Method and apparatus for processing order, and device and storage medium

By identifying unfinished orders within the target time window in the order system and requesting execution from the business party, combined with the secondary verification mechanism, the problem of inefficiency and missed orders in the traditional order replenishment system is solved, and the efficiency and reliability of order processing are improved.

WO2024193397A1PCT designated stage expired Publication Date: 2024-09-26DOUYIN VISION CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/081243
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-20
Filing Date
2024-03-12
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

The traditional order replenishment system is inefficient by polling the database, leading to problems such as missed orders and stuck orders, and cannot complete order processing in a timely and effective manner.

Method used

By determining a group of uncompleted orders associated with the target time window, request order execution from the business party, and after receiving the completion message, query the order database for secondary verification and status update to ensure the accuracy of the order status.

Benefits of technology

It improves the efficiency and effectiveness of order replenishment, ensures timely updates and accuracy of order status, reduces the load pressure on the business side interface, and enhances the reliability of order replenishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024081243_26092024_PF_FP
    Figure CN2024081243_26092024_PF_FP
Patent Text Reader

Abstract

According to the embodiments of the present disclosure, provided are a method and apparatus for processing an order, and a device and a storage medium. The method comprises: determining a group of orders associated with a target time window, wherein the group of orders is not completed; requesting a business party associated with the group of orders to execute the group of orders; in response to receiving, from the business party, a message for indicating the completion of the group of orders, querying an order database, which is maintained by the business party, so as to verify whether the group of orders is completed; and in response to that the completion of the group of orders is verified, updating the state of the group of orders to indicate order completion. In this way, the embodiments of the present disclosure can improve the order compensation timeliness and effectiveness of an order.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, apparatus and storage medium for processing orders

[0001] This application claims priority to the Chinese invention patent application entitled “Method, apparatus, device and storage medium for processing orders” and application number 202310274259.4, filed on March 20, 2023. The entire contents of that application are incorporated herein by reference. Technical Field

[0002] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for processing orders. Background Art

[0003] During the payment process, orders may not be completed effectively due to various network or processing anomalies. Therefore, order fulfillment (i.e., pushing order execution to the middle platform) has become an important task in the order system.

[0004] Traditional order fulfillment systems poll the database to find orders that need to be processed. However, this approach is often inefficient and can lead to missed orders, stuck orders, and other issues.

[0005] Summary of the Invention

[0006] In a first aspect of the present disclosure, a method for processing orders is provided. The method includes: determining a group of orders associated with a target time window, the group of orders not yet completed; requesting a business party associated with the group of orders to execute the group of orders; in response to receiving a message from the business party indicating that the group of orders is completed, querying an order database maintained by the business party to verify whether the group of orders is completed; and in response to the group of orders being verified as completed, updating a status of the group of orders to indicate that the orders are completed.

[0007] In a second aspect of the present disclosure, a device for processing orders is provided. The device includes a determining module configured to determine that a group of orders associated with a target time window is not yet completed; a requesting module configured to request a business party associated with the group of orders to execute the group of orders; a verifying module configured to, in response to receiving a message from the business party indicating that the group of orders is completed, query an order database maintained by the business party to verify whether the group of orders is completed; and an updating module configured to, in response to the group of orders being verified as completed, update the status of the group of orders to indicate that the orders are completed.

[0008] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the device to perform the method of the first aspect.

[0009] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the medium, and when the program is executed by a processor, the method of the first aspect is implemented.

[0010] It should be understood that the contents described in the summary of the present invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0012] 1A to 1C are schematic diagrams showing a traditional payment process;

[0013] FIG2 illustrates a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0014] FIG3 shows a schematic diagram of task state changes according to some embodiments of the present disclosure;

[0015] FIG4 shows a schematic diagram of the processing process of the producer module according to some embodiments of the present disclosure;

[0016] FIG5 is a schematic diagram illustrating a processing procedure of a consumer module according to some embodiments of the present disclosure;

[0017] FIG6 shows an example block diagram of an order processing system according to some embodiments of the present disclosure;

[0018] FIG7 illustrates a flowchart of an example process for processing an order according to some embodiments of the present disclosure;

[0019] FIG8 shows a block diagram of an apparatus for processing an order according to some embodiments of the present disclosure; and

[0020] FIG9 illustrates a block diagram of a device capable of implementing various embodiments of the present disclosure. DETAILED DESCRIPTION

