Method and apparatus for processing orders

By analyzing the content correlation information between each order in the pending order set, determining the backlog of each order, and determining the processing order based on this, the order backlog problem of e-commerce platforms when processing a large number of orders is solved, and processing efficiency is improved.

CN113723893BActive Publication Date: 2025-05-23BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111079045.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2025-05-23
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

When existing e-commerce platforms process large numbers of orders, it is difficult for them to effectively avoid order backlogs, resulting in inefficient processing.

Method used

By obtaining the content correlation information between each order in the pending order set, the backlog impact of each order is determined, and the order processing order is determined based on the backlog impact, so as to prioritize orders with a greater impact on the overall backlog state.

Benefits of technology

It effectively avoids the overall backlog of orders and improves order processing efficiency and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113723893B_ABST
    Figure CN113723893B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a method and device for processing orders. A specific implementation of the method includes: obtaining content association information between orders in a pending order set, wherein the content association information is used to indicate whether different orders include the same service content; determining the backlog impact of each order in the pending order set based on the content association information, wherein the backlog impact of an order indicates the impact of the order on the order backlog status of the pending order set; determining the processing order of the orders in the pending order set based on the backlog impact, and processing the orders according to the determined processing order. This implementation helps to improve order processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and device for processing an order. Background Art

[0002] With the rapid development of e-commerce and logistics, more and more users are conducting transactions for various services online through the Internet. For example, purchasing items and various life services. As the number of user transaction orders continues to grow, for e-commerce platforms, how to design reasonable and efficient order fulfillment decisions is one of the issues that need to be studied.

[0003] Order fulfillment decision refers to the process from when the user submits an order to when the service content in the order is prepared. Taking the purchase of items by users as an example, order fulfillment decision includes the process from when the user submits an order to when the order is picked up in the corresponding warehouse, including order service content analysis, order process control, inventory matching of items involved in the order, etc. Order fulfillment decision directly determines the overall processing flow of all pending orders, and therefore has an important impact on the overall order processing efficiency.

[0004] Existing order fulfillment decisions usually accumulate orders generated within a certain period of time (such as within 10 minutes) and then process them in batches. Generally, e-commerce platforms will use the "first come, first served" rule to ensure that the same batch of accumulated orders can be processed in order according to the order generation time, and give priority to orders generated earlier when inventory is limited. Summary of the invention

[0005] Embodiments of the present disclosure provide a method and apparatus for processing an order.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for processing orders, the method comprising: obtaining content association information between orders in a set of pending orders, wherein the content association information is used to indicate whether different orders include the same service content; determining the backlog impact of each order in the set of pending orders based on the content association information, wherein the backlog impact of an order indicates the impact of the order on the backlog status of orders in the set of pending orders; determining a processing order for the orders in the set of pending orders based on the backlog impact, and performing order processing in accordance with the determined processing order.

[0007] In a second aspect, an embodiment of the present disclosure provides a device for processing orders, the device comprising: an acquisition unit, configured to acquire content association information between orders in a set of pending orders, wherein the content association information is used to indicate whether different orders include the same service content; a determination unit, configured to determine the backlog impact of each order in the set of pending orders based on the content association information, wherein the backlog impact of an order indicates the impact of the order on the backlog status of orders in the set of pending orders; a processing unit, configured to determine the processing order of the orders in the set of pending orders based on the backlog impact, and to process the orders in accordance with the determined processing order.

[0008] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.

[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0010] The method and device for processing orders provided by the embodiments of the present disclosure determine the content association information between orders through the service content of each order in the set of pending orders, and then determine the influence of each order on the overall backlog status of orders based on the content association information between the orders, and then determine the processing order of each order according to the backlog influence of each order so as to process them in sequence, thereby ensuring that orders that have a greater impact on the overall backlog status of orders are processed first, so as to avoid a serious overall backlog of orders, and help improve the overall order processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0012] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0013] Figure 2 is a flow chart of one embodiment of a method for processing an order according to the present disclosure;

[0014] Figure 3 is a flow chart of an embodiment of determining a preceding order set and a succeeding order set for each order;

[0015] Figure 4is a flow chart of one embodiment of determining the backlog impact of each order;

[0016] Figure 5 is a flow chart of yet another embodiment of a method for processing an order according to the present disclosure;

