CN111798228A - Bill processing method, device, server and storage medium - Google Patents

Bill processing method, device, server and storage medium Download PDF

Info

Publication number
CN111798228A
CN111798228A CN202010648467.2A CN202010648467A CN111798228A CN 111798228 A CN111798228 A CN 111798228A CN 202010648467 A CN202010648467 A CN 202010648467A CN 111798228 A CN111798228 A CN 111798228A
Authority
CN
China
Prior art keywords
bill
transaction
user
processing
request
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.)
Pending
Application number
CN202010648467.2A
Other languages
Chinese (zh)
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010648467.2A priority Critical patent/CN111798228A/en
Publication of CN111798228A publication Critical patent/CN111798228A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/22Payment schemes or models
    • G06Q20/24Credit schemes, i.e. "pay after"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/407Cancellation of a transaction

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a bill processing method, a bill processing device, a server and a storage medium, and belongs to the technical field of data processing. The bill processing method comprises the following steps: receiving a transaction processing request, wherein the transaction processing request carries a bill identification; determining a user bill corresponding to the bill identification; performing a process of obtaining a transaction lock of a user bill; if the transaction lock is successfully acquired, executing service processing corresponding to the transaction processing request; the transaction lock for the customer's bill is released. By adopting the method and the device, only one business process corresponding to the transaction processing request can be executed aiming at the same user bill at the same time, so that the possibility of payment failure is reduced.

Description

