Business order processing method, device, computer equipment and medium

By receiving order status migration instructions during business order processing, determining the migration target status of the target business order, and executing corresponding migration event information, the problem of inability to migrate non-state information in the existing technology is solved, and the accuracy of order tracking is improved.

CN114358889BActive Publication Date: 2025-02-28PING AN TECH (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210031141.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-02-28
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

Non-status information cannot be migrated in a timely manner during the processing of existing business orders, resulting in low order tracking accuracy.

Method used

By receiving the order status migration instruction, determine the target business order, obtain its current status, and determine the migration target status based on the status migration instruction. Then, migration event information, including event information for non-state information and state information migration, is determined, and these event information is performed separately to complete the migration of state and non-state information.

Benefits of technology

It effectively resolves state migration errors caused by insufficient non-state information migration, and improves the accuracy of business order status migration and order tracking accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114358889B_ABST
    Figure CN114358889B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of big data technology, and provides a business order processing method, device, computer equipment and medium, the method comprising: receiving an order status migration instruction, and determining a target business order according to the order status migration instruction; obtaining the current order status of the target business order, and determining the migration target state of the target business order according to the current order status and the order status migration instruction; determining the migration event information of the target business order according to the current order status and the migration target state; and performing state migration on the target business order according to the first migration event information and the second migration event information. Based on the determined first migration event information and the second migration event information, the present application can effectively migrate the non-state information and state information of the target business order respectively, thereby improving the accuracy of order tracking after the state of the target business order is migrated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a business order processing method, device, computer equipment and medium. Background Art

[0002] In the business order processing scenario, business orders may involve multiple order states, such as "stop state", "open state" and "fault state". When the state of a business order changes, the order state of the business order needs to be migrated to improve the accuracy of order state tracking of the business order.

[0003] In the existing business order processing process, only the status information of the business order can be migrated, and the non-status information of the business order cannot be migrated in time, such as key information such as order time and order address, resulting in low order tracking accuracy after the business order status is migrated. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a business order processing method, apparatus, computer equipment and medium to solve the problem of low order tracking accuracy caused by the inability to timely and effectively migrate non-state information of business orders in the existing business processing process.

[0005] A first aspect of an embodiment of the present application provides a service order processing method, including:

[0006] receiving an order status migration instruction, and determining a target business order according to the order status migration instruction, wherein the order status migration instruction is used to trigger migration of the order status of the target business order;

[0007] Acquire the current order status of the target business order, and determine the migration target state of the target business order according to the current order status and the order status migration instruction;

[0008] Determining migration event information of the target business order according to the current state of the order and the migration target state, the migration event information including first migration event information for migrating non-state information of the target business order and second migration event information for migrating state information of the target business order;

[0009] According to the first migration event information and the second migration event information, status migration is performed on the target business order respectively.

[0010] Further, determining the migration target state of the target business order according to the current state of the order and the order state migration instruction includes:

[0011] Obtaining the process status in the current status of the order, and obtaining the instruction identifier of the order status migration instruction;

[0012] Determining a target process state of the target business order according to the process state, the instruction identifier and a state transition diagram of the target business order;

[0013] Acquire the business state in the current state of the order, and determine the target business state of the target business order according to the business state, the instruction identifier and the state transition diagram;

[0014] The target migration state includes the target process state and the target business state. The target process state is the target state to which the non-state information corresponding to the target business order needs to migrate. The target business state is the target state to which the state information corresponding to the target business order needs to migrate.

[0015] Furthermore, before determining the migration target state of the target business order according to the current state of the order and the order state migration instruction, the method further includes:

[0016] Determine the state transition diagram according to the order identifier of the target business order, and initialize the state transition diagram;

[0017] Performing a transition diagram detection on the initialized state transition diagram;

[0018] If the transition diagram detection of the state transition diagram fails, a transition diagram error prompt is sent.

[0019] Further, the performing a transition diagram detection on the initialized state transition diagram includes:

[0020] Performing a transition diagram detection on the initialized state transition diagram according to a preset state machine;

[0021] If the transition diagram of the initialized state transition diagram passes the detection, obtaining the topological sorting of the initialized state transition diagram to obtain a topological sorting result;

[0022] Determine whether the initialized state transition graph forms a directed loop according to the topological sorting result;

[0023] If the initialized state transition diagram forms a directed loop, the transition diagram detection of the state transition diagram fails.

[0024] Further, determining the migration event information of the target business order according to the current state of the order and the migration target state includes:

[0025] respectively obtaining the state identifiers of the process state and the target process state, and performing event query in the state transition diagram according to the state identifiers of the process state and the target process state to obtain the first transition event information;

[0026] The state identifiers of the service state and the target service state are respectively obtained, and event query is performed in the state transition diagram according to the state identifiers of the service state and the target service state to obtain the second transition event information.

[0027] Further, after executing the state migration of the target service order according to the first migration event information and the second migration event information, the method further includes:

[0028] Acquire the associated business order of the target business order, and query the association type between the target business order and the associated business order;

[0029] Performing update detection on the associated business order according to the second migration event information and the association type, wherein the update detection is used to determine whether the associated business order needs to perform state migration after the target business order performs business state migration;

[0030] If the update detection of the associated business order is qualified, the state of the associated business order is migrated according to the order information of the associated business order, the second migration event information and the association type.

[0031] Further, the performing update detection on the associated service order according to the second migration event information and the associated type includes:

[0032] Acquire the order status of the associated business order, and acquire the event type of the second migration event information;

[0033] Matching the order status of the associated business order, the event type and the associated type with a pre-stored update query table;

[0034] If the order status of the associated service order, the event type and the associated type match the update query table, it is determined that the update detection of the associated service order is qualified.

[0035] A second aspect of an embodiment of the present application provides a service order processing device, including:

[0036] An order determination unit, configured to receive an order status migration instruction and determine a target business order according to the order status migration instruction, wherein the order status migration instruction is used to trigger migration of the order status of the target business order;

[0037] A state determination unit, configured to obtain the current order state of the target business order, and determine the migration target state of the target business order according to the current order state and the order state migration instruction;

[0038] an event determination unit, configured to determine migration event information of the target business order according to the current state of the order and the migration target state, wherein the migration event information includes first migration event information for migrating non-state information of the target business order and second migration event information for migrating state information of the target business order;

[0039] A state migration unit is used to perform state migration on the target business order according to the first migration event information and the second migration event information.

[0040] A third aspect of an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the computer device, wherein the processor implements the steps of the business order processing method provided in the first aspect when executing the computer program.

[0041] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, each step of the business order processing method provided in the first aspect is implemented.

[0042] The embodiments of the present application provide a business order processing method, apparatus, computer equipment and medium. By acquiring the current order status of the target business order, according to the current order status and the order status migration instruction, the migration target state of the target business order can be effectively determined. Through the current order status and the migration target state, first migration event information and second migration event information can be determined. Based on the determined first migration event information and second migration event information, the non-state information and state information of the target business order can be effectively migrated respectively, thereby preventing state migration errors caused by the non-state information of the target business order not being migrated, improving the accuracy of the state migration of the business order, and improving the accuracy of order tracking after the state migration of the target business order. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1It is a flowchart of a method for processing a business order provided in an embodiment of the present application;

[0045] Figure 2 is a flowchart of a method for processing a business order provided by another embodiment of the present application;

[0046] Figure 3 It is a structural block diagram of a business order processing device provided in an embodiment of the present application;

[0047] Figure 4 It is a structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] See also Figure 1 , Figure 1 The following is a flowchart of a method for processing a business order provided by an embodiment of the present application. The method for processing a business order is applied to any computer device, which may be a server, a mobile phone, a tablet, or a wearable smart device. The method for processing a business order includes:

[0050] Step S10, receiving an order status migration instruction, and determining a target business order according to the order status migration instruction;

[0051] The order status migration instruction is used to trigger the migration of the order status of the target business order. In this step, when any business order is detected to have information changes, an order status migration instruction is generated for the business order. The order status migration instruction generated for the business order includes:

[0052] Obtaining the order ID of the business order and the change type of the information change, and generating an order status migration instruction according to the order ID of the business order and the change type of the information change;

[0053] Optionally, an order identifier is stored in the order status migration instruction. The target business order is obtained by matching the order identifier stored in the order status migration instruction with a pre-stored order query table. The order query table stores a correspondence between different order identifiers and corresponding target business orders. The order identifier is used to point to the corresponding target business order, that is, the business order with information changes.

[0054] Further, in this step, by acquiring information parameters of information changes in the business order, the information parameters of information changes are matched with a pre-stored change type query table to obtain the change type of the information change corresponding to the business order, and the change type query table stores the correspondence between different information parameters of information changes and the change types of corresponding information changes. In this step, the order identifier of the business order and the change type of information changes are matched with a pre-stored migration instruction query table to obtain the order status migration instruction, and the migration instruction query table stores the correspondence between the order identifiers of different business orders and the change types of information changes and the corresponding order status migration instructions;