[0017] Figure 6 is a schematic diagram of an application scenario of a method for processing an order according to an embodiment of the present disclosure;

[0018] Figure 7 is a structural schematic diagram of an embodiment of a device for processing orders according to the present disclosure;

[0019] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the relevant parts are shown in the accompanying drawings.

[0021] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] Figure 1 An exemplary architecture 100 is shown to which an embodiment of a method for processing an order or an apparatus for processing an order of the present disclosure can be applied.

[0023] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0024] The terminal devices 101, 102, 103 interact with the server 105 through the network 104 to receive or send messages, etc. Various client applications may be installed on the terminal devices 101, 102, 103. For example, browser applications, search applications, instant messaging tools, shopping applications, service platforms or tools, etc.

[0025] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0026] The server 105 may be a server that provides various services, such as a server that provides backend support for client applications installed on the terminal devices 101, 102, and 103. The server 105 may obtain content association information between the pending orders submitted by the terminal devices 101, 102, and 103, determine the backlog impact of each order based on the content association information, determine the processing order of each order based on the backlog impact, and process the orders according to the determined processing order.

[0027] It should be noted that the method for processing an order provided in the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for processing an order is generally disposed in the server 105 .

[0028] It should also be noted that an order processing application may also be installed in the terminal devices 101, 102, and 103. The terminal devices 101, 102, and 103 may also process each order in the pending order set based on the order processing application. In this case, the method for processing an order may also be executed by the terminal devices 101, 102, and 103, and accordingly, the device for processing an order may also be set in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may not have the server 105 and the network 104.

[0029] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0030] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0031] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for processing an order according to the present disclosure. The method for processing an order comprises the following steps:

[0032] Step 201, obtaining content association information between orders in a set of pending orders.

[0033] In this embodiment, an order may be any type of order, and correspondingly, the service content of the order may be various. The service content of an order may refer to the service provided by the order. For example, the service content of an order may include the provision of various items or the provision of various services. The pending order set may consist of a number of pending orders. The pending order may be any order. For example, the pending order set may consist of orders generated within the past 10 minutes.

[0034] For any two orders, the content association information between the orders can be used to indicate whether the two orders include the same service content. It should be noted that the service content of each order can include multiple items. If two orders include at least one of the same service content, then the two orders can be considered to include the same service content.

[0035] For example, order "A" includes items "X" and "Y", and order "B" includes items "X" and "Z". Since orders "A" and "B" include the same item "X", it can be considered that orders "A" and "B" include the same service content.

[0036] The content association information between the orders in the pending order set may include the content association information between any two orders. The content association information between the orders may be determined according to the service content included in each order.

