Method, device, electronic device and storage medium for out-of-order order processing
By constructing a decision sequence through a dynamic programming algorithm, the problems of disorder and repeated calls in order processing are solved, flexible order process execution is achieved, and order fulfillment efficiency and customer satisfaction are improved.
Patent Information
- Application Number
- CN202110247055.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-05
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-03-05
AI Technical Summary
During the order processing process, existing technologies face the problem of an increase in abnormal orders caused by disordered and repeated calls, which reduces fulfillment efficiency and customer satisfaction. In addition, hard-coded solutions are not conducive to demand changes and expansion.
A decision sequence is constructed based on a dynamic programming algorithm. The order process is divided into multiple execution stages through the dynamic programming algorithm, the decision strategy is determined, and the flexible execution of orders in disordered situations is achieved through pre-judgment rules and link transition rules.
It improves the flexibility of order process processing, reduces the number of abnormal orders, increases the fulfillment success rate, and improves customer satisfaction.
Smart Images

Figure CN115034530B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data processing technology, and in particular to a method, device, electronic device and storage medium for out-of-order order processing. Background Art
[0002] During order processing and fulfillment scheduling, the order system needs to interact with multiple external systems, receiving processing notifications or feedback from these external systems. Both parties agree on the order and frequency limits for calling interface services. For example, for card services, this typically follows a pre-programmed process, such as STEP 1: Order creation -> STEP 2: Order payment -> STEP 3: Logistics delivery -> STEP 4: Card writing -> STEP 5: Activation -> STEP 6: Completion.
[0003] However, in the actual processing process, there are often situations where orders are out of order or repeated calls due to various reasons, including the following situations:
[0004] 1. The external system does not send processing requests in the agreed order. For example, if STEP 3 is not executed, STEP 4 is notified.
[0005] 2. When batching requests, due to varying business complexities, processing times may be inconsistent (for example, STEP 5 is faster than STEP 4). If batching requests are made in both STEP 4 and STEP 5, some STEP 5 requests may be processed out of order because their corresponding STEP 4 requests have not yet been completed, resulting in an out-of-order exception error.
[0006] 3. Due to business needs, several events can be packaged into a process link, allowing multiple executions of this link (each execution handling a different event). Taking the group's OAO card business as an example, Event 1 (signing), Event 2 (card writing), and Event 3 (activation) are defined as a single link. Repeated external calls are allowed, but each call must follow the order of the events.
[0007] In the existing order system, a simple solution is to return an error for all requests that violate the agreed calling sequence, such as Figure 1 At the same time, for scenarios where calls can be repeated and the content of each call is inconsistent, hard coding is used.
[0008] It can be found that the existing technology for processing out-of-order calls has the following shortcomings:
[0009] 1. The crude and simplistic approach of directly returning errors fails to fully consider the fault tolerance of interfaces and systems, as well as the rationality of merging or skipping links in actual business operations, making it difficult to meet actual business needs.
[0010] 2. Directly returning errors leads to a large number of abnormal orders, reduced order fulfillment efficiency, increased or reduced operation and maintenance workload, and reduced customer and front-line staff satisfaction;
[0011] 3. Using hard coding to implement a solution for controlling repeated calls and sequences is not conducive to rapid support for demand changes and is difficult to expand.
[0012] Therefore, as order processing becomes increasingly complex, new order processing methods need to be proposed. Summary of the Invention
[0013] The present invention provides a method, device, electronic device and storage medium for processing out-of-order orders, so as to solve the defects existing in the prior art.
[0014] In a first aspect, the present invention provides a method for processing out-of-order orders, comprising:
[0015] Identify pending orders;
[0016] Obtaining the workflow of the pending order;
[0017] The workflow is executed using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed in an out-of-order situation.
[0018] In one embodiment, the dynamic programming algorithm specifically includes:
[0019] Divide the activity process into several execution stages and determine the decision-making strategy for each execution stage;
[0020] A multi-stage decision process is formed by the initial state of the activity process, several decision strategies and the end state;
[0021] The problem stages, the states of each stage and the recursive relationships between the stages in the multi-stage decision process are determined respectively.
[0022] In one embodiment, the workflow for obtaining the pending order specifically includes:
[0023] Obtaining several link nodes corresponding to the workflow, a policy scheme corresponding to each link node, several policy rules corresponding to each policy scheme, and several rule conditions corresponding to each policy rule;
[0024] The plurality of policy rules are formed into a rule sequence through the plurality of rule conditions;
[0025] The plurality of policy rules and the rule sequence are executed in a predefined order or based on the dynamic programming algorithm.
[0026] In one embodiment, the workflow is executed using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed out of order, and the process also includes:
[0027] Obtaining a current rule sequence corresponding to the workflow;
[0028] Determining that the current rule sequence includes a plurality of execution rules, wherein the plurality of execution rules include a pre-judgment rule and a link transition rule;
[0029] The preceding judgment rule is configured as the first rule in the current rule sequence to determine whether the preceding solution has been executed. If it is determined that the preceding solution has not been executed, the preceding solution rule sequence is executed; otherwise, the next rule in the current rule sequence is executed;
[0030] The link transition rule is configured as the last rule in the current rule sequence to determine whether the current rule sequence can transition to the next link scheme rule sequence after execution. If it is determined that the transition can be made, the next link scheme rule sequence is entered.
[0031] In one embodiment, executing the workflow using a decision sequence constructed based on a dynamic programming algorithm to complete the execution of pending orders out of order specifically includes:
[0032] Determine the current request execution node sequence number of the workflow;
[0033] Configure the current execution policy rule according to the current request execution node sequence number, and load the current rule sequence corresponding to the current execution policy rule and the rule condition group corresponding to the current rule sequence;
[0034] Performing a start execution judgment of the current request execution node based on the pre-judgment rule;
[0035] The end execution judgment of the current request execution node is performed based on the link transition rule.
[0036] In one embodiment, the determining whether to start execution of the current request execution node based on the pre-determination rule specifically includes:
[0037] If the request execution node number corresponding to the current link condition of the judgment process is equal to the current request execution node number, then the remaining request execution nodes corresponding to the current request execution node are executed in sequence;
[0038] If the request execution node number corresponding to the current link condition of the judgment process is less than the current request execution node number, the link has not been executed to the current request execution node, and it is judged whether it is necessary to jump back to the previous execution node based on whether the previous link condition needs to be jumped. If the jump is allowed, the rule sequence pointing to the previous execution node is jumped, otherwise an error message is returned;
[0039] If the request execution node number corresponding to the current link condition of the judgment process is greater than the current request execution node number, then the link has exceeded the current request execution node, the current request execution node has been executed and cannot be executed again, and an error message is returned.
[0040] In one embodiment, the determining whether to terminate execution of the current request execution node based on the link transition rule specifically includes:
[0041] Determine whether the link can be ended based on the end condition. If it is ended, return to allow transition to the next link. Otherwise, return not to allow transition and continue to stay in the current link.
[0042] In a second aspect, the present invention further provides an apparatus for processing out-of-order orders, comprising:
[0043] A determination module is used to determine pending orders;
[0044] An acquisition module, used to acquire the workflow of the order to be processed;
[0045] The execution module is used to execute the workflow by adopting a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders can be completed in an out-of-order situation.
[0046] In a third aspect, the present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described methods for processing out-of-order orders are implemented.
[0047] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for processing out-of-order orders.
[0048] The out-of-order order processing method, device, electronic device and storage medium provided by the present invention enhance the flexibility of order process processing, reduce the number of abnormal orders, and increase the order fulfillment success rate by adding processing rules that support dynamic planning of order processes on the basis of conventional order processing processes, thereby improving customer satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 This is a schematic diagram of the processing flow of the existing order system for call errors provided by the prior art;
[0051] Figure 2 1 is a flow chart of the method for processing out-of-order orders provided by the present invention;
[0052] Figure 3 This is a schematic diagram of the process steps based on the dynamic programming solution provided by the present invention;
[0053] Figure 4 It is a schematic diagram of the model configuration provided by the present invention;
[0054] Figure 5 It is a schematic diagram of the sequential execution plan provided by the present invention;
[0055] Figure 6 This is a schematic diagram of the out-of-order execution plan provided by the present invention;
[0056] Figure 7 It is a structural diagram of the device for processing out-of-order orders provided by the present invention;
[0057] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0059] The present invention provides a flexible and configurable order disorder processing method for the case of disordered and repeated calls of order processes. Through dynamic planning of strategy execution, a rational execution sequence for disordered process calls is dynamically constructed.
[0060] Figure 2 This is a flow chart of the method for processing out-of-order orders provided by the present invention. Figure 2 As shown, including:
[0061] 101, confirm pending orders;
[0062] 102, obtaining the workflow of the pending order;
[0063] 103. Execute the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed out of order.
[0064] Specifically, the present invention first determines the execution order that needs to be processed, obtains the specific information of the execution order, that is, the workflow, the conventional process that needs to be executed, introduces the dynamic programming idea, combines the workflow with the decision rule, and realizes flexible link transition judgment through various condition calculations (such as current node judgment, whether it can jump back to the previous order, whether it can be repeated, end conditions, etc.); through the pre-judgment rule Rule pre , Transition Rule jump The present invention realizes the dynamic planning rule execution sequence. Through the decision calculation of the rule condition group, the present invention dynamically constructs the decision sequence according to the actual call situation, realizes the regular processing of the process link execution, and realizes the flexible order disorder and repeated call control.
[0065] The present invention improves the flexibility of order process processing, reduces the number of abnormal orders, and increases the order fulfillment success rate, thereby improving customer satisfaction by adding processing rules that support dynamic planning of the order process on the basis of the conventional order processing process.
[0066] Based on the above embodiment, the dynamic programming algorithm specifically includes:
[0067] Divide the activity process into several execution stages and determine the decision-making strategy for each execution stage;
[0068] A multi-stage decision process is formed by the initial state of the activity process, several decision strategies and the end state;
[0069] The problem stages, the states of each stage and the recursive relationships between the stages in the multi-stage decision process are determined respectively.
[0070] It's important to note that in real life, activities are divided into several interconnected stages, each requiring a decision to achieve optimal results. Therefore, the decisions made at each stage cannot be made arbitrarily; they depend on the current situation and influence future developments. Once decisions are made at each stage, they form a decision sequence, defining a path for the entire process. This approach of viewing a problem as a multi-stage, chain-like process with interconnected processes is called a multi-stage decision process, and this type of problem is called a multi-stage decision problem.
[0071] Dynamic programming deals with multi-stage decision-making problems, generally starting from an initial state and reaching a final state through the selection of intermediate decisions. These decisions form a decision sequence and determine a path of action to complete the entire process (usually the optimal path). Dynamic programming designs follow a certain pattern and generally go through the following steps:
[0072] Initial state →│Decision 1│→│Decision 2│→…→│Decision n│→End state
[0073] When using dynamic programming to solve problems, the most important thing is to determine the three elements of dynamic programming:
[0074] 1. The stage of the problem: each process link of the workflow;
[0075] 2. The status of each stage: whether the process link is executable and the execution results.
[0076] 3. The recursive relationship from the previous stage to the next stage: that is, the transition relationship between process links.
[0077] The present invention increases the processing capability of supporting dynamic planning of order processes on the basis of preset order conventional processes, thereby greatly improving the flexibility of process processing.
[0078] Based on any of the above embodiments, the workflow for obtaining the pending order specifically includes:
[0079] Obtaining several link nodes corresponding to the workflow, a policy scheme corresponding to each link node, several policy rules corresponding to each policy scheme, and several rule conditions corresponding to each policy rule;
[0080] The plurality of policy rules are formed into a rule sequence through the plurality of rule conditions;
[0081] The plurality of policy rules and the rule sequence are executed in a predefined order or based on the dynamic programming algorithm.
[0082] Specifically, the order workflow in the present invention is divided into the following features:
[0083] 1) A workflow Flow corresponds to several links Node;
[0084] 2) Each process node corresponds to a strategy plan;
[0085] 3) A plan consists of several rules, each of which corresponds to a business execution component.
[0086] 4) A policy rule includes several rule conditions;
[0087] 5) Rules and rules form a series of rule sequences through rule conditions, which realize the whole process of process execution. Figure 3 As shown;
[0088] 6) In addition to being predefined, the execution order between rules and sequences also supports dynamic planning based on conditions.
[0089] The present invention realizes dynamic judgment of link execution through policy rules and condition configuration, supports multi-strategy execution schemes of sequential execution, reverse tracing execution and next link jump, and thus dynamically plans and generates process execution sequence.
[0090] Based on any of the above embodiments, the workflow is executed using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed out of order, and the method further includes:
[0091] Obtaining a current rule sequence corresponding to the workflow;
[0092] Determining that the current rule sequence includes a plurality of execution rules, wherein the plurality of execution rules include a pre-judgment rule and a link transition rule;
[0093] The preceding judgment rule is configured as the first rule in the current rule sequence to determine whether the preceding solution has been executed. If it is determined that the preceding solution has not been executed, the preceding solution rule sequence is executed; otherwise, the next rule in the current rule sequence is executed;
[0094] The link transition rule is configured as the last rule in the current rule sequence to determine whether the current rule sequence can transition to the next link scheme rule sequence after execution. If it is determined that the transition can be made, the next link scheme rule sequence is entered.
[0095] Specifically, to implement the dynamic programming solution proposed in the present invention, it is necessary to set the corresponding rule configuration before execution:
[0096] First, the process Flow is composed of n links: Node1, Node2, Node3, ..., Node n ; Each link Node corresponds to the strategy plan Plan1, Plan1, Plan3, ..., Plan n Each strategy plan configures a rule sequence, which includes several rules, including at least the pre-judgment rule Rule pre , Link transition rules jump .
[0097] Here, Rule pre As the first rule configuration in the scheme rule sequence, it is used to determine whether the previous scheme has been executed. If not, the previous scheme rule sequence is executed; otherwise, the next rule in this rule sequence is executed; Rule jump As the last rule configuration in the scheme rule sequence, it is used to determine whether the scheme can transition to the next stage after execution. If it can, it will enter the next stage scheme rule sequence. pre和 Rule jump Implement dynamic programming of rule execution sequence. The specific model configuration is as follows Figure 4 shown.
[0098] The present invention realizes the function of allowing multiple executions of process links through policy rule configuration, which can meet various business needs.
[0099] Based on any of the above embodiments, executing the workflow using a decision sequence constructed based on a dynamic programming algorithm so that the pending orders are executed out of order specifically includes:
[0100] Determine the current request execution node sequence number of the workflow;
[0101] Configure the current execution policy rule according to the current request execution node sequence number, and load the current rule sequence corresponding to the current execution policy rule and the rule condition group corresponding to the current rule sequence;
[0102] Performing a start execution judgment of the current request execution node based on the pre-judgment rule;
[0103] The end execution judgment of the current request execution node is performed based on the link transition rule.
[0104] The step of performing the judgment of starting execution of the current request execution node based on the pre-judgment rule specifically includes:
[0105] If the request execution node number corresponding to the current link condition of the judgment process is equal to the current request execution node number, then the remaining request execution nodes corresponding to the current request execution node are executed in sequence;
[0106] If the request execution node number corresponding to the current link condition of the judgment process is less than the current request execution node number, the link has not been executed to the current request execution node, and it is judged whether it is necessary to jump back to the previous execution node based on whether the previous link condition needs to be jumped. If the jump is allowed, the rule sequence pointing to the previous execution node is jumped, otherwise an error message is returned;
[0107] If the sequence number of the request execution node corresponding to the condition of the current step in the judgment process is greater than the current request execution node sequence number, it means that the step has exceeded the current request execution node, and the current request execution node has been executed and cannot be executed again, and an error message is returned.
[0108] Among them, the end execution judgment of the current request execution node based on the step transition rule specifically includes:
[0109] Judge whether the step can end according to whether the end condition is met. If it ends, return permission to transition to the next step; otherwise, return non - permission to transition and continue to stay in the current step.
[0110] Specifically, the present invention first sets the normal call logic in the order workflow as Node1—>Node2—>Node3—>Node n , assuming that the current request is to execute step Node2, execute Plan2 according to the configuration of Node2, and load the rule chain Rule and its corresponding condition group Cond of Plan2.
[0111] First, perform the pre - judgment rule Rulepre judgment:
[0112] 1) If the condition Cond 流程当前环节 = Node2, it means that the step is already at Node2, and the remaining Role2, Role3... corresponding to Plan2 can be executed in sequence;
[0113] 2) If the condition Cond 流程当前环节 < Node2, it means that the step has not reached Node2, and the previous Node1 has not been executed completely;
[0114] Then, judge whether it can jump back to the previous step according to the condition Cond 是否需要跳转前序环节 , for example, some steps allow subsequent steps to trigger the re - execution of the previous step, while some do not;
[0115] If the jump is allowed, point to the rule chain of the previous Plan1; if not, return an error;
[0116] 3) If the condition Cond1 流程当前环节 > Node2, it means that the step has passed Node2, and Node2 has been executed and cannot be executed again, and an error prompt is returned.
[0117] For the sequential execution plan as Figure 5 shown, and for the out - of - order execution plan as Figure 6 shown.
[0118] Then, perform the step transition rule Rulejump judgment: <着
[0119] 1) According to the conditions of these rules 是否结束 Determine whether a link can be terminated, such as allowing some links to be repeated until a certain condition is met;
[0120] 2) If it is finished, return to allow transition to the next link;
[0121] 3) If it is not finished, the result of not allowing transition is returned and the process remains in this link.
[0122] The present invention realizes the explicit and flexible configuration of process execution rules without hard coding, realizes the dynamic planning of process execution sequence according to actual conditions, and can meet and quickly support various business rule requirements.
[0123] The order out-of-order processing device provided by the present invention is described below. The order out-of-order processing device described below and the order out-of-order processing method described above can be referenced to each other.
[0124] Figure 7 This is a schematic diagram of the structure of the order disorder processing device provided by the present invention. Figure 7 As shown, it includes: a determination module 71, an acquisition module 72 and an execution module 73; wherein:
[0125] The determination module 71 is used to determine the pending orders; the acquisition module 72 is used to obtain the workflow of the pending orders; the execution module 73 is used to execute the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders can be completed in an out-of-order situation.
[0126] The present invention improves the flexibility of order process processing, reduces the number of abnormal orders, and increases the order fulfillment success rate, thereby improving customer satisfaction by adding processing rules that support dynamic planning of the order process on the basis of the conventional order processing process.
[0127] Figure 8 An example of a physical structure diagram of an electronic device is shown below. Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communications bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communications bus 840. The processor 810 may call logic instructions in the memory 830 to execute a method for processing orders out of order, which includes: determining an order to be processed; obtaining a workflow for the order to be processed; and executing the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the order to be processed is completed out of order.
[0128] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program code.
[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the order out-of-order processing method provided by the above methods, which includes: determining the orders to be processed; obtaining the workflow of the orders to be processed; and executing the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the orders to be processed are executed in an out-of-order situation.
[0130] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to perform the above-mentioned order out-of-order processing method provided above, the method comprising: determining the orders to be processed; obtaining the workflow of the orders to be processed; and executing the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the orders to be processed are completed in an out-of-order situation.
[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0132] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for processing out-of-order orders, characterized in that: include: Identify pending orders; Obtaining the workflow of the pending order; The workflow is executed using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed out of order; The workflow is executed by adopting a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed in an out-of-order manner, and the process also includes: Obtaining a current rule sequence corresponding to the workflow; Determining that the current rule sequence includes a plurality of execution rules, wherein the plurality of execution rules include a pre-judgment rule and a link transition rule; The preceding judgment rule is configured as the first rule in the current rule sequence to determine whether the preceding solution has been executed. If it is determined that the preceding solution has not been executed, the preceding solution rule sequence is executed; otherwise, the next rule in the current rule sequence is executed; The link transition rule is configured as the last rule in the current rule sequence, and is used to determine whether the current rule sequence can transition to the next link scheme rule sequence after execution is completed. If it is determined that the current rule sequence can transition, the next link scheme rule sequence is entered; The decision sequence constructed based on the dynamic programming algorithm is used to execute the workflow so that the pending orders are executed out of order, specifically including: Determine the current request execution node sequence number of the workflow; Configure the current execution policy rule according to the current request execution node sequence number, and load the current rule sequence corresponding to the current execution policy rule and the rule condition group corresponding to the current rule sequence; Performing a start execution judgment of the current request execution node based on the pre-judgment rule; The end execution judgment of the current request execution node is performed based on the link transition rule.
2. The method for processing out-of-order orders according to claim 1, characterized in that: The dynamic programming algorithm specifically includes: Divide the activity process into several execution stages and determine the decision-making strategy for each execution stage; A multi-stage decision process is formed by the initial state of the activity process, several decision strategies and the end state; The problem stages, the states of each stage and the recursive relationships between the stages in the multi-stage decision process are determined respectively.
3. The method for processing out-of-order orders according to claim 1, characterized in that: The workflow for obtaining the pending orders specifically includes: Obtaining several link nodes corresponding to the workflow, a policy scheme corresponding to each link node, several policy rules corresponding to each policy scheme, and several rule conditions corresponding to each policy rule; The plurality of policy rules are formed into a rule sequence through the plurality of rule conditions; The plurality of policy rules and the rule sequence are executed in a predefined order or based on the dynamic programming algorithm.
4. The method for processing out-of-order orders according to claim 1, characterized in that: The judgment of starting execution of the current request execution node based on the pre-judgment rule specifically includes: If the request execution node number corresponding to the current link condition of the judgment process is equal to the current request execution node number, then the remaining request execution nodes corresponding to the current request execution node are executed in sequence; If the request execution node number corresponding to the current link condition of the judgment process is less than the current request execution node number, the link has not been executed to the current request execution node, and it is judged whether it is necessary to jump back to the previous execution node based on whether the previous link condition needs to be jumped. If the jump is allowed, the rule sequence pointing to the previous execution node is jumped, otherwise an error message is returned; If the request execution node number corresponding to the current link condition of the judgment process is greater than the current request execution node number, then the link has exceeded the current request execution node, the current request execution node has been executed and cannot be executed again, and an error message is returned.
5. The method for processing out-of-order orders according to claim 1, characterized in that: The determining of the end of execution of the current request execution node based on the link transition rule specifically includes: Determine whether the link can be ended based on the end condition. If it is ended, return to allow transition to the next link. Otherwise, return not to allow transition and continue to stay in the current link.
6. The device for processing out-of-order orders is characterized by: include: A determination module is used to determine pending orders; An acquisition module, used to acquire the workflow of the order to be processed; An execution module, configured to execute the workflow using a decision sequence constructed based on a dynamic programming algorithm, so that the pending orders are executed out of order; The execution module is further configured to obtain a current rule sequence corresponding to the workflow; determine that the current rule sequence includes a plurality of execution rules, wherein the plurality of execution rules include a pre-judgment rule and a link transition rule; configure the pre-judgment rule as the first rule in the current rule sequence to determine whether the preceding solution has been executed; if it is determined that the preceding solution has not been executed, execute the preceding solution rule sequence; otherwise, execute the next rule of the current rule sequence; configure the link transition rule as the last rule in the current rule sequence to determine whether the current rule sequence can transition to the next link solution rule sequence after execution is completed; if it is determined that the transition can be made, enter the next link solution rule sequence; The execution module is specifically configured to determine the current request execution node sequence number of the workflow; configure the current execution policy rule according to the current request execution node sequence number, and load the current rule sequence corresponding to the current execution policy rule and the rule condition group corresponding to the current rule sequence; Performing a start execution judgment of the current request execution node based on the pre-judgment rule; The end execution judgment of the current request execution node is performed based on the link transition rule.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the order out-of-order processing method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the order out-of-order processing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Order exception processing method, server, storage medium and processing device
CN111488236A
Intelligent order management system and method
CN118505356A