[0021] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0022] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.

[0023] 1A , the order system 110 typically initiates payment and initiates an interface call 120. Accordingly, the payment system 130 may return a message notification to the order system 110 to indicate the order processing status, such as whether the order has been successfully processed, failed to process, or is in progress.

[0024] However, in some cases, the payment interface call from order system 110 may experience a network timeout or disconnection. For example, as shown in FIG1B , interface call 120 may fail to reach payment system 130. However, in this case, the corresponding order has already been generated in order system 110, but payment system 130 may not have the order. In this case, the call must be reinitiated.

[0025] In other cases, as shown in Figure 1C, a network timeout or disconnection may occur when payment system 130 synchronizes back to order system 110. In this case, both order system 110 and payment system 130 have already generated the corresponding order, but due to the synchronization issue with payment system 130's return to China UnionPay, the payment system cannot determine whether the order was successful. In this case, a mechanism is needed to reconfirm the order status and ensure that the order reaches its final state.

[0026] Therefore, order fulfillment is a crucial task for order systems. This involves compensating for orders in an intermediate state until they reach their final state (success or failure). The timeliness and effectiveness of order fulfillment are key factors influencing the user experience.

[0027] Embodiments of the present disclosure provide a solution for processing orders. In this solution, a group of unfulfilled orders associated with a target time window can be determined. Further, a request can be made to a business party associated with the group of orders to execute the group of orders.

[0028] If a message indicating that a group of orders is completed is received from the business party, the order database maintained by the business party may be further queried to verify whether the group of orders is completed. If the group of orders is verified to be completed, the status of the group of orders may be updated to indicate that the orders are completed.

[0029] Based on this approach, on the one hand, the embodiments of the present disclosure can perform order replenishment based on a time window approach, thereby improving the efficiency of order replenishment. On the other hand, through the secondary verification mechanism, the embodiments of the present disclosure can also improve the effectiveness of order replenishment.

[0030] Hereinafter, exemplary solutions according to embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0031] Figure 2 shows a schematic diagram of an example environment 200 according to some embodiments of the present disclosure. As shown in Figure 2 , the environment 200 includes a fulfillment device 210 , which can be configured to communicate with a business party 220 to perform a compensation operation (also referred to as a fulfillment operation) for an order 230 .

[0032] In some embodiments, such order fulfillment device 210 may include any suitable electronic device managed by a fulfillment party (e.g., an order fulfillment center). Such order fulfillment device 210 may, for example, retrieve order 230 from an order database and utilize an interface provided by business party 220 to facilitate the execution of order 230 to a final state.

[0033] The specific processing process of the order replenishment device 210 will be described in detail below with reference to the accompanying drawings.

[0034] Example State Machine

[0035] In some embodiments, the order-filling device 210 may manage the compensation of the order 230 through a state machine. FIG3 shows a state change diagram 300 of a task according to some embodiments of the present disclosure.

[0036] In some embodiments, the order fulfillment device 210 may obtain a group of uncompleted (ie, not yet finalized) orders associated with a predetermined time window. The process of determining this group of orders will be described in detail below in conjunction with FIG.

[0037] Accordingly, the order-filling device 210 may generate a task corresponding to the group of orders, such a task being set to an initial state 310, for example.

[0038] Furthermore, order fulfillment device 210 can utilize the execution interface (or service) provided by business party 220 to request that the group of orders be executed. Accordingly, if order fulfillment device 210 determines from business party 220 that the group of orders has been successfully executed (i.e., has reached a final state), the task can proceed to pending state 320.

[0039] Conversely, if the task execution fails or times out, the task may proceed to the processing state 330. Accordingly, in the processing state 330, the order fulfillment device 210 may re-execute the task. For example, the order fulfillment device 210 may utilize the execution interface (or service) provided by the business party 220 to re-request the group of orders to be executed.

[0040] If the task is re-executed so that the group of orders reaches the final state, the task can similarly proceed to the pending state. On the contrary, if the task fails to execute or times out, the order-filling device 210 can execute the task again.

[0041] In some embodiments, the order fulfillment device 210 may re-execute or re-execute the task according to a fixed time interval. For example, the order fulfillment device 210 may re-execute the task after a fixed time interval after the last execution.