[0037] The execution entity used to process the order (such as Figure 1 The server 105 shown in the figure can obtain the content association information between the orders in the to-be-processed order set from the local or other storage devices. The content association information between the orders can be generated by the execution subject or by other electronic devices.

[0038] Step 202: Determine the backlog impact of each order in the set of pending orders based on the content association information between the orders.

[0039] In this embodiment, the order backlog state may refer to a situation where orders are backlogged and cannot be processed in time. The backlog impact of an order may indicate the impact of the order on the order backlog state of the pending order set. Specifically, the backlog impact of an order may indicate the degree of order backlog that may occur due to the non-execution of the order.

[0040] Generally, orders should be processed in order according to their generation time, and orders with earlier generation time should be processed first when inventory is limited. The generation time of an order can refer to the time when the user places the order. Therefore, the generation time of an order and the content association information between orders directly affect the processing order of each order. The content association information between orders is one of the root causes of order backlogs. Specifically, various methods can be used to determine the backlog impact of each order according to actual application requirements.

[0041] For example, for an order, the number of orders including the same service content as the order can be determined based on the content association information between the order and other orders, and then the backlog impact of the order can be determined based on the determined number and the generation time of the order. Generally, the determined number is proportional to the backlog impact of the order, and the generation time is inversely proportional to the backlog impact of the order. As an example, for each order, the quotient of the number of orders including the same service content as the order and the generation time can be determined as the backlog impact of the order.

[0042] Step 203, determining the processing order of the orders in the to-be-processed order set according to the backlog impact of each order, and processing the orders according to the determined processing order.

[0043] In this embodiment, after obtaining the backlog impact corresponding to each order, the processing order of each order can be further determined, and then the processing of each order can be completed in sequence according to the determined processing order. Generally, the orders in the to-be-processed order set can be sorted in descending order according to the corresponding backlog impact, and the obtained order is used as the processing order of each order.

[0044] The specific process of order processing can be flexibly set according to the actual application scenario. For example, the process of order processing can include the packaging, sorting and transportation of items involved in the order.

[0045] In some optional implementations of this embodiment, the backlog impact of each order in the pending order set can be used to characterize the number of associated orders of the order in the pending order set. Specifically, for each order, the associated orders of the order in the pending order set can constitute the associated order set of the order, and correspondingly, the non-associated orders of the order in the pending order set can constitute the non-associated order set of the order.

[0046] The service contents of all associated orders in the associated order set of the order may have no intersection with the service contents of all non-associated orders in the non-associated order set of the order. That is, any service content involved in the associated order set of the order is not included in the service content involved in the non-associated order set of the order. For each order, the associated order set and non-associated order set of each order can be screened out based on the content association information between the orders in the pending order set.

[0047] The associated orders of each order determined in this way can include all orders related to each order in a cascading manner. Therefore, the execution status of each order will directly affect the backlog of its associated orders. Therefore, determining the backlog impact of each order based on the number of associated orders of each order can more accurately evaluate the degree of order backlog that each order may cause, which is convenient for the subsequent reasonable arrangement of the processing order of the order to avoid serious order backlogs as much as possible.

[0048] In some optional implementations of this embodiment, for each order in the to-be-processed order set, a preceding order set and a succeeding order set of the order may be determined based on content association information between the orders.

[0049] Each order includes the same service content as each order in its predecessor order set, and the generation time of the order is no earlier than that of the order in its predecessor order set. Each order and each order in its predecessor order set may include at least one common service content. The common service content included in each order and each order in its predecessor order set may be the same or different.

[0050] At the same time, each order also includes the same service content as each order in the subsequent order set, and the generation time of the order is no later than that of the orders in the subsequent order set. Each order and each order in its subsequent order set may include at least one common service content. The common service content included in each order and each order in its subsequent order set may be the same or different.

[0051] Specifically, the preceding order set and the succeeding order set of each order may be determined according to the content association information between the orders and the generation time statistics of the orders.

[0052] As an example, order "A" includes items "01", "02" and "03", order "B" includes items "02" and "04", order "C" includes items "02", "03" and "05", and order "A" is generated earlier than order "B", and order "B" is generated earlier than order "C". For order "A", its predecessor order set is empty, and its successor order set includes orders "B" and "C". For order "B", its predecessor order set includes order "A", and its successor order set includes order "C". For order "C", its predecessor order set includes orders "A" and "B", and its successor order set is empty.

[0053] Generally, each order has a corresponding relationship with each order in its predecessor order set and successor order set. For example, if order "X" is the predecessor order of order "Y", then order "Y" must also be the successor order of order "X".

[0054] By analyzing the predecessor order set and the successor order set of each order, we can more clearly and intuitively understand the content relationship between the orders, thereby facilitating the subsequent analysis of the backlog impact of each order and rationally designing the processing sequence of each order.

[0055] In the prior art, in order to ensure the "first come, first served" order processing rule, orders are usually processed in strict accordance with the order generation time. However, when the order volume is large and the content of the orders processed in the same batch is seriously related (such as the promotion of certain items), if one order is not processed, it will cause a large number of subsequent related orders to be unable to be processed, thereby causing a serious order backlog.

[0056] To address this problem, the method provided by the above-mentioned embodiments of the present disclosure analyzes the content association information between each order, and based on this determines the backlog impact of each order to understand the degree of influence of each order on the order backlog of the pending order set, and then reasonably arranges the processing order of each order according to the backlog impact of each order, and gives priority to timely processing the pending orders that may cause serious order backlogs, thereby avoiding serious order backlogs and helping to improve order processing efficiency and resource utilization.

[0057] Further references Figure 3 , which shows a process 300 of an embodiment of determining a preceding order set and a succeeding order set for each order. The process 300 includes the following steps:

[0058] Step 301, determining target orders corresponding to the service contents of the order from the orders in the to-be-processed order set whose generation time is not later than that of the order, and obtaining a target order set.

[0059] In this embodiment, for each order in the pending order set, an order whose generation time is not later than that of the order can be selected from the pending orders to obtain an order subset. Then, for each service content included in the order, a target order corresponding to the service content can be selected from the order subset obtained in this step, thereby obtaining a target order set consisting of target orders corresponding to each service content included in the order.

[0060] The target order corresponding to each service content may be the order that includes the service content and is generated the latest. Specifically, for each service content, the order that includes the service content may be first selected from the order subset obtained in this step, and then the order with the latest generation time may be selected from the selected orders as the target order corresponding to the service content.

[0061] Step 302: for each service content of the order, determine whether the target order set includes the target order corresponding to the service content.

[0062] In this embodiment, for each service content included in the order, it can be determined whether the target order set includes the target order corresponding to the service content. Since there is a situation where none of the orders in the order subset obtained in the previous step 301 includes a certain service content included in the order, there is no corresponding target order for the service content.

[0063] Step 303, in response to determining that the target order set includes the target order corresponding to the service content, the target order corresponding to the service content is added to the predecessor order set of the order, and the order is added to the successor order set of the target order corresponding to the service content.

[0064] In this embodiment, for each service content, if the target order set includes the target order corresponding to the service content, the target order corresponding to the service content is added to the predecessor order set of the order, and the order is added to the successor order set of the target order corresponding to the service content.

[0065] For the execution process not specifically described in this embodiment, reference can be made to the relevant descriptions in the above embodiments, and will not be repeated here.

[0066] Based on this, the predecessor order set and subsequent order set of each order are determined or updated in sequence according to the natural order of the generation time of each order in the pending order set, until the predecessor order set and subsequent order set corresponding to each order are finally determined. The latest predecessor order set and subsequent order set of each order can be determined in an orderly and timely manner, which is convenient for the subsequent analysis and setting of the order processing sequence. When there are a large number of identical service contents in the orders in the pending order set, the order processing time can be effectively shortened, thereby improving the order processing efficiency.

[0067] Further references Figure 4 , which shows a process 400 of an embodiment of determining the backlog impact of each order. The process 400 includes the following steps:

[0068] Step 401, setting the same initial backlog impact for each order in the to-be-processed order set.

[0069] In this embodiment, the initial backlog impact can be flexibly set by the technician in advance according to the actual application scenario. Generally, the initial backlog impact is not less than zero. For example, the initial backlog impact of all orders can be set to 1.

[0070] Step 402, select the order with the latest generation time from the set of pending orders as the target order, and perform the following update steps 4021-4022:

[0071] Step 4021, determining the sum of the current backlog impact and the initial backlog impact of the target order as a comparison value, and executing the following update sub-steps 40211-40123:

[0072] In this step, the sum of the current latest backlog impact of the target order and its initial backlog impact can be calculated as a comparison value.

[0073] Step 40211, select an order from the predecessor order set of the target order as the order to be updated, select the maximum value between the current backlog impact and the comparison value of the order to be updated, and use the selected maximum value to update the current backlog impact of the order to be updated.

[0074] In this step, orders can be flexibly selected from the previous order set of the target order as the order to be updated. For example, orders can be selected randomly or in sequence according to the generation time.

[0075] After selecting the order to be updated, the current latest backlog impact of the order to be updated and the comparison value obtained in the above step 4021 can be compared, and the maximum value can be selected. The current backlog impact of the order to be updated is then updated using the maximum value, that is, the maximum value is used as the current latest backlog impact of the order to be updated.

[0076] Step 40212, determining whether there are any unselected orders in the previous order set;

[0077] Step 40213, in response to determining that there are unselected orders in the predecessor order set, select the unselected orders from the predecessor order set to continue executing the above-mentioned update sub-step.

[0078] In this step, if there are unselected orders in the previous order set, reselect orders from the unselected orders in the previous order set and continue to execute the above-mentioned update sub-step until there are no unselected orders in the previous order set.

[0079] Step 4022, in response to determining that there are no unselected orders in the previous order set, the target order is deleted from the pending order set, and the order with the latest generation time is reselected from the updated pending order set as the target order to continue executing the above update step.

[0080] In this step, if there are no unselected orders in the previous order set, the target order is deleted from the pending order set to update the pending order set, and then the order with the latest generation time is reselected from the updated pending order set as the target order to continue executing the above update steps until the updated pending order set is empty.

[0081] As an example, the initial backlog impact of each order in the pending order set can be initialized to 1, and then an order sequence is formed in order of the order generation time from the latest to the earliest, and orders are selected from the order sequence for traversal. For each selected order "X", each predecessor order in its predecessor order set is traversed, and for each predecessor order "Y", its backlog impact is updated to D(Y) = max(D(Y), D(X) + 1), and then the operation is repeated until all orders in the order sequence are traversed to obtain the final backlog impact of each order.

[0082] For the execution process not specifically described in this embodiment, reference can be made to the relevant descriptions in the above embodiments, and will not be repeated here.

[0083] The method provided by the above-mentioned embodiments of the present disclosure first sets the same initial backlog impact for each order, and then updates the backlog impact of each order in the predecessor order set of each order in order from late to early generation time, so that the backlog impact of orders with more cascaded predecessor orders is greater, thereby accurately characterizing the backlog impact of each order, and further ensuring the rationality of the subsequent order processing order determined based on the backlog impact.

[0084] Further references Figure 5 , which shows a process 500 of another embodiment of a method for processing an order. The process 500 of the method for processing an order includes the following steps:

[0085] Step 501: Obtain content association information between orders in a set of pending orders.

[0086] Step 502: Determine the backlog impact of each order in the to-be-processed order set according to the content association information between the orders.

[0087] Step 503: Determine the target attribute of the predecessor order set of each order in the to-be-processed order set.

[0088] In this embodiment, the target attribute of the predecessor order set may be used to indicate whether the predecessor order set is empty.

[0089] Step 504, determining the processing order of each order according to the target attributes and backlog impact of the predecessor order set of the order.

[0090] In this embodiment, various methods can be flexibly adopted to determine the processing order of each order according to the target attributes and backlog impact of the preceding order set of each order.

[0091] If an order has a predecessor order, it means that the order can only be processed after the predecessor order is processed to ensure that the inventory is allocated to the order first. Therefore, the processing order of an order with an empty predecessor order set can be earlier than that of an order with a non-empty predecessor order set.

[0092] The greater the backlog impact of an order, the more serious the order backlog that the order may cause. Therefore, in order to avoid serious order backlogs, orders with greater backlog impact should be processed first, so orders with greater backlog impact can be processed earlier than orders with smaller backlog impact.

[0093] In this way, the processing order of each order in the pending order set can be reasonably allocated to ensure that inventory can be allocated to orders with an earlier generation time first, and at the same time, orders with a greater backlog impact can be processed first to avoid serious order backlogs.

[0094] In some optional implementations of this embodiment, the following steps may be used to determine the processing order of the orders in the to-be-processed order set according to the backlog impact of each order, and to process the orders according to the determined processing order:

[0095] Step 1: Select orders whose previous order set is empty from the pending order set and add them to the order processing queue, and execute the following processing steps 2 to 4:

[0096] In this step, it can be determined whether the predecessor order set of each order in the to-be-processed order set is empty, and then the orders with empty predecessor order sets are selected and added to the order processing queue.

[0097] Step 2, in response to determining that the order processing queue is not empty and there are currently idle threads, select the order with the largest backlog impact from the order processing queue as a candidate processing order, use the idle thread to process the selected candidate processing order, and delete the candidate processing order from the order processing queue.

[0098] In this step, threads can be assigned to process orders. If there are orders in the order processing queue and there are currently idle threads that can process orders, the orders with the greatest backlog impact can be preferentially selected from the order processing queue as candidate processing orders, and then the idle threads can be used to process the orders with the greatest backlog impact. Then, the candidate processing orders that have started processing can be deleted from the order processing queue.

[0099] Step three, in response to determining that the candidate processing order is completed, releasing the occupied thread, and deleting the association relationship between the candidate processing order and each order in its subsequent order set.

[0100] In this step, if the candidate order is processed, the thread it occupies can be released to make the thread an idle thread. At the same time, since the candidate order has been processed, it will no longer cause a backlog of other orders, so the association between the candidate order and each order in its subsequent order set can be deleted at this time. Specifically, the subsequent order set of the candidate order that has been processed can be deleted, and at the same time, for each order in its subsequent order set, the candidate order that has been processed can be deleted from the previous order set of the order.

[0101] Step 4: in response to determining that the set of pending orders also includes unprocessed orders, the order processing queue is updated to continue to execute the above processing steps.

[0102] In this step, if the pending order set also includes unprocessed orders, orders whose preceding order set is empty can be selected from the pending order set and added to the order processing queue to update the order processing queue, and then the above steps 2 to 4 can be continued based on the updated order processing queue until all pending orders are processed.

[0103] In some cases, there may be multiple idle threads. In this case, if there are multiple orders with empty preceding order sets, multiple idle threads can be used to process multiple orders in parallel to further improve order processing efficiency and thread utilization.

[0104] For the execution process not specifically described in this embodiment, reference can be made to the relevant descriptions in the above embodiments, and will not be repeated here.

[0105] Continue to see Figure 6 , Figure 6 FIG. 6 is an exemplary application scenario 600 of the method for processing an order according to this embodiment. Figure 6In the application scenario, the orders submitted by users within the past 5 minutes can be obtained to form a pending order set, including order "A" 601, order "B" 602, and order "C" 603. Among them, order "A" includes items "01", "02", and "03", order "B" includes items "02" and "04", and order "C" includes items "03" and "05". The generation time of order "A" is earlier than that of order "B", and the generation time of order "B" is earlier than that of order "C".

[0106] For order "A", as shown by label 604 in the figure, its predecessor order set is empty, and its successor order set includes orders "B" and "C". For order "B", as shown by label 605 in the figure, its predecessor order set includes order "A", and its successor order set includes order "C". For order "C", as shown by label 606 in the figure, its predecessor order set includes orders "A" and "B", and its successor order set is empty. Based on this calculation, the backlog impact of order "A" is 3, and the backlog impact of orders "B" and "C" is 1.

[0107] The idle threads at this time include thread "X" 607 and thread "Y" 608. Since order "A" does not have a preceding order, thread "X" 607 can be randomly selected to process order "A" to obtain the corresponding processing result, and then thread "X" is released.

[0108] After order "A" is processed, there are no previous orders for order "B" and order "C", so the current idle thread "X" can be used to process order "C", and idle thread "Y" can be used to process order "B" at the same time, so as to obtain the processing results corresponding to order "B" and order "C" respectively.

[0109] Some existing order processing methods are to design an order caching mechanism to cache orders with the same service content as the currently processed order. However, since the cache capacity is usually limited, the order processing efficiency will be greatly reduced after the cache is saturated. The method provided by the above-mentioned embodiment of the present disclosure, after obtaining the backlog impact of each order in the to-be-processed order set, prioritizes the orders with an empty predecessor order set and a large backlog impact based on whether the predecessor order set of each order is empty, so as to avoid serious order backlogs due to the failure to process these orders in a timely manner, ensure the rationality of the order processing sequence, and improve resource utilization.

[0110] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for processing an order. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0111] like Figure 7 As shown, the device 700 for processing orders provided by this embodiment includes an acquisition unit 701, a determination unit 702 and a processing unit 703. The acquisition unit 701 is configured to acquire content association information between orders in the pending order set, wherein the content association information is used to indicate whether different orders include the same service content; the determination unit 702 is configured to determine the backlog impact of each order in the pending order set according to the content association information between the orders, wherein the backlog impact of an order indicates the impact of the order on the order backlog state of the pending order set; the processing unit 703 is configured to determine the processing order of the orders in the pending order set according to the backlog impact of each order, and process the orders according to the determined processing order.

