Message Queue-Based Order Processing Method and Device
By creating a message queue for each production line and generating enqueue rules based on the order type and job type, the problem of order generation is solved, and orderly processing and efficient production on the production line are achieved.
Patent Information
- Application Number
- CN202111664446.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The lack of a good order sequential processing mechanism in the prior art leads to confusion in product generation when multiple orders enter the production system and low production efficiency.
Create a corresponding message queue for each production line, generate enqueue rules based on the type of order information and the operation type of the production line, and control the production line to process orderly according to the order execution task data in the message queue.
It realizes orderly processing of different types of operations on the production line, improves production efficiency, avoids duplication and loss of order information, and ensures the reliability of transmission information.
Smart Images

Figure CN114358578B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of production line control, and in particular, to an order processing method and device based on a message queue. Background Art
[0002] In an order production system, orders are generated by a business system, and the production system obtains the orders and processes the orders respectively through corresponding production lines. When multiple orders enter the production system, due to the lack of a good order sequence processing mechanism, it often causes low production efficiency and disordered generation of order products. Summary of the Invention
[0003] The embodiments of the present invention provide an order processing method based on a message queue, which solves the problems in the prior art that when multiple orders enter the production system, due to the lack of a good order sequence processing mechanism, the order products are generated disorderly and the production efficiency is low, and realizes the orderly processing of different types of operations on the production line, improving the production efficiency.
[0004] In a first aspect, the present embodiment provides an order processing method based on a message queue, and the method includes:
[0005] Create corresponding message queues for each production line, where the message queues are used to store order information;
[0006] When it is detected that new order information is generated, determine the order sub-products in the order information, where each order sub-product corresponds to a production line;
[0007] Generate order execution task data for each order sub-product respectively, and store the multiple different order execution task data into the corresponding message queues according to the enqueue rules of each message queue;
[0008] Control the production line corresponding to each message queue to perform job production according to the order execution task data recorded in the message queue.
[0009] Further, the creating corresponding message queues for each production line further includes:
[0010] Generate enqueue rules for the message queues according to the operation types of each production line;
[0011] Create message queues corresponding to the enqueue rules for each production line respectively.
[0012] Further, the generating enqueue rules for the message queues according to the operation types of each production line further includes:
[0013] When it is determined that the operation type of the production line is a single product task, create a message queue based on a time series rule;
[0014] When it is determined that the operation type of the production line is a combined product task, a message queue based on the collaborative processing rule is created.
[0015] Further, after monitoring that new order information is generated, determining the order sub-products in the order information further includes:
[0016] After monitoring the new order information, disassemble the product components included in the order information to obtain the order sub-products corresponding to the order information.
[0017] Further, storing the multiple different order execution task data into the corresponding message queues respectively according to the enqueue rules of each message queue further includes:
[0018] When it is determined that the enqueue rule of the dequeued message queue is based on the time series rule, add the order execution tasks to the message queue in chronological order;
[0019] When it is determined that the enqueue rule of the dequeued message queue is based on the collaborative processing rule, determine the enqueue position of the order execution task in the message queue, and add the order execution task at the enqueue position.
[0020] Further, determining the enqueue position of the order execution task in the message queue further includes:
[0021] Determine the priority information of the order execution task and the order execution tasks stored in the message queue;
[0022] Determine the enqueue position of the order execution task in the message queue according to the priority information.
[0023] Further, controlling each production line corresponding to the message queue to perform job production according to the order execution task data recorded in the message queue further includes:
[0024] Control each production line to sequentially obtain the order execution task data from the message queue;
[0025] Determine the content of the job task to be executed according to the order execution task data, and perform job processing on the corresponding order sub-products based on the job task content.
[0026] In a second aspect, an order processing apparatus based on a message queue provided by an embodiment of the present application includes:
[0027] A creation module: used to create a corresponding message queue for each production line, and the message queue is used to store order information;
[0028] Disassembly module: used to determine the order sub-products in the order information when new order information is detected. Each order sub-product corresponds to a production line;
[0029] Generation module: used to generate order execution task data for each order sub-product respectively, and store multiple different order execution task data into the corresponding message queues according to the enqueue rules of each message queue;
[0030] Control module: used to control the production line corresponding to each message queue to perform job production according to the order execution task data recorded in the message queue.
[0031] Thirdly, an embodiment of the present application provides an order processing device based on a message queue. The device includes:
[0032] One or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the order processing method based on a message queue.
[0033] Fourthly, an embodiment of the present application provides a storage medium storing computer-executable instructions. The computer-executable instructions are used to execute the order processing method based on a message queue when executed by a computer processor.
[0034] In this embodiment, by creating corresponding message queues for each production line respectively, the message queues are used to store order information; when new order information is detected, the order sub-products in the order information are determined, where each order sub-product corresponds to a production line; order execution task data is generated for each order sub-product respectively, and multiple different order execution task data are stored into the corresponding message queues according to the enqueue rules of each message queue; the production line corresponding to each message queue is controlled to perform job production according to the order execution task data recorded in the message queue. The production line processes the orders orderly according to the order execution task data recorded in the message queue, ensuring the reliability of the transmitted information, avoiding duplication and loss of order information, providing a targeted and orderly processing mechanism for different types of jobs on the production line, and improving production efficiency. Brief Description of the Drawings
[0035] Figure 1 is a specific flowchart of an order processing method based on a message queue provided by an embodiment of the present solution;
[0036] Figure 2 is a specific flowchart of another order processing method based on a message queue provided by an embodiment of the present solution;
[0037] Figure 3It is a schematic structural diagram of an order processing device based on a message queue provided by an embodiment of the present solution;
[0038] Figure 4 It is a schematic structural diagram of an order processing device based on a message queue provided by an embodiment of the present solution. Specific implementation manners
[0039] The following further elaborates on the embodiments of the present invention in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention, rather than limiting the embodiments of the present invention. Additionally, it should be noted that for ease of description, only parts related to the embodiments of the present invention are shown in the drawings, rather than all the structures.
[0040] Figure 1 It is a specific flowchart of an order processing method based on a message queue provided by an embodiment of the present solution. The order processing method based on a message queue provided by the embodiments of the present application can be completed by an order processing device based on a message queue. The order processing device based on a message queue can be implemented in a hardware and / or software manner and integrated in a computer device. Refer to Figure 1 , and the method can specifically include:
[0041] S101. Create corresponding message queues for each production line, where the message queues are used to store order information.
[0042] Among them, the production line can be a product production line composed of multiple components or a single part production line, which refers to the route passed through during the product production process, that is, the route starting from the raw materials entering the production site and passing through a series of production activities such as processing, transportation, assembly, and inspection. The message queue is a way of inter-process communication or communication between different threads of the same process, and it is a priority queue sorted by execution time. Order information refers to the information of buying and selling goods, mainly including order number, placing user information, order basic information, such as specific goods and the quantity of goods, payment information, and receiving information. The order information in this solution refers to electronic order information. Specifically, different goods correspond to different production lines, and corresponding message queues are created for each production line. The message queue can be understood as a container for storing order information, and the order information is continuously stored until it is processed by the application program.
[0043] In an implementable example, an order system terminal receives order information and sends the order information to a specified message queue, which stacks the order information. When a control terminal monitors the message queue, it will receive the order information from an intelligent terminal. The transport layer security (TLS) of the message queue can protect the order information online, while the built-in access control can protect the order information on the target queue. If there is a network or application interruption that causes the message queue to be unable to deliver the order information immediately, the order information will be secured in its waiting queue until all the order information is delivered. Other mechanisms use at-least-once or at-most-once message delivery, which means that messages will be repeated or lost. The message queue only moves the data once, that is, with the message queue, order information will never be repeated or lost.
[0044] S102. After detecting the generation of new order information, determine the order sub-products in the order information, where each order sub-product corresponds to a production line.
[0045] An order sub-product refers to each component that makes up a commodity obtained by disassembling the commodity in the order information. For example, if the order commodity is a mobile phone, the lens, battery, screen, etc. are all sub-products of the mobile phone order. Specifically, when the order system terminal detects new order information, it disassembles and analyzes the commodity in the order information to determine each component of the product, that is, the order sub-product, and matches each order sub-product with a corresponding production line.
[0046] In an embodiment, the input order information can be disassembled through a preset neural network model. The preset neural network model has a corresponding relationship with the order tasks in the order information, so as to determine the order sub-products included in the order information. The embodiments of the present application do not specifically limit the training and construction methods of the neural network model. This step is mainly to decompose the overall commodity to obtain each component of the commodity, produce each component separately in an orderly manner, adjust the production of each component to match the demand, and improve production efficiency.
[0047] S103. Generate order execution task data for each order sub-product respectively, and store the multiple different order execution task data into the corresponding message queue according to the enqueue rules of each message queue.
[0048] Order execution task data refers to the specific processing information of the sub-orders to be processed, including information such as the processing steps, processing duration, and total demand quantity of the order. According to the sub-order processing information provided by the order execution task data, different message queues are matched for it, and the order execution task data is sent to the corresponding message queue. It can be understood that each message queue can correspond to different message enqueue rules. According to the different sub-order processing requirements in the order execution task data of the multiple sub-orders, the execution task data of the multiple sub-orders is respectively stored in the corresponding message queue according to the enqueue rules of each message queue. Providing message queues corresponding to the adapted enqueue rules for different sub-orders ensures the orderly processing of orders and improves production efficiency.
[0049] S104. Control the production line corresponding to each message queue to carry out production operations according to the order execution task data recorded in the message queue.
[0050] When the control terminal detects the order execution task data in the message queue, it can control the mechanical transmission device to sequentially control the production of commodity components on the production line corresponding to the message queue according to the execution task data.
[0051] The control mechanical transmission device refers to an automatic control device that transmits power and information through mechanical connections and can achieve accurate transmission and signal processing. In one embodiment, for example, commodity A has three processing procedures with a fixed procedure sequence. The control terminal processes component A in the first procedure according to the execution task data read from the message queue, with a processing duration of 30 seconds, then processes it in the second procedure with a processing duration of 60 seconds, and then combines and packages component A with component B, with a packaging duration of 15 seconds. Then the control mechanical transmission device transports component A to the first procedure processing area. After 30 seconds, it transports component A to the second procedure processing area. After 60 seconds, it transports component A to the packaging area. After 15 seconds, it transports the packaged finished product to the finished product area and continues to control the processing of the next component A, realizing the automatic control of commodity operation processing.
[0052] Furthermore, the control mechanical transmission device includes an alarm module. When the control mechanical transmission device does not respond to the execution task data within the preset duration, the alarm module transmits an error message to the control terminal to notify the technical personnel to promptly perform fault maintenance on the control mechanical transmission device, avoiding delays in commodity production due to the device malfunctioning without the technical personnel's knowledge. The preset duration in this solution is set by the technical personnel according to actual needs, and this solution does not specifically limit the device for automatically controlling commodity production.
[0053] As described above, the order system terminal receives order information, which is disassembled into sub-order information. Each sub-order corresponds to a specific production line, and order execution task data is generated for the corresponding sub-order. The control mechanical transmission device on the production line controls the automatic sequential production of goods according to the order execution task data in the message queue. This ensures the reliability of the transmitted information, avoids duplication and loss of order information, provides a targeted sequential processing mechanism for different types of operations on the production line, and improves production efficiency.
[0054] Based on the above embodiments, Figure 2 is a specific flowchart of another order processing method based on a message queue provided by an embodiment of this solution. This order processing method based on a message queue is a concretization of the above-mentioned order processing method based on a message queue. Refer to Figure 2 and this order processing method based on a message queue includes:
[0055] S201. When it is determined that the operation type of the production line is a single product task, a message queue based on time series rules is created; when it is determined that the operation type of the production line is a combined product task, a message queue based on collaborative processing rules is created.
[0056] The operation type is judged according to the processing procedures of the goods. When the processing process of the goods is a single process, it is determined that the operation type of the goods is a single product task. At this time, the goods only need to go through one processing procedure, and a message queue based on time series rules is created for the production line corresponding to the goods, that is, following the first-in, first-out rule, the order of writing the order execution task data into the message queue is used as the production order of the goods; when the goods require multiple processing procedures, it is determined that the operation type of the goods is a combined product task. At this time, a message queue based on collaborative processing rules is created for the production line corresponding to the goods, that is, when the goods are produced, the balance of the goods to be processed is adjusted according to the required quantity of the goods, the quantity of the goods to be processed, and the duration of each process, and then distributed to each process, so that the synchronization of each process of the goods is processed, reducing the retention of semi-finished products and being able to shorten the production cycle accordingly.
[0057] S202. When it is determined that the enqueue rule of the incoming message queue is based on time series rules, the order execution tasks are added to the message queue in chronological order; when it is determined that the enqueue rule of the incoming message queue is based on collaborative processing rules, the enqueue position of the order execution task in the message queue is determined, and the order execution task is added at the enqueue position.
[0058] In one embodiment, product A has only one processing step. Therefore, the enqueue rule for the message queue of product A is based on the time series rule. Exemplarily, the order system terminal receives order information 1 at 11:58, receives order information 2 at 13:45, and receives order information 3 at 15:30. Then, the message queue writes the execution task data of product A in order information 1, 2, and 3 into the message queue according to the time order of receiving the order information. At the same time, the control end also processes product A in sequence according to the execution task data in order information 1, 2, and 3. Since product A has only one step, there is no need to consider the synchronization of multiple steps. Product A is produced in the time order of receiving orders.
[0059] In another embodiment, the production process of product B requires three processing steps. It can be understood that product B has no requirement for the order of processing steps and the processing durations are equal. Exemplarily, currently, there are 15 pieces of product B waiting to be processed in the queue in the first processing step area, 30 pieces of product B waiting to be processed in the queue in the second processing step area, and 40 pieces of product B waiting to be processed in the queue in the third processing step area. The message queue reads and processes messages in the order from front to back, writes the product B to be processed in the first processing step to the front end of the message queue, and controls the subsequent product B to be processed to queue up in the first processing step area for waiting to be processed, adjusting the products to be processed in each processing step queue area to be basically the same, synchronizing each processing step of product B, reducing the retention of semi-finished products, and being able to shorten the production cycle accordingly.
[0060] S203. Determine the priority information of the order execution task and the order execution tasks stored in the message queue, and determine the enqueue position of the order execution task in the message queue according to the priority information.
[0061] Priority is a parameter that determines the priority level of each job program to receive system resources when a computer time-sharing operating system processes multiple job programs. That is, priority is an agreement. The job program with a higher priority is processed first, and the job program with a lower priority is processed later. In this solution, the priority of the processing steps when a product is processed is determined, and the processing step with a higher priority is written to the front end of the message queue, that is, the processing of this processing step is given priority.
[0062] In one embodiment, product C has three processing steps. Due to the particularity of the product, product C must complete the first step before the second step can be carried out, and the third step can be carried out only after the first and second steps are completed. At this time, the first step of product C has the highest priority, and the third step has the lowest priority. The product C waiting to be processed in the first step is written to the front end of the message queue, and the product C waiting to be processed in the third step is written to the end of the message queue. That is, product C is first processed in the first step, then in the second step, and finally in the third step. When new order information of product C is detected, the first step of product C in the new order information is still given the highest priority and processed first. When there are sequential requirements for the processing steps of a product, the step that needs to be processed first for the product is given the highest priority, and the step that needs to be processed last has the lowest priority. The high and low order of the priorities corresponds to the order in the message queue. According to the setting of the priorities, it is ensured that the processing steps of the product are processed as required, guaranteeing the correctness of the product processing steps.
[0063] S204. When new order information is detected, disassemble the product components included in the order information to obtain the order sub-products corresponding to the order information.
[0064] Order sub-products refer to the individual components that make up a product obtained by disassembling the product in the order information. For example, if the order product is a mobile phone, the lens, battery, screen, etc. are all sub-products of the mobile phone order. Specifically, when the order system terminal detects new order information, it disassembles and analyzes the product in the order information to determine the individual components of the product, that is, the order sub-products, and matches each order sub-product with a corresponding production line.
[0065] In one embodiment, the input order information can be decomposed by a preset neural network model. The preset neural network model has a corresponding relationship with the order tasks in the order information, so as to determine the order sub-products included in the order information. The embodiments of the present application do not specifically limit the training and construction methods of the neural network model. This step is mainly to decompose the overall product to obtain the individual components of the product, produce each component separately in an orderly manner, and adjust the production of each component to match the demand, thereby improving production efficiency.
[0066] S205. Generate order execution task data for each order sub-product respectively, and store the multiple different order execution task data in the corresponding message queues according to the enqueue rules of each message queue.
[0067] Order execution task data refers to the specific processing information of the sub-orders to be processed, including information such as the processing steps, processing duration, and total demand quantity of the order. According to the sub-order processing information provided by the order execution task data, different message queues are matched for it, and the order execution task data is sent to the corresponding message queue. It can be understood that each message queue can correspond to different message enqueue rules. According to the different sub-order processing requirements in the order execution task data of the multiple sub-orders, the execution task data of the multiple sub-orders is stored in the corresponding message queue respectively according to the enqueue rules of each message queue. Provide message queues corresponding to the adapted enqueue rules for different sub-orders to ensure the orderly processing of orders and improve production efficiency.
[0068] S206. Control each production line to sequentially obtain order execution task data from the message queue, determine the content of the operation task to be executed according to the order execution task data, and perform the operation processing of the corresponding order sub-products based on the operation task content.
[0069] The control terminal obtains the order execution task data according to the order of queuing in the message queue. According to the commodity demand quantity, processing procedures, and the duration of each procedure in the order execution task data, the control mechanical transmission device can be controlled to sequentially control the production of commodity components on the production line corresponding to the message queue in order.
[0070] The control mechanical transmission device refers to an automatic control device that can transmit power and information through mechanical connections and can achieve accurate transmission and signal processing. In one embodiment, for example, commodity A has three processing procedures, and the procedure order is fixed. The control terminal processes the first procedure of component A according to the execution task data read from the message queue, with a processing duration of 30 seconds, then processes the second procedure, with a processing duration of 60 seconds, and then combines and packages component A with component B, with a packaging duration of 15 seconds. Then the control mechanical transmission device transports component A to the first procedure processing area. After 30 seconds, it transports component A to the second procedure processing area. After 60 seconds, it transports component A to the packaging area. After 15 seconds, it transports the packaged finished product to the finished product area and continues to control the processing of the next component A, realizing the automatic control of commodity operation processing.
[0071] Furthermore, the control mechanical transmission device includes an alarm module. When the control mechanical transmission device does not respond to the execution task data within the preset duration, the alarm module transmits an error message to the control terminal to notify the technical personnel to promptly perform fault repair on the control mechanical transmission device, avoiding delays in commodity production progress caused by the device malfunctioning without the technical personnel's knowledge. The preset duration in this solution is set by the technical personnel according to actual needs, and this solution does not specifically limit the device for automatically controlling commodity production.
[0072] As described above, according to the operation types of production lines, a message queue based on time series rules and a message queue based on collaborative processing rules are respectively created for single product tasks and combined product tasks. When there is no requirement for the order of multiple processes of a commodity, according to the number of commodities waiting to be processed in each process and the process duration, the queue positions of subsequent commodities in the message queues where each process is located are adjusted. By adjusting the commodities to be processed in each process queuing area to be basically the same, the synchronization processing of each process of the commodity is carried out, reducing the retention of semi-finished products and thus being able to shorten the production cycle; when there is a fixed order requirement for the processing processes of a commodity, according to the order requirement, the process that needs to be processed first is given the highest priority, and the process that is processed last is given the lowest priority, and the high and low levels of priority correspond to the front and back positions of the message queue. According to the setting of priorities, it is ensured that the processing processes of the commodity are processed as required, guaranteeing the correctness of the processing processes of the commodity.
[0073] Figure 3 is a schematic structural diagram of an order processing device based on a message queue provided by an embodiment of the present solution. Refer to Figure 3 , the order processing device based on a message queue provided by this embodiment specifically includes: a creation module 301, a disassembly module 302, a generation module 303, and a control module 304. Each module can be connected through a bus or other means, Figure 3 taking connection through a bus as an example.
[0074] Among them, the creation module 301 is used to create corresponding message queues for each production line, and the message queues are used to store order information.
[0075] In one embodiment, according to the operation types of production lines, the creation module 301 creates a message queue based on time series rules and a message queue based on collaborative processing rules for single product tasks and combined product tasks respectively.
[0076] The disassembly module 302 is used to determine the order sub-products in the order information when it is detected that new order information is generated, where each order sub-product corresponds to a production line.
[0077] In one embodiment, when the order system terminal receives new order information, the disassembly module 302 disassembles and analyzes the commodities in the order information to determine the respective components of the product, that is, the order sub-products, and matches each order sub-product with a corresponding production line.
[0078] The generation module 303 is used to generate order execution task data for each order sub-product respectively, and store the multiple different order execution task data into the corresponding message queues according to the enqueue rules of each message queue.
[0079] In one embodiment, the order execution task data refers to the specific processing information of the sub - order operations to be processed, including information such as the processing steps, processing duration, and total required quantity of the order. The generation module 303 generates corresponding order execution task data for the sub - orders. According to the sub - order processing information provided by the order execution task data, different message queues are matched for it, and the order execution task data is sent to the corresponding message queues.
[0080] The control module 304 is used to control the production lines corresponding to each message queue to perform production operations according to the order execution task data recorded in the message queues.
[0081] In one embodiment, the control module controls the mechanical transmission device to sequentially control the production of commodity components on the production line corresponding to the message queue according to the execution task data, realizing the automatic control of commodity operation processing.
[0082] The order processing device based on message queues provided by the embodiments of the present application can be used to execute the order processing method based on message queues provided by the above - mentioned embodiments, and has corresponding functions and beneficial effects.
[0083] Figure 4 It is a schematic structural diagram of an order processing device based on message queues provided by an embodiment of the present solution. As Figure 4 shown, the device includes a processor 401, a memory 402, an input device 403, and an output device 404; the number of processors 401 in the device can be one or more. Figure 4 Here, one processor 401 is taken as an example; the processor 401, memory 402, input device 403, and output device 404 in the device can be connected through a bus or other means. Figure 4 Here, taking the connection through a bus as an example. The memory 402, as a computer - readable storage medium, can be used to store software programs, computer - executable programs, and modules, such as the program instructions / modules corresponding to the order processing method based on message queues in the embodiments of the present invention. The processor 401 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 402, that is, to implement the above - mentioned order processing method based on message queues. The input device 403 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 404 can include display devices such as a display screen.
[0084] Of course, the storage medium containing computer - executable instructions provided by the embodiments of the present application, its computer - executable instructions are not limited to the order processing method based on message queues as described above, and can also execute related operations in the order processing method based on message queues provided by any embodiment of the present application.
[0085] Note that the above is only the preferred embodiment of the embodiments of the present invention and the technical principles applied. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments described herein, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments only. Without departing from the concept of the embodiments of the present invention, more other equivalent embodiments can be included, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A method for processing orders based on a message queue, characterized in that Including: Create corresponding message queues for each production line, including: when it is determined that the operation type of the production line is a single product task, create a message queue based on time series rules; when it is determined that the operation type of the production line is a combined product task, create a message queue based on collaborative processing rules; create message queues with corresponding enqueue rules for each production line, and the message queues are used to store order information; When it is monitored that new order information is generated, determine the order sub-products in the order information, including: when it is monitored that new order information is generated, disassemble the product components included in the order information to obtain the order sub-products corresponding to the order information, and each order sub-product corresponds to a production line; Generate order execution task data for each order sub-product respectively, and store multiple different order execution task data into the corresponding message queues according to the enqueue rules of each message queue, including: when it is determined that the enqueue rule of the message queue for enqueue is based on time series rules, add the order execution tasks to the message queue in chronological order; when it is determined that the enqueue rule of the message queue for enqueue is based on collaborative processing rules, determine the enqueue position of the order execution task in the message queue, and add the order execution task at the enqueue position. Determining the enqueue position of the order execution task in the message queue includes: determining the priority information of the order execution task and the order execution tasks stored in the message queue, and determining the enqueue position of the order execution task in the message queue according to the priority information; Control the production lines corresponding to each message queue to perform job production according to the order execution task data recorded in the message queue, including: control each production line to sequentially obtain the order execution task data from the message queue, determine the job task content to be executed according to the order execution task data, and perform job processing on the corresponding order sub-products based on the job task content.
2. The order processing device based on a message queue, characterized in that, Including: Creation module: used to create corresponding message queues for each production line, and the message queues are used to store order information. The creation module is specifically used for: when it is determined that the operation type of the production line is a single product task, create a message queue based on time series rules; when it is determined that the operation type of the production line is a combined product task, create a message queue based on collaborative processing rules; create message queues with corresponding enqueue rules for each production line; Disassembly module: used to determine the order sub-products in the order information when it is monitored that new order information is generated, and each order sub-product corresponds to a production line. The disassembly module is specifically used for: when it is monitored that new order information is generated, disassemble the product components included in the order information to obtain the order sub-products corresponding to the order information; Generation module: used to generate order execution task data for each order sub - product respectively, and store multiple different order execution task data into corresponding message queues according to the enqueue rules of each message queue. Specifically, the generation module is used to: when it is determined that the enqueue rule of the message queue for enqueueing is based on the time - series rule, add order execution tasks to the message queue in chronological order; when it is determined that the enqueue rule of the message queue for enqueueing is based on the collaborative - processing rule, determine the enqueue position of the order execution task in the message queue, and add the order execution task at the enqueue position. Specifically, the generation module is used to determine the priority information of the order execution task and the order execution tasks stored in the message queue, and determine the enqueue position of the order execution task in the message queue according to the priority information. Control module: used to control the production line corresponding to each message queue to perform job production according to the order execution task data recorded in the message queue. Specifically, the control module is used to control each production line to sequentially obtain order execution task data from the message queue, determine the job task content to be executed according to the order execution task data, and perform job processing on the corresponding order sub - product based on the job task content.
3. An order processing device based on a message queue, the device comprising: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the message - queue - based order processing method as claimed in claim 1.
4. A storage medium storing computer - executable instructions, which when executed by a computer processor are used to execute the message - queue - based order processing method as claimed in claim 1.
Citation Information
Patent Citations
Order management method and device
CN107705179A
Order processing method and device, electronic equipment and storage medium
CN112085550A