Bill processing method, device, server and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a server, and a storage medium for bill processing.
Background
Credit payment, as its name implies, refers to credit payment, which is a consumption mode of "first consumption and then payment". The credit payment service comprises main transaction processes of payment, goods return, refund and the like. And (4) billing the user during payment to generate a piece of borrowing data, and accumulating all the borrowing data of the user in the previous month on the next monthly expenditure date to generate a user bill. And when repayment is carried out, the user needs to be paid out and the bill of the user is settled. At the same time, the user's payment may result in a return, which requires the user to be billed. Refunding after a payment may also involve refunding the user.
In credit payment services, payment is the most complex part. Firstly, the repayment mode is various: the user can select active repayment after the payment, also can select advance repayment before the payment, and also can select automatic deduction repayment on the repayment date. Secondly, the interaction of active repayment is complex: and finally, after the service system receives the payment result, the bill of the user is subjected to processing such as payment account cancellation, line recovery and the like.
In the active repayment process of the user, concurrent operations on the same user bill such as automatic deduction, goods return and even active repayment may occur within the time from the time when the user enters the payment interface to operate the payment action to complete the payment action and the time when the user completes the payment action to notify the service system of the payment result, so that the amount of the user bill to be paid is changed, the amount of the user repayment payment is not equal to the amount of the user bill to be paid, and the condition that the user repayment fails occurs.
Disclosure of Invention
The embodiment of the application provides a bill processing method, a bill processing device, a server and a storage medium, and can solve the technical problems in the related art. The technical scheme of the bill processing method, the bill processing device, the bill processing server and the storage medium is as follows:
in a first aspect, a method for bill processing is provided, the method comprising:
receiving a transaction processing request, wherein the transaction processing request carries a bill identification, and the transaction processing request comprises an active repayment request and a refund request;
determining a user bill corresponding to the bill identification;
performing a process of obtaining a transaction lock of the user bill;
if the transaction lock is successfully acquired, performing business processing corresponding to the transaction processing request on the user bill;
releasing a transaction lock of the user bill.
In one possible implementation, the receiving a transaction processing request includes:
receiving an active repayment request sent by a user terminal;
the executing the business processing corresponding to the transaction processing request on the user bill comprises:
generating a prepayment bill corresponding to the transaction processing request;
sending the pre-payment order to the user terminal so that the user terminal executes payment processing through a payment platform based on the pre-payment order;
and when a payment success notice corresponding to the pre-payment order sent by the payment platform is received, executing account cancellation processing corresponding to the active repayment request on the bill of the user.
In a possible implementation manner, after the performing the process of obtaining the transaction lock of the user bill, the method further includes:
if the transaction lock fails to be acquired, generating prompt information for prompting the user to reinitiate the active repayment request after time delay;
and sending the prompt information to the user terminal.
In one possible implementation, the receiving a transaction processing request includes:
receiving a refund request sent by a refund platform;
the executing the business processing corresponding to the transaction processing request on the user bill comprises:
and executing account cancellation processing corresponding to the refund request on the bill of the user.
In a possible implementation manner, after the performing the process of obtaining the transaction lock of the user bill, the method further includes:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
In one possible implementation, the releasing the transaction lock of the user bill includes:
and releasing the transaction lock after the business processing corresponding to the transaction processing request is executed.
In one possible implementation, the releasing the transaction lock of the user bill includes:
and releasing the transaction lock after the duration of acquiring the transaction lock reaches a set duration.
In one possible implementation, the method further includes:
when the automatic repayment period corresponding to the user bill is reached, executing the processing of obtaining the transaction lock of the user bill;
if the transaction lock is successfully acquired, sending a deduction request to a payment platform;
when a deduction success notification sent by the payment platform is received, executing account cancellation processing corresponding to the deduction request on the bill of the user;
releasing a transaction lock of the user bill.
In a possible implementation manner, after the performing the process of obtaining the transaction lock of the user bill, the method further includes:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
In a second aspect, there is provided a bill processing apparatus, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a transaction processing request, the transaction processing request carries a bill identification, and the transaction processing request comprises an active repayment request and a refund request;
the determining module is used for determining a user bill corresponding to the bill identification;
an acquisition module for performing a process of acquiring a transaction lock of the user bill;
the execution module is used for executing the business processing corresponding to the transaction processing request if the transaction lock is successfully acquired;
and the release module is used for releasing the transaction lock of the user bill.
In a possible implementation manner, the receiving module is configured to:
receiving an active repayment request sent by a user terminal;
the execution module is configured to:
generating a prepayment bill corresponding to the transaction processing request;
sending the pre-payment order to the user terminal so that the user terminal executes payment processing through a payment platform based on the pre-payment order;
and when a payment success notice corresponding to the pre-payment order sent by the payment platform is received, executing account cancellation processing corresponding to the active repayment request on the bill of the user.
In a possible implementation manner, the apparatus further includes a prompting module, configured to:
if the transaction lock fails to be acquired, generating prompt information for prompting the user to reinitiate the active repayment request after time delay;
and sending the prompt information to the user terminal.
In a possible implementation manner, the receiving module is configured to:
receiving a refund request sent by a refund platform;
the execution module is configured to:
and executing account cancellation processing corresponding to the refund request on the bill of the user.
In a possible implementation manner, the execution module is further configured to:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
In one possible implementation manner, the releasing module is configured to:
and releasing the transaction lock after the business processing corresponding to the transaction processing request is executed.
In one possible implementation manner, the releasing module is configured to:
and releasing the transaction lock after the duration of acquiring the transaction lock reaches a set duration.
In a possible implementation manner, the obtaining module is further configured to:
when the automatic repayment period corresponding to the user bill is reached, executing the processing of obtaining the transaction lock of the user bill;
the apparatus further comprises a sending module configured to:
if the transaction lock is successfully acquired, sending a deduction request to a payment platform;
the execution module is further configured to:
when a deduction success notification sent by the payment platform is received, executing account cancellation processing corresponding to the deduction request on the bill of the user;
the release module is configured to:
releasing a transaction lock of the user bill.
In a possible implementation manner, the execution module is further configured to:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
In a third aspect, a server is provided, which includes a memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method of bill processing according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein at least one instruction, which is loaded and executed by a processor to implement the method of billing as described in the first aspect.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
according to the bill processing method provided by the embodiment of the application, before the business processing corresponding to the transaction processing request is executed, the transaction lock of the user bill corresponding to the transaction processing request is obtained, and the business processing corresponding to the transaction processing request is executed only when the transaction lock is successfully obtained, so that only one business processing can be executed for one user bill at the same time. In the active repayment process of the user, the amount of money to be paid of the user bill cannot change, and the amount of money to be paid of the user bill is consistent with the amount of money to be paid of the user bill, so that the possibility of payment failure is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for bill processing according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a bill processing apparatus according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a server provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of a payment interface provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of another payment interface provided by embodiments of the present application;
FIG. 6 is a schematic diagram of another payment interface provided by embodiments of the present application;
FIG. 7 is a schematic diagram of another payment interface provided by embodiments of the present application;
FIG. 8 is a flowchart of an active payment service process provided by an embodiment of the present application;
FIG. 9 is a flow chart of a refund transaction process provided by an embodiment of the present application;
fig. 10 is a flowchart of a deduction agency service process according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application provides a bill processing method, which can be implemented by a server, wherein the server can be a single server or a server cluster, and the single server and the server cluster can also be referred to as a transaction processing system.
In practical applications, a user may download an application program on a terminal that can make a credit payment, and then, may make a purchase using a credit payment function. After payment by credit, the user needs to make a payment before or on the day of the payment. During repayment, the user can select active repayment before the repayment date, also can select active repayment on the repayment date, also can select automatic withholding repayment on the repayment date, and need carry out account cancellation processing on the user bill after repayment. In addition, sometimes the user may pay off the purchased goods after shopping, and at this time, the user bill also needs to be subjected to corresponding account cancellation processing. It can be seen that, in the above service processing of the user bill, at least active payment service processing, withholding payment service processing, and refund service processing are included, and in order to avoid performing multiple service processing on the user bill at the same time, the method provided in the embodiment of the present application may be adopted.
As shown in fig. 1, the process flow of the method of bill processing may include the following steps:
in step 101, a transaction processing request is received.
The transaction processing request carries a bill identification, and comprises an active repayment request and a refund request. The transaction processing request may also carry a repayment amount or a refund amount.
In practice, the transaction processing request may be an active payment request or a refund request. The active payment request is triggered by the operation of a user on a user terminal, and the refund request is automatically sent by a refund platform (also called a refund platform) after the user operates and finishes the refund on the user terminal, and the specific process can be divided into the following two cases:
in the first case, the transaction processing request is an active repayment request, and then the active repayment request sent by the user terminal is received.
In implementation, the user may select active payment, wherein the active payment may be active payment before the payment date, active payment on the payment date, or active payment after an overdue date.
When the user actively repays, the user firstly opens an application program for credit payment, then enters a repayment interface (also called a cash register) to complete corresponding operation, the user terminal sends an active repayment request to the server, and the server can receive the active repayment request sent by the user terminal.
For example, the user selects the bill to be paid at the user terminal, and as shown in fig. 4, if the user selects the bill not to be paid, it indicates that the user selects to actively pay before the payment date. In the payment interface shown in fig. 4, contents such as bill particulars are also displayed. Then, the user clicks the advance payment, that is, the payment interface shown in fig. 5 can be entered, then, the user can click the immediate payment, that is, the user terminal can send an active payment request to the server, and in the payment interface shown in fig. 5, the user can also adjust the amount of the payment.
In the second case, the transaction processing request is a refund request, and the refund request sent by the refund platform is received.
In practice, the user may also refund the goods purchased by using the credit payment, and at this time, the user may operate at the user terminal, so that the user terminal sends a goods refund request to the refund platform, and the refund platform may perform business processing related to the goods refund request. After the refund platform completes execution, the refund platform sends a refund request to the server, and then the server can receive the refund request sent by the refund platform.
In step 102, it is determined that the bill identifies a corresponding user bill.
In implementation, after receiving the transaction processing request, the bill identifier carried in the transaction processing request may be obtained through parsing. And then, determining the corresponding user bill according to the bill identification.
In step 103, a process of acquiring a transaction lock of a user bill is performed.
Because a plurality of business processes can be executed by different machines and different processes, the transaction lock can be a distributed lock, and different business processes can share one lock.
In implementation, the process of acquiring the transaction lock of the user bill, that is, the process of locking the user bill. If the transaction lock for obtaining the user bill is successfully obtained, namely the user bill is successfully locked, and after the user bill is successfully locked, only the business processing corresponding to the transaction processing request can be executed for the user bill. If the transaction lock for obtaining the user bill fails to be obtained, it indicates that the user bill is locked by the business processing at this time, and the business processing corresponding to the transaction processing request needs to be executed in a delayed manner.
In step 104, if the transaction lock is successfully acquired, the business process corresponding to the transaction processing request is executed.
In implementation, after the transaction lock is successfully acquired, the service process corresponding to the transaction processing request may be executed, specifically, the executed service process is different according to the difference of the transaction processing request, and the following description is divided into two cases.
In the first case, when the transaction processing request is an active payment request, the service processing executed may be as follows: and generating a prepayment bill corresponding to the transaction processing request. And sending the prepayment sheet to the user terminal so that the user terminal executes payment processing through the payment platform based on the prepayment sheet. And when a payment success notice corresponding to the pre-payment order sent by the payment platform is received, executing account cancellation processing corresponding to the active payment request on the bill of the user.
In implementation, a corresponding pre-payment bill can be generated according to the identification of the user bill and the payment amount carried in the active payment request. Then, the pre-payment ticket is transmitted to the user terminal.
As shown in fig. 6, the user terminal receives and displays a prepaid bill in which remaining payment time, payment amount, payment method, and the like are displayed. The user may select a certain payment method and then click to confirm the payment. The user terminal sends a payment message to the payment platform corresponding to the payment mode, and the payment platform deducts the corresponding repayment amount from the account corresponding to the user, so that the payment is successful.
After the payment is successful, the payment platform sends a payment success notice to the server, and the server can execute account cancellation processing corresponding to the active payment request. The payment success notification may also carry a payment amount.
In a possible implementation manner, if the acquisition of the transaction lock fails, prompt information for prompting the user to reinitiate the active repayment request after time delay is generated, and the prompt information is sent to the user terminal.
Wherein the prompt message may be as shown in fig. 5.
In implementation, after the user terminal receives the prompt message, the prompt message may be displayed. In a possible implementation manner, a time length required to be delayed may be displayed in the prompt message, and if the acquisition of the transaction lock fails, the remaining effective time length of the transaction lock may be acquired, and a prompt message for prompting the delayed remaining effective time length may be sent to the user terminal, for example, the prompt message may be "give please make a repayment attempt again after several minutes and several seconds". Therefore, the user can timely reinitiate the active repayment request.
Or, in another possible implementation manner, if the acquisition of the transaction lock fails, sending a prompt message for prompting a delay set time length to the user terminal, where the set time length should be greater than the effective time length of the transaction lock. Therefore, the processing logic of the server is simplified, and the computing resources are saved.
In the second case, when the transaction processing request is a refund request, the service processing executed may be as follows: and executing account cancellation processing corresponding to the refund request on the bill of the user.
In implementation, the refund request may carry an identifier of a user bill and a refund amount, and when executing the cancellation processing corresponding to the refund request, the user bill may be subjected to the cancellation processing with an amount equal to the refund amount, and a credit payment amount equal to the refund amount is restored for the user.
In one possible implementation, if the acquisition of the transaction lock fails, a remaining effective duration of the transaction lock may be determined. And after delaying the residual effective time, executing the processing of obtaining the transaction lock of the bill of the user again. After the obtaining is successful, the account cancellation processing corresponding to the refund request can be executed on the bill of the user.
In implementation, when the transaction lock is acquired, if the acquisition fails, the ongoing service processing and the remaining effective duration of the transaction lock may also be acquired. And then, after delaying the remaining effective time, executing the processing of obtaining the transaction lock of the bill of the user again. Wherein the remaining effective duration of the transaction lock is equal to the effective duration of the transaction lock minus the used duration of the transaction lock. The effective time of the transaction lock acquired by different service processing may be the same or different, and the application does not limit this.
By determining the remaining effective time of the transaction lock and immediately re-executing the processing of the transaction lock for acquiring the bill of the user after delaying the remaining effective time, the business processing corresponding to the refund request can be executed as soon as possible.
In another possible implementation, if the acquisition of the transaction lock fails, the process of acquiring the transaction lock of the user bill may be performed again after delaying the target time period. And after the obtaining is successful, the business processing corresponding to the refund request can be executed on the bill of the user.
The target duration should be longer than the effective duration of the transaction lock acquired by each service processing.
In implementation, after the transaction lock acquisition fails, the processing of acquiring the transaction lock of the user bill can be executed again after the target time length is delayed directly, and the remaining effective time length does not need to be determined. Thus, the processing logic of the server is reduced.
In step 105, the transaction lock for the customer's bill is released.
In implementation, after the business process corresponding to the transaction processing request is executed, the transaction lock needs to be released, so as to execute the rest business processes for the user bill, and the specific process may be as follows:
in a possible implementation manner, after the service processing corresponding to the service processing request is executed, the transaction lock may be released immediately, so that the rest of the service processing can be executed in time.
In another possible implementation manner, if the transaction lock is successfully acquired and the time length for acquiring the transaction lock reaches the set time length, the transaction lock is released.
The set duration may also be referred to as an effective duration, and the set durations corresponding to different service processes may be the same or different.
In practice, sometimes after the transaction lock is acquired, the corresponding business process may not be executed and completed. If it is only envisaged that the transaction lock will be released after the transaction is completed, the transaction lock may not be released at all times in this case. In order to release the transaction lock under such a condition, a set time length may be set, and when the time length for acquiring the transaction lock by a certain service process reaches the set time length, the transaction lock is released regardless of whether the service process is executed or not.
It should be further noted that, when the automatic repayment period corresponding to the bill of the user is reached, the server may further automatically perform deduction-behalf service processing, and then the corresponding processing procedure may be as follows: and when the automatic repayment period corresponding to the bill of the user is reached, executing the processing of obtaining the transaction lock of the bill of the user. And if the transaction lock is successfully acquired, sending a deduction request to the payment platform. And when receiving a deduction success notice sent by the payment platform, executing account cancellation processing corresponding to the deduction request on the bill of the user.
In implementation, if the user does not pay in advance, the server can automatically perform withholding service processing when the payment date is reached. Specifically, when an automatic repayment period corresponding to the bill of the user is reached, a transaction lock of the bill of the user is obtained firstly, and if the transaction lock is obtained successfully, a deduction request is sent to the payment platform.
The deduction request may carry a deduction amount and a deduction account, and the payment platform may deduct the corresponding deduction amount from the deduction account. If the deduction is successful, a deduction success notification can be sent to the server, and the deduction success notification can also carry corresponding deduction amount. After receiving the deduction success notice sent by the payment platform, the user bill can be subjected to account cancellation processing with the amount equal to the deduction amount.
In one possible implementation, if the acquisition of the transaction lock fails, the remaining effective duration of the transaction lock is determined, and the processing of acquiring the transaction lock of the user bill is executed again after delaying the remaining effective duration.
In addition, after the account cancellation process corresponding to the deduction request is executed, the transaction lock needs to be released so as to execute the rest business processes for the user bill, and the specific process may be as follows:
in one possible implementation, after the accounting process corresponding to the deduction request is performed on the bill of the user, the transaction lock is released, so that the rest of business processes can be performed in time.
In another possible implementation manner, if the transaction lock is successfully acquired and the time length for acquiring the transaction lock reaches the set time length, the transaction lock is released.
The set duration may also be referred to as an effective duration, and the set durations corresponding to different service processes may be the same or different.
In practice, sometimes after the transaction lock is acquired, the corresponding business process may not be executed and completed. If it is only envisaged that the transaction lock will be released after the transaction is completed, the transaction lock may not be released at all times in this case. In order to release the transaction lock under such a condition, a set duration may be set, and when the duration for acquiring the transaction lock by a certain service process reaches the set duration, the transaction lock is released no matter the service process release is completed.
According to the bill processing method provided by the embodiment of the application, the transaction lock of the user bill corresponding to the transaction processing request is acquired before the business processing corresponding to the transaction processing request is executed, and the business processing corresponding to the transaction processing request is executed only when the transaction lock is acquired successfully, so that only one business processing can be performed on one user bill at the same time, and the possibility of payment failure is reduced.
In addition, on the user experience, the probability of successful repayment of the user is improved, the probability of complaint of the user is reduced, the probability of initiative payment initiated by the user again is also reduced, and the operation cost of the user is reduced.
In the aspect of service processing, the number of refund cases needing to be processed by a service system and customer service is reduced, and the operation and maintenance cost and the manual processing cost of the system are reduced.
The flow of the three kinds of business processes will be described in detail with reference to the accompanying drawings.
As shown in fig. 8, a processing flow of the active payment request service is as follows:
(1) receiving an active repayment request;
(2) acquiring a transaction lock;
(3) and if the acquisition fails, sending prompt information to the user terminal, and if the acquisition succeeds, generating a pre-payment list and sending the pre-payment list to the user terminal.
(4) And receiving a payment success notice sent by the payment platform.
(5) Executing corresponding account cancellation processing;
(6) the transaction lock is released over time.
As shown in fig. 9, it is a refund business processing flow:
(1) receiving a refund request;
(2) acquiring a transaction lock;
(3) if the acquisition fails, the processing of acquiring the transaction lock is initiated again after time delay, and if the acquisition succeeds, corresponding account cancellation processing is executed.
(4) And releasing the transaction lock after executing the account cancellation processing.
As shown in fig. 10, for the deduction service processing flow:
(1) when the automatic repayment period is reached, acquiring a transaction lock;
(2) if the acquisition fails, the processing of acquiring the transaction lock is initiated again after time delay, and if the acquisition succeeds, a deduction request is sent to the refund platform;
(3) receiving a deduction success notice sent by a refund platform;
(4) executing corresponding account cancellation processing;
(5) and releasing the transaction lock after the account cancellation processing is completed.
In addition, if a deduction failure notification sent by the refund platform is received, for example, due to insufficient user accounts, the transaction lock may be released directly.
In summary, the present application comprehensively considers three business processing flows of active repayment, withholding and refund, and splits each business processing flow into three stages: acquiring a transaction lock, executing corresponding service processing and releasing the transaction lock. Specifically, before entering the business process, the transaction lock of the user bill is acquired first, and the successful acquisition of the lock means that the right to modify the user bill is obtained. Then, business processing is entered, and the amount processing and modification of the bill are operated. And finally, releasing the transaction lock after the modification is completed so that other business processing flows can acquire the transaction lock and perform other business processing on the bill of the user.
Based on the same technical concept as the method for processing the bill, the embodiment of the present application further provides a device for processing the bill, where the device may be a server, as shown in fig. 2, and the device includes:
the receiving module 201 is configured to receive a transaction processing request, where the transaction processing request carries a bill identifier, and the transaction processing request includes an active repayment request and a refund request;
the determining module 202 is configured to determine a user bill corresponding to the bill identification;
an obtaining module 203, configured to perform processing of obtaining a transaction lock of a user bill;
the execution module 204 is configured to execute service processing corresponding to the transaction processing request if the transaction lock is successfully acquired;
a release module 205 for releasing a transaction lock of the user bill.
In a possible implementation manner, the receiving module 201 is configured to:
receiving an active repayment request sent by a user terminal;
an execution module 204, configured to:
generating a prepayment bill corresponding to the transaction processing request;
sending a pre-payment order to the user terminal so that the user terminal executes payment processing through the payment platform based on the pre-payment order;
and when a payment success notice corresponding to the pre-payment order sent by the payment platform is received, executing account cancellation processing corresponding to the active payment request on the bill of the user.
In one possible implementation manner, the apparatus further includes a prompting module, configured to:
if the transaction lock fails to be acquired, generating prompt information for prompting the user to reinitiate the active repayment request after time delay;
and sending prompt information to the user terminal.
In a possible implementation manner, the receiving module 201 is configured to:
receiving a refund request sent by a refund platform;
an execution module 204, configured to:
and executing account cancellation processing corresponding to the refund request on the bill of the user.
In a possible implementation manner, the execution module 204 is further configured to:
if the transaction lock fails to be acquired, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the bill of the user again.
In one possible implementation, the releasing module 205 is configured to:
and releasing the transaction lock after the business processing corresponding to the transaction processing request is executed.
In one possible implementation, the releasing module 205 is configured to:
and releasing the transaction lock after the duration of acquiring the transaction lock reaches the set duration.
In a possible implementation manner, the obtaining module 203 is further configured to:
when the automatic repayment period corresponding to the bill of the user is reached, executing the processing of obtaining the transaction lock of the bill of the user;
the apparatus further comprises a sending module configured to:
if the transaction lock is successfully acquired, sending a deduction request to the payment platform;
the execution module 204 is further configured to:
when a deduction success notice sent by the payment platform is received, executing expenditure processing corresponding to the deduction request on the bill of the user;
a release module 205 to:
the transaction lock for the customer's bill is released.
In a possible implementation manner, the execution module 204 is further configured to:
if the transaction lock fails to be acquired, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the bill of the user again.
With regard to the apparatus in the above-described embodiment, the specific manner in which the respective modules perform operations has been described in detail in the embodiment of the method of bill processing, and will not be elaborated upon here.
It should be noted that: in the above embodiment, when performing the bill processing, the device for processing a bill is only illustrated by dividing and executing the functional modules, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the bill processing apparatus and the bill processing method provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the bill processing method embodiment, and are not described herein again.
Fig. 3 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 300 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 301 and one or more memories 302, where the memory 302 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 301 to implement the method for billing processing.
In an exemplary embodiment, a computer-readable storage medium is further provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the method for bill processing in the above-described embodiments. For example, the computer-readable storage medium may be a ROM (Read-Only Memory), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A method of bill processing, the method comprising:
receiving a transaction processing request, wherein the transaction processing request carries a bill identification, and the transaction processing request comprises an active repayment request and a refund request;
determining a user bill corresponding to the bill identification;
performing a process of obtaining a transaction lock of the user bill;
if the transaction lock is successfully acquired, performing business processing corresponding to the transaction processing request on the user bill;
releasing a transaction lock of the user bill.
2. The method of claim 1, wherein receiving a transaction processing request comprises:
receiving an active repayment request sent by a user terminal;
the executing the business processing corresponding to the transaction processing request on the user bill comprises:
generating a prepayment bill corresponding to the transaction processing request;
sending the pre-payment order to the user terminal so that the user terminal executes payment processing through a payment platform based on the pre-payment order;
and when a payment success notice corresponding to the pre-payment order sent by the payment platform is received, executing account cancellation processing corresponding to the active repayment request on the bill of the user.
3. The method of claim 2, wherein after the performing the process of obtaining the transaction lock for the user bill, further comprises:
if the transaction lock fails to be acquired, generating prompt information for prompting the user to reinitiate the active repayment request after time delay;
and sending the prompt information to the user terminal.
4. The method of claim 1, wherein receiving a transaction processing request comprises:
receiving a refund request sent by a refund platform;
the executing the business processing corresponding to the transaction processing request on the user bill comprises:
and executing account cancellation processing corresponding to the refund request on the bill of the user.
5. The method of claim 4, wherein after the performing the process of obtaining the transaction lock for the user bill, further comprises:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
6. The method of any of claims 1-5, wherein releasing the transaction lock of the user bill comprises:
and releasing the transaction lock after the business processing corresponding to the transaction processing request is executed.
7. The method of any of claims 1-5, wherein releasing the transaction lock of the user bill comprises:
and releasing the transaction lock after the duration of acquiring the transaction lock reaches a set duration.
8. The method of claim 1, further comprising:
when the automatic repayment period corresponding to the user bill is reached, executing the processing of obtaining the transaction lock of the user bill;
if the transaction lock is successfully acquired, sending a deduction request to a payment platform;
when a deduction success notification sent by the payment platform is received, executing account cancellation processing corresponding to the deduction request on the bill of the user;
releasing a transaction lock of the user bill.
9. The method of claim 8, wherein after the performing the process of obtaining the transaction lock for the user bill, further comprises:
if the acquisition of the transaction lock fails, determining the remaining effective duration of the transaction lock;
and after delaying the residual effective time, executing the processing of obtaining the transaction lock of the user bill again.
10. An apparatus for bill processing, the apparatus comprising:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a transaction processing request, the transaction processing request carries a bill identification, and the transaction processing request comprises an active repayment request and a refund request;
the determining module is used for determining a user bill corresponding to the bill identification;
an acquisition module for performing a process of acquiring a transaction lock of the user bill;
the execution module is used for executing the business processing corresponding to the transaction processing request if the transaction lock is successfully acquired;
and the release module is used for releasing the transaction lock of the user bill.
11. A server, comprising a memory and a processor, the memory having stored therein at least one instruction, the at least one instruction being loaded and executed by the processor to implement the method of billing according to any of claims 1-9.
12. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to implement the method of billing processing of any of claims 1-9.
CN202010648467.2A 2020-07-07 2020-07-07 Bill processing method, device, server and storage medium Pending CN111798228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010648467.2A CN111798228A (en) 2020-07-07 2020-07-07 Bill processing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010648467.2A CN111798228A (en) 2020-07-07 2020-07-07 Bill processing method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111798228A true CN111798228A (en) 2020-10-20