[0112] In the device 700 for processing an order in this embodiment, the specific processing of the acquisition unit 701, the determination unit 702 and the processing unit 703 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.

[0113] In some optional implementations of this embodiment, the backlog impact of each order in the above-mentioned set of pending orders is used to characterize the number of associated orders of the order in the set of pending orders, wherein the service content of the associated orders of the order has no intersection with the service content of the non-associated orders of the order in the set of pending orders.

[0114] In some optional implementations of the present embodiment, the determination unit 702 is further configured to: for each order in the pending order set, determine a predecessor order set and a successor order set of the order based on content-related information, wherein the order includes the same service content as the orders in the predecessor order set and the successor order set, respectively, and the generation time of the order is no earlier than that of the orders in the predecessor order set and no later than that of the orders in the successor order set.

[0115] In some optional implementations of the present embodiment, the determination unit 702 is further configured to: determine the target orders corresponding to the service contents of the order from the orders in the pending order set whose generation time is no later than that of the order, and obtain a target order set, wherein the target order corresponding to each service content is the order that includes the service content and has the latest generation time; for each service content of the order, determine whether the target order set includes the target order corresponding to the service content; in response to determining that the target order set includes the target order corresponding to the service content, add the target order corresponding to the service content to the predecessor order set of the order, and add the order to the successor order set of the target order corresponding to the service content.

