Methods, apparatus, equipment, and media for order collaborative processing based on message queues
By creating order placeholder messages in sub-queues of the message queue and processing them sequentially, the problem of insufficient collaboration in the order processing process is solved, achieving efficient order collaborative processing and notification information transmission, and improving the system's processing capacity.
Patent Information
- Application Number
- CN202310274085.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-03-17
AI Technical Summary
In existing technologies, collaborative processing cannot be performed efficiently during order processing, especially when order traffic peaks are large, causing the processing system to run overloaded and resulting in request waiting timeouts.
By creating order placeholder messages in sub-queues of the message queue, the processing order is determined according to the order parameters and sent to the corresponding processing system. At the same time, prompt information is generated and the processed order is updated to update the queue status.
It improves the coordination and efficiency of order processing, ensuring smooth order processing even under peak traffic conditions, reducing storage space requirements and optimizing information transmission.
Smart Images

Figure CN116151929B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a message queue-based order collaborative processing method, apparatus, device, and medium. Background Technology
[0002] During order processing, when order traffic spikes significantly, the processing system becomes overloaded, causing processing requests to time out and orders to fail. Adding a message queue can cache orders, ensuring a stable processing speed. However, current methods typically apply the message queue before order processing. If multiple stages exist in the order processing, inefficient collaborative processing between these stages becomes problematic. Therefore, existing technologies suffer from inefficient collaborative processing in order handling. Summary of the Invention
[0003] This invention provides a message queue-based order collaborative processing method, apparatus, device, and medium, aiming to solve the problem of inefficient collaborative processing in existing order processing procedures.
[0004] In a first aspect, embodiments of the present invention provide an order collaborative processing method based on a message queue, wherein the method includes:
[0005] If an input order to be processed is received, the order parameters corresponding to the order to be processed are retrieved from the pre-stored order information database;
[0006] Create a corresponding order placeholder message in a sub-queue of the message queue according to the order processing flow in the order parameters;
[0007] According to the creation order of the order placeholder messages in the sub-queues, the pending orders corresponding to the order placeholder messages are sent to the processing systems corresponding to each sub-queue for processing in sequence.
[0008] Generate a prompt message corresponding to the pending order that has been sent and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order.
[0009] The system receives pending orders processed by each processing system and adds corresponding identification information to the corresponding order placeholder message in the message queue.
[0010] Secondly, embodiments of the present invention provide an order collaborative processing device based on a message queue, wherein the device includes:
[0011] The order parameter acquisition unit is used to retrieve the order parameters corresponding to the pending order from the pre-stored order information database if the input pending order is received.
[0012] The order placeholder message creation unit is used to create a corresponding order placeholder message in a sub-queue of the message queue according to the order processing flow in the order parameters.
[0013] The order processing unit is used to send the orders to be processed corresponding to the order placeholder messages to the processing systems corresponding to each of the sub-queues for processing in sequence according to the creation order of the order placeholder messages in the sub-queues.
[0014] The prompt information sending unit is used to generate a prompt information corresponding to the pending order that has been sent and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order.
[0015] The pending order addition unit is used to receive pending orders processed by each processing system and add corresponding identification information to the corresponding order placeholder message in the message queue.
[0016] Thirdly, embodiments of the present invention provide a computer device, wherein the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the message queue-based order collaborative processing method described in the first aspect.
[0017] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, implements the message queue-based order collaborative processing method described in the first aspect.
[0018] This invention provides a message queue-based order collaborative processing method, apparatus, device, and medium. The method involves: retrieving order parameters corresponding to received orders from a pre-stored order information database; creating corresponding order placeholder messages in the message queue according to the order processing flow in the order parameters; sequentially sending the orders corresponding to the order placeholder messages to the processing systems corresponding to each sub-queue for processing; generating prompt messages for the sent orders and sending them to the corresponding processing terminals; and receiving the processed orders from each processing system and adding them to the corresponding order placeholder messages in the message queue. By creating order placeholder messages corresponding to the orders in the sub-queues of the message queue and sending the corresponding orders to the processing systems of the sub-queues for processing via these placeholder messages, while simultaneously generating prompt messages for the orders and sending them to the corresponding processing terminals, the collaborative nature of order processing based on message queues is improved, significantly increasing the efficiency of order collaborative processing. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the message queue-based order collaborative processing method provided in an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of a sub-process of the message queue-based order collaborative processing method provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of another sub-process of the message queue-based order collaborative processing method provided in an embodiment of the present invention;
[0023] Figure 4 This is another flowchart illustrating the message queue-based order collaborative processing method provided in an embodiment of the present invention.
[0024] Figure 5 This is a schematic diagram of another sub-process of the message queue-based order collaborative processing method provided in this embodiment of the invention;
[0025] Figure 6 This is another sub-process diagram of the message queue-based order collaborative processing method provided in the embodiments of the present invention;
[0026] Figure 7 This is another flowchart illustrating the message queue-based order collaborative processing method provided in this embodiment of the invention.
[0027] Figure 8 A schematic block diagram of an order collaborative processing device based on a message queue provided in an embodiment of the present invention;
[0028] Figure 9 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0031] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0032] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0033] Please see Figure 1 , Figure 1 This is a flowchart illustrating a message queue-based order collaborative processing method provided in an embodiment of the present invention. This message queue-based order collaborative processing method is applied to a management server and is executed by application software installed on the management server. The management server is a server-side device configured within an enterprise or government agency for order processing. The management server establishes a communication connection with at least one processing terminal, which is a terminal device used to receive prompts and perform corresponding processing, such as a desktop computer, laptop computer, tablet computer, or mobile phone. Figure 1 As shown, the method includes steps S110 to S150.
[0034] S110. If the input order to be processed is received, retrieve the order parameters corresponding to the order to be processed from the pre-stored order information database.
[0035] If an input order to be processed is received, the order parameters corresponding to the order to be processed are retrieved from the pre-stored order information database. The management server can receive orders to be processed; for example, an order to be processed may be a purchase order submitted to the management server by the purchaser. The management server pre-stores an order information database, which contains order processing flows corresponding to different order processing types. The order information database also includes alternative processing information corresponding to each order processing flow, and the alternative processing information includes at least one alternative handler. The order processing flow and corresponding handler information corresponding to the order to be processed can then be retrieved from the order information database, thereby obtaining the order parameters of the order to be processed. The order parameters include the order processing flow, handler information, and basic order information.
[0036] In one embodiment, such as Figure 2 As shown, step S110 includes sub-steps S111, S112 and S113.
[0037] S111. Based on the processing type of the order to be processed, obtain the order processing flow corresponding to the processing type from the order information database; S112. Based on the alternative processing information corresponding to each processing node in the order processing flow, determine the handler information for each processing node of the order to be processed; S113. Combine the basic order information of the order to be processed with the order processing flow and the handler information to obtain the order parameters.
[0038] Specifically, each order to be processed contains a processing type, which is essentially the classification information for order processing. Based on the processing type of the order to be processed, the corresponding order processing flow can be retrieved from the order information database. Each order processing flow contains at least one processing node. Based on the processing nodes in the order processing flow, alternative processing information corresponding to each processing node can be retrieved from the order information database. One or more handlers can then be selected from the multiple handlers in the alternative processing information. The combination of handlers from multiple processing nodes in the order processing flow constitutes the handler information for the order to be processed. Since the handler information for the order to be processed typically includes multiple handlers, multi-person collaborative processing of the order can be achieved.
[0039] The basic order information of the order to be processed is combined with the corresponding order processing flow and the information of the person in charge to obtain the order parameters of the order to be processed. The basic order information is the information used to describe the basic information of the order to be processed. For example, the basic order information includes the order number, order generation time, order receipt time, order generator, etc.
[0040] S120. Create a corresponding order placeholder message in a sub-queue of the message queue according to the order processing flow in the order parameters.
[0041] Based on the order processing flow in the order parameters, corresponding order placeholder messages are created in sub-queues of the message queue. Specifically, order placeholder messages are created in sub-queues of the message queue according to the order processing flow in the order parameters. These order placeholder messages are not used for actual order processing; they are merely messages used to place items in the sub-queue for sorting. Therefore, the storage space occupied by the order placeholder message is much smaller than that of the order to be processed. For example, the storage space occupied by one order placeholder message can be 128 bytes. By sorting and buffering order placeholder messages in sub-queues, the storage space required for each sub-queue is reduced, greatly improving the storage and transmission efficiency of information corresponding to the order to be processed. The message queue contains multiple sub-queues, and each sub-queue corresponds to a processing node.
[0042] In one embodiment, such as Figure 3 As shown, step S120 includes sub-steps S121 and S122.
[0043] S121. Determine the sub-queue corresponding to each processing node based on the processing nodes included in the order processing flow in the order parameters.
[0044] Sub-queues corresponding to each processing node can be determined based on the processing nodes included in the order processing flow. Since the processing nodes included in the order processing flow may differ for different types of orders to be processed, in order to improve the efficiency of collaborative order processing, sub-queues corresponding to each processing node of the order to be processed can be determined sequentially.
[0045] For example, if an order processing flow includes processing nodes 1, 3 and 4, with 1 corresponding to sub-queue A, 3 corresponding to sub-queue C and 4 corresponding to sub-queue D, then the sub-queues corresponding to each processing node can be determined sequentially.
[0046] S122. Based on the basic order information in the order parameters, create order placeholder messages in the corresponding sub-queues respectively.
[0047] Based on the basic order information in the order parameters, order placeholder messages are created in the sub-queues. Thus, a single pending order can correspond to multiple order placeholder messages created in the message queue, with each order placeholder message belonging to a different sub-queue.
[0048] For example, if the order number of an order to be processed is 12001, a first order placeholder message 12001-1 based on the order number is created in queue A; a second order placeholder message 12001-2 based on the order number is created in queue C; and a third order placeholder message 12001-3 based on the order number is created in queue D.
[0049] S130. According to the creation order of the order placeholder messages in the sub-queues, the pending orders corresponding to the order placeholder messages are sent to the processing systems corresponding to each sub-queue for processing in sequence.
[0050] Based on the creation order of the order placeholder messages in the sub-queues, the pending orders corresponding to the order placeholder messages are sequentially sent to the processing systems corresponding to each sub-queue for processing. The management server is also configured with different processing systems, such as a procurement demand processing system and a logistics processing system. Based on the creation order of the order placeholder messages in the sub-queues and following the first-in, first-out (FIFO) principle, the pending orders corresponding to the order placeholder messages are sequentially sent to the processing systems corresponding to the sub-queues for processing.
[0051] In one embodiment, such as Figure 4 As shown, before step S130, there is also step S1301.
[0052] S1301. Determine whether the order placeholder message contains a corresponding pending order; if the order placeholder message contains a corresponding pending order, execute the step of sequentially sending the pending orders corresponding to the order placeholder message to the processing systems corresponding to each of the sub-queues for processing.
[0053] Specifically, it can be determined whether the order placeholder message corresponds to an pending order. For example, when an pending order arrives at the processing node corresponding to the sub-queue to which the order placeholder message belongs, an identifier can be added to the order placeholder message to indicate that the order already exists. If the order placeholder message contains a corresponding pending order, step S130 can be executed. If the order placeholder message does not contain a corresponding pending order, the sub-queue will first send the pending orders corresponding to the order placeholder messages that already contain the corresponding orders to the processing system for processing. After the order placeholder messages that do not contain the corresponding pending orders reacquire the pending orders, the pending orders corresponding to the order placeholder messages will be processed.
[0054] In one embodiment, such as Figure 5 As shown, step S130 includes sub-steps S131 and S132.
[0055] S131. Send a system detection message to the processing system corresponding to the order placeholder message in the sub-queue to obtain the system detection result fed back by the processing system. S132. If the system detection result meets the preset conditions, send the pending order corresponding to the order placeholder message to the processing system corresponding to the sub-queue to which the order placeholder message belongs.
[0056] Before sending an order to the processing system, a system detection message can be sent to the system about to send the order. This message detects any anomalies in the processing system. The system then provides feedback on the detection results, which determine the specific status of any anomalies in the order. Upon receiving the detection results, it's determined whether the system detection meets predefined conditions. If the results are normal, the predefined conditions are met, and the order can be sent to the processing system. If the results are abnormal, the predefined conditions are not met, and the system waits for the processing system to recover before sending the order.
[0057] For example, if the logistics processing system malfunctions and takes several minutes to repair, during this time, all system detection messages will show anomalies. The processing of other nodes before this malfunctioning node (such as order placement) will not be affected. Once the logistics processing system returns to normal, the system detection messages will also show normal results, and pending orders corresponding to the order placeholder messages stored in the relevant sub-queues can continue to be sent to the logistics processing system for processing. Users performing order placement operations will not be aware of the malfunction in the logistics processing system.
[0058] S140. Generate a prompt message corresponding to the sent pending order and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order.
[0059] A prompt message corresponding to the sent pending order is generated and sent to the corresponding processing terminal. The processing terminal corresponds to the handler information in the order parameters of the pending order. After sending the pending order to the corresponding processing system, a prompt message corresponding to the sent pending order can also be generated and sent to the corresponding processing terminal. The order parameters also include handler information, from which one or more handlers of the processing node corresponding to the current processing system can be obtained, and the generated prompt message is sent to the processing terminal corresponding to that handler.
[0060] For example, if a processing node for a pending order includes both a buyer's processor and a supplier's processor, then the generated notification information can be sent to the processing terminals corresponding to the two processors respectively. The notification information can be a notification from the processing system software, a notification from a third-party mobile terminal software, a notification from SMS, or a notification from email.
[0061] S150: Receive the pending orders processed by each processing system and add corresponding identification information to the corresponding order placeholder message in the message queue.
[0062] The system receives pending orders processed by each processing system and adds corresponding identification information to the corresponding order placeholder message in the message queue. The management server can also receive processed pending orders, generate identification information for each pending order, and add it to the corresponding order placeholder message. This identification information is used to identify the pending order so that it can reach the processing node corresponding to the appropriate sub-queue in the message queue.
[0063] In one embodiment, such as Figure 6 As shown, step S150 includes sub-steps S151 and S152.
[0064] S151. Verify whether the pending orders from each of the processing systems contain processing information corresponding to the processing system.
[0065] Specifically, the management server can verify whether received orders to be processed contain corresponding processing information. For example, if an order to be processed requires one or more processors at a certain processing node, it can verify whether the order contains processing content corresponding to that processing node, thus enabling multiple people to collaboratively process the same processing node. Specifically, if a processing system corresponds to a processing node, it can verify whether the number of processing opinions in the processing information corresponds to the target processing opinion of that processing node, and whether the content of the processing opinions in the processing information meets the content requirements of that processing node, thereby verifying whether the order to be processed contains processing information corresponding to the corresponding processing system.
[0066] S152. If the pending order contains corresponding processing information, according to the next processing node of the order processing flow corresponding to the pending order, add the identification information of the existing order to the order placeholder message of the corresponding sub-queue in the message queue.
[0067] If the order to be processed contains the corresponding processing information, the next processing node of the order to be processed can be determined in the order processing flow. The order placeholder message corresponding to the order processing message can be determined in the sub-queue corresponding to the next processing node. The identification information of the existing order is added to the determined order placeholder message, so that the sub-queue of the next processing node can perform subsequent processing on the order to be processed.
[0068] In one embodiment, such as Figure 7 As shown, before step S150, steps S1501 and S1502 are also included.
[0069] S1501. Determine whether the pending orders processed by each of the processing systems are in an incomplete state; if the pending orders are in an incomplete state, execute the step of receiving the pending orders processed by each processing system and adding corresponding identification information to the corresponding order placeholder message in the message queue; S1502. If the pending orders are in a completed state, modify the pending orders to processed orders and add them to the preset historical order database for storage.
[0070] Before adding the corresponding identifier information to the corresponding order placeholder message in the message queue, it is also possible to determine whether the pending order received from the processing system is in a completed state. Specifically, it can be determined whether the last processing node in the order processing flow of the pending order has been completed. If the last node has been completed, the pending order is determined to be in a completed state; otherwise, the pending order is determined to be in an incomplete state. If the pending order is in an incomplete state, step S150 is executed. If the pending order is in a completed state, the pending order is modified to a processed order, and the processed order is added to the historical order database for storage. In this case, there is no need to process the processed order through the message queue, thereby releasing the storage resources in the message queue.
[0071] In the message queue-based collaborative order processing method provided in this embodiment of the invention, order parameters corresponding to the received pending orders are obtained from a pre-stored order information database; according to the order processing flow in the order parameters, corresponding order placeholder messages are created in the message queue; the pending orders corresponding to the order placeholder messages are sequentially sent to the processing systems corresponding to each sub-queue for processing; prompt messages corresponding to the sent pending orders are generated and sent to the corresponding processing terminals; and pending orders processed by each processing system are received and added to the corresponding order placeholder messages in the message queue. Through this method, order placeholder messages corresponding to pending orders are first created in the sub-queues of the message queue, and the corresponding pending orders are sent to the processing systems corresponding to the sub-queues for processing via the order placeholder messages. Simultaneously, prompt messages corresponding to the pending orders are generated and sent to the corresponding processing terminals, thereby improving the collaboration of order processing based on message queues and significantly increasing the efficiency of collaborative order processing.
[0072] This invention also provides a message queue-based order collaborative processing device 100, which is used to execute any of the aforementioned message queue-based order collaborative processing methods. Specifically, please refer to... Figure 8, Figure 8 This is a schematic block diagram of a message queue-based order collaborative processing device 100 provided in an embodiment of the present invention. The message queue-based order collaborative processing device 100 includes an order parameter acquisition unit 110, an order placeholder message creation unit 120, an order processing unit 130, a prompt information sending unit 140, and a pending order addition unit 150.
[0073] The order parameter acquisition unit 110 is used to acquire the order parameters corresponding to the pending order from the pre-stored order information database if it receives the input pending order.
[0074] The order placeholder message creation unit 120 is used to create a corresponding order placeholder message in a sub-queue of the message queue according to the order processing flow in the order parameters.
[0075] The order processing unit 130 is used to send the pending orders corresponding to the order placeholder messages to the processing systems corresponding to each of the sub-queues for processing in sequence according to the creation order of the order placeholder messages in the sub-queues.
[0076] The prompt message sending unit 140 is used to generate a prompt message corresponding to the pending order that has been sent and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order.
[0077] The pending order addition unit 150 is used to receive pending orders processed by each processing system and add corresponding identification information to the corresponding order placeholder message in the message queue.
[0078] The message queue-based order collaborative processing device provided in this embodiment of the invention applies the aforementioned message queue-based order collaborative processing method. It retrieves order parameters corresponding to the received orders to be processed from a pre-stored order information database; creates corresponding order placeholder messages in the message queue according to the order processing flow in the order parameters; sequentially sends the orders to be processed corresponding to the order placeholder messages to the processing systems corresponding to each sub-queue for processing; generates prompt messages for the sent orders to be processed and sends them to the corresponding processing terminals; and receives the orders to be processed after processing by each processing system and adds them to the corresponding order placeholder messages in the message queue. Through this method, order placeholder messages corresponding to the orders to be processed are first created in the sub-queues of the message queue, and the corresponding orders to be processed are sent to the processing systems corresponding to the sub-queues for processing via these order placeholder messages. Simultaneously, prompt messages for the orders to be processed are generated and sent to the corresponding processing terminals, thereby improving the collaborative nature of order processing based on message queues and significantly increasing the efficiency of order collaborative processing.
[0079] The aforementioned message queue-based order collaborative processing method can be implemented as a computer program, which can be used in various ways, such as... Figure 9 It runs on the computer device shown.
[0080] Please see Figure 9 , Figure 9 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device may be a management server for executing a message queue-based order collaborative processing method to collaboratively process orders.
[0081] See Figure 9 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a storage medium 503 and internal memory 504.
[0082] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a message queue-based order collaborative processing method. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0083] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0084] The internal memory 504 provides an environment for the execution of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a message queue-based order collaborative processing method.
[0085] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0086] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the message queue-based order collaborative processing method described above.
[0087] Those skilled in the art will understand that Figure 9The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 9 The embodiments shown are consistent and will not be described again here.
[0088] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0089] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the aforementioned message queue-based order collaborative processing method.
[0090] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.
[0091] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0093] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A message queue-based order collaborative processing method, characterized in that, The method includes: If an input order to be processed is received, the order parameters corresponding to the order to be processed are retrieved from the pre-stored order information database; Based on the processing nodes included in the order processing flow in the order parameters, the sub-queue corresponding to each processing node is determined in the sub-queue of the message queue; Based on the basic order information in the order parameters, create order placeholder messages in the corresponding sub-queues respectively; To determine whether the order placeholder message contains a corresponding pending order, specifically, when a pending order arrives at the processing node corresponding to the sub-queue to which the order placeholder message belongs, an identifier is added to the order placeholder message. This identifier is used to indicate that the order already exists. If the order placeholder message contains a corresponding pending order, then according to the creation order of the order placeholder message in the sub-queue, the pending orders corresponding to the order placeholder message are sent to the processing system corresponding to each sub-queue for processing in turn; If the order placeholder message does not contain the corresponding pending order, the sub-queue will first send the pending order corresponding to the order placeholder message that already has the corresponding order to the processing system for processing. Generate a prompt message corresponding to the pending order that has been sent and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order. The system receives pending orders processed by each processing system and adds the identifier information of the existing order to the order placeholder message of the sub-queue corresponding to the next processing node of the order processing flow corresponding to the pending order.
2. The message queue-based order collaborative processing method according to claim 1, characterized in that, The step of retrieving the order parameters corresponding to the order to be processed from the pre-stored order information database includes: Based on the processing type of the order to be processed, obtain the order processing flow corresponding to the processing type from the order information database; Based on the alternative processing information corresponding to each processing node in the order processing flow, determine the processing person information for each processing node of the order to be processed; The order parameters are obtained by combining the basic order information of the order to be processed with the order processing flow and the information of the processor.
3. The message queue-based order collaborative processing method according to claim 1, characterized in that, The step of sequentially sending the pending orders corresponding to the order placeholder messages to the processing systems corresponding to each of the sub-queues for processing includes: Send a system detection message to the processing system corresponding to the order placeholder message in the sub-queue, in order to obtain the system detection result fed back by the processing system; If the system detection result meets the preset conditions, the pending order corresponding to the order placeholder message will be sent to the processing system corresponding to the sub-queue to which the order placeholder message belongs.
4. The message queue-based order collaborative processing method according to claim 1, characterized in that, The step of receiving pending orders processed by each processing system and adding the identifier information of the existing order to the order placeholder message of the sub-queue corresponding to the next processing node in the message queue according to the next processing node of the order processing flow corresponding to the pending order includes: Verify whether the pending orders from each of the aforementioned processing systems contain processing information corresponding to that processing system; If the pending order contains corresponding processing information, according to the next processing node of the order processing flow corresponding to the pending order, add the identification information of the existing order to the order placeholder message of the sub-queue corresponding to the next processing node in the message queue.
5. The message queue-based order collaborative processing method according to claim 1, characterized in that, Before receiving pending orders processed by each processing system and adding the identifier information of the existing order to the order placeholder message in the sub-queue corresponding to the next processing node of the order processing flow corresponding to the pending order, the process also includes: Determine whether the pending orders from each of the aforementioned processing systems are in an incomplete state; If the pending order is in an incomplete state, the following steps are executed: receiving the pending orders processed by each processing system and adding the identification information of the existing order to the order placeholder message of the sub-queue corresponding to the next processing node of the order processing flow corresponding to the pending order. If the pending order is in a completed state, change the pending order to a processed order and add it to the preset historical order database for storage.
6. A message queue-based order collaborative processing device, characterized in that, The device includes: The order parameter acquisition unit is used to retrieve the order parameters corresponding to the pending order from the pre-stored order information database if the input pending order is received. The order placeholder message creation unit is used to determine the sub-queue corresponding to each processing node in the sub-queue of the message queue according to the processing nodes included in the order processing flow in the order parameters; and to create order placeholder messages in the corresponding sub-queues according to the basic order information in the order parameters. To determine whether the order placeholder message contains a corresponding pending order, specifically, when a pending order arrives at the processing node corresponding to the sub-queue to which the order placeholder message belongs, an identifier is added to the order placeholder message. This identifier is used to indicate that the order already exists. An order processing unit is configured to, if the order placeholder message contains a corresponding pending order, sequentially send the pending orders corresponding to the order placeholder message to the processing system corresponding to each of the sub-queues for processing according to the creation order of the order placeholder message in the sub-queue; If the order placeholder message does not contain the corresponding pending order, the sub-queue will first send the pending order corresponding to the order placeholder message that already has the corresponding order to the processing system for processing. The prompt information sending unit is used to generate a prompt information corresponding to the pending order that has been sent and send it to the corresponding processing terminal. The processing terminal corresponds to the processor information in the order parameters of the pending order. The pending order addition unit is used to receive pending orders processed by each processing system and, according to the next processing node of the order processing flow corresponding to the pending order, add the identification information of the existing order to the order placeholder message of the sub-queue corresponding to the next processing node in the message queue.
7. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the message queue-based order collaborative processing method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the message queue-based order collaborative processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Order processing method and device, electronic equipment and storage medium
CN114255095A