[0055] Step S20, obtaining the current order status of the target business order, and determining the migration target state of the target business order according to the current order status and the order status migration instruction;

[0056] Among them, the current order status of the target business order can be obtained according to the abstract state machine. The current order status of the target business order includes a process status and a business status. The process status is used to characterize the process node of the target business order, and the business status is used to characterize the business node of the target business order. The process node includes an order information acquisition node, an order information confirmation node, an order information review node, and an order information generation node. The business node includes a normal node, a stop node, an end node, and a deletion node.

[0057] Optionally, in this step, determining the migration target state of the target business order according to the current state of the order and the order state migration instruction includes:

[0058] Obtaining the process state in the current state of the order, and obtaining the instruction identifier of the order state migration instruction; wherein, by obtaining the process state in the current state of the order, the process node corresponding to the target business order is determined, and the instruction identifier of the order state migration instruction is used to point to the corresponding state driving event, and the state driving event is used to drive the migration of the process node and / or business node corresponding to the target business order;

[0059] Determining a target process state of the target business order according to the process state, the instruction identifier and a state transition diagram of the target business order;

[0060] The state transition diagram is used to represent the order state of the target business order and the order event that causes the state of the target business order to change, thereby describing the change process of the order state of the target business order. In the state transition diagram, there may be multiple next order states determined by an order state and an order event. In this step, based on the process state and the driving event pointed to by the instruction identifier, the process state is queried in the state transition diagram to obtain the target process state of the target business order;

[0061] Acquire the business state in the current state of the order, and determine the target business state of the target business order according to the business state, the instruction identifier and the state transition diagram;

[0062] Wherein, based on the business state and the driving event pointed to by the instruction identifier, the business state is queried in the state transition diagram to obtain the target business state of the target business order, and the migration target state includes the target process state and the target business state, the target process state is the target state to which the non-state information corresponding to the target business order needs to be migrated, and the target process state is the target state to which the state information corresponding to the target business order needs to be migrated;

[0063] Step S30, determining the migration event information of the target business order according to the current state of the order and the migration target state;

[0064] The migration event information includes first migration event information for migrating the non-state information of the target business order, and second migration event information for migrating the state information of the target business order, that is, the first migration event information is used to complete the migration of other key elements in the non-state information of the target business order, and the other key elements include order time, order number, order address, order type and other information;

[0065] Optionally, in this step, determining the migration event information of the target business order according to the current state of the order and the migration target state includes:

[0066] respectively obtaining the state identifiers of the process state and the target process state, and performing event query in the state transition diagram according to the state identifiers of the process state and the target process state to obtain the first transition event information;

[0067] The state transition diagram stores the transition paths between the state identifiers of different process states and the state identifier of the target process state, and the first transition event information is obtained by querying the event information corresponding to the transition path between the state identifier of the process state and the state identifier of the target process state;

[0068] respectively obtaining the state identifiers of the service state and the target service state, and performing event query in the state transition diagram according to the state identifiers of the service state and the target service state to obtain the second transition event information;

[0069] The state transition diagram further stores a transition path between the state identifiers of different business states and the state identifier of the target business state, and the second transition event information is obtained by querying event information corresponding to the transition path between the state identifier of the business state and the state identifier of the target business state;

[0070] Step S40: executing state migration for the target business order according to the first migration event information and the second migration event information respectively;

[0071] Among them, the first migration event information and the second migration event information both store corresponding order migration events. By executing the order migration events stored in the first migration event information and the second migration event information, the state information and non-state information of the target business order can be migrated. Based on the migration of the non-state information of the target business order, the tracking and query of the target business order are facilitated, and the accuracy of business order processing is improved. Optionally, in this step, an event-driven approach can also be used to complete the state migration of the target business order.