[0116] In some optional implementations of the present embodiment, the determination unit 702 is further configured to: set the same initial backlog impact for each order in the pending order set; select the order with the latest generation time from the pending order set as the target order, and perform the following update steps: determine the sum of the current backlog impact and the initial backlog impact of the target order as a comparison value, and perform the following update sub-steps: select an order from the predecessor order set of the target order as the order to be updated, select the maximum value between the current backlog impact and the comparison value of the order to be updated, and use the selected maximum value to update the current backlog impact of the order to be updated; determine whether there are unselected orders in the predecessor order set; in response to determining that there are unselected orders in the predecessor order set, select the unselected orders from the predecessor order set to continue to perform the update sub-step; in response to determining that there are no unselected orders in the predecessor order set, delete the target order from the pending order set, and re-select the order with the latest generation time from the updated pending order set as the target order to continue to perform the above update steps.

[0117] In some optional implementations of the present embodiment, the determination unit 703 is further configured to: determine a target attribute of a predecessor order set of each order in the set of pending orders, wherein the target attribute is used to indicate whether the predecessor order set is empty; determine a processing order for the order based on the target attribute of the predecessor order set and the backlog impact of each order, wherein an order whose predecessor order set is empty is processed earlier than an order whose predecessor order set is not empty, and an order with a large backlog impact is processed earlier than an order with a small backlog impact.