[0042] In some embodiments, the order-filling device 210 may also determine the time interval for re-requesting based on the number of times the task has been re-executed. Specifically, the order-filling device 210 may determine the number of times the task has been re-executed, and determine the time interval based on the number of times, so that the time interval is positively correlated with the number of times. For example, if a task has been re-executed twice, the interval from the moment of its third re-execution to the moment of its second re-execution may be greater than the interval from the moment of its second re-execution to the moment of its first re-execution. Based on this approach, the embodiments of the present disclosure can reduce the load pressure on the business party interface.

[0043] Furthermore, the order fulfillment device 210 may determine a target time based on the determined time interval for re-requesting, the time interval, and the historical time when the task was last re-executed. Additionally, the order fulfillment device 210 may execute the task at the determined target time to re-request the execution of the order associated with the task from the business party.

[0044] In some embodiments, if the task has been re-executed more than a threshold number of times or the task has expired, the order fulfillment device 210 may mark the task as unsuccessful. Specifically, if the task failed because the maximum number of retries (i.e., the threshold number) was exceeded, the order fulfillment device 210 may mark the task as failed 360. Alternatively, if the task has expired, the order fulfillment device 210 may mark the task as expired 370.

[0045] Continuing with Figure 3 , as discussed above, if the business party reports that all orders in the group have been completed, the task may proceed to pending state 320. Furthermore, order fulfillment device 210 may perform secondary verification at block 340. Specifically, order fulfillment device 210 may query the order database maintained by business party 220 to verify whether the group of orders has been completed.

[0046] If the secondary verification fails, meaning that there are still orders marked as uncompleted in the order database, the task will be reset to the initial state 310 and the state machine process shown in Figure 3 will be re-executed. In some embodiments, if the secondary verification fails, the order fulfillment device 210 may also generate an alarm, for example, to indicate that the business party's order database does not match the status returned by the business party interface.

[0047] On the contrary, if the secondary verification passes, the order filling device 210 can set the task to a successful state 350 to indicate that the at least one unfinished order has been successfully advanced to a completed state, that is, the order filling operation is completed.

[0048] Based on the state machine switching process introduced above, the embodiments of the present disclosure can effectively manage the order filling process by means of task state conversion, thereby improving the reliability of order filling.

[0049] In some embodiments, the order fulfillment device 210 may further maintain execution information corresponding to the task, also known as a flow table. For example, the order fulfillment device 210 may maintain execution information associated with the re-execution of the task.

[0050] Such execution information may, for example, include information about a set of orders associated with the task, such as order identifiers. Alternatively or additionally, such execution information may also include, for example, execution description information about each re-execution, such as the time of re-execution, the result of re-execution (e.g., the number of orders successfully advanced to the final state, the number of orders not successfully advanced to the final state), etc. Alternatively or additionally, such execution information may also include, for example, description information about the reason for task execution failure or execution timeout, such as the reason why the order returned by the business party was not successfully advanced to the final state.

[0051] By maintaining such execution information, the embodiments of the present disclosure can facilitate the order-filling party to explicitly manage the order-filling process. Additionally, the order-filling device 210 can also provide such execution information for analyzing the task.

[0052] Example producer module

[0053] In some embodiments, the order fulfillment device 210 may utilize a producer module and a consumer module to manage the generation, circulation, and consumption of tasks.

[0054] Figure 4 illustrates a schematic diagram of a producer module process 400 according to some embodiments of the present disclosure. As shown in Figure 4 , the producer module may include a trigger 405, a task service 410, and a task database 415. A query service 420, a local data backup 425, and a source database 430 may be provided by a business entity, for example.

[0055] In some embodiments, the local data backup 425, also known as the order data copy, can be, for example, a data mirror of the source database 430 constructed in a heterogeneous manner, which can be deployed locally on the order-filling party to improve access efficiency and reduce the database access pressure on the business party.

[0056] 4 , at 432 , trigger 405 (also referred to as task trigger 405 ) can be configured to periodically trigger task service 410 to generate a task. Accordingly, at 434 , task service 410 can query task database 415 and determine a task identifier to be assigned to the task at 436 .

[0057] Further, at 438, task service 410 may call query service 420 provided by the business party. At 440, query service 420 may determine a set of outstanding orders associated with the time window corresponding to the task.

[0058] In some embodiments, at 440A, the query service 420 can use the local data backup 425 to query the status of the order to determine a set of outstanding orders.