[0072] Specifically, in this embodiment, the business order processing method is applied to the business order processing model. In the business order processing model, an internal state field is defined to identify the state transition field, which facilitates the identification of the business orders that need to be migrated. When the state machine in the business order processing model configures the order state for the business order, the process state and the business state are used to configure the order state. The state machine completes the state transition with the internal state, and at the same time, the business state is cascaded and refreshed to the local database and the domain model in the memory, thereby facilitating the subsequent expansion of the state transition diagram corresponding to the business order.

[0073] Furthermore, in this embodiment, the business order processing model drives the order state migration event by receiving the driving event corresponding to the business order trigger information to determine the target business order. The abstract state machine in the business order processing model determines the migration target state, the first migration event information and the second migration event information from the state transition diagram corresponding to the target business order based on the current order state of the target business order and the driving event corresponding to the business order trigger information, and executes the first migration event information and the second migration event information respectively to achieve the state migration effect on the target business order.

[0074] For example, when the trigger event AB corresponding to the order status migration instruction is received, it is detected that the current order status of the target business order is in "Process status: A; Business status: 01", and the migration target state is determined from the state transition diagram: "Process status: B; Business status: 02", the first migration event information B1 and the second migration event information B2, and the events corresponding to the first migration event information B1 and the second migration event information B2 are executed.

[0075] Optionally, in this embodiment, after executing the state migration of the target service order according to the first migration event information and the second migration event information, the method further includes:

[0076] Acquire the associated business order of the target business order, and query the association type between the target business order and the associated business order;

[0077] The order identifier of the target business order is matched with a pre-stored association query table to obtain the associated business order, wherein the association query table stores the correspondence between different order identifiers and corresponding associated business orders, as well as the association type between each target business order and the associated business order;

[0078] Performing update detection on the associated business order according to the second migration event information and the association type; wherein the update detection is used to determine whether the associated business order needs to perform state migration after the target business order performs business state migration;

[0079] If the update detection of the associated business order is qualified, performing state migration on the associated business order according to the order information of the associated business order, the second migration event information and the association type;

[0080] Among them, by judging whether the associated business order needs to perform state migration after the target business order executes the business state migration, the accuracy of the state update of the associated business order is effectively improved. If the update detection of the associated business order is qualified, the state update event is determined through the order information, the second migration event information and the association type of the associated business order, and the state migration of the associated business order is performed according to the determined state update event;

[0081] Furthermore, in this step, performing update detection on the associated service order according to the second migration event information and the associated type includes:

[0082] Acquire the order status of the associated business order, and acquire the event type of the second migration event information; wherein the order status of the associated business order includes a process status and a business status;

[0083] Matching the order status of the associated business order, the event type and the associated type with a pre-stored update query table; wherein the update query table stores the corresponding relationship between the order status of the associated business order that needs to be migrated, the event type and the associated type;

[0084] If the order status, the event type and the association type of the associated business order match the update query table, then it is determined that the update detection of the associated business order is qualified;

[0085] In this embodiment, by acquiring the current order status of the target business order, the migration target state of the target business order can be effectively determined according to the current order status and the order status migration instruction, and the first migration event information and the second migration event information can be determined through the current order status and the migration target status. Based on the determined first migration event information and second migration event information, the non-state information and state information of the target business order can be effectively migrated respectively, thereby preventing state migration errors caused by the failure to migrate the non-state information of the target business order, improving the accuracy of the state migration of the business order, and improving the accuracy of order tracking after the state migration of the target business order.

[0086] See also Figure 2 , Figure 2 is a flowchart of a method for processing a business order provided by another embodiment of the present application. Figure 1 Embodiment, the business order processing method provided in this embodiment is used for Figure 1 The steps before step S20 in the embodiment are further refined to include:

[0087] Step S50, determining the state transition diagram according to the order identifier of the target business order, and initializing the state transition diagram;

[0088] The order identifier of the target business order is matched with a pre-stored transition diagram query table to determine the state transition diagram corresponding to the target business order. The transition diagram query table stores the correspondence between different order identifiers and corresponding state transition diagrams. In this step, by initializing the state transition diagram, tampering or errors in the state transition diagram corresponding to the target business order are prevented;