[0118] In some optional implementations of this embodiment, the above-mentioned determination unit 703 is further configured to: select orders whose predecessor order set is empty from the to-be-processed order set and add them to the order processing queue, and execute the following processing steps: in response to determining that the order processing queue is not empty and there are currently idle threads, select the order with the largest backlog impact from the order processing queue as a candidate processing order, use the idle thread to process the selected candidate processing order, and delete the candidate processing order from the order processing queue; in response to determining that the processing of the candidate processing order is completed, release the occupied thread, and delete the association relationship between the candidate processing order and each order in its subsequent order set; in response to determining that the to-be-processed order set also includes unprocessed orders, update the order processing queue and continue to execute the above-mentioned processing steps.

[0119] The device provided by the above-mentioned embodiment of the present disclosure obtains content association information between each order in the pending order set through an acquisition unit, wherein the content association information is used to indicate whether different orders include the same service content; the determination unit determines the backlog impact of each order in the pending order set according to the content association information, wherein the backlog impact of an order indicates the impact of the order on the order backlog status of the pending order set; the processing unit determines the processing order of the orders in the pending order set according to the backlog impact, and processes the orders according to the determined processing order, thereby ensuring that orders that have a greater impact on the overall backlog status of orders are processed first, so as to avoid a serious overall backlog of orders, which helps to improve the overall order processing efficiency.