[0059] Alternatively, at 440B, query service 420 can also use the business party's source database 430 (i.e., the order database) to query the order status, thereby identifying a set of uncompleted orders. It should be understood that because local data backup 425 is a heterogeneous mirror of source database 430, its data real-time performance is generally weaker than that of source database 430. However, thanks to the fact that such local data backup 425 can be deployed locally on the order-filling party, this can effectively reduce the database access pressure on the business party.

[0060] Furthermore, query service 420 may return query results to task service 410. For example, query service 420 may return a query result indicating that all orders within the time window have been completed. Alternatively, query service 420 may return a query result indicating a set of orders within the time window that have not yet been completed.

[0061] Furthermore, task service 410 may perform an action based on the order status information at 444. Specifically, if query service 420 returns a query result from source database 430 indicating that all orders in the time window have been completed, task service 410 may not create the task.

[0062] Alternatively, if the query service 420 returns a query result indicating a group of uncompleted orders based on the local data backup 425 or the source database 430 , the task service 410 may create a task corresponding to the group of orders based on the query result.

[0063] Alternatively, if the query service 420 returns a query result indicating that all orders in the time window have been completed based on the local data backup 425 , the task service 410 may continue to execute the process from 446 to 454 as shown in FIG. 4 .

[0064] Specifically, at 446, task service 410 may initiate a secondary verification request to query service 420. Further, query service 420 may query source database 430 to verify whether all orders in the time window have been completed.

[0065] At 450, source database 430 may return a verification result, which is then returned to task service 410 by the query service at 452. Furthermore, at 454, task service 410 may perform corresponding actions based on the verification result. Specifically, if the verification result indicates that all orders within the time window have been executed, task service 410 may not create a task. Conversely, if the verification result indicates that a group of orders within the time window have not yet been executed, task service 410 may create a task for that group of orders.

[0066] Based on the secondary verification process at the task creation stage, the embodiments of the present disclosure can improve the reliability of task creation.

[0067] In some embodiments, the producer module may also perform integrity checking of the task, for example.

[0068] Specifically, the producer module can obtain the consumption status of a set of historical tasks associated with a historical time window, where the length of the historical time window is longer than the target time window for normal task generation. For example, the producer module can check the task sequence within the past 48 hours and determine whether there are any tasks that have not been consumed (or are missing).

[0069] Exemplarily, the generator module may verify whether the task sequence is complete based on the continuity of task identifiers or the continuity of time windows corresponding to the tasks, thereby determining unconsumed target historical tasks.

[0070] Furthermore, the producer module can utilize a task creation-like process (e.g., see 440 in FIG4 ) to determine whether the orders within the historical event window corresponding to the task have been completed. If there are uncompleted orders, the producer module can create a new task corresponding to the uncompleted set of orders and provide it to the consumer module for execution.

[0071] Based on this approach, the embodiments of the present disclosure can further improve the completeness of the task list and avoid the occurrence of missing tasks.

[0072] Example Consumer Module

[0073] An example processing procedure of the consumer module will be described below with reference to Figure 5. Figure 5 shows a schematic diagram of a processing procedure 500 of the consumer module according to some embodiments of the present disclosure.

[0074] As shown in Figure 5, the consumer module may include the task service 410 and the task database 415 described above. In addition, unlike the producer module, the consumer module utilizes the execution service 510 provided by the business side instead of the query service 420.

[0075] 5 , at 512, trigger 505 (also referred to as execution trigger 505, which may be the same as or different from task trigger 405) may trigger task service 410. At 514, task service 410 may query task database 415 to record one or more tasks that have not been successfully executed within a certain period of time.

[0076] For ease of description, the following will take a single task as an example to introduce the execution of the consumer module. Further, at 516, the task service 410 may call the execution service 510 provided by the business party to promote the execution of a group of uncompleted orders corresponding to the task.

[0077] At 518 , the execution service 510 may obtain detailed information about the set of orders. Specifically, the task service may obtain the order details from the local data backup 425 at 518A. Alternatively, the execution service 510 may also obtain the order details from the source database 430 .

[0078] Furthermore, at 520, fulfillment service 510 can call the downstream interface provided by the business party and proceed with order fulfillment based on the order details. At 522, if the order status has been updated, fulfillment service 522 can update source database 430. Alternatively, such updated information can be synchronized to local data backup 425 based on pre-defined synchronization logic.