[0089] Step S60, performing a transition diagram detection on the initialized state transition diagram;

[0090] Optionally, in this step, performing a transition diagram detection on the initialized state transition diagram includes:

[0091] Performing a migration diagram detection on the initialized state transition diagram according to a preset state machine; wherein the preset state machine stores path information between different process nodes and path information between different business nodes, and based on the path information between different process nodes and between different business nodes stored in the preset state machine, performing a migration diagram detection on the paths between each process node and each business node in the state transition diagram;

[0092] If the transition diagram of the initialized state transition diagram passes the detection, obtaining the topological sorting of the initialized state transition diagram to obtain a topological sorting result;

[0093] If the paths between the process nodes and the business nodes in the initialized state transition diagram are correct, the transition diagram test of the initialized state transition diagram is qualified.

[0094] Determine whether the initialized state transition graph forms a directed loop according to the topological sorting result; if the initialized state transition graph forms a directed loop, the transition graph detection of the state transition graph fails;

[0095] Step S70, if the transition diagram detection of the state transition diagram fails, sending a transition diagram error prompt;

[0096] If it is detected that a directed loop is formed in the state transition graph after initialization, a transition graph error prompt is sent to prompt that a closed loop exists in the state transition graph after initialization, thereby preventing the state cyclic transition error caused by the directed loop formed in the state transition graph;

[0097] In this embodiment, by initializing the state transition diagram, tampering or errors in the state transition diagram corresponding to the target business order are prevented. By performing a migration diagram detection on the initialized state transition diagram, it is detected whether there is a closed loop in the initialized state transition diagram. If it is detected that a directed loop is formed in the initialized state transition diagram, a migration diagram error prompt is sent to prompt that a closed loop exists in the initialized state transition diagram, thereby preventing state cyclic transition errors caused by the formation of directed loops in the state transition diagram.

[0098] See also Figure 3 , Figure 3 1 is a structural block diagram of a service order processing device 100 provided in an embodiment of the present application. In this embodiment, the service order processing device 100 includes various units for executing Figure 1 , Figure 2 For details, please refer to the steps in the corresponding embodiment. Figure 1 , Figure 2 as well as Figure 1 , Figure 2For the convenience of explanation, only the parts related to this embodiment are shown. Figure 3 The business order processing device 100 includes: an order determination unit 10, a state determination unit 11, an event determination unit 12 and a state transition unit 13, wherein:

[0099] The order determination unit 10 is used to receive an order status migration instruction and determine a target business order according to the order status migration instruction, wherein the order status migration instruction is used to trigger the migration of the order status of the target business order.

[0100] The state determination unit 11 is used to obtain the current order state of the target business order, and determine the migration target state of the target business order according to the current order state and the order state migration instruction.

[0101] Optionally, the state determination unit 11 is further used to: obtain the process state in the current state of the order, and obtain the instruction identifier of the order state migration instruction;

[0102] Determining a target process state of the target business order according to the process state, the instruction identifier and a state transition diagram of the target business order;

[0103] Acquire the business state in the current state of the order, and determine the target business state of the target business order according to the business state, the instruction identifier and the state transition diagram;

[0104] The target migration state includes the target process state and the target business state. The target process state is the target state to which the non-state information corresponding to the target business order needs to migrate. The target business state is the target state to which the state information corresponding to the target business order needs to migrate.

[0105] Furthermore, the state determination unit 11 is further used to: determine the state transition diagram according to the order identifier of the target business order, and initialize the state transition diagram;

[0106] Performing a transition diagram detection on the initialized state transition diagram;

[0107] If the transition diagram detection of the state transition diagram fails, a transition diagram error prompt is sent.

[0108] Furthermore, the state determination unit 11 is further used to: perform a transition diagram detection on the initialized state transition diagram according to a preset state machine;

[0109] If the transition diagram of the initialized state transition diagram passes the detection, obtaining the topological sorting of the initialized state transition diagram to obtain a topological sorting result;

[0110] Determine whether the initialized state transition graph forms a directed loop according to the topological sorting result;

[0111] If the initialized state transition diagram forms a directed loop, the transition diagram detection of the state transition diagram fails.