[0120] Reference below Figure 8 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server in (a) 800. Figure 8 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0121] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0122] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0123] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0124] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0125] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains content association information between orders in the pending order set, wherein the content association information is used to indicate whether different orders include the same service content; determines the backlog impact of each order in the pending order set according to the content association information between the orders, wherein the backlog impact of an order indicates the impact of the order on the order backlog status of the pending order set; determines the processing order of the orders in the pending order set according to the backlog impact of each order, and processes the orders according to the determined processing order.

[0126] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0127] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0128] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor includes an acquisition unit, a determination unit, and a processing unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the processing unit may also be described as "a unit that determines the processing order of orders in the set of pending orders according to the backlog impact of each order, and processes the orders according to the determined processing order".

[0129] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure to form a technical solution.

Claims

1. A method for processing orders, comprising: obtaining content association information among orders in a set of orders to be processed, wherein the content association information is used to indicate whether different orders include the same service content; respectively determining the backlog impact degree of each order in the set of orders to be processed according to the content association information, wherein the backlog impact degree of an order represents the impact degree of the order on the order backlog status of the set of orders to be processed, and the backlog impact degree of an order is determined according to the number of orders including the same service content as the order and the generation time of the order; sorting the processing order of the orders in the set of orders to be processed in descending order according to the backlog impact degree, and processing the orders according to the sorted processing order.