[0079] At 524, the execution service 510 may return the task execution result to the task service 410. At 526, the task service 410 may perform corresponding actions based on the execution result and with reference to the state machine shown in FIG3.

[0080] For example, if the execution result indicates that the orders corresponding to the task have not all been advanced to the final state, the task service 410 can, for example, control the re-execution of the task according to the state machine shown in Figure 3 until the task reaches the success state 350, the failure state 360 ​​or the expired state 370.

[0081] In some embodiments, if the indication result indicates that the group of orders corresponding to the task are all advanced to the final state, then at 528 , the task service 410 may call the execution service 510 to perform a secondary verification.

[0082] At 530 , the execution service 510 may query the source database 430 to verify whether all orders corresponding to the task have been completed. At 532 , the source database 430 may return the verification result to the execution service 510 .

[0083] Furthermore, the execution service 510 may send the verification result to the task service 410. At 536, the task service 410 may perform corresponding actions based on the verification result. Specifically, if the verification result indicates that all orders have been completed, the task service 410 may mark the task as a success state 350.

[0084] On the other hand, if the verification result indicates that there are orders that have not yet been completed, the task service 410 can reset the task to the initial state 310, thereby re-executing the task. In addition, the task service 410 can also generate an alert message, for example, to indicate that the state of the business party's source database 430 does not match the state returned by the execution service 510.

[0085] Based on the task consumption process discussed above, the embodiments of the present disclosure can effectively control the order fulfillment process through the consumer module, thereby improving the efficiency and reliability of order fulfillment.

[0086] Sample order fulfillment system

[0087] Figure 6 further illustrates a block diagram of an example order fulfillment system 600 according to some embodiments of the present disclosure. As shown in Figure 6, the order fulfillment system 600 may include different modules or components corresponding to the order fulfillment party and the business party.

[0088] In some embodiments, for the order fulfillment party, the order fulfillment system 600 may include multiple triggers, such as a task trigger 405, an execution trigger 505, and a check trigger 605. The task trigger 405 may be configured to periodically trigger the generation of a task, the execution trigger 505 may be configured to periodically trigger the consumption of a task, and the check trigger 605 may be configured to periodically trigger a check on the completeness of a task.

[0089] In some embodiments, such triggers can be designed to handle only the logic for task triggering, without performing any additional task logic itself. Furthermore, such triggers can be designed without any cache. This allows for a lightweight trigger design, ensuring trigger stability and execution efficiency.

[0090] In some embodiments, the trigger can be implemented using FAAS (Event as a Service). Alternatively, Cronjob can be used as a disaster recovery trigger to further improve the stability of the system.

[0091] 6 , task service 410 can execute task creation based on the triggering of task trigger 405, execute task integrity checks based on the triggering of check trigger 605, and execute task consumption based on the triggering of execution trigger 505. Accordingly, such task service 410 can, for example, rely solely on a local task database 415.

[0092] Additionally, for task creation and task completeness check, the task service 410 may also call a query service 420 provided by a business party to determine uncompleted orders based on a local database 425 or a source database 430 .

[0093] For task consumption, the task service 410 can call the execution service 510 provided by the business party to query order information using the local database 425 or the source database 430, call the downstream interface 610 to promote order execution, and / or update the order status in the source database 430.

[0094] Based on this approach, the embodiments of the present disclosure can reduce the dependence of the order filling process on the business party. For example, it can only provide two interfaces: a query interface and an execution interface. This can increase the flexibility of the order filling system and provide support for the intervention of different business parties.

[0095] Example Process

[0096] FIG7 shows a flowchart of an example process 700 for processing an order according to some embodiments of the present disclosure. The process 700 may be performed by the order-filling device 210 shown in FIG1 , and the process 700 is described below with reference to FIG1 .

[0097] As shown in FIG. 7 , at block 710 , the order fulfillment device 210 determines a group of orders associated with a target time window, wherein the group of orders has not yet been completed.

[0098] At block 720 , the order fulfillment device 210 requests a business party associated with the group of orders to execute the group of orders.

[0099] In block 730 , in response to receiving a message from the business party indicating that a group of orders is completed, the order fulfillment device 210 queries an order database maintained by the business party to verify whether the group of orders is completed.

