Non-final-state order processing method and device
By periodically acquiring and distributing sets of non-final state orders and updating order priorities, the problem of low processing efficiency for non-final state orders is solved, achieving efficient utilization of computing resources and improving order processing efficiency.
Patent Information
- Application Number
- CN202511334067.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-01-20
AI Technical Summary
In the business process of order processing in financial institutions, non-final orders suffer from low processing efficiency due to anomalies in payment channels. Existing technologies cannot effectively resolve this issue through multiple queries, which affects the system's normal order processing for other channels.
By periodically obtaining a set of non-final orders based on updated order priorities and distributing them one by one to downstream servers, recording the distribution time and processing results, updating order priorities, and utilizing computing resources to optimize the processing of non-final orders.
It improves the processing efficiency of non-final state orders, reduces the consumption of computing resources, and enhances the overall efficiency of order processing.
Smart Images

Figure CN121366017A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a non-terminal state order processing method and device. BACKGROUND
[0002] In the business process of processing orders in a financial institution, many payment channels need to be involved, so that the order processing chain is long. As long as one of the chain nodes does not process the order business, the subsequent chain nodes cannot continue to process the order business, thereby affecting the order processing efficiency. The terminal state of the order can include an order processing success state and an order processing failure state. The order in the order processing failure state usually needs manual intervention for processing. The intermediate order state that does not belong to the order processing success state and the order processing failure state can be collectively referred to as a non-terminal state. The corresponding order is a non-terminal state order.
[0003] The prior art processes the non-terminal state order multiple times by continuously calling the business processing system of the payment channel. When some payment channels cannot normally feedback the order state due to holidays, system maintenance, etc., multiple queries of these orders are a waste of effort. A large number of orders of this channel will cause the system to process other channels' normal returnable terminal state orders inefficiently. SUMMARY
[0004] In view of the problems in the prior art, the embodiments of the present application provide a non-terminal state order processing method and device, which can at least partially solve the problems in the prior art.
[0005] In one aspect, the present application provides a non-terminal state order processing method, comprising:
[0006] Periodically acquiring a non-terminal state order set with an order quantity equal to an error processing number according to an updated order priority, distributing each non-terminal state order in the non-terminal state order set to a downstream server one by one, and recording an order distribution time corresponding to each non-terminal state order respectively;
[0007] Receiving a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and updating an order processing number;
[0008] Updating the order priority according to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to the current time.
[0009] Among them, the periodically acquiring a non-terminal state order set with an order quantity equal to an error processing number according to an updated order priority comprises:
[0010] According to the updated order priority, the non-terminal state order quantity equal to the error processing quantity is obtained from the error processing table;
[0011] The non-terminal state order whose order distribution time is between the earliest error processing time and the latest error processing time and which does not exist data duplication in the error processing table is obtained from the order table, and the non-terminal state order set is formed.
[0012] The non-terminal state order processing method further comprises:
[0013] When each non-terminal state order in the non-terminal state order set is distributed to the downstream server one by one, the time interval between adjacent two non-terminal state orders is controlled according to the error processing distribution sleep time;
[0014] The error processing distribution sleep time is calculated according to the following formula:
[0015] The error processing distribution sleep time = the average response time / (the number of downstream servers*the number of thread pool threads).
[0016] The processing result of each non-terminal state order received by the downstream server according to the order state query result of the downstream system is fed back, and the order processing times is updated, comprising:
[0017] If it is determined that the processing result fed back by the downstream server according to the first order state query result of the downstream system is the first processing result, the order processing times is added by 1;
[0018] The first order state query result is the query result of the order state being a non-terminal state, and the first processing result is the processing result corresponding to the first order state query result.
[0019] The non-terminal state order processing method further comprises:
[0020] If it is determined that the processing result fed back by the downstream server according to the second order state query result of the downstream system is the second processing result, the order record of the second processing result is deleted from the error processing table;
[0021] The second order state query result is the query result of the order state being a terminal state, and the second processing result is the processing result corresponding to the second order state query result.
[0022] The non-terminal state order processing method further comprises:
[0023] The error processing quantity is calculated according to the following formula:
[0024] The error processing number of times = error processing task execution interval time / the error processing distribution sleep time.
[0025] In one aspect, the application provides a non-terminal state order processing device comprising:
[0026] An acquisition unit is configured to periodically acquire a set of non-terminal state orders with an order quantity equal to the error processing number of times according to the updated order priority, distribute each non-terminal state order in the set of non-terminal state orders to a downstream server one by one, and record an order distribution time corresponding to each non-terminal state order respectively;
[0027] A first updating unit is configured to receive a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and update an order processing number of times;
[0028] A second updating unit is configured to update the order priority according to the order distribution time, the order processing number of times, an order service type corresponding to each non-terminal state order respectively, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time.
[0029] In another aspect, the application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following method when executing the computer program:
[0030] Periodically acquire a set of non-terminal state orders with an order quantity equal to the error processing number of times according to the updated order priority, distribute each non-terminal state order in the set of non-terminal state orders to a downstream server one by one, and record an order distribution time corresponding to each non-terminal state order respectively;
[0031] Receive a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and update an order processing number of times;
[0032] Update the order priority according to the order distribution time, the order processing number of times, an order service type corresponding to each non-terminal state order respectively, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time.
[0033] The application provides a computer readable storage medium comprising:
[0034] The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following method:
[0035] According to the updated order priority, a non-terminal state order set with an order quantity equal to an error processing number is periodically acquired, each non-terminal state order in the non-terminal state order set is distributed to a downstream server one by one, and an order distribution time corresponding to each non-terminal state order is recorded;
[0036] A processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing number is updated;
[0037] According to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, the order priority is updated.
[0038] The embodiment of the application further provides a computer program product, the computer program product comprising a computer program, the computer program being executed by a processor to implement the following method:
[0039] According to the updated order priority, a non-terminal state order set with an order quantity equal to an error processing number is periodically acquired, each non-terminal state order in the non-terminal state order set is distributed to a downstream server one by one, and an order distribution time corresponding to each non-terminal state order is recorded;
[0040] A processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing number is updated;
[0041] According to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, the order priority is updated.
[0042] The non-terminal state order processing method and device provided by the embodiment of the application can periodically acquire a non-terminal state order set with an order quantity equal to an error processing number according to an updated order priority, distribute each non-terminal state order in the non-terminal state order set to a downstream server one by one, record an order distribution time corresponding to each non-terminal state order, receive a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, update an order processing number, and update the order priority according to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, so that the non-terminal state order processing processing efficiency can be improved by fully utilizing the computing resources. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor. In the drawings:
[0044] Figure 1 is a flowchart of the non-terminal state order processing method provided by an embodiment of the present application.
[0045] Figure 2 is a structural diagram of the non-terminal state order processing device provided by an embodiment of the present application.
[0046] Figure 3 is a computer device entity structure diagram provided by an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the following will further describe the embodiments of the present application in combination with the drawings. Herein, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but not as a limitation of the present application. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other at will.
[0048] Related term explanation:
[0049] Error processing number: the number of non-terminal state orders processed each time.
[0050] Error processing upper limit: the upper limit of the number of times that a non-terminal state order fails to be successfully updated to a terminal state.
[0051] Error processing latest time: a time point in the past from the current time as a reference, as the time end point of obtaining a non-terminal state order. For example, the current time is May 20, 10:00, and the error processing latest time is May 19, 10:00.
[0052] Error processing earliest time: a time point in the past from the current time as a reference, as the time start point of obtaining a non-terminal state order. For example, the current time is May 20, 10:00, and the error processing earliest time is May 18, 10:00.
[0053] Figure 1 is a flowchart of the non-terminal state order processing method provided by an embodiment of the present application, as shown in Figure 1 The non-terminal state order processing method provided by the embodiment of the present application includes:
[0054] Step S1: periodically acquire a non-terminal order set with an order quantity equal to the error processing number according to the updated order priority, distribute each non-terminal order in the non-terminal order set to the downstream server one by one, and record the order distribution time corresponding to each non-terminal order respectively.
[0055] Step S2: receive the processing result of each non-terminal order fed back by the downstream server according to the order state query result of the downstream system, and update the order processing times.
[0056] Step S3: update the order priority according to the order distribution time, the order processing times, the order business type corresponding to each non-terminal order respectively, and the average response time of the payment channel responding to the corresponding non-terminal order within the preset time length adjacent to the current time.
[0057] In the above step S1, the device periodically acquires a non-terminal order set with an order quantity equal to the error processing number according to the updated order priority, distributes each non-terminal order in the non-terminal order set to the downstream server one by one, and records the order distribution time corresponding to each non-terminal order respectively. The device can be a computer device executing the method, and specifically can be the most upstream server in the payment channel. In the technical solution of the present application, the acquisition, storage, use, processing, etc. of data all comply with relevant regulations. The time period for periodically acquiring a non-terminal order set with an order quantity equal to the error processing number can be understood as the time period for executing the method, that is, the error processing task execution interval time, and the error processing number processed each time constitutes an error processing task, and the time interval between adjacent two error processing tasks is the error processing task execution interval time.
[0058] The periodically acquiring a non-terminal order set with an order quantity equal to the error processing number according to the updated order priority comprises:
[0059] According to the updated order priority, a non-terminal order set with an order quantity equal to the error processing number is acquired from the error processing table. The error processing table can record order attributes such as order serial number, order business type field, and order distribution time. The order distribution time can be understood as the order distribution time of the non-terminal order sent from the most upstream server, which can be sent directly from the most upstream server to the downstream server, or the non-terminal order can be forwarded from the most upstream server to the downstream server by using a message middleware.
[0060] According to the priority field, the non-terminal orders with the highest priority and the number equal to the error processing number are taken out from the error processing table.
[0061] The order distribution time of each order in the order table is obtained between the earliest error processing time and the latest error processing time, and the non-terminal state orders without data duplication in the error processing table are obtained, and the non-terminal state order set is formed. The earliest error processing time and the latest error processing time can be used as the time condition of order processing, and the non-terminal state orders without data duplication in the error processing table can be found by comparing the order serial numbers in the order table and the error processing table. Since the non-terminal state orders in the error processing table are dynamically changed, the de-duplicated non-terminal state orders can be accurately obtained from the order table, so that each non-terminal state order in the non-terminal state order set is different from the non-terminal state order in the error processing table.
[0062] The non-terminal state order processing method further comprises:
[0063] When each non-terminal state order in the non-terminal state order set is distributed to the downstream server one by one, the time interval between adjacent two non-terminal state orders is controlled according to the error processing distribution sleep time;
[0064] The error processing distribution sleep time is calculated according to the following formula:
[0065] The error processing distribution sleep time = the average response time / (the number of downstream servers x the number of thread pool threads).
[0066] The number of downstream servers can be the number of servers that can process tasks in parallel at the next level of the uppermost server. If the number of downstream servers is larger, it means that the number of servers that can process tasks in parallel is larger, and the order processing efficiency is higher. If the number of downstream servers is smaller, it means that the number of servers that can process tasks in parallel is smaller, and the order processing efficiency is lower.
[0067] The number of thread pool threads is the number of threads that can process tasks in parallel corresponding to the above-mentioned downstream servers. If the number of thread pool threads is larger, it means that the number of threads that can process tasks in parallel is larger, and the order processing efficiency is higher. If the number of thread pool threads is smaller, it means that the number of threads that can process tasks in parallel is smaller, and the order processing efficiency is lower.
[0068] The average response time is the average response time of the payment channel to the non-terminal state order within a preset time period adjacent to the current time. The preset time period can be 30 minutes. If the current time is 10:00, the preset time period adjacent to the current time is 9:30-10:00. The payment channel refers to a downstream system of the downstream server. Taking the downstream system as an example, referring to the above example, the payment channel is the uppermost server-downstream server-downstream system. If there are multiple downstream systems, the downstream system can be further connected. Taking the payment channel as three chain nodes as an example, if a non-terminal state order is C1, the response time of the uppermost server to it is t1, the response time of the downstream server to it is t2, and the response time of the downstream system to it is t3, then the average response time is (t1+t2+t3) / 3. The preset time period should be set according to the time to ensure that all chain nodes in the payment channel have enough time to process non-terminal state orders. Through the above formula, the error processing distribution sleep time can be reasonably set, so as to reasonably control the time interval between adjacent two non-terminal state orders.
[0069] In step S2, the device receives the processing result of each non-terminal state order fed back by the downstream server according to the order state query result of the downstream system, and updates the order processing times. The receiving the processing result of each non-terminal state order fed back by the downstream server according to the order state query result of the downstream system, and updating the order processing times, comprises:
[0070] If it is determined that the processing result fed back by the downstream server according to the first order state query result of the downstream system is the first processing result, the order processing times is increased by 1;
[0071] The first order state query result is a query result of an order state being a non-terminal state, and the first processing result is a processing result corresponding to the first order state query result.
[0072] The non-terminal state order processing method further comprises:
[0073] If it is determined that the processing result fed back by the downstream server according to the second order state query result of the downstream system is the second processing result, the order record of the second processing result is deleted from the error processing table;
[0074] The second order state query result is a query result of an order state being a terminal state, and the second processing result is a processing result corresponding to the second order state query result.
[0075] After the distribution is completed, the order attribute information can be updated or newly added to the error processing table. If it is found that the order serial number exists in the error processing table, the order distribution time of the non-terminal state order is updated to the current time. If it is found that the serial number does not exist in the error processing table, the order attribute information is newly added, including recording the serial number, business type and other fields, and the distribution time is recorded as the current time. The subsequent update of the order priority can be calculated according to the record information in the error processing table.
[0076] Each downstream server can receive the non-terminal state order distributed by the message middleware and use a thread pool for asynchronous processing. The state of the non-terminal state order is queried, and if the order is a non-terminal state order, the state of the non-terminal state order is queried from the downstream system. If the order query returns a terminal state, the order state is updated to a terminal state, and the subsequent processing logic of the corresponding terminal state order is performed. After the processing is completed, the record of the non-terminal state order in the error processing table is deleted, indicating that the non-terminal state order has been processed. The downstream system can feed back the order state query result to the downstream server. If it is the first order state query result, that is, the query result of the order state being a non-terminal state, the order processing number is increased by 1. If it is the second order state query result, that is, the query result of the order state being a terminal state, the order record of the second processing result is deleted from the error processing table.
[0077] In step S3, the device updates the order priority according to the order distribution time, the order processing number, the order business type corresponding to each non-terminal state order, and the average response time of the payment channel corresponding to the non-terminal state order within the preset time length adjacent to the current time. If the time difference between the order distribution time and the current time is smaller, it means that the non-terminal state order needs to be processed in time, and therefore the weight corresponding to the order distribution time can be increased. If the time difference between the order distribution time and the current time is larger, it means that the non-terminal state order does not need to be processed in time, and therefore the weight corresponding to the order distribution time can be reduced.
[0078] If the order processing number is smaller, it means that the non-terminal state order still needs to occupy some computing resources, and therefore the weight corresponding to the order processing number can be increased. If the order processing number is larger, it means that the non-terminal state order is still in a non-terminal state after many times of processing, and therefore the computing resources should be given to other non-terminal state orders as much as possible, and therefore the weight corresponding to the order processing number can be reduced.
[0079] If the average response time is shorter, it means that the non-terminal state order does not consume more time in a certain chain node in the payment channel chain, and the non-terminal state order is not a special order, such as an order that needs to be verified for a long time, so the weight corresponding to the average response time can be increased; if the average response time is longer, it means that the non-terminal state order consumes more time in a certain chain node in the payment channel chain, and the non-terminal state order may be a special order, such as an order that needs to be verified for a long time, and it is not necessary to occupy too much computing resource for waiting, so the weight corresponding to the average response time can be reduced.
[0080] The order business type can include single-pen pending type, single-pen pending type, batch pending type and batch pending type, and the same type is maintained, for example, single-pen pending type and batch pending type, and the single-pen pending type can be set to have a higher order business type weight than the batch pending type.
[0081] The same type is maintained, for example, single-pen pending type and single-pen pending type, and the number of non-terminal state orders corresponding to the single-pen pending type and the number of non-terminal state orders corresponding to the single-pen pending type are further obtained, and a higher order business type weight is given to the type with more quantity, for example, the number of non-terminal state orders corresponding to the single-pen pending type is greater than the number of non-terminal state orders corresponding to the single-pen pending type, and the single-pen pending type can be set to have a higher order business type weight than the single-pen pending type. The calculation formula of the order priority is as follows:
[0082] Priority=w1×Tc+w2×Tb+w3×Tt+w4×Tn
[0083] Wherein, Priority represents the order priority, Tc represents the average response time, Tb represents the order distribution time, Tt represents the order business type, Tn represents the order processing times, and w1-w4 are weights corresponding to the above order priority calculation factors respectively. Through the rules described above, the weights can be adaptively adjusted, so as to dynamically calculate the order priority of each non-terminal state order.
[0084] The non-terminal state order processing method provided by the embodiment of the application ensures the efficiency of order terminal state updating in payment transaction, and improves the transaction backboard time of a large number of non-terminal state orders.
[0085] The non-terminal state order processing method provided by the embodiment of the present application periodically acquires a non-terminal state order set with an order quantity equal to an error processing quantity according to an updated order priority, distributes each non-terminal state order in the non-terminal state order set to a downstream server one by one, and records an order distribution time corresponding to each non-terminal state order respectively; receives a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, updates an order processing quantity; updates the order priority according to the order distribution time, the order processing quantity, an order service type corresponding to each non-terminal state order respectively, and an average response time of a payment channel responding to a corresponding non-terminal state order within a preset time length adjacent to a current time, and optimizes the non-terminal state order participating in processing through the updated order priority, so that the computing resource can be fully utilized, and the processing efficiency of the non-terminal state order processing is improved.
[0086] Further, the periodically acquiring a non-terminal state order set with an order quantity equal to an error processing quantity according to an updated order priority comprises:
[0087] Acquiring a non-terminal state order with an order quantity equal to an error processing quantity from an error processing table according to an updated order priority; refer to the above embodiment for description.
[0088] Acquiring a non-terminal state order with an order distribution time between an earliest error processing time and a latest error processing time from an order table and without data duplication in the error processing table, and composing the non-terminal state order set. Refer to the above embodiment for description.
[0089] Further, the non-terminal state order processing method further comprises:
[0090] Controlling a time interval between two adjacent non-terminal state orders according to an error processing distribution sleep time when distributing each non-terminal state order in the non-terminal state order set to a downstream server one by one; refer to the above embodiment for description.
[0091] The error processing distribution sleep time is calculated according to the following formula:
[0092] The error processing distribution sleep time = the average response time / (the number of downstream servers * the number of thread pool threads). Refer to the above embodiment for description.
[0093] Further, the receiving a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, updating an order processing quantity comprises:
[0094] If it is determined that the processing result fed back by the downstream server according to the first order state query result of the downstream system is the first processing result, the order processing times is added by 1; refer to the above embodiment for illustration, and no further description is made.
[0095] The first order state query result is a query result of an order state being a non-terminal state, and the first processing result is a processing result corresponding to the first order state query result. Refer to the above embodiment for illustration, and no further description is made.
[0096] Further, the non-terminal order processing method further comprises:
[0097] If it is determined that the processing result fed back by the downstream server according to the second order state query result of the downstream system is the second processing result, the order record for the second processing result is deleted from the error processing table; refer to the above embodiment for illustration, and no further description is made.
[0098] The second order state query result is a query result of an order state being a terminal state, and the second processing result is a processing result corresponding to the second order state query result. Refer to the above embodiment for illustration, and no further description is made.
[0099] Further, the non-terminal order processing method further comprises:
[0100] The error processing number is calculated according to the following formula:
[0101] The error processing number = error processing task execution interval time / error processing distribution sleep time. Refer to the above embodiment for illustration, and no further description is made.
[0102] Figure 2 is a structural schematic diagram of a non-terminal order processing device provided by an embodiment of the present application, as Figure 2 The non-terminal order processing device provided by the embodiment of the present application comprises an acquisition unit 201, a first updating unit 202 and a second updating unit 203, wherein:
[0103] The acquisition unit 201 is configured to periodically acquire a non-terminal state order set with an order quantity equal to the error processing number according to the updated order priority, distribute each non-terminal state order in the non-terminal state order set to a downstream server one by one, and record an order distribution time corresponding to each non-terminal state order; the first updating unit 202 is configured to receive a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and update an order processing number; and the second updating unit 203 is configured to update the order priority according to the order distribution time, the order processing number, an order service type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time.
[0104] Specifically, the acquisition unit 201 in the device is configured to periodically acquire a non-terminal state order set with an order quantity equal to the error processing number according to the updated order priority, distribute each non-terminal state order in the non-terminal state order set to a downstream server one by one, and record an order distribution time corresponding to each non-terminal state order; the first updating unit 202 is configured to receive a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and update an order processing number; and the second updating unit 203 is configured to update the order priority according to the order distribution time, the order processing number, an order service type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time.
[0105] The non-terminal state order processing device provided by the embodiment of the application periodically acquires a non-terminal state order set with an order quantity equal to the error processing number according to the updated order priority, distributes each non-terminal state order in the non-terminal state order set to a downstream server one by one, and records an order distribution time corresponding to each non-terminal state order; receives a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system, and updates an order processing number; and updates the order priority according to the order distribution time, the order processing number, an order service type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, so that the non-terminal state order participating in processing is preferred by the updated order priority, computing resources can be fully utilized, and the processing efficiency of the non-terminal state order processing is improved.
[0106] Further, the acquisition unit 201 is specifically configured to:
[0107] acquire, according to the updated order priority, a non-terminal state order with an order quantity equal to the error processing number from the error processing table;
[0108] Obtain, from the order table, order distribution times that are between the earliest error handling time and the latest error handling time and that do not exist in the non-terminal state order in the error handling table, and form the non-terminal state order set.
[0109] Further, the non-terminal state order processing apparatus is further configured to:
[0110] control a time interval between adjacent two non-terminal state orders according to an error handling distribution sleep time when distributing each non-terminal state order in the non-terminal state order set to the downstream server one by one.
[0111] The error handling distribution sleep time is calculated according to the following formula:
[0112] The error handling distribution sleep time = the average response time / (the number of downstream servers x the number of thread pool threads).
[0113] Further, the first updating unit 202 is specifically configured to:
[0114] If it is determined that the processing result fed back by the downstream server according to the first order state query result of the downstream system is a first processing result, the order processing number is increased by 1.
[0115] The first order state query result is a query result of an order state being a non-terminal state, and the first processing result is a processing result corresponding to the first order state query result.
[0116] Further, the non-terminal state order processing apparatus is further configured to:
[0117] If it is determined that the processing result fed back by the downstream server according to the second order state query result of the downstream system is a second processing result, an order record for the second processing result is deleted from the error handling table.
[0118] The second order state query result is a query result of an order state being a terminal state, and the second processing result is a processing result corresponding to the second order state query result.
[0119] Further, the non-terminal state order processing apparatus is further configured to:
[0120] The error handling number is calculated according to the following formula:
[0121] The error handling number = error handling task execution interval time / error handling distribution sleep time.
[0122] The embodiment of the non-terminal state order processing device can be used to execute the processing procedure of the method embodiment, and the function thereof will not be repeated here, and the detailed description can be referred to the method embodiment.
[0123] Figure 3 The computer device provided by the embodiment of the present application is shown in the entity structure diagram as follows, Figure 3 The computer device comprises a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302, and the processor 302 implements the following method when executing the computer program.
[0124] According to the updated order priority, a non-terminal state order set with an order quantity equal to the error processing quantity is periodically acquired, each non-terminal state order in the non-terminal state order set is distributed to a downstream server one by one, and an order distribution time corresponding to each non-terminal state order is recorded.
[0125] A processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing quantity is updated.
[0126] According to the order distribution time, the order processing quantity, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to the current time, the order priority is updated.
[0127] The embodiment discloses a computer program product, the computer program product comprises a computer program, and the computer program implements the following method when executed by a processor.
[0128] According to the updated order priority, a non-terminal state order set with an order quantity equal to the error processing quantity is periodically acquired, each non-terminal state order in the non-terminal state order set is distributed to a downstream server one by one, and an order distribution time corresponding to each non-terminal state order is recorded.
[0129] A processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing quantity is updated.
[0130] According to the order distribution time, the order processing quantity, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to the current time, the order priority is updated.
[0131] The embodiment provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program implements the following method when executed by a processor.
[0132] According to the updated order priority, a non-terminal state order set with an order quantity equal to the error processing number is periodically acquired, each non-terminal state order in the non-terminal state order set is distributed to a downstream server one by one, and an order distribution time corresponding to each non-terminal state order is recorded;
[0133] A processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing number is updated;
[0134] According to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, the order priority is updated.
[0135] Compared with the technical solution in the prior art, the non-terminal state order processing method provided by the embodiment of the application periodically acquires a non-terminal state order set with an order quantity equal to the error processing number according to the updated order priority, distributes each non-terminal state order in the non-terminal state order set to a downstream server one by one, and records an order distribution time corresponding to each non-terminal state order; a processing result of each non-terminal state order fed back by the downstream server according to an order state query result of a downstream system is received, and an order processing number is updated; according to the order distribution time, the order processing number, an order business type corresponding to each non-terminal state order, and an average response time of a payment channel responding to the corresponding non-terminal state order within a preset time length adjacent to a current time, the order priority is updated, and the non-terminal state order participating in processing is preferred through the updated order priority, so that the computing resources can be fully utilized, and the processing efficiency of the non-terminal state order processing is improved.
[0136] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can adopt a computer program product in the form of being implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.
[0137] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flows and / or block or blocks in the block diagrams. Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks or steps with the functions specified in the flowchart or flows and / or block or blocks.
[0138] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device that implements the functions specified in the flowchart or flows and / or block or blocks. Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks or steps with the functions specified in the flowchart or flows and / or block or blocks.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flows and / or block or blocks. Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks or steps with the functions specified in the flowchart or flows and / or block or blocks.
[0140] In the description of the specification, the description of the terms "one embodiment", "one specific embodiment", "some embodiments", "for example", "exemplary", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples.
[0141] The above-described specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above-described specific embodiments are only specific embodiments of the present application and are not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A non-terminating state order processing method, characterized by, The method comprises the following steps: According to the updated order priority, periodically acquire a non-terminal order set with an order quantity equal to the error processing number, distribute each non-terminal order in the non-terminal order set to a downstream server one by one, and record the order distribution time corresponding to each non-terminal order respectively; Receive the processing result of each non-terminal order fed back by the downstream server according to the order state query result of the downstream system, and update the order processing number; According to the order distribution time, the order processing number, the order business type corresponding to each non-terminal order respectively, and the average response time of the payment channel corresponding to the non-terminal order within the preset time length adjacent to the current time, update the order priority.
2. The non-terminating state order processing method of claim 1, wherein, According to the updated order priority, periodically acquire a non-terminal order set with an order quantity equal to the error processing number, which comprises the following steps: According to the updated order priority, acquire non-terminal orders with an order quantity equal to the error processing number from the error processing table; Acquire non-terminal orders with an order distribution time between the earliest error processing time and the latest error processing time from the order table, and do not have data duplication in the error processing table, and form the non-terminal order set.
3. The non-trap order processing method of claim 1, wherein, The non-terminal order processing method further comprises: When distributing each non-terminal order in the non-terminal order set to the downstream server one by one, control the time interval between adjacent two non-terminal orders according to the error processing distribution sleep time; Wherein, the error processing distribution sleep time is calculated according to the following formula: The error processing distribution sleep time = the average response time / (the number of downstream servers × the number of thread pool threads).
4. The non-trap order processing method of claim 1, wherein, The method further comprises: If it is determined that the processing result fed back by the downstream server according to the first order state query result of the downstream system is the first processing result, then the order processing number is increased by 1; Wherein, the first order state query result is a query result of an order state being non-terminal, and the first processing result is a processing result corresponding to the first order state query result.
5. The non-destinate order processing method according to claim 4, wherein, The method further comprises: If it is determined that the processing result fed back by the downstream server according to the second order state query result of the downstream system is the second processing result, then delete the order record with the second processing result from the error processing table; Wherein, the second order state query result is a query result of an order state being terminal, and the second processing result is a processing result corresponding to the second order state query result.
6. The non-destinate order processing method according to claim 3, wherein, The method further comprises: The error processing number is calculated according to the following formula: The error processing number = error processing task execution interval time / error processing distribution sleep time.
7. A non-terminating state order processing apparatus, characterized by, The method comprises the following steps: An acquisition unit is configured to periodically acquire a non-terminal order set with an order quantity equal to the error processing number according to the updated order priority, distribute each non-terminal order in the non-terminal order set to a downstream server one by one, and record the order distribution time corresponding to each non-terminal order respectively. The first updating unit is configured to receive a processing result of each non-terminal state order fed back by the downstream server according to a query result of an order state of a downstream system, and update a processing number of the order; The second updating unit is configured to update the order priority according to the order distribution time, the processing number of the order, an order service type corresponding to each non-terminal state order, and an average response time of a corresponding non-terminal state order within a preset time length adjacent to a current time.
8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method in any of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program implements the method in any of claims 1 to 6 when executed by the processor.
10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program implements the method in any of claims 1 to 6 when executed by the processor.