[0112] The event determination unit 12 is used to determine the migration event information of the target business order according to the current state of the order and the migration target state, wherein the migration event information includes first migration event information for migrating the non-state information of the target business order and second migration event information for migrating the state information of the target business order.

[0113] Optionally, the event determination unit 12 is further used to: respectively obtain the state identifiers of the process state and the target process state, and perform event query in the state transition diagram according to the state identifiers of the process state and the target process state to obtain the first transition event information;

[0114] The state identifiers of the service state and the target service state are respectively obtained, and event query is performed in the state transition diagram according to the state identifiers of the service state and the target service state to obtain the second transition event information.

[0115] The state migration unit 13 is used to perform state migration on the target service order according to the first migration event information and the second migration event information.

[0116] Optionally, the state transition unit 13 is further used to: obtain an associated business order of the target business order, and query the association type between the target business order and the associated business order;

[0117] Performing update detection on the associated business order according to the second migration event information and the association type, wherein the update detection is used to determine whether the associated business order needs to perform state migration after the target business order performs business state migration;

[0118] If the update detection of the associated business order is qualified, the state of the associated business order is migrated according to the order information of the associated business order, the second migration event information and the association type.

[0119] Furthermore, the state migration unit 13 is further used to: obtain the order state of the associated business order, and obtain the event type of the second migration event information;

[0120] Matching the order status of the associated business order, the event type and the associated type with a pre-stored update query table;

[0121] If the order status of the associated service order, the event type and the associated type match the update query table, it is determined that the update detection of the associated service order is qualified.

[0122] In this embodiment, by acquiring the current order status of the target business order, the migration target state of the target business order can be effectively determined according to the current order status and the order status migration instruction, and the first migration event information and the second migration event information can be determined through the current order status and the migration target status. Based on the determined first migration event information and second migration event information, the non-state information and state information of the target business order can be effectively migrated respectively, thereby preventing state migration errors caused by the failure to migrate the non-state information of the target business order, improving the accuracy of the state migration of the business order, and improving the accuracy of order tracking after the state migration of the target business order.

[0123] Figure 4 2 is a structural block diagram of a computer device 2 provided in another embodiment of the present application. Figure 4 As shown, the computer device 2 of this embodiment includes: a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program of a business order processing method. When the processor 20 executes the computer program 22, the steps in each embodiment of the above-mentioned business order processing method are implemented, such as Figure 1 S10 to S40 as shown, or Figure 2 Alternatively, the processor 20 implements the above when executing the computer program 22 Figure 3 The functions of each unit in the corresponding embodiment are, for example, Figure 3 For details on the functions of units 10 to 13, please refer to Figure 3 The relevant descriptions in the corresponding embodiments are not repeated here.

[0124] Exemplarily, the computer program 22 may be divided into one or more units, which are stored in the memory 21 and executed by the processor 20 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 22 in the computer device 2. For example, the computer program 22 may be divided into an order determination unit 10, a state determination unit 11, an event determination unit 12, and a state migration unit 13, and the specific functions of each unit are as described above.

[0125] The computer device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 4 It is only an example of the computer device 2 and does not constitute a limitation of the computer device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0126] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0127] The memory 21 may be an internal storage unit of the computer device 2, such as a hard disk or memory of the computer device 2. The memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 2. Further, the memory 21 may also include both an internal storage unit of the computer device 2 and an external storage device. The memory 21 is used to store the computer program and other programs and data required by the computer device. The memory 21 may also be used to temporarily store data that has been output or is to be output.