[0100] At block 740 , the fulfillment device 210 updates the status of the group of orders to indicate that the orders are complete in response to the group of orders being verified as complete.

[0101] In some embodiments, determining a set of orders associated with the target time window includes: determining the target time window based on a preset time period; and obtaining a set of orders associated with the target time window.

[0102] In some embodiments, a group of orders associated with a target time window is determined: order data maintained by a business party is queried to determine a first query result indicating whether a group of orders is completed; and based on the first query result, a group of orders that have not been completed are determined from the group of orders.

[0103] In some embodiments, determining a group of orders associated with a target time window includes: querying a copy of order data corresponding to an order database deployed locally at the order-filling party to determine a second query result indicating whether a group of orders has been completed; and determining a group of orders that have not been completed based on the second query result.

[0104] In some embodiments, determining a group of uncompleted orders from a group of orders based on a second query result includes: in response to the second query result indicating that all orders associated with the target time window have been completed, querying the order data maintained by the business party to determine a third query result indicating whether all orders have been completed; and determining a group of uncompleted orders based on the third query result.

[0105] In some embodiments, requesting a business party associated with a group of orders to execute a group of orders includes: generating a first task associated with the group by a producer module; and requesting the business party to execute the group of orders according to the first task by a consumer module.

[0106] In some embodiments, a group of orders is a first group of orders, and process 700 also includes: the producer module obtains the consumption status of a group of historical tasks associated with a historical time window, and the length of the historical time window is greater than the target time window; the producer module determines the target historical tasks that have not been consumed from the group of historical tasks; the producer module determines the second group of orders associated with the target historical tasks, and the second group of orders has not been completed; and the producer module generates a second task associated with the second group of orders, so that the consumer module requests the business party to execute the second group of orders based on the second task.

[0107] In some embodiments, process 700 also includes: generating a task associated with a set of orders; iteratively performing the following at least once: in response to determining that the task execution has failed or the execution has timed out, re-executing the task to re-request a set of orders to be executed from the business party; and marking the task as unsuccessful in response to the number of times the task is re-executed exceeding a threshold number or the task has expired.

[0108] In some embodiments, re-executing a task includes: determining a time interval for re-execution; in response to a non-first re-request for execution of the task, determining a target time based on the historical time and time interval of the last re-execution; and re-executing the task at the target time.

[0109] In some embodiments, determining the time interval for re-requesting includes: determining a number of times the task has been re-executed; and determining the time interval based on the number of times, such that the time interval is positively correlated to the number of times.

[0110] In some embodiments, process 700 also includes: maintaining execution information associated with the re-execution of the task, the execution information indicating at least one of the following: order information of a set of orders, execution description information about the re-execution, and description information about the reason for the task execution failure or execution timeout.

[0111] In some embodiments, process 700 further includes providing execution information for use in analyzing the task.

[0112] In some embodiments, process 700 further includes: in response to the group of orders being verified as incomplete, re-requesting the group of orders to be executed from the business party.

[0113] In some embodiments, the business party provides a query interface for querying the order database and an execution interface for requesting that an order be executed.

[0114] Example devices and equipment

[0115] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 8 shows a schematic structural block diagram of a device 800 for processing an order according to some embodiments of the present disclosure.

[0116] As shown in FIG8 , the apparatus 800 includes a determining module 810 configured to determine a group of orders associated with a target time window, wherein the group of orders has not been completed.

[0117] The apparatus 800 further includes a request module 820 configured to request a business party associated with the group of orders to execute the group of orders.

[0118] The apparatus 800 further includes a verification module 830 configured to query an order database maintained by the business party in response to receiving a message indicating that a group of orders is completed from the business party to verify whether the group of orders is completed.

[0119] In addition, the apparatus 800 further includes an updating module 840 configured to update the status of the set of orders to indicate that the orders are completed in response to the set of orders being verified as completed.

[0120] In some embodiments, the determination module 810 is further configured to: determine a target time window based on a preset time period; and obtain a group of orders associated with the target time window.

[0121] In some embodiments, the determination module 810 is further configured to: query order data maintained by the business party to determine a first query result indicating whether a group of orders is completed; and based on the first query result, determine a group of orders that have not been completed from the group of orders.

[0122] In some embodiments, the determination module 810 is further configured to: query a copy of the order data corresponding to the order database deployed locally at the order-filling party to determine a second query result indicating whether a group of orders has been completed; and based on the second query result, determine a group of orders that have not been completed.