Family

ID=72811377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010648467.2A Pending CN111798228A (en) 2020-07-07 2020-07-07 Bill processing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111798228A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113112344A (en) * 2021-04-21 2021-07-13 京东数科海益信息科技有限公司 Business processing method, device, storage medium and computer program product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113112344A (en) * 2021-04-21 2021-07-13 京东数科海益信息科技有限公司 Business processing method, device, storage medium and computer program product
CN113112344B (en) * 2021-04-21 2024-04-09 京东科技信息技术有限公司 Service processing method, device, storage medium and computer program product

Similar Documents

Publication Publication Date Title
CN109961365B (en) Account receiving record processing method and system based on block chain intelligent contract
US20120036045A1 (en) Methods and Systems for Reserving and Completing Purchases
CN107133788B (en) Refund processing method and device
CN110910230A (en) Accounting method, accounting system and storage medium
CN109426955B (en) Target object providing method, device and system
CN113194419B (en) User locking method and system based on 5G message and face recognition
CN112330316A (en) Payment service processing method and device and machine-readable storage medium
CN116703389A (en) Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment
CN111798228A (en) Bill processing method, device, server and storage medium
CN110689394B (en) Method and device for processing service supplementary notes
JP3162023B2 (en) Electronic money system, cashless transaction method, payment terminal, and recording medium
CN114202334A (en) Method and system suitable for asynchronously updating balance of hotspot account in batch
CN113259873B (en) 5G message-based card change reservation method and system and bank terminal
CN112334937A (en) Refund method, transaction system, account system and storage medium
KR20050091203A (en) Credit payment processing method
CN111796854B (en) Module hot upgrading method and device, electronic equipment and readable storage medium
CN111192113A (en) Order processing method, device, equipment and storage medium
CN115345750A (en) Data processing method, device, equipment and medium
CN114202331A (en) Fund management method, device, equipment and program product
CN116468551A (en) Financial business management method, system, computer and readable storage medium
CN117455675A (en) Data processing method and device for same-industry deposit, terminal equipment and medium
CN113763141A (en) Settlement method, settlement device, electronic equipment and storage medium
CN114298652A (en) Method and device for establishing enterprise overdraft business, computer equipment and storage medium
CN115496581A (en) Account amount transferring method and device
CN115809922A (en) Data processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201020

WD01 Invention patent application deemed withdrawn after publication