2. The method according to claim 1, wherein, the backlog impact degree of each order in the set of orders to be processed is used to characterize the number of associated orders of the order in the set of orders to be processed, wherein the service content of the associated orders of the order has no intersection with the service content of the non-associated orders of the order in the set of orders to be processed.

3. The method according to claim 2, wherein, the method further comprises: for each order in the set of orders to be processed, determining a set of previous orders and a set of subsequent orders of the order according to the content association information, wherein the order and each order in the set of previous orders and the set of subsequent orders include the same service content, and the generation time of the order is not earlier than the orders in the set of previous orders and not later than the orders in the set of subsequent orders.

4. The method according to claim 3, wherein, determining the set of previous orders and the set of subsequent orders of the order according to the content association information includes: determining target orders corresponding to each service content of the order from the orders in the set of orders to be processed whose generation time is not later than the order, to obtain a set of target orders, wherein the target order corresponding to each service content is the order including the service content and having the latest generation time; for each service content of the order, determining whether the set of target orders includes the target order corresponding to the service content; in response to determining that the set of target orders includes the target order corresponding to the service content, adding the target order corresponding to the service content to the set of previous orders of the order, and adding the order to the set of subsequent orders of the target order corresponding to the service content.

5. The method according to claim 3, wherein, respectively determining the backlog impact degree of each order in the set of orders to be processed according to the content association information includes: setting the same initial backlog impact degree for each order in the set of orders to be processed; selecting the order with the latest generation time from the set of orders to be processed as the target order, and performing the following update steps: determining the sum of the current backlog impact degree and the initial backlog impact degree of the target order as the comparison value, and performing the following update sub-steps: selecting an order from the set of previous orders of the target order as the order to be updated, selecting the maximum value between the current backlog impact degree of the order to be updated and the comparison value, and using the selected maximum value to update the current backlog impact degree of the order to be updated; Determine whether there are unselected orders in the previous order set; In response to determining that there are unselected orders in the previous order set, selecting the unselected orders from the previous order set to continue executing the updating sub-step; In response to determining that there are no unselected orders in the previous order set, the target order is deleted from the pending order set, and the order with the latest generation time is reselected from the updated pending order set as the target order to continue executing the updating step.

6. The method according to any one of claims 1 to 5, in, The ordering of the processing order of the orders in the to-be-processed order set according to the backlog impact from large to small, and processing the orders according to the sorted processing order, includes: Determine a target attribute of a predecessor order set of each order in the to-be-processed order set, wherein the target attribute is used to indicate whether the predecessor order set is empty; The processing order of each order is determined based on the target attributes and backlog impact of its predecessor order set, where the processing order of an order whose predecessor order set is empty is earlier than that of an order whose predecessor order set is not empty, and the processing order of an order with a large backlog impact is earlier than that of an order with a small backlog impact.

7. The method according to claim 6, in, The ordering of the processing order of the orders in the to-be-processed order set according to the backlog impact from large to small, and processing the orders according to the sorted processing order, includes: Select orders whose previous order set is empty from the pending order set and add them to the order processing queue, and perform the following processing steps: In response to determining that the order processing queue is not empty and there is currently an idle thread, selecting an order with the largest backlog impact from the order processing queue as a candidate processing order, processing the selected candidate processing order using the idle thread, and deleting the candidate processing order from the order processing queue; In response to determining that the candidate processing order is completed, releasing the occupied thread, and deleting the association relationship between the candidate processing order and each order in its subsequent order set; In response to determining that the to-be-processed order set further includes unprocessed orders, the order processing queue is updated to continue to execute the processing steps.

8. A device for processing orders, in, The device comprises: an acquisition unit, configured to acquire content association information between orders in the to-be-processed order set, wherein the content association information is used to indicate whether different orders include the same service content; a determining unit configured to determine the backlog impact of each order in the set of pending orders according to the content association information, wherein the backlog impact of an order indicates the impact of the order on the order backlog state of the set of pending orders, and the backlog impact of an order is determined according to the number of orders including the same service content as the order and the generation time of the order; The processing unit is configured to sort the processing order of the orders in the to-be-processed order set according to the order from large to small of the backlog impact, and to process the orders according to the sorted processing order.

9. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Hot selling query based quick sorting method and system

    CN105303352A

  • Capacity management based on backlog information

    US20150222560A1