[0123] In some embodiments, the determination module 810 is further configured to: in response to the second query result indicating that all orders associated with the target time window have been completed, query the order data maintained by the business party to determine a third query result indicating whether all orders have been completed; and based on the third query result, determine a set of orders that have not been completed.

[0124] In some embodiments, the request module 820 is further configured to: generate a first task associated with a group by the producer module; and request the business party to execute a group of orders according to the first task by the consumer module.

[0125] In some embodiments, a group of orders is a first group of orders, and the request module 820 is further configured to: obtain, by the producer module, the consumption status of a group of historical tasks associated with a historical time window, where the length of the historical time window is greater than the target time window; determine, by the producer module, the target historical tasks that have not been consumed from a group of historical tasks; determine, by the producer module, the second group of orders associated with the target historical tasks, where the second group of orders has not yet been completed; and generate, by the producer module, a second task associated with the second group of orders, so that the consumer module requests the business party to execute the second group of orders based on the second task.

[0126] In some embodiments, the request module 820 is further configured to: generate a task associated with a set of orders; iteratively perform at least one of the following: in response to determining that the task execution has failed or the execution has timed out, re-execute the task to re-request a set of orders to be executed from the business party; and in response to the number of times the task is re-executed exceeding a threshold number or the task has expired, mark the task as unsuccessful.

[0127] In some embodiments, the request module 820 is further configured to: determine a time interval for re-execution; in response to a non-first re-request for execution of the task, determine a target time based on the historical time and time interval of the last re-execution; and re-execute the task at the target time.

[0128] In some embodiments, the request module 820 is further configured to: determine a number of times the task has been re-executed; and determine a time interval based on the number of times, such that the time interval is positively correlated to the number of times.

[0129] In some embodiments, the device 800 is further configured to: maintain execution information associated with the re-execution of the task, the execution information indicating at least one of the following: order information of a set of orders, execution description information about the re-execution, and description information about the reasons for the failure or timeout of the task execution.

[0130] In some embodiments, the apparatus 800 is further configured to provide execution information for analyzing the task.

[0131] In some embodiments, the request module 820 is further configured to: in response to a group of orders being verified as uncompleted, re-request a group of orders from the business party to be executed.

[0132] In some embodiments, the business party provides a query interface for querying the order database and an execution interface for requesting that an order be executed.

[0133] The units included in the device 800 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 800 can be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0134] Figure 9 shows a block diagram of a computing device / server 900 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the computing device / server 900 shown in Figure 9 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.

[0135] As shown in Figure 9, computing device / server 900 is in the form of a general-purpose computing device. Components of computing device / server 900 may include, but are not limited to, one or more processors or processing units 910, memory 920, storage device 930, one or more communication units 940, one or more input devices 960, and one or more output devices 960. Processing unit 910 may be a real or virtual processor and is capable of performing various processes according to a program stored in memory 920. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of computing device / server 900.

[0136] The computing device / server 900 typically includes a plurality of computer storage media. Such media can be any available media accessible to the computing device / server 900, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 920 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory) or some combination thereof. The storage device 930 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk or any other medium, which can be used to store information and / or data (e.g., training data for training) and can be accessed within the computing device / server 900.

[0137] The computing device / server 900 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG. 9 , a disk drive for reading from or writing to a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 920 may include a computer program product 925 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0138] The communication unit 940 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device / server 900 can be implemented as a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device / server 900 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or other network nodes.

[0139] Input device 950 may be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 960 may be one or more output devices, such as a display, speaker, printer, etc. Computing device / server 900 may also communicate with one or more external devices (not shown) via communication unit 940 as needed, such as storage devices, display devices, etc., with one or more devices that allow users to interact with computing device / server 900, or with any device that allows computing device / server 900 to communicate with one or more other computing devices (e.g., a network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0140] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to implement the method described above.

[0141] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0142] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0143] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0144] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0145] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the implementations disclosed herein.

Claims

1. A method for processing an order, comprising: determining a set of orders associated with the target time window, the set of orders not yet completed; Requesting a business party associated with the set of orders to execute the set of orders; In response to receiving a message from the business party indicating that the set of orders is completed, querying an order database maintained by the business party to verify whether the set of orders is completed; as well as In response to the set of orders being verified as complete, a status of the set of orders is updated to indicate that the orders are complete.