[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0129] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0130] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A business order processing method, characterized in that: include: receiving an order status migration instruction, and determining a target business order according to the order status migration instruction, wherein the order status migration instruction is used to trigger migration of the order status of the target business order; Acquire the current order status of the target business order, and determine the migration target state of the target business order according to the current order status and the order status migration instruction; Determining migration event information of the target business order according to the current state of the order and the migration target state, the migration event information comprising first migration event information for migrating non-state information of the target business order and second migration event information for migrating state information of the target business order; According to the first migration event information and the second migration event information, respectively, the state migration is performed on the target business order; wherein the first migration event information and the second migration event information both store corresponding order migration events; Before determining the migration target state of the target business order according to the current state of the order and the order state migration instruction, the method further includes: Determine a state transition diagram according to the order identifier of the target business order, and initialize the state transition diagram; Performing a transition diagram detection on the initialized state transition diagram; If the transition diagram detection of the state transition diagram fails, a transition diagram error prompt is sent; The performing a transition diagram detection on the initialized state transition diagram includes: Performing a transition diagram detection on the initialized state transition diagram according to a preset state machine; If the transition diagram of the initialized state transition diagram passes the detection, obtaining the topological sorting of the initialized state transition diagram to obtain a topological sorting result; Determine whether the initialized state transition graph forms a directed loop according to the topological sorting result; If the initialized state transition diagram forms a directed loop, the transition diagram detection of the state transition diagram fails.

2. The business order processing method according to claim 1, characterized in that: The step of determining the migration target state of the target business order according to the current state of the order and the order state migration instruction includes: Obtaining the process status in the current status of the order, and obtaining the instruction identifier of the order status migration instruction; Determining a target process state of the target business order according to the process state, the instruction identifier and a state transition diagram of the target business order; Acquire the business state in the current state of the order, and determine the target business state of the target business order according to the business state, the instruction identifier and the state transition diagram; The target migration state includes the target process state and the target business state. The target process state is the target state to which the non-state information corresponding to the target business order needs to migrate. The target business state is the target state to which the state information corresponding to the target business order needs to migrate.

3. The business order processing method according to claim 2, characterized in that: The step of determining the migration event information of the target business order according to the current state of the order and the migration target state includes: respectively obtaining the state identifiers of the process state and the target process state, and performing event query in the state transition diagram according to the state identifiers of the process state and the target process state to obtain the first transition event information; The state identifiers of the service state and the target service state are respectively obtained, and event query is performed in the state transition diagram according to the state identifiers of the service state and the target service state to obtain the second transition event information.

4. The business order processing method according to any one of claims 1 to 3, characterized in that: After executing the state migration of the target service order according to the first migration event information and the second migration event information, the method further includes: Acquire the associated business order of the target business order, and query the association type between the target business order and the associated business order; Performing update detection on the associated business order according to the second migration event information and the association type, wherein the update detection is used to determine whether the associated business order needs to perform state migration after the target business order performs business state migration; If the update detection of the associated business order is qualified, the state of the associated business order is migrated according to the order information of the associated business order, the second migration event information and the association type.

5. The business order processing method according to claim 4, characterized in that: The performing update detection on the associated service order according to the second migration event information and the associated type includes: Acquire the order status of the associated business order, and acquire the event type of the second migration event information; Matching the order status of the associated business order, the event type and the associated type with a pre-stored update query table; If the order status of the associated service order, the event type and the associated type match the update query table, it is determined that the update detection of the associated service order is qualified.

6. A business order processing device, characterized in that: include: An order determination unit, configured to receive an order status migration instruction and determine a target business order according to the order status migration instruction, wherein the order status migration instruction is used to trigger migration of the order status of the target business order; A state determination unit, configured to obtain the current order state of the target business order, and determine the migration target state of the target business order according to the current order state and the order state migration instruction; an event determination unit, configured to determine migration event information of the target business order according to the current state of the order and the migration target state, wherein the migration event information includes first migration event information for migrating non-state information of the target business order and second migration event information for migrating state information of the target business order; A state migration unit, configured to perform state migration on the target business order according to the first migration event information and the second migration event information; wherein the first migration event information and the second migration event information both store corresponding order migration events; The state determination unit is further used for: Determine a state transition diagram according to the order identifier of the target business order, and initialize the state transition diagram; Performing a transition diagram detection on the initialized state transition diagram; If the transition diagram detection of the state transition diagram fails, a transition diagram error prompt is sent; The state determination unit is further used for: Performing a transition diagram detection on the initialized state transition diagram according to a preset state machine; If the transition diagram of the initialized state transition diagram passes the detection, obtaining the topological sorting of the initialized state transition diagram to obtain a topological sorting result; Determine whether the initialized state transition graph forms a directed loop according to the topological sorting result; If the initialized state transition diagram forms a directed loop, the transition diagram detection of the state transition diagram fails.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Using digital item tracking to drive e-commerce

    US10248987B1