Processing method and device of order message
By using an order tree structure and real-time updates of order status messages, the problem of analyzing and processing parent and child orders is solved, and the clarity and accuracy of order status expression are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-14
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies struggle to effectively handle order messages that contain parent and child orders, increasing the difficulty of analysis and processing.
An order tree structure is used to represent the parent-child relationship between various sub-orders in an order, and the order tree is updated in real time through order status messages to ensure the clarity and accuracy of the order status expression.
It improves the clarity and accuracy of expressing parent-child relationships between sub-orders, and enhances the real-time performance and accuracy of order status.
Smart Images

Figure CN115760285B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to the Internet and order processing technology, and in particular to methods and apparatus for processing order messages. Background Technology
[0002] With the development of internet technology, more and more users are starting to shop online. The process of online shopping generally involves several stages, which may include placing an order, confirming receipt, and so on.
[0003] To monitor the stage of an order in real time, user order messages are typically received and analyzed. However, the difficulty of understanding different order messages varies. Some orders include "parent-child orders," with multiple child orders under the parent order, each with its own order messages. Therefore, some orders present challenges in analysis and processing. Summary of the Invention
[0004] A method, apparatus, electronic device, and storage medium for processing order messages are provided.
[0005] According to the first aspect, a method for processing order messages is provided, comprising: in response to receiving an order status message of a target sub-order of an order, querying in an order tree set whether there exists an order tree containing a sub-order with a parent-child relationship to the target sub-order, wherein the order tree indicates the parent-child relationship between each sub-order in the order; if there exists an order tree containing a sub-order with a parent-child relationship to the target sub-order, in response to the absence of a node for the target sub-order in the order tree, adding the target sub-order as a new node to the order tree to obtain a new order tree; and determining the order status indicated by the order status message as the order status of the new node.
[0006] According to a second aspect, an order message processing apparatus is provided, comprising: a query unit configured to, in response to an order status message of a target sub-order of an order, query in an order tree set whether there exists an order tree containing a sub-order with a parent-child relationship to the target sub-order, wherein the order tree indicates the parent-child relationship between the sub-orders in the order; an addition unit configured to, if an order tree containing a sub-order with a parent-child relationship to the target sub-order exists, in response to the absence of a node for the target sub-order in the order tree, add the target sub-order as a new node to the order tree to obtain a new order tree; and a determination unit configured to determine the order status indicated by the order status message as the order status of the new node.
[0007] According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method according to any embodiment of an order message processing method.
[0008] According to a fourth aspect, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform a method according to any embodiment of the order message processing method.
[0009] According to a fifth aspect, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of any embodiment of the processing method according to an order message.
[0010] According to the scheme disclosed herein, an order tree can be used to indicate the parent-child relationships between various sub-orders within an order, thereby improving the clarity and accuracy of expressing these relationships. Furthermore, by obtaining order status messages in real time and representing them within the order tree, the effectiveness of expressing order status can be further enhanced. Attached Figure Description
[0011] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0012] Figure 1 This is an exemplary system architecture diagram to which some embodiments of this disclosure can be applied;
[0013] Figure 2 This is a flowchart of one embodiment of the order message processing method according to this disclosure;
[0014] Figure 3 This is a schematic diagram of an application scenario of the order message processing method according to this disclosure;
[0015] Figure 4a This is a flowchart of yet another embodiment of the order message processing method according to this disclosure;
[0016] Figure 4b This is a flowchart of updating the parent order status according to the order message processing method disclosed herein;
[0017] Figure 4c This is a flowchart of the judgment steps for the order message processing method disclosed herein;
[0018] Figure 5 This is a schematic diagram of the structure of an embodiment of an order message processing apparatus according to the present disclosure;
[0019] Figure 6 This is a block diagram of an electronic device used to implement the order message processing method of the embodiments of this disclosure. Detailed Implementation
[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] The acquisition, storage, and application of user personal information involved in this technical solution comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and it does not violate public order and good morals.
[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the order message processing method or apparatus of the present disclosure can be applied.
[0024] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0025] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as online shopping applications, live streaming applications, instant messaging tools, email clients, social media platform software, etc.
[0026] The terminal devices 101, 102, and 103 here can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, e-book readers, laptops, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., multiple software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.
[0027] Server 105 can be a server that provides various services, such as a backend server that supports terminal devices 101, 102, and 103. The backend server can analyze and process data such as order status messages of the received target sub-orders, and feed back the processing results (such as a new order tree) to the terminal devices.
[0028] It should be noted that the order message processing method provided in this embodiment can be executed by server 105 or terminal devices 101, 102, 103. Accordingly, the order message processing device can be set in server 105 or terminal devices 101, 102, 103.
[0029] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0030] Continue to refer to Figure 2 The diagram illustrates a flow 200 of an embodiment of an order message processing method according to the present disclosure. The order message processing method includes the following steps:
[0031] Step 201: In response to the order status message of the target sub-order of the order, query the order tree set to see if there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order. The order tree indicates the parent-child relationship between the sub-orders in the order.
[0032] In this embodiment, the order message processing method runs on an execution entity (e.g., Figure 1 The server or terminal device shown can, upon receiving the order status message of a target sub-order, query the order tree set, which is the order tree containing sub-orders that have a parent-child relationship with the target sub-order.
[0033] If items ordered in a single order (the original order) need to be shipped or transported separately, the order can be split into multiple sub-orders. The original order can be called the parent order, and the resulting sub-orders can be called child orders. If the child orders within the original order still need to be split, then those child orders can be used as new parent orders, and new child orders can be further split from these new parent orders. The final level of each sub-order represents the actual unit for transportation and receipt.
[0034] An order has at least two sub-orders. A sub-order can include a parent order and a child order. An order tree is a tree structure consisting of at least one node corresponding to each of the at least one sub-orders of the same order. The connection rules between parent and child orders in the tree structure can include arranging them in the order from parent to child. For example, parent order on the left, child order on the right, parent order below, child order above, or parent order above, child order below, etc. The order tree set can be stored in the cache of this electronic device or other electronic devices.
[0035] In practice, the aforementioned execution entity can use various methods to query the order tree set to find the order tree containing a sub-order that has a parent-child relationship with the target sub-order. For example, the order status message may include a sub-order number, which can be used to find the field of the sub-order that has a parent-child relationship with the target sub-order. Then, the execution entity can use this field to find the corresponding order tree in the order tree set, such as finding the order tree containing this field, or first determining the target field that has a preset mapping relationship with this field and then finding the order tree containing this target field.
[0036] Order status messages can indicate the stage of an order. For example, an order status message can indicate that the user has placed an order, a return message can indicate that the user has returned the goods, or a confirmation message can indicate that the user has confirmed receipt.
[0037] Step 202: If there exists an order tree containing a sub-order that has a parent-child relationship with the target sub-order, and the target sub-order does not exist in the order tree, then the target sub-order is added as a new node to the order tree to obtain a new order tree.
[0038] In this embodiment, if the query result indicates the existence of the order tree, it can be determined whether a node representing the target sub-order tree exists within the order tree. Specifically, if it is determined that the target sub-order does not exist in the order tree, that is, if the target sub-order is missing from the order tree, the aforementioned execution entity can add the target sub-order as a new node to the order tree. The order tree after the addition is the new order tree.
[0039] In practice, if a sub-order with a parent-child relationship to the target sub-order includes the target sub-order's parent order, then according to the connection rules, the target sub-order is connected below the aforementioned parent order. If a sub-order with a parent-child relationship to the target sub-order includes the target sub-order's child order, then according to the connection rules, the target sub-order is connected above the aforementioned child order.
[0040] Step 203: Determine the order status indicated by the order status message as the order status of the new node.
[0041] In this embodiment, the aforementioned execution entity can update the order status of a new node. Specifically, the order status indicated by the order status message can be determined as the order status of the new node in the new order tree. Each node in the order tree can have a field indicating the order status. By updating this field, the order status can be updated.
[0042] After obtaining the new order tree with the added new nodes, the aforementioned executing entity can push the new order tree to other electronic devices.
[0043] The method provided in the above embodiments of this disclosure can use an order tree to indicate the parent-child relationship between various sub-orders in an order, thereby improving the clarity and accuracy of expressing the parent-child relationship between sub-orders. Furthermore, by obtaining order status messages in real time and representing these messages in the order tree, the expression of order status can be improved.
[0044] See also Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario of the order message processing method according to this embodiment. Figure 3 In this application scenario, the executing entity can receive the order status message of the target sub-order of a new order, specifically an order placement message. Then, the executing entity can query the cached order tree set to find the order tree containing sub-orders with a parent-child relationship to the target sub-order, and assemble the new node of the target sub-order into the appropriate position in the order tree. For another sub-order of the target sub-order's parent order, if the first received order status message for that sub-order is a return message, the return message node is connected to the node below the parent order's node. If the first received order status message for that sub-order is an order placement message, the order placement message node is connected to the node below the parent order's node. If the first received order status message for that sub-order is a confirmation of receipt message, the confirmation of receipt message node is connected to the node below the parent order's node.
[0045] In some optional implementations of any embodiment of this disclosure, adding the target sub-order as a new node to the order tree may include: responding to an order status message carrying a sub-order field of a sub-order that has a parent-child relationship with the target sub-order; determining the connection position of the new node in the order tree based on the sub-order field, wherein the connection position includes the connected sub-order and the position connection relationship; and connecting the new node to the order tree according to the position connection relationship.
[0046] In these optional implementations, the connected sub-orders included in the connection position refer to the sub-orders that the new node connects to in the new order tree, that is, sub-orders that have a parent-child relationship with the target sub-order. The positional connection relationship refers to the positional relationship used when connecting the target sub-order and the sub-orders with which it has a parent-child relationship. For example, the positional connection relationship can be a child order direction or a parent order direction. The child order direction and the parent order direction can be preset opposite directions. For example, if the child order direction is to the left, the parent order direction is to the right.
[0047] If the sub-order field in the order status message indicates that the sub-order with a parent-child relationship to the target sub-order is the parent order of the target sub-order, the aforementioned execution entity can connect the new node of the target sub-order to the parent order according to the position of the sub-order. Specifically, the new node can be connected below the node containing the parent order. Furthermore, if the sub-order field in the order status message indicates that the sub-order with a parent-child relationship to the target sub-order is the sub-order of the target sub-order, the aforementioned execution entity can connect the new node of the target sub-order to the sub-order according to the position of the parent order. Specifically, the new node can be connected above the node containing the sub-order.
[0048] These implementations can accurately locate the order tree that can connect to the target sub-order based on the sub-order field indicating the parent-child relationship, and accurately connect the target sub-order to the order tree through the connection position.
[0049] In some optional application scenarios of these implementation methods, the above-mentioned connection of new nodes to the order tree according to the positional connection relationship can include: in response to the fact that the order tree where the sub-order with a parent-child relationship with the target sub-order is located includes the parent order tree and the child order tree of the target sub-order, the new node is combined with the parent order tree and the child order tree to form an order tree.
[0050] In response to the fact that the order tree containing the sub-order that has a parent-child relationship with the target sub-order includes the parent order tree and the child order tree of the target sub-order, the new node is combined with the parent order tree and the child order tree to form an order tree.
[0051] In these application scenarios, for an order tree containing a sub-order that has a parent-child relationship with the target sub-order, if there are two order trees—specifically, the parent order tree of the target sub-order and the child order tree of the target sub-order—the aforementioned execution entity can combine the new node with the parent order tree and the child order tree to form a new order tree. This combined order tree is the new order tree.
[0052] In this application scenario, the order tree set includes not only the order tree of the parent order of the target sub-order (first order tree) but also the order tree of the child orders of the target sub-order (second order tree). The execution entity can use the new node corresponding to the target sub-order to combine the first and second order trees, and the result of the combination is the new order tree.
[0053] These application scenarios can combine the parent order tree and child order tree of the target sub-order into a new order tree by using the new node corresponding to the target sub-order as a connection in the order tree set, thereby ensuring the structural integrity of the order tree.
[0054] In some optional implementations of any embodiment of this disclosure, the method further includes: if there is no order tree containing a sub-order that has a parent-child relationship with the target sub-order, then an order tree with the target sub-order as a node is generated to obtain a new order tree.
[0055] In these optional implementations, the aforementioned order tree may not exist in the order tree set; that is, there may be no order tree containing a sub-order that has a parent-child relationship with the target sub-order. In this case, the execution entity can generate an order tree with the target sub-order as the node, i.e., a new order tree. In practice, the execution entity can add the generated order tree to the order tree set.
[0056] These implementations can generate new order trees even when there is no order tree with the target order as a node in the order tree set, thereby obtaining the order tree for each order comprehensively and ensuring the order recall rate.
[0057] In some optional implementations of any embodiment of this disclosure, the above-mentioned querying in the order tree set whether there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order may include: in response to the order status message carrying a sub-order field of a sub-order that has a parent-child relationship with the target sub-order, querying in the order tree set whether there is an order tree corresponding to the sub-order field, wherein the sub-order field includes a parent order field and / or a child order field.
[0058] In these implementations, if the sub-order field carried by the order status message includes a parent order field, the parent order field indicates that the sub-order with a parent-child relationship to the target sub-order is the parent order of the target sub-order. If the sub-order field carried by the order status message includes a child order field, the child order field indicates that the sub-order with a parent-child relationship to the target sub-order is a child order of the target sub-order.
[0059] The order tree corresponding to the sub-order field refers to the order tree in which the node of the sub-order indicated by the sub-order field is located, such as the order tree in which the node of the parent order is located.
[0060] The sub-order field in these implementations can explicitly indicate the parent or child order of the target sub-order, thus helping to accurately find the order tree to be connected.
[0061] In some optional implementations of any embodiment of this disclosure, the method further includes: querying the item details of the target sub-order based on the target sub-order number; in response to not finding the item details of the target sub-order, retrying the query of the item details a preset number of times at increasingly larger query intervals; and in response to finding the item details of the target sub-order, sending a new order tree and item details to the target electronic device.
[0062] The aforementioned executing entity can query detailed item information for the target sub-order, such as by querying a third-party interface using the target sub-order number to obtain detailed item information. If the detailed item information for the target sub-order is not found, the query can be retried. Specifically, a preset number of retries can be performed, such as 6 times. Furthermore, the query intervals for retrying can become progressively larger. For example, the query intervals could be 30 seconds, 60 seconds, 3 minutes, 5 minutes, 30 minutes, and 60 minutes from the target time. The target time can be varied, such as the moment of the initial query or the moment the retry table is created after the initial query. The item in the detailed item information can refer to the smallest stock keeping unit (SKU).
[0063] The retry table records each retrieval, with one record indicating one retry. After a successful retry, the status of the latest retry record is updated to "retry successful." The retry table can record detailed information about the item being queried, such as the product name, price, and description. The executing entity can periodically (e.g., every 10 minutes) poll the detailed information in the retry table to confirm the content to be queried.
[0064] The target electronic device can be any type of electronic device, such as the electronic devices of the business party, i.e. the access party, or other demand parties.
[0065] These implementations utilize query retries to repeatedly query for detailed item information if it's not found initially, thus ensuring the comprehensiveness of the retrieved information. If detailed item information isn't retrieved within a short time interval, it indicates that the update speed of the information may be slow, requiring a longer wait. Therefore, using increasingly longer time intervals allows for a longer waiting period, ensuring, to some extent, that detailed item information can be retrieved.
[0066] In some optional implementations of any embodiment of this disclosure, responding to the order status message of the target sub-order of the order includes: responding to the initial order status message of the target sub-order of the order being listened to, parsing the initial order status message, wherein the message format of the initial order status message corresponding to different order statuses is different; responding to the message format of the initial order status message of the target sub-order not being the target message format, converting the message format of the initial order status message to the target message format to obtain the order status message.
[0067] In these implementations, the initial order status messages have different formats for different order states. For example, the initial order status messages indicating that a user has placed an order and those indicating that a user should return the order have different formats. The aforementioned execution entity can unify the message format of the order status messages. Specifically, if the message format of the initial order status message is not the target message format, the message format of the initial order status message is converted to obtain the order status message in the target message format.
[0068] These implementation methods can standardize the message format of order status messages, thereby reducing the cost of understanding and analyzing the message format and shortening the processing time of order messages.
[0069] Further reference Figure 4a This illustrates a flow 400 of another embodiment of a method for processing order messages. Flow 400 includes the following steps:
[0070] Step 401: In response to the order status message of the target sub-order of the order, query the order tree set to see if there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order. The order tree indicates the parent-child relationship between the sub-orders in the order.
[0071] Step 402: If there exists an order tree containing a sub-order that has a parent-child relationship with the target sub-order, and the target sub-order does not exist in the order tree, then the target sub-order is added as a new node to the order tree to obtain a new order tree.
[0072] Step 403: Determine the order status indicated by the order status message as the order status of the new node.
[0073] Step 404: If there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order, in response to the existence of a node for the target sub-order in the order tree, determine whether to update the order status of that node based on the order status indicated by the order status message.
[0074] In this embodiment, the order message processing method runs on an execution entity (e.g., Figure 1 The server or terminal device shown can update the order status if there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order, and if the node of the target sub-order already exists in the order tree, there is no need to add an additional node of the target sub-order.
[0075] The aforementioned executing entity can use various methods to determine whether to update the order status of a node based on the order status indicated by the order status message. For example, the executing entity can send the order status to a designated terminal device and receive the result from the terminal device. This result can indicate whether to update the order status of the node.
[0076] Step 405: If it is determined that the order status of the node needs to be updated, then update the order status of the node according to the order status indicated in the order status message.
[0077] In this embodiment, after updating the order status of a node, i.e., updating the field indicating the order status, the order status of that node becomes consistent with the order status indicated by the order status message. For example, if the current order status of the node is "user has placed an order," the updated order status will be "user has returned the item."
[0078] This embodiment can avoid creating duplicate nodes when there are already nodes for sub-orders, and instead perform timely order status updates for the nodes.
[0079] In some optional application scenarios of these implementation methods, determining whether to update the order status of a node based on the order status indicated by the order status message may include: judging the order status indicated by the order status message and the current order status of the node; if the order status indicated by the order status message is after the current order status of the node, then determining to update the order status of the node.
[0080] In these application scenarios, different order statuses represent different stages of an order and have a sequential relationship. In practice, order statuses, in order of priority, can include placing an order, confirming receipt, and returning the goods.
[0081] The aforementioned executing entity can only determine to update the order status of a node if the order status indicated by the received order status message is after the current order status. For example, if the current order status is "order placed," but the order status message indicates "order returned," then updating the order status of that node is possible. Conversely, if the received order status message indicates an order status that is not in the current order status, then no action is taken, meaning the order status of that node will not be updated. For example, if the current order status is "order returned," but the order status message indicates "order placed," then the received order status message is an outdated message.
[0082] These application scenarios can improve the real-time performance of order status in the order tree by avoiding treating outdated messages as the latest messages through the order status sequence.
[0083] In some optional application scenarios of these implementations, the above method may further include: in response to determining that the order status of each sub-order of the parent order of the target sub-order in the order tree is after the order status of the parent order, updating the order status of the parent order according to the earliest order status among the order statuses of each sub-order.
[0084] In these application scenarios, after updating the order status of the target sub-order, the order status of each sub-order (i.e., all sub-orders) of the target sub-order's parent order may be outdated and need to be updated. In this case, the parent order's order status is outdated and needs to be updated. The aforementioned execution entity can update the parent order's order status according to the earliest order status. The updated parent order's order status will be the earliest order status among all sub-orders.
[0085] For example, the parent order of the target sub-order has an order status of "order placed by user." The order status of the target sub-order is "confirmed receipt." Another sub-order within the order tree of the target sub-order has an order status of "returned by user." The aforementioned executing entity can then modify the order status of the parent order to "confirmed receipt."
[0086] Optionally, if the order status of each of the above sub-orders is the same and all are after the order status of the parent order, then the order status of the parent order can be updated according to the same order status.
[0087] like Figure 4bAs shown in the diagram, the execution entity receives an order status message that is a confirmed receipt message. If this message pertains to the sub-order corresponding to the node in the dashed box in the first order tree on the left, the order status of that node is updated to confirmed receipt. Furthermore, the execution entity can change the order status of the parent order of the aforementioned sub-order to confirmed receipt if all sub-orders are confirmed receipt. For the third order tree on the left, after receiving a confirmed receipt message for the sub-order corresponding to the node in the dashed box, the execution entity can change the order status of that node to confirmed receipt. Finally, the execution entity can change the order status of the parent order's parent order to confirmed receipt.
[0088] These application scenarios allow for timely modification of the parent order's status, thereby ensuring the timeliness of the parent order's status.
[0089] In some optional implementations of any embodiment of this disclosure, the method further includes: performing at least one of a first judgment step, a second judgment step, and a third judgment step on the obtained order status message: determining whether the user who placed the order for the target sub-order is in a specified user identifier set, determining whether the user is in a user blacklist, and determining whether the order status message exists in the cache, wherein if the user who placed the order for the target sub-order is in the specified user identifier set, the order status message passes the first judgment step; if the user is not in the user blacklist, the order status message passes the second judgment step; and if the order status message does not exist in the cache, the order status message passes the third judgment step; in response to determining that the order status message passes at least one judgment step, the order status message is stored in the cache; and the order status indicated by the order status message is determined as the order status of the new node, including: determining the order status indicated by the order status message in the cache as the order status of the new node.
[0090] In these implementations, the aforementioned executing entity may perform at least one of the first judgment step, the second judgment step, and the third judgment step.
[0091] Specifically, the first judgment step includes determining whether the user who placed the order for the target sub-order is in the specified user identifier set. If the judgment result is that the user who placed the order for the target sub-order is in the specified user identifier set, then the order status message passes the first judgment step. Specifically, the specified user identifier set may refer to the user identifier set reported by the access party, such as the user PIN (Personal Identification Number) packet.
[0092] The second judgment step includes determining whether the user is on the user blacklist. If the result is that the user is not on the user blacklist, the order status message passes the second judgment step.
[0093] The third step involves checking if the order status message exists in the cache. If the result is that the order status message does not exist in the cache, then the order status message passes the third step. If the order status message is present in the cache, it indicates that the order status message has already been received and is a duplicate message.
[0094] If the aforementioned executing entity needs to process the order status message subsequently, it can retrieve the message from the cache for processing.
[0095] The execution order of the first, second, and third judgment steps described above can be arbitrary and is not limited here.
[0096] like Figure 4c As shown in the diagram, the process involves executing the first, second, and third judgment steps sequentially. After passing these three judgment steps, the order status message can be cached. If any of the three judgment steps fails, the process exits, ending the process.
[0097] In these implementations, order status messages can be stored in a cache, facilitating deduplication and subsequent processing. Furthermore, order status messages can be filtered before being stored in the cache, ensuring the accuracy and validity of the generated order tree.
[0098] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an order message processing apparatus, which is similar to... Figure 2 Corresponding to the method embodiment shown, in addition to the features described below, the device embodiment may also include [features related to...]. Figure 2 The method embodiments shown have the same or corresponding features or effects. This device can be specifically applied to various electronic devices.
[0099] like Figure 5 As shown, the order message processing apparatus 500 of this embodiment includes a query unit 501, an add unit 502, and a determine unit 503. The query unit 501 is configured to, in response to the order status message of the target sub-order, query the order tree set to see if there exists an order tree containing a sub-order with a parent-child relationship to the target sub-order. The order tree indicates the parent-child relationship between the sub-orders in the order. The add unit 502 is configured to, if an order tree containing a sub-order with a parent-child relationship to the target sub-order exists, and in response to the absence of a node for the target sub-order in the order tree, add the target sub-order as a new node to the order tree, thus obtaining a new order tree. The determine unit 503 is configured to determine the order status indicated by the order status message as the order status of the new node.
[0100] In this embodiment, the specific processing of the query unit 501, the add unit 502, and the determine unit 503 of the order message processing device 500, and the resulting technical effects, can be referred to respectively. Figure 2 The relevant descriptions of steps 201, 202 and 203 in the corresponding embodiments will not be repeated here.
[0101] In some optional implementations of this embodiment, the apparatus further includes: an execution unit configured to, if there exists an order tree containing a sub-order that has a parent-child relationship with the target sub-order, determine whether to update the order status of the node according to the order status indicated by the order status message in response to the existence of a node in the order tree containing the target sub-order; and an update unit configured to, if it is determined that the order status of the node should be updated, update the order status of the node according to the order status indicated by the order status message.
[0102] In some optional implementations of this embodiment, the execution unit is further configured to determine whether to update the order status of the node based on the order status indicated by the order status message in the following manner: determine the order status indicated by the order status message and the current order status of the node; if the order status indicated by the order status message is after the current order status of the node, then determine to update the order status of the node.
[0103] In some optional implementations of this embodiment, the apparatus further includes: a parent order update unit, configured to update the order status of the parent order according to the earliest order status among the order statuses of each sub-order of the target sub-order in the order tree, in response to determining that the order statuses of each sub-order of the parent order are all after the order status of the parent order.
[0104] In some optional implementations of this embodiment, the joining unit is further configured to add the target sub-order as a new node to the order tree as follows: in response to the order status message carrying a sub-order field of a sub-order that has a parent-child relationship with the target sub-order, the target sub-order is treated as a new node according to the sub-order field, and the connection position of the new node in the order tree is determined, wherein the connection position includes the connected sub-order and the position connection relationship; the new node is connected to the order tree according to the position connection relationship.
[0105] In some optional implementations of this embodiment, the added unit is further configured to connect the new node to the order tree according to the positional connection relationship as follows: in response to the order tree containing the sub-order that has a parent-child relationship with the target sub-order including the parent order tree and the child order tree of the target sub-order, the new node is combined with the parent order tree and the child order tree to form an order tree.
[0106] In some optional implementations of this embodiment, the query unit is further configured to perform the following operation: querying the order tree set to see if there is an order tree containing a sub-order that has a parent-child relationship with the target sub-order: in response to the order status message carrying a sub-order field of a sub-order that has a parent-child relationship with the target sub-order, querying the order tree set to see if there is an order tree corresponding to the sub-order field, wherein the sub-order field includes a parent order field and / or a child order field.
[0107] In some optional implementations of this embodiment, the apparatus further includes: a generation unit configured to generate an order tree with the target sub-order as a node if there is no sub-order with a parent-child relationship to the target sub-order in the order tree, thereby obtaining a new order tree.
[0108] In some optional implementations of this embodiment, the apparatus further includes: querying the item details of the target sub-order based on the target sub-order number; retrying the query of the item details a preset number of times at increasingly larger query intervals in response to not finding the item details of the target sub-order; and sending the new order tree and item details to the target electronic device in response to finding the item details of the target sub-order.
[0109] In some optional implementations of this embodiment, the query unit is further configured to execute the order status message of the target sub-order in response to the receipt of the order as follows: in response to the initial order status message of the target sub-order that has been listened to, the initial order status message is parsed, wherein the message format of the initial order status message corresponding to different order statuses is different; in response to the message format of the initial order status message of the target sub-order not being the target message format, the message format of the initial order status message is converted to the target message format to obtain the order status message.
[0110] In some optional implementations of this embodiment, the apparatus further includes: performing at least one of a first judgment step, a second judgment step, and a third judgment step on the obtained order status message: determining whether the user who placed the order for the target sub-order is in a specified user identifier set, determining whether the user is in a user blacklist, and determining whether the order status message exists in the cache, wherein if the user who placed the order for the target sub-order is in the specified user identifier set, the order status message passes the first judgment step; if the user is not in the user blacklist, the order status message passes the second judgment step; and if the order status message does not exist in the cache, the order status message passes the third judgment step; in response to determining that the order status message passes at least one judgment step, the order status message is stored in the cache; and the order status indicated by the order status message is determined as the order status of the new node, including: determining the order status indicated by the order status message in the cache as the order status of the new node.
[0111] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0112] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0113] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0114] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0115] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the order message processing method. For example, in some embodiments, the order message processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the order message processing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the order message processing method by any other suitable means (e.g., by means of firmware).
[0116] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0118] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0120] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0121] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0122] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0123] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for processing an order message, the method comprising: in response to obtaining an order state message of a target sub-order of an order, querying whether an order tree in which a sub-order having a parent-child relationship with the target sub-order exists in a set of order trees, wherein the order tree indicates a parent-child relationship between each sub-order in the order; if an order tree in which a sub-order having a parent-child relationship with the target sub-order exists, in response to a node of the target sub-order not existing in the order tree, adding the target sub-order as a new node to the order tree to obtain a new order tree; determining an order state indicated by the order state message as an order state of the new node; in response to determining that order states of each sub-order of a parent order of the target sub-order in the order tree are all after an order state of the parent order, updating the order state of the parent order according to the earliest order state among the order states of the each sub-order.
2. The method of claim 1, wherein, The method further comprises: if an order tree in which a sub-order having a parent-child relationship with the target sub-order exists, in response to a node of the target sub-order existing in the order tree, determining whether to update the order state of the node according to an order state indicated by the order state message; if it is determined to update the order state of the node, updating the order state of the node according to the order state indicated by the order state message.
3. The method of claim 2, wherein, The determining whether to update the order state of the node according to the order state indicated by the order state message comprises: judging a sequence relationship between the order state indicated by the order state message and a current order state of the node; if the order state indicated by the order state message is after the current order state of the node, determining to update the order state of the node.
4. The method of claim 1, wherein, The adding the target sub-order as a new node to the order tree comprises: in response to the order state message carrying a sub-order field of a sub-order having a parent-child relationship with the target sub-order, determining a connection position of the new node in the order tree according to the sub-order field, wherein the connection position comprises a connected sub-order and a position connection relationship; connecting the new node to the order tree according to the position connection relationship.
5. The method of claim 4, wherein, The connecting the new node to the order tree according to the position connection relationship comprises: in response to an order tree in which a sub-order having a parent-child relationship with the target sub-order exists comprising a parent order tree and a child order tree of the target sub-order, connecting the new node with the parent order tree and the child order tree to form an order tree.
6. The method of claim 1, wherein, The querying whether an order tree in which a sub-order having a parent-child relationship with the target sub-order exists in a set of order trees comprises: in response to the order state message carrying a sub-order field of a sub-order having a parent-child relationship with the target sub-order, querying whether an order tree corresponding to the sub-order field exists in a set of order trees, wherein the sub-order field comprises a parent order field and / or a child order field.
7. The method of claim 1, wherein, The method further comprises: If there is no order tree in which the sub-order having the parent-child relationship with the target sub-order is located, an order tree with the target sub-order as a node is generated to obtain a new order tree.
8. The method of claim 1, wherein, The method further comprises: According to the number of the target sub-order, the item detailed information of the target sub-order is queried; In response to not querying the item detailed information of the target sub-order, the item detailed information is queried for a preset number of times with an increasingly large query time interval; In response to querying the item detailed information of the target sub-order, the new order tree and the item detailed information are sent to a target electronic device.
9. The method of claim 1, wherein, The order state message of the target sub-order in response to obtaining an order comprises: In response to listening to an initial order state message of the target sub-order in an order, the initial order state message is parsed, wherein the message formats of the initial order state messages corresponding to different order states are different; In response to the message format of the initial order state message of the target sub-order not being a target message format, the message format of the initial order state message is converted into the target message format to obtain the order state message.
10. The method of claim 1, wherein, The method further comprises: At least one of the first, second and third judgment steps is performed on the obtained order state message: whether the user who placed the target sub-order is in a specified user identifier set, whether the user is in a user blacklist, and whether the order state message exists in a cache, wherein if the user who placed the target sub-order is in the specified user identifier set, the order state message passes the first judgment step, if the user is not in the user blacklist, the order state message passes the second judgment step, and if the order state message does not exist in the cache, the order state message passes the third judgment step; In response to determining that the order state message passes the at least one judgment step, the order state message is stored in the cache; and The order state indicated by the order state message is determined as the order state of the new node, comprising: The order state indicated by the order state message in the cache is determined as the order state of the new node.
11. An order message processing apparatus, the apparatus comprising: a query unit configured to, in response to obtaining an order state message of a target sub-order in an order, query whether there is an order tree in which a sub-order having a parent-child relationship with the target sub-order is located in a set of order trees, wherein the order tree indicates the parent-child relationship between each sub-order in an order; a joining unit configured to, if there is an order tree in which a sub-order having a parent-child relationship with the target sub-order is located, in response to the target sub-order not existing as a node in the order tree, join the target sub-order as a new node to the order tree to obtain a new order tree; a determination unit configured to determine the order state indicated by the order state message as the order state of the new node; The parent order updating unit is configured to update the order state of the parent order in the order tree according to the earliest order state among the order states of the respective child orders of the parent order of the target sub-order in response to determining that the order states of the respective child orders of the parent order are all behind the order state of the parent order. 12.An electronic device comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
13. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, the computer instructions for causing the computer to perform the method of any one of claims 1-10.
Citation Information
Patent Citations
Methods, systems, and computer readable media for managing order processing and fallout in an order management system
US20160321739A1
Systems and methods for visualizing a trade life cycle and detecting discrepancies
US20200211110A1