2. The method of claim 1 , wherein determining a set of orders associated with a target time window comprises: Based on a preset time period, determining the target time window; as well as The set of orders associated with the target time window is obtained.

3. The method of claim 1 , wherein determining a set of orders associated with a target time window comprises: querying the order data maintained by the business party to determine a first query result indicating whether the set of orders is completed; as well as Based on the first query result, the group of orders that have not been completed is determined.

4. The method of claim 1 , wherein determining a set of orders associated with a target time window comprises: querying a copy of the order data corresponding to the order database and deployed locally at the order-filling party to determine a second query result indicating whether the group of orders is completed; as well as Based on the second query result, the group of orders that have not been completed is determined.

5. The method according to claim 4, wherein based on the second query result, determining the group of orders that have not been completed from the group of orders comprises: In response to the second query result indicating that the group of orders have been completed, querying the order data maintained by the business party to determine a third query result indicating whether the group of orders has been completed; as well as Based on the third query result, the group of orders that have not been completed is determined.

6. The method of claim 1 , wherein requesting a business party associated with the set of orders to execute the set of orders comprises: generating, by a producer module, a first task associated with the set of orders; as well as The consumer module requests the business party to execute the group of orders according to the first task.

7. The method according to claim 6, wherein the group of orders is a first group of orders, the method further comprising: The producer module obtains consumption status of a group of historical tasks associated with a historical time window, wherein the length of the historical time window is greater than the target time window; The producer module determines an unconsumed target historical task from the group of historical tasks; Determining, by the producer module, a second set of orders associated with the target historical task, the second set of orders not yet completed; as well as A second task associated with the second group of orders is generated by the producer module, so that the consumer module requests the business party to execute the second group of orders according to the second task.

8. The method according to claim 1, further comprising: generating tasks associated with the set of orders; Iteratively performing the following at least once: in response to determining that the task execution fails or the execution times out, re-executing the task to re-request the business party to execute the set of orders; as well as In response to the number of times the task is re-executed exceeding a threshold number or the task has expired, marking the task as unsuccessful.

9. The method of claim 8, wherein re-executing the task comprises: determining a time interval for re-execution; In response to the non-first re-execution request of the task, determining a target time according to the historical time of the last re-execution and the time interval; and At the target time, the task is re-executed.

10. The method of claim 9, wherein determining a time interval for re-requesting comprises: determining a number of times the task has been re-executed; as well as Based on the number of times, the time interval is determined such that the time interval is positively correlated to the number of times.

11. The method according to claim 8, further comprising: Maintain execution information associated with the re-execution of the task, the execution information indicating at least one of the following: order information of the group of orders, execution description information about the re-execution, and description information about the reason for the failure or timeout of the task execution.

12. The method according to claim 11, further comprising: The execution information is provided for analyzing the task.

13. The method according to claim 1, further comprising: In response to the group of orders being verified as incomplete, a new request is made to the business party for the group of orders to be executed.

14. The method according to claim 1, wherein the business party provides a query interface for querying the order database and an execution interface for requesting an order to be executed.

15. A device for processing an order, comprising: a determination module configured to determine a group of orders associated with the target time window, the group of orders not yet completed; A request module configured to request a business party associated with the group of orders to execute the group of orders; a verification module configured to query an order database maintained by the business party in response to receiving a message from the business party indicating that the set of orders is completed to verify whether the set of orders is completed; as well as An update module is configured to update the status of the group of orders to indicate that the orders are completed in response to the group of orders being verified as completed.

16. An electronic device, comprising: at least one processing unit; as well as at least one memory coupled to the at least one processor A processing unit and stores instructions for execution by the at least one processing unit, the instructions causing the device to perform the method according to any one of claims 1 to 14 when executed by the at least one processing unit.

17. A computer-readable storage medium having a computer program stored thereon, wherein the program implements the method according to any one of claims 1 to 14 when executed by a processor.

Citation Information

Patent Citations

  • Method and device for obtaining order information

    CN105139191A

  • Order processing method and device

    CN109785077A

  • Method and device for confirming state of order to be paid based on time window

    CN114418702A

  • Order processing system and method and order processing server

    CN115187328A

  • Order compensation method, device and equipment and storage medium

    CN115187337A