Scheduling method, system, device, electronic device and storage medium

Through the scheduling method optimized by genetic algorithm, the scheduling problem of smart electronic product orders under the constraints of material and delivery is solved, and efficient order completion and production plan management is achieved.

CN118333199BActive Publication Date: 2024-12-03SHENZHEN JIANZHOU TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311773506.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2024-12-03
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively schedule smart electronic product orders, especially under material constraints and delivery constraints, completing a large number of product orders has become a challenge.

Method used

Using a scheduling method combined with genetic algorithm, the order sequence is randomly determined by obtaining order information and inventory information, selecting the order with the highest achievement rate, and optimizing the order sequence through cross- and mutant processing until the preset termination condition is reached, and the order is realized final schedule.

Benefits of technology

It improves the order completion rate, ensures effective completion of orders under material and delivery constraints, and improves the efficiency and accuracy of production plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118333199B_ABST
    Figure CN118333199B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a scheduling method, system, device, electronic device and storage medium, which relates to the field of intelligent production technology. The method includes: obtaining order information of each pending order and inventory information of each material required; determining multiple random pending order sequences; scheduling each pending order according to each pending order sequence based on order information and inventory information, and obtaining the order fulfillment rate scheduled according to each pending order sequence; selecting the first preset number of elite order sequences with the largest order fulfillment rate; performing cross processing and / or mutation processing on the elite order sequence based on a genetic algorithm to obtain multiple optimized pending order sequences; returning to execute the step of scheduling according to each pending order sequence until a preset termination condition is reached, and taking the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result. In this way, the orders can be reasonably scheduled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent production technology, and in particular to a scheduling method, system, device, electronic device and storage medium. Background Art

[0002] With the development of industrialization, the manufacturing process of modern products is becoming increasingly complex, often involving a large number of different types of materials. For example, the production process of smart electronic products involves thousands or even tens of thousands of materials. For large factories, a batch often receives a large number of product orders. However, the factory's material inventory is limited, and product orders often have agreed delivery dates. In order to complete as many product orders as possible under the constraints of materials and delivery dates, it is necessary to formulate production plans for the large number of product orders received, that is, it is necessary to schedule the product orders.

[0003] Therefore, how to reasonably schedule product orders to effectively complete product orders has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a scheduling method, system, device, electronic device and storage medium to achieve reasonable scheduling of orders to effectively complete the orders. The specific technical solution is as follows:

[0005] In a first aspect of the present application, a scheduling method is provided, the method comprising:

[0006] Obtaining order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0007] Determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders;

[0008] For each current pending order sequence, based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence, and the order fulfillment rate of the orders scheduled according to the pending order sequence is obtained;

[0009] Select the first preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0010] Based on the genetic algorithm, the current elite order sequence is cross-processed and / or mutated to obtain multiple optimized order sequences as the current order sequence to be processed;

[0011] Return to executing the step of scheduling each pending order sequence currently in progress within the scheduling time range according to the pending order sequence based on the order information and the inventory information, and obtaining the order fulfillment rate of the orders scheduled according to the pending order sequence, until a preset termination condition is reached, and taking the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range.

[0012] Optionally, the crossover processing and / or mutation processing of the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current order sequences to be processed includes:

[0013] Combine the current elite order sequences in pairs to obtain multiple elite order sequence pairs;

[0014] For each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair;

[0015] For each order sequence contained in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence of each pending order.

[0016] Optionally, the acquiring of order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range, includes:

[0017] Receive pending order information and pending inventory information;

[0018] The received information is filtered based on the scheduling time range, and abnormal data in the filtered information is cleaned to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range.

[0019] The second aspect provided by the implementation of the present application further provides a scheduling method applied to a GPU (Graphic Processing Unit), the method comprising:

[0020] Receive order information of each pending order within a scheduling time range sent by a CPU (Central Processing Unit), inventory information of each material required for each pending order within the scheduling time range, and the current order of each pending order;

[0021] For each current pending order sequence, based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence, and the order fulfillment rate of the orders scheduled according to the pending order sequence is obtained;

[0022] Sending the order fulfillment rates scheduled according to the current order sequence of pending orders to the CPU, so that the CPU selects the first preset number of order sequences with the largest order fulfillment rates from the current order sequence of pending orders as the current elite order sequence, and sending the current elite order sequence to the GPU;

[0023] Based on the genetic algorithm, the current elite order sequence is cross-processed and / or mutated to obtain multiple optimized order sequences as the current order sequence to be processed;

[0024] Return to execute the method based on the order information and the inventory information, schedule each pending order within the scheduling time range according to the current sequence of each pending order, and obtain the order fulfillment rate scheduled according to the sequence of pending orders, so that when the CPU reaches the preset termination condition, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range.

[0025] Optionally, the crossover processing and / or mutation processing of the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current order sequences to be processed includes:

[0026] For each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair; wherein the multiple elite order sequence pairs are obtained by the CPU combining the current elite order sequences in pairs;

[0027] For each order sequence contained in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence of each pending order.

[0028] Optionally, for each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair, including:

[0029] For each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged by a thread allocated to the elite order sequence pair in the GPU to obtain an exchanged elite order sequence pair;

[0030] and / or,

[0031] For each order sequence included in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence to be processed, including:

[0032] For each order sequence included in each elite order sequence pair after the exchange, the thread allocated to the order sequence in the GPU is used to exchange the positions of two orders in the order sequence according to a preset probability to obtain the current order sequences to be processed.

[0033] Optionally, for each current sequence of pending orders, scheduling each pending order within the scheduling time range according to the sequence of pending orders based on the order information and the inventory information to obtain an order fulfillment rate scheduled according to the sequence of pending orders includes:

[0034] For each current sequence of pending orders, the threads allocated to the sequence of pending orders in the GPU are used to schedule each pending order within the scheduling time range according to the sequence of pending orders based on the order information and the inventory information, so as to obtain the order fulfillment rate scheduled according to the sequence of pending orders.

[0035] Optionally, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range;

[0036] Based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence, and the order fulfillment rate of the orders scheduled according to the pending order sequence is obtained, including:

[0037] According to the order of pending orders, select a pending order that is not currently selected as the current order to be scheduled;

[0038] When there is no target production cycle that satisfies the agreed delivery date of the current to-be-scheduled order within the scheduling time range, returning to the step of selecting a currently unselected to-be-scheduled order as the current to-be-scheduled order according to the sequence of the to-be-scheduled orders, until there is no unselected to-be-scheduled order in the sequence of the to-be-scheduled orders;

[0039] The quantity of materials required by the current order to be scheduled is not greater than the inventory quantity of materials required by the current order to be scheduled within the target production cycle; and the target production cycle is before the agreed delivery date of the current order to be scheduled;

[0040] When the target production cycle exists within the scheduling time range, the target production cycle is determined as the production cycle of the current order to be scheduled; based on the material quantity of the material required for the current order to be scheduled, the inventory quantity of the material required for the current order to be scheduled within the target production cycle is updated; and the step of selecting a currently unselected order to be processed as the current order to be scheduled according to the order to be processed is returned to execute until there is no unselected order to be processed in the order to be processed;

[0041] The ratio of the number of pending orders with a determined production cycle to the total number of pending orders is calculated to obtain an order fulfillment rate for scheduling according to the sequence of the pending orders.

[0042] Optionally, the order information of a pending order further includes: an order identifier of the pending order; the inventory information further includes: a material identifier of each material required for each pending order;

[0043] The receiving CPU sends order information of each pending order within the scheduled time range, inventory information of each material required for each pending order within the scheduled time range, and the current order of each pending order, including:

[0044] Receive the first array, the second array, the third array, the fourth array and the fifth array corresponding to the order of each current pending order sent by the CPU;

[0045] The order of each pending order is represented by a one-dimensional first array; the first array contains the order identifiers of the pending orders; the agreed delivery dates of the pending orders are represented by a one-dimensional second array, and the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs;

[0046] The material identification of each material required for each pending order is represented by a two-dimensional third array; the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material that needs to be represented by the material identification; the designated array unit is the row or column to which the element belongs;

[0047] The material quantity of each of the pending orders is represented by a two-dimensional fourth array; the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively;

[0048] The inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range is represented by a two-dimensional fifth array; the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively;

[0049] The step of selecting a currently unselected pending order according to the pending order sequence as the current pending order to be scheduled includes:

[0050] According to the arrangement order of the order identifiers in the first array corresponding to the order of the pending orders, select a pending order that is not currently selected as the current order to be scheduled;

[0051] After selecting a currently unselected pending order according to the pending order sequence as the current pending order, the method further includes:

[0052] In the second array, query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled to obtain the agreed delivery date of the current order to be scheduled;

[0053] In the third array, query the material ID recorded in the specified array unit corresponding to the order ID of the current order to be scheduled as the target material ID;

[0054] In the fourth array, the number of materials that are consistent with the position of the target material identifier is searched to obtain the number of materials required for the current order to be scheduled;

[0055] In the fifth array, the inventory quantity corresponding to the target material identifier and the target production cycle is queried to obtain the inventory quantity of each material required for the current order to be scheduled within the target production cycle.

[0056] In a third aspect of the implementation of the present application, a scheduling method is also provided, which is applied to a CPU, and the method includes:

[0057] Obtaining order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0058] Determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders;

[0059] Sending the order information and the inventory information, as well as the current order sequence of pending orders to the GPU, so that the GPU schedules the pending orders within the scheduling time range according to the pending order sequence for each current order sequence of pending orders based on the order information and the inventory information, obtains an order fulfillment rate for scheduling according to the pending order sequence, and sends the order fulfillment rate for scheduling according to the current order sequence of pending orders to the CPU;

[0060] Select the first preset number of order sequences with the largest order fulfillment rate from the current pending order sequences as the current elite order sequence, and send the current elite order sequence to the GPU, so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; return to execute the step of scheduling the pending orders within the scheduling time range according to each current pending order sequence based on the order information and the inventory information to obtain the order fulfillment rate of the scheduled order according to the pending order sequence;

[0061] When the preset termination condition is reached, the scheduling result of the sequence of pending orders with the highest order fulfillment rate is used as the final scheduling result of the pending orders within the scheduling time range.

[0062] Optionally, the step of selecting a preset number of order sequences with the highest order fulfillment rate from the current order sequences to be processed as the current elite order sequence, and sending the current elite order sequence to the GPU, so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on a genetic algorithm to obtain multiple optimized order sequences as the current order sequences to be processed, includes:

[0063] Select the first preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0064] The current elite order sequences are combined in pairs to obtain multiple elite order sequence pairs, and the multiple elite order sequence pairs are sent to the GPU, so that the GPU exchanges, for each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair to obtain the exchanged elite order sequence pairs; for each order sequence contained in each exchanged elite order sequence pair, the positions of the two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequences to be processed.

[0065] Optionally, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range, and the order identification of the pending order; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range, and the material identification of each material required for each pending order;

[0066] Before sending the order information and the inventory information, as well as the current sequence of orders to be processed to the GPU, the method further includes:

[0067] For each current order sequence to be processed, a one-dimensional first array representing the order sequence to be processed is generated; wherein one first array contains order identifiers of each order to be processed;

[0068] Generate a one-dimensional second array representing the agreed delivery dates of the pending orders; wherein the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs;

[0069] Generate a two-dimensional third array representing the material identification of each material required for each of the pending orders; wherein the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material represented by the material identification; the designated array unit is the row or column to which the element belongs;

[0070] Generate a two-dimensional fourth array representing the material quantity of the materials required for each of the pending orders; wherein the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively;

[0071] For each current sequence of pending orders, a two-dimensional fifth array is generated, which represents the inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range; wherein the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively;

[0072] The sending the order information and the inventory information, as well as the current sequence of pending orders to the GPU, includes:

[0073] The first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order of pending orders are sent to the GPU, so that the GPU selects a pending order that is not currently selected as the current order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the order of pending orders for each current order of pending orders; after selecting a pending order that is not currently selected as the current order to be scheduled according to the order of pending orders, in the second array, the agreed delivery date at the position represented by the order identifier of the current order to be scheduled is queried to obtain the agreed delivery date of the current order to be scheduled; in the third array, the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled is queried as the target material identifier; in the fourth array, the number of materials consistent with the position of the target material identifier is queried to obtain the number of materials required for the current order to be scheduled; in the fifth array, the inventory number corresponding to the target material identifier and the target production cycle is queried to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0074] Optionally, the acquiring of order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range, includes:

[0075] Receive pending order information and pending inventory information;

[0076] The received information is filtered based on the scheduling time range, and abnormal data in the filtered information is cleaned to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0077] and / or,

[0078] After the scheduling result of the order of pending orders with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range when the preset termination condition is reached, the method further includes:

[0079] The inventory information is updated according to the final scheduling result.

[0080] In another aspect of the present application, a scheduling system is provided, the system comprising: a CPU and a GPU;

[0081] The CPU is used to execute any one of the scheduling methods described in the third aspect above;

[0082] The GPU is used to execute any scheduling method described in the second aspect above.

[0083] In another aspect of the present application, a scheduling device is provided, the device comprising:

[0084] An information acquisition module is used to acquire order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0085] A module for determining a sequence of pending orders, used to determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders;

[0086] An order scheduling module is used to schedule each pending order sequence within the scheduling time range according to the pending order sequence based on the order information and the inventory information, and obtain an order fulfillment rate for scheduling according to the pending order sequence;

[0087] An elite order sequence selection module is used to select a preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0088] The pending order sequence optimization module is used to perform cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; trigger the order scheduling module until the preset termination condition is reached, and use the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of the pending orders within the scheduling time range.

[0089] Optionally, the pending order sequence optimization module is specifically used to combine the current elite order sequences in pairs to obtain multiple elite order sequence pairs; for each elite order sequence pair, exchange a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair to obtain an exchanged elite order sequence pair; for each order sequence contained in each exchanged elite order sequence pair, exchange the positions of two orders in the order sequence according to a preset probability to obtain the current pending order sequences.

[0090] Optionally, the information acquisition module is specifically used to receive pending order information and pending inventory information; filter the received information based on the scheduling time range, and clean the abnormal data in the filtered information to obtain the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range.

[0091] In another aspect of the present application, a scheduling device is provided, which is applied to a GPU, and the device includes:

[0092] An information receiving module, used to receive order information of each pending order within the scheduling time range sent by the CPU, inventory information of each material required for each pending order within the scheduling time range, and the current order of each pending order;

[0093] A pending order scheduling module is used to schedule each pending order within the scheduling time range according to the pending order sequence based on the order information and the inventory information, and obtain the order fulfillment rate of the orders scheduled according to the pending order sequence;

[0094] An order fulfillment rate sending module is used to send the order fulfillment rate scheduled according to the current order sequence to be processed to the CPU, so that the CPU selects the first preset number of order sequences with the largest order fulfillment rate from the current order sequence to be processed as the current elite order sequence, and sends the current elite order sequence to the GPU;

[0095] The order sequence processing module is used to perform cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; trigger the pending order scheduling module so that when the CPU reaches the preset termination condition, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of the pending orders within the scheduling time range.

[0096] Optionally, the order sequence processing module includes:

[0097] The first exchange submodule is used for exchanging a specified number of orders at the same position in two order sequences contained in each elite order sequence pair to obtain an exchanged elite order sequence pair; wherein the multiple elite order sequence pairs are obtained by the CPU combining the current elite order sequences in pairs;

[0098] The second exchange submodule is used to exchange the positions of two orders in each order sequence included in each exchanged elite order sequence pair according to a preset probability to obtain the current order sequence to be processed.

[0099] Optionally, the first exchange submodule is specifically configured to exchange, for each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair through a thread allocated to the elite order sequence pair in the GPU, to obtain an exchanged elite order sequence pair;

[0100] and / or,

[0101] The second exchange submodule is specifically used to exchange the positions of two orders in each order sequence included in each elite order sequence pair after the exchange according to a preset probability through the thread allocated to the order sequence in the GPU to obtain the current order sequences to be processed.

[0102] Optionally, the pending order scheduling module is specifically used to schedule each pending order currently in the pending order sequence within the scheduling time range according to the pending order sequence through a thread allocated to the pending order sequence in the GPU, based on the order information and the inventory information, so as to obtain the order fulfillment rate scheduled according to the pending order sequence.

[0103] Optionally, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range;

[0104] The pending order scheduling module includes:

[0105] The to-be-scheduled order selection submodule is used to select a currently unselected to-be-scheduled order according to the sequence of the to-be-scheduled orders as the current to-be-scheduled order;

[0106] The first determination submodule is used to trigger the to-be-scheduled order selection submodule when there is no target production cycle that meets the agreed delivery date of the current to-be-scheduled order within the scheduling time range, until there is no unselected to-be-scheduled order in the to-be-scheduled order sequence;

[0107] The quantity of materials required by the current order to be scheduled is not greater than the inventory quantity of materials required by the current order to be scheduled within the target production cycle; and the target production cycle is before the agreed delivery date of the current order to be scheduled;

[0108] The second determination submodule is used to determine the target production cycle as the production cycle of the current order to be scheduled when the target production cycle exists within the scheduling time range; based on the material quantity of the material required for the current order to be scheduled, update the inventory quantity of the material required for the current order to be scheduled within the target production cycle; trigger the order to be scheduled selection submodule until there is no unselected order to be processed in the order to be processed sequence;

[0109] The order fulfillment rate calculation submodule is used to calculate the ratio of the number of pending orders with a determined production cycle to the total number of pending orders, and obtain the order fulfillment rate scheduled according to the sequence of the pending orders.

[0110] Optionally, the order information of a pending order further includes: an order identifier of the pending order; the inventory information further includes: a material identifier of each material required for each pending order;

[0111] The information receiving module is specifically used to receive the first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order sequence of each pending order sent by the CPU;

[0112] The order of each pending order is represented by a one-dimensional first array; the first array contains the order identifiers of the pending orders; the agreed delivery dates of the pending orders are represented by a one-dimensional second array, and the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs;

[0113] The material identification of each material required for each pending order is represented by a two-dimensional third array; the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material that needs to be represented by the material identification; the designated array unit is the row or column to which the element belongs;

[0114] The material quantity of each of the pending orders is represented by a two-dimensional fourth array; the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively;

[0115] The inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range is represented by a two-dimensional fifth array; the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively;

[0116] The to-be-scheduled order selection submodule is specifically configured to select a currently unselected to-be-scheduled order as the current to-be-scheduled order according to the arrangement order of the order identifiers in the first array corresponding to the order of the to-be-scheduled orders;

[0117] The device also includes: an information query module, which is used to, after selecting a currently unselected pending order as the current order to be scheduled in the sequence of the pending orders, query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled in the second array to obtain the agreed delivery date of the current order to be scheduled; query the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled in the third array as the target material identifier; query the number of materials consistent with the position of the target material identifier in the fourth array to obtain the number of materials required for the current order to be scheduled; query the inventory number corresponding to the target material identifier and the target production cycle in the fifth array to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0118] In another aspect of the present application, a scheduling device is provided, which is applied to a CPU, and the device includes:

[0119] A scheduling information acquisition module is used to acquire order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0120] An order sequence determination module is used to determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders;

[0121] an information sending module, configured to send the order information and the inventory information, as well as the current order sequence of pending orders to the GPU, so that the GPU schedules the pending orders within the scheduling time range according to the order sequence of pending orders based on the order information and the inventory information for each current order sequence of pending orders, obtains an order fulfillment rate for scheduling according to the order sequence of pending orders, and sends the order fulfillment rate for scheduling according to the current order sequence of pending orders to the CPU;

[0122] The elite selection module is used to select the first preset number of order sequences with the largest order fulfillment rate from the current pending order sequences as the current elite order sequence, and send the current elite order sequence to the GPU so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; return to execute the step of scheduling the pending orders within the scheduling time range according to each current pending order sequence based on the order information and the inventory information to obtain the order fulfillment rate of the scheduled order according to the pending order sequence;

[0123] The final scheduling result determination module is used to, when a preset termination condition is reached, use the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range.

[0124] Optionally, the elite selection module is specifically used to select a preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0125] The current elite order sequences are combined in pairs to obtain multiple elite order sequence pairs, and the multiple elite order sequence pairs are sent to the GPU, so that the GPU exchanges, for each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair to obtain the exchanged elite order sequence pairs; for each order sequence contained in each exchanged elite order sequence pair, the positions of the two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequences to be processed.

[0126] Optionally, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range, and the order identification of the pending order; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range, and the material identification of each material required for each pending order;

[0127] The device also includes: an array generation module, which is used to generate a one-dimensional first array representing the order of pending orders for each current order of pending orders before sending the order information and the inventory information and the current order of pending orders to the GPU; wherein a first array contains order identifiers of the pending orders; generate a one-dimensional second array representing the agreed delivery dates of the pending orders; wherein the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs; generate a two-dimensional third array representing the material identifier of each material required for the pending orders; wherein the elements in the third array are material identifiers, and the specified array unit to which any material identifier in the third array belongs is consistent with the material that needs to be represented by the material identifier. The order identifier of the pending order corresponds to the specified array unit, and the specified array unit is the row or column to which the element belongs. A two-dimensional fourth array is generated to represent the number of materials required for each pending order. The elements in the fourth array are the number of materials, and the dimensions of the fourth array are consistent with those of the third array. The material identifier and the number of materials required for any material of the pending order are recorded at the same positions in the third array and the fourth array, respectively. For each current sequence of pending orders, a two-dimensional fifth array is generated to represent the inventory number of each material required for each pending order within each production cycle included in the scheduling time range. The elements in the fifth array are the inventory number, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively.

[0128] The information sending module is specifically used to send the first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order of pending orders to the GPU, so that the GPU selects a pending order that is not currently selected as the current order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the order of pending orders for each current order of pending orders; after selecting a pending order that is not currently selected as the current order to be scheduled according to the order of pending orders, in the second array, query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled to obtain the agreed delivery date of the current order to be scheduled; in the third array, query the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled as the target material identifier; in the fourth array, query the number of materials consistent with the position of the target material identifier to obtain the number of materials required for the current order to be scheduled; in the fifth array, query the inventory number corresponding to the target material identifier and the target production cycle to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0129] Optionally, the scheduling information acquisition module is specifically used to receive pending order information and pending inventory information; filter the received information based on the scheduling time range, and perform data cleaning on abnormal data in the filtered information to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0130] and / or,

[0131] The device also includes: an inventory information updating module, which is used to update the inventory information according to the final scheduling result after the scheduling result of the order of pending orders with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range when the preset termination condition is reached.

[0132] Another aspect of the present application provides an electronic device, including:

[0133] Memory, used to store computer programs;

[0134] The processor is used to implement the scheduling method described in any one of the first aspect, the second aspect or the third aspect when executing the program stored in the memory.

[0135] According to another aspect of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the scheduling method described in any one of the first aspect, the second aspect or the third aspect is implemented.

[0136] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the scheduling method described in any one of the first aspect, the second aspect or the third aspect.

[0137] A scheduling method provided by an embodiment of the present application can obtain order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range; determine multiple random order sequences as the current pending order sequences; wherein any order sequence represents the sequence between the pending orders; for each current pending order sequence, based on order information and inventory information, schedule each pending order within the scheduling time range according to the pending order sequence, and obtain the order fulfillment rate scheduled according to the pending order sequence; select the order fulfillment rate from the current pending order sequences The first preset number of order sequences with the highest success rate are used as the current elite order sequence; the current elite order sequence is cross-processed and / or mutated based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; return to execute the step of scheduling each pending order within the scheduling time range according to each current pending order sequence based on the order information and inventory information to obtain the order completion rate of the scheduled orders according to the pending order sequence, until the preset termination condition is reached, and the scheduling result of the pending order sequence with the highest order completion rate is used as the final scheduling result of each pending order within the scheduling time range.

[0138] Based on the above processing, the order information of the orders that need to be scheduled within the scheduling time range (i.e., pending orders) and the inventory information of each material required for each pending order within the scheduling time range can be obtained. Each pending order is randomly sorted to obtain multiple order sequences (i.e., each pending order sequence). Since the material constraints and delivery constraints for each pending order can be determined based on the order information and inventory information, for each pending order sequence, each pending order can be scheduled within the scheduling time range according to the pending order sequence under the material constraints and delivery constraints of each pending order. It is also possible to determine the order fulfillment rate of scheduling according to the pending order sequence.

[0139] Subsequently, the order sequence of the first preset number of orders with the largest order fulfillment rate can be selected as the current elite order sequence. The current elite order sequence can be cross-processed and / or mutated based on the genetic algorithm to obtain multiple optimized order sequences as new pending order sequences. Then, according to each new pending order sequence, each pending order is scheduled within the scheduling time range. When the preset termination condition is reached, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of each pending order. In this way, the order sequence with a larger order fulfillment rate (i.e., the elite order sequence) can be cyclically selected, and each pending order can be scheduled within the scheduling time range based on the optimized elite order sequence, so that an order sequence with a higher order fulfillment rate can be obtained, and the scheduling result obtained by scheduling according to the order sequence, that is, the order can be reasonably scheduled to effectively complete the order.

[0140] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0142] Figure 1a A schematic diagram of material requirements for an i-th order provided in an embodiment of the present application;

[0143] Figure 1b A schematic diagram of material inventory on the kth day of the next month provided in an embodiment of the present application;

[0144] Figure 2 A first flow chart of the scheduling method provided in the embodiment of the present application;

[0145] Figure 3a A schematic diagram of a cross-processing provided in an embodiment of the present application;

[0146] Figure 3b A schematic diagram of a variation process provided in an embodiment of the present application;

[0147] Figure 4 A second flow chart of the scheduling method provided in the embodiment of the present application;

[0148] Figure 5 A third flow chart of the scheduling method provided in the embodiment of the present application;

[0149] Figure 6 A schematic diagram of a scheduling method provided in an embodiment of the present application;

[0150] Figure 7 A schematic diagram of an inversion rule provided in an embodiment of the present application;

[0151] Figure 8 A schematic diagram of a first array, a second array, a third array and a fourth array provided in an embodiment of the present application;

[0152] Fig. 9 A fourth flow chart of the scheduling method provided in the embodiment of the present application;

[0153] Fig.10 A schematic diagram of a scheduling method provided in an embodiment of the present application;

[0154] Fig.11 A schematic diagram of the structure of a scheduling device provided in an embodiment of the present application;

[0155] Fig.12 A schematic diagram of the structure of another scheduling device provided in an embodiment of the present application;

[0156] Fig.13 A schematic diagram of the structure of another scheduling device provided in an embodiment of the present application;

[0157] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0158] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0159] With the development of industrialization, the manufacturing process of modern products is becoming increasingly complex, often involving a large number of different types of materials. For example, the production process of smart electronic products involves thousands or even tens of thousands of materials. For large factories, a batch often receives a large number of product orders. However, the factory's material inventory and production capacity are limited, and product orders have agreed delivery dates. In order to complete as many product orders as possible under material constraints, production capacity constraints, and delivery constraints, it is necessary to formulate production plans for the large number of product orders received, that is, it is necessary to schedule the product orders.

[0160] In this application, capacity can also be regarded as a material, and capacity can be quantified to obtain the number of capacity requirements for an order and the number of capacity inventory. A scheduling time range can include multiple scheduling cycles. For example, the scheduling time range can be one month, and correspondingly, the scheduling cycle can be one day or one week. Within the current scheduling time range, when the end time of a scheduling cycle is reached, the orders within the next scheduling time range received within the scheduling cycle can be scheduled.

[0161] For example, in a supply chain scenario, it is necessary to schedule the orders received in the current month for the next month into the production plan for the next month. That is, the current scheduling time range is the current month, and the next scheduling time range is the next month. It is necessary to schedule the orders received in each scheduling cycle in the current month that need to be completed in the next month, and obtain the production dates of these orders in the next month. For example, if the scheduling cycle is one day, then within the current month, every day that passes, the orders received on that day that need to be completed in the next month are scheduled.

[0162] Assume that N orders are received on a certain day of the month, and the types of materials involved in these N orders are M. The number of materials required for the jth material in the i-th order can be expressed as The jth material can be called material j. Indicates that the i-th order does not involve the j-th material. Figure 1a , Figure 1a A schematic diagram of material requirements for the i-th order provided in an embodiment of the present application: The i-th order requires 45 material 1s, 32 material 2s, 64 material 3s, 8 material 4s, ..., 82 material M-1s and 27 material Ms.

[0163] The inventory quantity of the jth material on the kth day of the next month can be expressed as There are K days in a month. Depending on the month, K can be 30, 31, 28 or 29. Figure 1b , Figure 1b A schematic diagram of material inventory on the kth day of the next month provided in an embodiment of the present application. On the kth day of the next month, the inventory number of material 1 is 273, the inventory number of material 2 is 324, the inventory number of material 3 is 296, the inventory number of material 4 is 246, ..., the inventory number of material M-1 is 308, and the inventory number of material M is 275.

[0164] The delivery date (i.e., the agreed delivery date) of the i-th order is Di, and 1≤Di≤K. The production date of the i-th order determined by scheduling is di. For ease of description, it is assumed that any order can be produced on the production date of the order. The order needs to be produced before the agreed delivery date. For the i-th order, its production date needs to be before its agreed delivery date. Formula (1) representing the delivery date constraint can be obtained as follows:

[0165] 0≤d i <D i (1)

[0166] The i-th order may not be scheduled for any day of the next month. In this case, d i is 0. For N orders, according to the delivery time constraints, N inequalities can be obtained.

[0167] And on the kth day of the next month, the inventory quantity of the jth material must be no less than the demand quantity of the jth material for all orders whose production date is determined on the kth day. The formula (2) representing the material constraint can be obtained as follows:

[0168]

[0169] Where N represents the total number of orders, i represents the i-th order, and j represents the j-th material. represents the number of materials required for the jth material in the ith order, and di represents the production date of the ith order determined by scheduling. δ(·) is a Dirac function, which is 1 when the variable is 0, otherwise it is 0. When the production date of an order is the kth day, δ(d i -k)=1, correspondingly, This means that the demand for the jth material is represented by all orders whose production date is determined on the kth day of the next month. It represents the inventory quantity of the jth material on the kth day of the next month. For K days and M materials in the next month, according to the material constraints, we can get M×K inequalities.

[0170] Order scheduling needs to maximize the number of successfully scheduled orders under material constraints and delivery constraints, that is, maximize the number of orders that can be fulfilled. The number of orders that can be fulfilled can be expressed as formula (3), as follows:

[0171]

[0172] Where Q represents the number of orders that can be completed; represents the i-th order; di represents the production date of the i-th order determined by scheduling; H(·) is a step function, which is 1 when the variable is not less than 0, otherwise it is 0. i If it is not 0, it means that the i-th order is successfully scheduled and can be completed. At this time, H(d i -1)=1. If the production date d of the i-th order is determined i If it is 0, it means that the i-th order scheduling failed and could not be completed. At this time, H(d i -1)=0.

[0173] For the problem of scheduling N orders involving M types of materials in K days of the next month, a total of (N+M×K) inequalities can be obtained based on the material constraints and delivery constraints. For example, video surveillance products involve 10,000 types of materials. If 400 orders are received on a certain day of the month and need to be arranged for production in the next month (K=30), then 300400 inequalities are involved. It can be seen that the number of inequalities involved in scheduling is positively correlated with the types of materials required for the order and the number of orders. When the number of orders is large and the types of materials required for the orders are more, the number of inequalities involved in scheduling is also greater.

[0174] In order to reasonably schedule product orders and effectively complete product orders, the present application embodiment provides a scheduling method, see Figure 2 , Figure 2 The first flow chart of the scheduling method provided in the embodiment of the present application may include the following steps:

[0175] Step S201: Obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range.

[0176] Step S202: Determine a plurality of random order sequences as the current sequence of orders to be processed.

[0177] Among them, any order sequence represents the order between the pending orders.

[0178] Step S203: for each current pending order sequence, based on order information and inventory information, schedule each pending order within the scheduling time range according to the pending order sequence, and obtain the order fulfillment rate scheduled according to the pending order sequence.

[0179] Step S204: Select a preset number of order sequences with the highest order fulfillment rates from the current pending order sequences as the current elite order sequence.

[0180] Step S205: Based on the genetic algorithm, the current elite order sequence is cross-processed and / or mutated to obtain multiple optimized order sequences as the current order sequences to be processed; return to execute step S203 until the preset termination condition is reached, and the scheduling result of the order sequence to be processed with the highest order fulfillment rate is used as the final scheduling result of each order to be processed within the scheduling time range.

[0181] Based on the above processing, the order information of the orders that need to be scheduled within the scheduling time range (i.e., pending orders) and the inventory information of each material required for each pending order within the scheduling time range can be obtained. Each pending order is randomly sorted to obtain multiple order sequences (i.e., each pending order sequence). Since the material constraints and delivery constraints for each pending order can be determined based on the order information and inventory information, for each pending order sequence, each pending order can be scheduled within the scheduling time range according to the pending order sequence under the material constraints and delivery constraints of each pending order. It is also possible to determine the order fulfillment rate of scheduling according to the pending order sequence.

[0182] Subsequently, the order sequence of the first preset number of orders with the largest order fulfillment rate can be selected as the current elite order sequence. The current elite order sequence can be cross-processed and / or mutated based on the genetic algorithm to obtain multiple optimized order sequences as new pending order sequences. Then, according to each new pending order sequence, each pending order is scheduled within the scheduling time range. When the preset termination condition is reached, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of each pending order. In this way, the order sequence with a larger order fulfillment rate (i.e., the elite order sequence) can be cyclically selected, and each pending order can be scheduled within the scheduling time range based on the optimized elite order sequence, so that an order sequence with a higher order fulfillment rate can be obtained, and the scheduling result obtained by scheduling according to the order sequence, that is, the order can be reasonably scheduled to effectively complete the order.

[0183] For step S201, the orders that need to be scheduled within the scheduling time range are pending orders. For example, the scheduling time range may be next month, and next month has K days, so the agreed delivery date of the pending orders may be any day from the first day to the Kth day of next month.

[0184] The order information of each pending order can be obtained. For example, for each pending order, the order information of the pending order may include: the agreed delivery date of the pending order, the type of materials required for the pending order, and the required quantity of each material. And the inventory information of each material required for each pending order within the scheduling time range can be obtained. For example, the inventory information may include: the inventory quantity of each material every day within the scheduling time range. In the present application, each material required for each pending order may include: the raw materials required for each pending order, and the production capacity.

[0185] Based on the acquired order information and inventory information, the material constraints and delivery constraints of each pending order within the scheduling time range can be determined. Subsequently, each pending order can be scheduled within the scheduling time range under the material constraints and delivery constraints of each pending order within the scheduling time range.

[0186] In one embodiment, step S201 includes:

[0187] Step S2011: receiving order information to be processed and inventory information to be processed.

[0188] Step S2012: Filter the received information based on the scheduling time range, and clean the abnormal data in the filtered information to obtain the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range.

[0189] In the embodiment of the present application, the pending order information and the pending inventory information (which may be referred to as initial data) may be acquired in advance. Since the initial data is often obtained by statistics of the order management personnel, there may be statistically incorrect data. For example, the pending order information may include non-existent material types; or the pending order information may record an agreed delivery date that is not within the scheduling time range; or the inventory information may record a negative inventory number.

[0190] Based on the above processing, after receiving the pending order information and the pending inventory information, the order information whose agreed delivery date falls within the scheduling time range and the inventory information within the scheduling time range can be screened out. And the abnormal data in the screened information can be cleaned to remove the abnormal data in the screened information. For example, the abnormal data can be a non-existent material type included in the pending order information; or the abnormal data can also be a negative inventory quantity recorded in the inventory information.

[0191] In this way, the order information of each pending order within the scheduling time range, as well as the inventory information of each material required for each pending order within the scheduling time range can be screened out, and the abnormal data can be cleaned, so that the validity of the acquired order information of each pending order within the scheduling time range and the inventory information of each material required for each pending order within the scheduling time range can be ensured. Subsequently, each pending order can be scheduled according to the order information and inventory information with higher validity to ensure the accuracy of the obtained scheduling results.

[0192] For step S202, each pending order can be randomly sorted to obtain multiple random order sequences as the pending order sequence for scheduling this batch. One pending order sequence can represent the sequence between all pending orders. If the number of pending orders is N, there can be N factorial kinds of order sequences between the pending orders. N factorial kinds of order sequences can be obtained in advance, and a first number of random order sequences can be selected from the obtained N factorial kinds of order sequences as the pending order sequence. The first number is not greater than the factorial of N, and the first number can be positively correlated with the performance of the electronic device that executes the scheduling method.

[0193] For step S203, the material constraints and delivery constraints of each pending order within the scheduling time range can be determined based on the order information and inventory information. Furthermore, under the material constraints and delivery constraints, for each pending order sequence scheduled in this batch, each pending order can be scheduled within the scheduling time range according to the pending order sequence. That is, the first pending order, the second pending order, ..., and the last pending order in the pending order sequence are scheduled in turn to determine the production date of each pending order (i.e., the above-mentioned di). The specific method of scheduling each pending order within the scheduling time range can be found in the description in the subsequent embodiments.

[0194] After scheduling all pending orders, the scheduling result can be obtained according to the order of the pending orders, that is, the number of pending orders that can be completed according to the order of the pending orders can be determined, that is, the above formula (3). Correspondingly, the order completion rate can be calculated according to the order of the pending orders.

[0195] With respect to step S204 and step S205, after obtaining the order fulfillment rate of each pending order sequence, each pending order sequence can be sorted according to the order fulfillment rate, so as to select the first preset number of order sequences with the largest order fulfillment rate as the elite order sequence. Furthermore, the elite order sequence can be cross-processed and / or mutated based on a genetic algorithm to obtain multiple optimized order sequences as the pending order sequences for the next batch to be scheduled. Each pending order sequence for the next batch to be scheduled can also represent the order between all pending orders.

[0196] The preset number can be determined according to the first number and the processing operation of the elite order sequence based on the genetic algorithm. The number of each pending order sequence for the next batch to be scheduled obtained after processing the elite order sequence based on the genetic algorithm can be the same as the first number, or can also be different.

[0197] After obtaining the sequence of pending orders for the next batch to be scheduled, for each pending order sequence for the next batch to be scheduled, based on the order information and inventory information, schedule each pending order within the scheduling time range according to the pending order sequence, and obtain the order fulfillment rate scheduled according to the pending order sequence. That is, the order fulfillment rate for each pending order sequence scheduled according to the next batch can be obtained. Subsequently, a new elite order sequence can be selected to obtain the sequence of pending orders for the latest batch to be scheduled. In this way, the order sequence with a larger order fulfillment rate (i.e., the elite order sequence) can be cyclically selected, and each pending order can be scheduled within the scheduling time range based on the optimized elite order sequence.

[0198] Until the preset termination condition is reached, the order of pending orders with the highest order fulfillment rate can be determined, and the scheduling result of scheduling according to the order of pending orders can be obtained as the final scheduling result of each pending order within the scheduling time range. For example, the scheduling result of the order of pending orders with the highest order fulfillment rate obtained by scheduling multiple batches of pending order sequences during the execution of the entire scheduling method can be determined as the final scheduling result of each pending order within the scheduling time range. In this way, an order sequence with a high order fulfillment rate and a scheduling result obtained by scheduling according to the order sequence can be obtained, that is, the orders can be reasonably scheduled to effectively complete the orders.

[0199] In one embodiment, the preset termination conditions include: there is at least one current pending order sequence whose order fulfillment rate is greater than a preset fulfillment rate, and / or the number of times returning to execute step S203 reaches a preset number of times.

[0200] In an embodiment of the present application, when there is at least one order fulfillment rate greater than a preset fulfillment rate among the order fulfillment rates of each pending order sequence scheduled in a batch, it means that there is a scheduling result with a higher order fulfillment rate. Therefore, the scheduling result of the pending order sequence with the highest order fulfillment rate in the batch of pending order sequences can be used as the final scheduling result of each pending order within the scheduling time range. For example, the preset fulfillment rate can be 65% or 80%. In this way, a scheduling result with a higher order fulfillment rate can be obtained as the final scheduling result of each pending order within the scheduling time range, that is, the orders can be reasonably scheduled to effectively complete the orders.

[0201] When the number of times of returning to execute step S203 reaches the preset number of times, the scheduling result of the pending order sequence with the highest order fulfillment rate among the order fulfillment rates of each pending order sequence scheduled in multiple batches can be obtained as the final scheduling result of each pending order within the scheduling time range. For example, the preset number of times can be 300 times or 500 times. Because when the number of times of returning to execute step S203 reaches the preset number of times, the order sequence with a larger order fulfillment rate (i.e., the elite order sequence) has been selected many times, and each pending order is scheduled within the scheduling time range based on the optimized elite order sequence, and each pending order is scheduled within the scheduling time range based on the optimized elite order sequence, and each pending order is scheduled within the scheduling time range, it is possible to obtain an order sequence with a higher order fulfillment rate than the previous order, therefore, when the number of times of returning to execute step S203 reaches the preset number of times, the pending order sequence with the highest order fulfillment rate obtained has a higher order fulfillment rate.

[0202] In this way, the scheduling result of the order of pending orders with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range, and the scheduling result with a higher order fulfillment rate can also be obtained as the final scheduling result of each pending order within the scheduling time range, that is, the orders can be scheduled reasonably to effectively complete the orders.

[0203] In one embodiment, step S205 includes:

[0204] Step 1: Combine the current elite order sequences in pairs to obtain multiple elite order sequence pairs.

[0205] Step 2: For each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair.

[0206] Step 3: For each order sequence contained in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence of each pending order.

[0207] In the embodiment of the present application, the current elite order sequences can be combined in pairs to obtain multiple elite order sequence pairs (which can be called parent pairs). The number of elite order sequences (i.e., the preset number) can be expressed as w, and accordingly, the elite order sequences can be combined in pairs to obtain (w-1)×w / 2 parent pairs.

[0208] For each parent pair, the specified number of orders at the same position in the two order sequences contained in the parent pair are exchanged to obtain the exchanged parent pair. In addition, for each order sequence contained in the exchanged parent pair, if there are repeated orders in the order sequence, the order sequence can be deduplicated. That is, each elite order sequence pair is cross-processed to obtain the elite order sequence pair after the cross-processing. For each parent pair, the elite order sequences in the parent pair are cross-processed to obtain 2 elite order sequences after the cross-processing. Accordingly, after cross-processing (w-1)×w / 2 parent pairs, (w-1)×w elite order sequences after the cross-processing can be obtained.

[0209] The specified number may be positively correlated with the number of orders in the order sequence (i.e., the number of each pending order). For example, if the number of each pending order is 10, the specified number may be 4; if the number of each pending order is 20, the specified number may be 7. The exchanged positions may be a specified number of positions randomly selected from a preset position range. For example, the preset position range may be a position corresponding to one-fifth of the length in the order sequence to a position corresponding to four-fifths of the length.

[0210] See also Figure 3a , Figure 3a A schematic diagram of cross-processing provided for an embodiment of the present application. Each row of sequence represents an elite order sequence, and the numbers 0-9 in each row of sequence represent an order to be processed. The two rows of sequence above represent a parent pair before cross-processing. For the parent pair, the four orders at the positions between the two rows of dotted lines in the two order sequences contained in the parent pair are exchanged to obtain the exchanged parent pair. Since there are repeated orders in the two order sequences contained in the exchanged parent pair, the two order sequences contained in the exchanged parent pair can be deduplicated to obtain the deduplicated parent pair. That is, the elite order sequence pair after cross-processing is obtained. The two rows of sequence below represent the elite order sequence pair after cross-processing.

[0211] For each order sequence included in each elite order sequence pair after cross processing, the positions of two orders in the order sequence are exchanged according to the preset probability to obtain the latest order sequences to be processed. That is, the order sequences included in each elite order sequence pair after cross processing are mutated according to the preset probability. The product of the preset probability and the total number of order sequences included in each elite order sequence pair after cross processing is the number of order sequences to be mutated.

[0212] For example, the preset probability may be 0.2, indicating that each elite order sequence after the cross processing performs mutation processing on 20% of the order sequences included; or the preset probability may be 0.3, indicating that each elite order sequence after the cross processing performs mutation processing on 30% of the order sequences included. The positions of the two orders to be exchanged may be random, and the number of times the positions of the two orders in the order sequence are exchanged may be one or more times.

[0213] The (w-1)×w order sequences contained in each elite order sequence after the cross processing are subjected to mutation processing, and the order sequences after the mutation processing are (w-1)×w. If it is necessary to obtain the first number (expressed as n) of pending order sequences for the next batch to be scheduled, then (w-1)×w≥n, and n order sequences can be determined from the order sequences after the mutation processing as the pending order sequences for the next batch to be scheduled.

[0214] Figure 3b A schematic diagram of a variation process provided in an embodiment of the present application. The row of sequences above represents an order sequence contained in each elite order sequence pair after the exchange, and the positions of the two orders in the order sequence are exchanged according to a preset probability. Figure 3b As shown, the 3rd and 9th orders in the order sequence are exchanged. The row of sequences below represents the order sequence after mutation processing.

[0215] Based on the above processing, the elite order sequence can be optimized through cross processing and mutation processing to obtain a new batch of order sequences as the next batch of pending orders to be scheduled. The optimized elite order sequence can be obtained, and then, each pending order can be scheduled within the scheduling time range based on the optimized elite order sequence. Furthermore, an order sequence with a high order fulfillment rate can be obtained, as well as the scheduling results obtained by scheduling according to the order sequence, that is, the orders can be reasonably scheduled to effectively complete the orders.

[0216] In the present application, the steps involved in the scheduling method in the above embodiments may all be executed on the GPU; or, the steps involved in the scheduling method in the above embodiments may all be executed on the CPU; or, part of the steps involved in the scheduling method in the above embodiments may be executed on the CPU and part of the steps may be executed on the GPU. For the specific execution method, please refer to the description in the subsequent embodiments.

[0217] In one embodiment, see Figure 4 , Figure 4 A second flow chart of the scheduling method provided in the embodiment of the present application. The method is applied to a scheduling system, the scheduling system includes: a CPU and a GPU, and the method may include the following steps:

[0218] Step S401: the CPU obtains order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range.

[0219] Step S402: The CPU determines a plurality of random order sequences as the current sequence of orders to be processed.

[0220] Among them, any order sequence represents the order between the pending orders.

[0221] Step S403: the CPU sends order information and inventory information, as well as the current sequence of pending orders, to the GPU.

[0222] Step S404: The GPU schedules each pending order within the scheduling time range according to the current pending order sequence based on the order information and inventory information, obtains the order completion rate scheduled according to the pending order sequence, and sends the order completion rate scheduled according to the current pending order sequence to the CPU.

[0223] Step S405: The CPU selects a preset number of order sequences with the highest order fulfillment rates from the current pending order sequences as the current elite order sequence, and sends the current elite order sequence to the GPU.

[0224] Step S406: The GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current order sequences to be processed; and returns to execute step S404.

[0225] Step S407: When the preset termination condition is reached, the CPU uses the scheduling result of the sequence of pending orders with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range.

[0226] In the embodiment of the present application, step S401 is step 201 in the above embodiment, and step S402 is step 202 in the above embodiment. The CPU can send the acquired order information and inventory information, as well as the determined order of each pending order to the GPU. The GPU executes step 404, that is, executes step 203 in the above embodiment, and sends the order fulfillment rate scheduled according to the order of each pending order to the CPU.

[0227] After receiving the order fulfillment rate scheduled according to the order of each pending order, the CPU executes step S405, that is, executes step 204 in the above embodiment, and sends the current elite order order to the GPU. The GPU performs crossover processing and / or mutation processing on the current elite order order based on the genetic algorithm to obtain multiple optimized order orders as the current order of each pending order; and returns to execute step S404.

[0228] The CPU can determine whether the preset termination condition is met each time the order fulfillment rate scheduled according to each pending order sequence is received. When the preset termination condition is met, the CPU can use the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range. The preset termination condition can refer to the relevant description of the preset termination condition in the above embodiment.

[0229] Since the CPU contains a large cache, control unit, and arithmetic and logic unit (ALU), it has a rich instruction set and is capable of processing logically complex streaming tasks. The cache and control unit inside the GPU are relatively small, but the GPU contains a dense ALU array and is capable of processing concurrent tasks. Therefore, the GPU can be used to schedule the pending orders in parallel according to the order of each pending order, which can improve the efficiency of scheduling the pending orders.

[0230] Based on the above processing, order scheduling can be realized by combining CPU and GPU, and an order sequence with a high order fulfillment rate can be obtained, as well as a scheduling result obtained by scheduling according to the order sequence, that is, the orders can be reasonably scheduled to effectively complete the orders. And the CPU's processing ability for logically complex streaming tasks and the GPU's ability to process concurrent tasks can be combined to execute steps with low parallelism and small computational workload on the CPU, and execute steps with high parallelism and large computational workload on the GPU to realize order scheduling, which can improve the efficiency of order scheduling while realizing reasonable order scheduling. In this way, with the help of the powerful parallel capability of the GPU, it is possible to solve the problem that genetic algorithms based only on the CPU cannot handle large-scale order scheduling optimization.

[0231] In one embodiment, step S404 includes: for each current pending order sequence, scheduling each pending order within a scheduling time range according to the pending order sequence based on order information and inventory information through a thread allocated to the pending order sequence in the GPU, and obtaining an order fulfillment rate scheduled according to the pending order sequence.

[0232] In the embodiment of the present application, the GPU may start the same number of threads as the number of pending order sequences. The GPU may allocate one thread to each pending order sequence. Accordingly, each thread is responsible for scheduling according to one pending order sequence. The scheduling environment of the threads of each pending order sequence is the same, that is, the order information and inventory information are the same.

[0233] For example, the number of pending order sequences may be n. The CPU may determine n random order sequences as the pending order sequences. Accordingly, after receiving the order information and inventory information sent by the CPU, as well as the n pending order sequences, the GPU may start n threads. The n threads may be scheduled in parallel according to their corresponding pending order sequences. Accordingly, n order fulfillment rates may be obtained. The GPU may send the n order fulfillment rates obtained through the n threads and scheduled according to the pending order sequences to the CPU.

[0234] In this way, the GPU can be used to schedule the pending orders in parallel, without waiting for the completion of scheduling according to the order of one pending order before scheduling according to the next pending order, which can improve the efficiency of scheduling the pending orders.

[0235] In one embodiment, see Figure 5 , Figure 5 This is a third flow chart of the scheduling method provided in the embodiment of the present application. Step S405 includes:

[0236] Step S4051: The CPU selects a preset number of order sequences with the highest order fulfillment rates from the current pending order sequences as the current elite order sequence.

[0237] Step S4052: The CPU combines the current elite order sequences in pairs to obtain multiple elite order sequence pairs, and sends the multiple elite order sequence pairs to the GPU.

[0238] Step S406 includes:

[0239] Step S4061: For each elite order sequence pair, the GPU exchanges a specified number of orders at the same position in the two order sequences included in the elite order sequence pair to obtain an exchanged elite order sequence pair.

[0240] Step S4062: The GPU exchanges the positions of two orders in each order sequence contained in each exchanged elite order sequence pair according to a preset probability to obtain the current order sequence to be processed.

[0241] In an embodiment of the present application, step S4051 is step 204 in the above embodiment, step S4052 is step one in the above embodiment, and the CPU can send multiple elite order sequence pairs to the GPU, so that the GPU obtains the order of each pending order through steps S4061 and S4062. Step S4061 is step two in the above embodiment, and step S4062 is step three in the above embodiment. In this way, the elite order sequence can be determined by the CPU, and cross-processing and variation processing can be performed by the GPU, which can further utilize the CPU's processing capabilities for logically complex streaming tasks and the GPU's ability to process concurrent tasks to improve the efficiency of scheduling orders. And when the number of orders that need to be scheduled is large and the types of materials required for the orders are large, the GPU's ability to process concurrent tasks can be used for scheduling, thereby improving the efficiency of scheduling orders.

[0242] In one embodiment, step S4061 includes: for each elite order sequence pair, exchanging a specified number of orders at the same position in two order sequences included in the elite order sequence pair by a thread allocated to the elite order sequence pair in the GPU to obtain an exchanged elite order sequence pair;

[0243] and / or,

[0244] Step S4062 includes: for each order sequence included in each exchanged elite order sequence pair, the positions of two orders in the order sequence are exchanged according to a preset probability by using a thread allocated to the order sequence in the GPU to obtain the current order sequences to be processed.

[0245] In an embodiment of the present application, the GPU can start the same number of threads as the number of elite order sequence pairs, and allocate one thread to each elite order sequence pair. Accordingly, each thread is responsible for cross-processing each elite order sequence pair. Similarly, the GPU can start the same number of threads as the total number of order sequences included in each elite order sequence pair after exchange, and allocate one thread to each order sequence included in each elite order sequence pair after exchange. Accordingly, each thread is responsible for mutating an order sequence included in each elite order sequence pair after exchange.

[0246] For example, in order to obtain n new order sequences to be processed, the number of elite order sequence pairs can be n / 2. The GPU can start n / 2 threads. The n / 2 threads can cross-process the corresponding elite order sequence pairs in parallel. Accordingly, n / 2 exchanged elite order sequence pairs can be obtained. The n / 2 exchanged elite order sequence pairs contain n order sequences. Subsequently, the GPU can start n threads and assign a thread to each order sequence contained in each exchanged elite order sequence pair, so as to perform mutation processing on the n order sequences contained in each exchanged elite order sequence pair in parallel through the n threads. Furthermore, the GPU can obtain n new order sequences to be processed.

[0247] Since the GPU opens the same number of threads as the number of pending order sequences in this batch (i.e., the first number), in order to make full use of the opened threads, the number of pending order sequences in the next batch obtained after cross processing and mutation processing can also be the first number.

[0248] Based on the above processing, the elite order sequence pairs can be cross-processed in parallel by the GPU, and / or each order sequence contained in each elite order sequence pair after the exchange can be mutated in parallel. By cross-processing the elite order sequence pairs in parallel by the GPU, there is no need to wait for one elite order sequence pair to be cross-processed before cross-processing the next elite order sequence pair, which can reduce the time required for cross-processing. Similarly, by mutating each order sequence contained in each elite order sequence pair after the exchange in parallel, the time required for mutating can be reduced. In this way, the efficiency of scheduling the orders to be processed can be improved.

[0249] In one embodiment, see Figure 6 , Figure 6 A schematic diagram of a scheduling method provided in an embodiment of the present application. The scheduling method provided in an embodiment of the present application can be implemented by CUDA (Compute Unified Device Architecture), which can also be called CUDA-GA (Genetic Algorithm) algorithm. CUDA is a programming language designed for GPUs. By writing CUDA code, the GPU can be called to perform parallel operations. The CPU can determine n random order sequences as the order of each pending order, which can be expressed as Figure 6 seq1, seq2, seq3, ..., seqn in. n pending order sequences can constitute a group.

[0250] After receiving the order information and inventory information sent by the CPU, as well as the order of n pending orders, the GPU can start n threads with the same environment. The n environments can be expressed as Figure 6 Environment 1, Environment 2, Environment 3, ..., Environment n in the process. n threads can be scheduled in parallel according to the order of the corresponding pending orders. Accordingly, the n order fulfillment rates (also called fitness) can be obtained, which can be expressed as Figure 6 Fitness 1, Fitness 2, Fitness 3, ..., Fitness n.

[0251] The GPU can send the n order fulfillment rates obtained by n threads to the CPU, which are scheduled according to the order of each pending order. After receiving the n order fulfillment rates, the CPU can sort the pending order orders according to the order fulfillment rates, so as to select the first preset number of order orders with the largest order fulfillment rates as the elite order order. And the preset number of order orders can be combined in pairs to obtain n / 2 elite order order pairs (i.e., parent pairs), which can be expressed as Figure 6 Pair 1, Pair 2, ..., Pair n / 2 in the parent pair. The order sequence contained in Pair 1 can be expressed as Figure 6 The parent seq and mother seq in .

[0252] The GPU can start n / 2 threads. The n / 2 threads can perform crossover and mutation processing on their respective parent pairs in parallel. Accordingly, n / 2 processed elite order sequence pairs can be obtained. The n / 2 processed elite order sequence pairs contain n order sequences. For the parent pair Pair 1, the processed sub-seq1 and sub-seq2 can be obtained. In addition, n processed elite order sequences can be obtained as new order sequences to be processed. The n new order sequences to be processed can also constitute a new group.

[0253] In one embodiment, the order information of a pending order includes: the agreed delivery date and the material quantity of the required materials of the pending order within the scheduling time range; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range.

[0254] Based on the order information and inventory information, each pending order is scheduled within a scheduling time range according to the pending order sequence, and the order fulfillment rate scheduled according to the pending order sequence is obtained, including:

[0255] Step 1: According to the order of pending orders, select a pending order that is not currently selected as the current order to be scheduled.

[0256] Step 2: When there is no target production cycle that meets the agreed delivery date of the current pending order within the scheduling time range, return to step 1 until there are no unselected pending orders in the pending order sequence.

[0257] The number of materials required for the current order to be scheduled is not greater than the inventory number of materials required for the current order to be scheduled within the target production cycle; the target production cycle is before the agreed delivery date of the current order to be scheduled.

[0258] Step 3: When there is a target production cycle within the scheduling time range, the target production cycle is determined as the production cycle of the current order to be scheduled; based on the material quantity required for the current order to be scheduled, the inventory quantity of the material required for the current order to be scheduled within the target production cycle is updated; and return to execute step 1 until there are no unselected pending orders in the pending order sequence.

[0259] Step 4: Calculate the ratio of the number of pending orders with a determined production cycle to the total number of each pending order to obtain the order fulfillment rate for scheduling according to the sequence of the pending orders.

[0260] In the embodiment of the present application, the above steps 1-4 are all executed by the GPU. For each pending order sequence, the GPU can select an unselected pending order according to the pending order sequence as the order to be scheduled. Any order can be produced within a production cycle, and the length of the production cycle can be determined according to the actual application scenario. For example, a production cycle can be 1 day or 2 days.

[0261] A production cycle before the agreed delivery date of the order to be scheduled can be determined as an alternative production cycle, and the relationship between the number of materials required for the order to be scheduled and the inventory number of the materials required for the order to be scheduled in the alternative production cycle can be determined. The materials required for the order to be scheduled represent each material required for the order to be scheduled.

[0262] If the number of materials required for the order to be scheduled is not greater than the number of materials in stock within the alternative production cycle, it indicates that the number of materials in stock within the alternative production cycle is sufficient for the order to be scheduled, and the order to be scheduled can be produced in the alternative production cycle. Then the alternative production cycle can be determined as the target production cycle. That is, it is determined to produce the order to be scheduled in the target production cycle. Therefore, it is necessary to determine the number of materials after consuming the number of materials required for the order to be scheduled based on the recorded number of materials in stock within the target production cycle, and obtain the latest number of materials in stock within the target production cycle. Subsequently, according to the order to be processed sequence, an unselected order to be processed is reselected as the next order to be scheduled. The latest number of materials in stock for the next order to be scheduled can be determined, so as to determine whether there is a target production cycle that meets the agreed delivery date of the next order to be scheduled within the scheduling time range according to the latest number of materials in stock for the next order to be scheduled. Until all orders to be processed in the order to be processed have been selected.

[0263] If the number of materials required by the order to be scheduled is greater than the inventory number of materials required by the order to be scheduled in the alternative production cycle, it means that the inventory number of materials required by the order to be scheduled in the alternative production cycle is not enough for the order to be scheduled, and the order to be scheduled cannot be produced in the alternative production cycle. Then, a new alternative production cycle can be determined from the production cycle before the agreed delivery date of the order to be scheduled, and the step of determining the relationship between the number of materials required by the order to be scheduled and the inventory number of materials required by the order to be scheduled in the alternative production cycle is returned. Until the target production cycle is determined, or it is determined that there is no target production cycle within the scheduling time range.

[0264] In one method, a production cycle that is before the agreed delivery date of the order to be scheduled and closest to the agreed delivery date of the current order to be scheduled can be determined as an alternative production cycle. If the order to be scheduled cannot be produced in the alternative production cycle, the closest production cycle before the alternative production cycle can be determined as a new alternative production cycle, and the judgment is continued, and so on. Accordingly, the target production cycle determined based on this method is closest to the agreed delivery date of the current order to be scheduled, is before the agreed delivery date of the current order to be scheduled, and can meet the production of the order to be scheduled.

[0265] For example, if the scheduling time range is next month, the production cycle is 1 day, and the agreed delivery date of the order to be scheduled is the 9th of next month, the production cycle that is before the agreed delivery date of the order to be scheduled and closest to the agreed delivery date of the current order to be scheduled can be determined, that is, the 8th, the day before the 9th, is the alternative production cycle. Determine whether the inventory quantity of the materials required for the order to be scheduled on the 8th meets the demand of the order to be scheduled, that is, determine whether the material quantity of the materials required for the order to be scheduled is greater than the inventory quantity of the materials required for the order to be scheduled on the 8th. If the material quantity of the materials required for the order to be scheduled is not greater than the inventory quantity of the materials required for the order to be scheduled on the 8th, arrange the order to be scheduled to be produced on the 8th. If the material quantity of the materials required for the order to be scheduled is greater than the inventory quantity of the materials required for the order to be scheduled on the 8th, determine the 7th, the day before the 8th, as the new alternative production cycle, and determine whether the inventory quantity of the materials required for the order to be scheduled on the 7th meets the demand of the order to be scheduled. And so on. If the inventory quantity of the materials required for the order to be scheduled still cannot meet the demand of the order to be scheduled until the 1st of the next month, that is, there is no target production cycle within the scheduling time range, it means that the scheduling of the order to be scheduled has failed.

[0266] In this way, the scheduling rule for an order to be scheduled can be called a reverse scheduling rule. Figure 7 , Figure 7 A schematic diagram of a reverse scheduling rule provided in an embodiment of the present application. The scheduling time range is the next month, and the production cycle is 1 day. Figure 7 1, 2, ..., 9, ... in the above represent the days of the next month. E represents the material inventory of the day, that is, the inventory quantity of the materials required for the orders to be scheduled on the day. e represents the materials required for the order, that is, the material quantity of the materials required for the orders to be scheduled. Figure 7 "E>=e?" in the formula indicates whether the inventory quantity of the material required by the order to be scheduled on that day is greater than or equal to the material quantity of the material required by the order to be scheduled. The delivery date (i.e. the agreed delivery date) of the order to be scheduled is the 9th of the next month. X indicates the order information of the order to be scheduled.

[0267] It can be determined that the 8th, the day before the 9th, is an alternative production cycle. Determine whether the inventory quantity of materials required for the to-be-scheduled order on the 8th meets the demand of the to-be-scheduled order, that is, determine whether the inventory quantity of materials required for the to-be-scheduled order on the 8th is greater than or equal to the material quantity of materials required for the to-be-scheduled order. The result of the determination is "No", that is, the inventory quantity of materials required for the to-be-scheduled order on the 8th is less than the material quantity of materials required for the to-be-scheduled order, which means that the to-be-scheduled order cannot be produced on the 8th. Determine that the 7th, the day before the 8th, is a new alternative production cycle, and determine whether the inventory quantity of materials required for the to-be-scheduled order on the 7th meets the demand of the to-be-scheduled order. The result of the determination is "No", which means that the to-be-scheduled order cannot be produced on the 7th either. Determine that the 6th, the day before the 7th, is a new alternative production cycle, and determine whether the inventory quantity of materials required for the to-be-scheduled order on the 6th meets the demand of the to-be-scheduled order. The result of the determination is "Yes", that is, the inventory quantity of the material required by the order to be scheduled on No. 6 is greater than or equal to the material quantity of the material required by the order to be scheduled, which means that the order to be scheduled can be produced on No. 6. Therefore, the order to be scheduled can be scheduled into No. 6, that is, the order to be scheduled can be produced on No. 6.

[0268] Based on the above processing, the order scheduling problem can be converted into a traveling salesman problem, and a genetic algorithm combined with the inverse rule can be used to find an order sequence with the highest order fulfillment rate to obtain the final order scheduling plan. It is further ensured that the order scheduling can be realized by combining the CPU and GPU, and the orders can be reasonably scheduled to effectively complete the orders. Combining the CPU's processing ability for logically complex streaming tasks and the GPU's ability to process concurrent tasks, the steps with low parallelism and small computational volume are executed on the CPU, and the steps with high parallelism and large computational volume are executed on the GPU to realize order scheduling, which can improve the efficiency of order scheduling while realizing reasonable scheduling of orders.

[0269] In one embodiment, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range, and the order identification of the pending order; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range, and the material identification of each material required for each pending order.

[0270] Before step S403, the method further includes:

[0271] For each current sequence of pending orders, the CPU generates a one-dimensional first array representing the sequence of the pending orders; wherein one first array contains the order identifier of each pending order.

[0272] The CPU generates a one-dimensional second array representing the agreed delivery dates of each of the pending orders; wherein the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs.

[0273] The CPU generates a two-dimensional third array representing the material identification of each material required for each pending order; wherein the elements in the third array are material identifications, and a designated array cell to which any material identification in the third array belongs corresponds to an order identification of a pending order for the material that needs to be represented by the material identification; the designated array cell is the row or column to which the element belongs.

[0274] The CPU generates a two-dimensional fourth array representing the number of materials required for each pending order; wherein the elements in the fourth array are the number of materials, and the dimension of the fourth array is consistent with that of the third array; the material identification and material quantity of any material required for the pending order are recorded at the same positions in the third array and the fourth array, respectively.

[0275] For each current sequence of pending orders, the CPU generates a two-dimensional fifth array representing the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range; wherein the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array respectively represent the production cycles and material identifiers included in the scheduling time range.

[0276] Step S403 includes: the CPU sends the first array, the second array, the third array, the fourth array and the fifth array corresponding to the current sequence of the orders to be processed to the GPU.

[0277] Step 1 includes: the GPU selects a currently unselected pending order as the current order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the sequence of the pending orders.

[0278] After step 1, the method further comprises:

[0279] In the second array, the GPU queries the agreed delivery date at the position represented by the order identifier of the current order to be scheduled, and obtains the agreed delivery date of the current order to be scheduled; in the third array, the GPU queries the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled, as the target material identifier; in the fourth array, the GPU queries the number of materials consistent with the position of the target material identifier, and obtains the number of materials required for the current order to be scheduled; in the fifth array, the GPU queries the inventory number corresponding to the target material identifier and the target production cycle, and obtains the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0280] In an embodiment of the present application, the order information of a pending order includes: the agreed delivery date and the number of materials required for the pending order within the scheduling time range, and the order identification of the pending order. The number of materials required (which can be called BOM, Bill of Materials) corresponds to the record of the material identification and demand of the required materials. The order identification of a pending order can be a pre-assigned serial number, and the material identification of the required material can also be a pre-assigned serial number. For example, the order information of order No. 1 includes: the order identification is 1, 32 items of material No. 2 are required, 13 items of material No. 23 are required, 24 items of material No. 43 are required, and the agreed delivery date is the 24th of next month.

[0281] See also Figure 8 , Figure 8 A schematic diagram of a first array, a second array, a third array, and a fourth array provided in an embodiment of the present application. Sequence is the first array representing the order of a pending order, date is the second array, mat_id is the third array, and mat_amount is the fourth array. The numbers 0-7 on the right side of the first and second arrays represent the position of each element in the array. The numbers 0-7 on the right side of the third and fourth arrays represent the position of each row in the array, and the numbers 0-5 below represent the position of each column in the array.

[0282] Since a first array represents a sequence of pending orders, the number of first arrays is consistent with the number of pending order sequences, that is, there can be multiple first arrays. Figure 8 Since the order information of each pending order is fixed, there is only one second array, one third array, and one fourth array.

[0283] A first array contains the order IDs of all pending orders. Figure 7 As shown in the sequence in , the number of pending orders is 8, and the order IDs of the pending orders are 0-7 respectively.

[0284] The position of an agreed delivery date in the second array is the order ID of the pending order to which the agreed delivery date belongs. Figure 7 As shown in the date, the row number 2 in the second array records the agreed delivery date for order No. 2, that is, the 22nd of next month.

[0285] The elements in the third array are material identifiers. The order identifier of each pending order can be represented by one of the rows and columns of the array. Accordingly, one of the number of rows or columns of the array can be determined according to the number N of each pending order, and the other of the number of rows or columns of the array can be determined according to the total number P of types of materials required for each pending order. And the designated array cell to which any material identifier in the third array belongs corresponds to the order identifier of the pending order of the material that needs to be represented by the material identifier. When the order identifier of each pending order is represented by the row of the array, the designated array cell is the row; when the order identifier of each pending order is represented by the column of the array, the designated array cell is the column.

[0286] like Figure 7 As shown in mat_id in, the rows of mat_id represent the order IDs of each pending order, and each row is used to store the material ID of each material required for a pending order. The row at position 2 in mat_id records the material ID of each material required for the pending order with order ID 2.

[0287] The elements in the fourth array are the number of materials. Corresponding to the third array, the order ID of each pending order can be represented by one of the rows and columns of the array. And the dimensions of the fourth array are consistent with those of the third array. For each material required for the pending order, the material ID and the material quantity of the material are recorded at the same position in the third array and the fourth array, respectively.

[0288] like Figure 7 As shown in mat_amount in mat_id, the rows of mat_amount represent the order IDs of each pending order, and each row is used to store the material quantity required for a pending order. The row at position 2 in mat_amount records the material quantity required for the pending order with order ID 2, and for each material quantity, the material ID of the material corresponding to the material quantity is recorded at the same position in mat_id as the material quantity in mat_amount.

[0289] The inventory information includes: the inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range, and the material identification of each material required for each pending order. Each material required for each pending order can be replenished according to the preset replenishment cycle within the scheduling time range. For example, the preset replenishment cycle can be 1 day or 2 days. The number of materials replenished each time (which can be called the replenishment number) is predetermined and can be the same or different. For example, the number of materials replenished once can be 300, and the number of materials replenished next time can be 300 or 400. Accordingly, for each material required for each pending order, the inventory quantity of the material in each production cycle included in the scheduling time range can be determined based on the initial inventory quantity of the material within the scheduling time range, the preset replenishment cycle of the material, and the number of materials replenished each time.

[0290] For example, if the scheduling time range is next month and the production cycle is 1 day, the inventory information may include: the inventory quantity of each material required for each pending order on each day of next month, and the material ID of each material required for each pending order. As shown in Table 1, for a material, the inventory quantity of this material on the 1st of next month is 100, and 300 of this material will be replenished every day thereafter. Then the inventory quantity of this material on the 2nd of next month is 400, the inventory quantity on the 3rd is 700, and so on.

[0291] Table 1

[0292] date 1 2 3 4 5 6 7 8 Inventory quantity 100 400 700 1000 1300 1600 1900 2200 Replenishment quantity 300 300 300 300 300 300 300 300

[0293] When a target production cycle of an order to be scheduled is determined, it is necessary to determine the inventory quantity after consuming the material quantity required by the order to be scheduled based on the recorded inventory quantity of the material required by the order to be scheduled within the target production cycle, and obtain the latest inventory quantity of the material required by the order to be scheduled within the target production cycle. That is, the inventory information is updated. And for each production cycle before the target production cycle, the inventory information is updated, and the replenishment quantity is consumed first.

[0294] For example, it is determined that the target production cycle of a to-be-scheduled order is No. 5, and the to-be-scheduled order requires 800 of the materials shown in Table 1. 800 are deducted from the inventory of No. 5, and 500 remain, that is, the new inventory of No. 5 is 500. 800 also need to be deducted from the inventory of No. 6-8. The inventory of No. 4 is 1000, and the replenishment number is 300. The 300 replenishments are deducted first, and the remaining 500 are deducted from the inventory of No. 4, so that the new inventory of No. 4 is 500. The inventory of No. 3 is 700, and the replenishment number is 300. The 300 replenishments of No. 4 and the 300 replenishments of No. 3 are deducted first, and the remaining 200 are deducted from the inventory of No. 3, so that the new inventory of No. 4 is 500. Since the three replenishments between No. 2 and No. 5 total 900, which is enough for the consumption of the to-be-scheduled order, the inventory of No. 2 remains unchanged. Similarly, the inventory of No. 1 remains unchanged. As shown in Table 2, Table 2 is the inventory information obtained by updating the inventory information shown in Table 1.

[0295] Table 2

[0296] date 1 2 3 4 5 6 7 8 Inventory quantity 100 400 500 500 500 800 1100 1400

[0297] For each current pending order sequence, the CPU can generate a two-dimensional fifth array representing the inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range, which can be represented by inventory. The elements in the fifth array are the inventory quantities. One of the rows and columns of the array can be used to represent each production cycle included in the scheduling time range, and the other of the rows and columns of the array can be used to represent the material identification. When the scheduling time range is the next month, and the next month is K days, and the number of material types required for each pending order is M, the dimension of the fifth array can be K×M. The positions of the rows and columns in the fifth array are both represented starting from 0. For example, the element recorded at inventory[4]

[17] is the inventory quantity of the 18th material (i.e., the material represented by material identification 17) on the 5th day of the next month.

[0298] The CPU sends the first array, the second array, the third array, the fourth array, and the fifth array corresponding to the current order sequence of each pending order to the GPU. Furthermore, for each pending order sequence, the GPU can select a currently unselected pending order as the order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the pending order sequence. That is, the order identifier of the order to be scheduled can be determined according to the arrangement order of the order identifiers in the first array corresponding to the pending order sequence.

[0299] Subsequently, the GPU can query the agreed delivery date at the position represented by the order identifier of the order to be scheduled in the second array to obtain the agreed delivery date of the order to be scheduled. In the third array, query the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled as the target material identifier. In the fourth array, query the number of materials consistent with the position of the target material identifier to obtain the number of materials required for the current order to be scheduled. In the fifth array, query the inventory number corresponding to the target material identifier and the target production cycle to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0300] Based on the above processing, the CPU can convert the order information and inventory information into the above array and send it to the GPU. Since the order information and inventory information are stored in the above array according to the preset corresponding rules, the GPU can directly search for the data required in the scheduling process according to the preset corresponding rules. In this way, it can be ensured that the GPU can quickly obtain the data required in the scheduling process from the above array, further ensuring that the efficiency of scheduling orders is improved while reasonably scheduling orders.

[0301] In one embodiment, step S401 includes: the CPU receives pending order information and pending inventory information; filters the received information based on the scheduling time range, and cleans the abnormal data in the filtered information to obtain the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range.

[0302] In the embodiment of the present application, the CPU can execute step S2011 and step S2012 in the above embodiment. It is possible to filter out the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range, and perform data cleaning on the abnormal data therein, so as to ensure the validity of the acquired order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range. Furthermore, subsequently, it is possible to schedule each pending order according to the order information and inventory information with higher validity.

[0303] In one embodiment, after step S407, the method further includes: the CPU updates the inventory information according to the final scheduling result.

[0304] In an embodiment of the present application, after obtaining the final scheduling results of each pending order within the scheduling time range, the CPU can update the inventory information according to the final scheduling results obtained to obtain new inventory information. The specific update method can refer to the relevant description at Table 2 in the above embodiment. The new inventory information can be used as a basis for scheduling the orders that need to be scheduled in the next scheduling cycle. In this way, the effectiveness of scheduling the orders that need to be scheduled in the next scheduling cycle can be guaranteed.

[0305] In one embodiment, see Fig. 9 , Fig. 9 This is a fourth flow chart of the scheduling method provided in the embodiment of the present application. The method may include:

[0306] Step S901: Initialize the group, that is, step S402 in the above embodiment.

[0307] Step S902: Scheduling test. That is, in step S404 of the above embodiment, the GPU schedules each pending order within the scheduling time range according to the current pending order sequence based on the order information and inventory information.

[0308] Step S903: Calculate the order fulfillment rate. That is, in step S404 in the above embodiment, the order fulfillment rate of scheduling according to the order to be processed is obtained.

[0309] Step S904: Sort by Fitness. That is, after obtaining the order fulfillment rate (ie, Fitness) of each pending order sequence, the CPU can sort the pending order sequences according to the order fulfillment rate.

[0310] Step S905: Whether the maximum Fitness meets the requirements or reaches the maximum number of iterations. If the maximum Fitness meets the requirements or reaches the maximum number of iterations, execute step S906; if the maximum Fitness does not meet the requirements or does not reach the maximum number of iterations, execute step S907. That is, the CPU can determine whether the preset termination condition is met each time it receives the order fulfillment rate scheduled according to each pending order sequence. The preset termination condition includes: there is at least one current pending order sequence whose order fulfillment rate is greater than the preset fulfillment rate, and / or the number of times returning to execute step S203 reaches the preset number of times.

[0311] Step S906: stop iteration and output the optimal result, that is, step S407 in the above embodiment.

[0312] Step S907: Arrange and combine the elites, i.e., Step S4051 and Step S4052 in the above embodiment.

[0313] Step S908: Perform crossover mutation on the elite offspring, i.e., steps S4061 and S4062 in the above embodiment.

[0314] Step S909: Generate a new generation of population. Return to execute step S902, that is, step S406 in the above embodiment.

[0315] In the embodiment of the present application, the solid-line box indicates that the step is executed by the CPU, and the dotted-line box indicates that the step is executed by the GPU. Order scheduling can be implemented by combining the CPU and the GPU, and an order sequence with a high order fulfillment rate can be obtained, as well as a scheduling result obtained by scheduling according to the order sequence, that is, the orders can be reasonably scheduled to effectively complete the orders. And the CPU's processing ability for logically complex streaming tasks and the GPU's ability to process concurrent tasks can be combined to execute steps with low parallelism and small computational complexity on the CPU, and execute steps with high parallelism and large computational complexity on the GPU to implement order scheduling, which can improve the efficiency of scheduling orders while realizing reasonable scheduling of orders.

[0316] In one embodiment, see Fig.10 , Fig.10 A schematic diagram of a framework of a scheduling method provided in an embodiment of the present application. The method may include four units: a data cleaning unit 1001, a data conversion unit 1002, a scheduling optimization unit 1003, and a result execution unit 1004. The data cleaning unit is used to execute steps S2011 and S2012 in the above embodiment. The data conversion unit is used to execute the steps of generating the first array, the second array, the third array, the fourth array, and the fifth array in the above embodiment. The scheduling optimization unit is used to execute steps S901-S909 in the above embodiment, that is, to implement the CUDA-GA algorithm. The result execution unit is used to execute the steps in the above embodiment in which the CPU updates the inventory information according to the final scheduling result. In this way, the key steps in the order scheduling process can be integrated to obtain a process-based order scheduling method, which can be used for continuous, multi-batch order scheduling, and can improve the efficiency of scheduling to improve the production efficiency of large-scale supply chain systems.

[0317] Among the above four units, the scheduling optimization unit occupies the main amount of calculation, and can be programmed in C / C++ (a programming language) language through CUDA to ensure the calculation efficiency of the scheduling optimization unit. Although the other three units have a small amount of calculation, they are logically complex and can be programmed in python (a programming language). In this application, the scheduling optimization unit can be encapsulated into a python interface to achieve the connection of the four units. Since python, as a scripting language, has great flexibility, therefore, the flexibility of the CUDA-GA algorithm can be improved while ensuring the high efficiency of the CUDA-GA algorithm provided in the embodiment of the present application.

[0318] The scheduling optimization unit in the present application can also be implemented in Python language to obtain Python-GA. In the related art, for each pending order, the materials required by each pending order can be sorted from small to large according to the number of requirements for the material of each pending order to obtain the target order sequence. According to the target order sequence, combined with the reverse order rule in the above embodiment, scheduling is performed to obtain the scheduling result. This method can be called a rule scheduling method.

[0319] If an order requires only one material, the order can be called a single-material order. Table 3 shows the time and result comparison of python-GA, CUDA-GA and rule-based scheduling methods for scheduling 300 orders in the case of single-material orders. Table 4 shows the time and result comparison of python-GA, CUDA-GA and rule-based scheduling methods for scheduling 900 orders in the case of single-material orders. Among them, the result represents the ratio of the number of orders that are successfully scheduled (i.e., can be achieved) in the scheduling results to the total number of orders, which can represent the order fulfillment rate.

[0320] As shown in Tables 3 and 4, in the case of scheduling 300 orders and 900 orders, CUDA-GA takes less time than python-GA. At the same time, the number of completed orders in the results of the GA-based scheduling method is greater than the number of completed orders in the results of the rule-based scheduling method.

[0321] Table 3

[0322] python-GA CUDA-GA Rule Scheduling Method time consuming 175min(minutes) 40s(seconds) About 2s result 188 / 300 188 / 300 181 / 300

[0323] Table 4

[0324]

[0325]

[0326] Table 5 shows the results of the rule scheduling method in the actual supply chain scenario. Table 6 shows the results of CUDA-GA in the actual supply chain scenario. During the 5 days of testing, a batch of orders came in every day. After a batch of orders was scheduled, the inventory information was updated, and then the next batch of orders was scheduled based on the latest inventory information. As shown in Tables 5 and 6, since both the rule scheduling method and CUDA-GA can complete order scheduling on the same day, and the time consumption of CUDA-GA is only at the minute level, the efficiency difference between the rule scheduling method and CUDA-GA can be ignored. For each batch of orders, the scheduling results of CUDA-GA (which can be expressed as the order fulfillment rate) are higher than the scheduling results of the rule scheduling method. It can be seen that CUDA-GA can improve the order fulfillment rate while ensuring scheduling efficiency, and obtain better scheduling results.

[0327] Table 5

[0328] Order batch Scheduling Results Order fulfillment rate time consuming 2021-03-02 182 / 298 0.611 About 2s 2021-03-03 263 / 437 0.602 About 2s 2021-03-04 281 / 473 0.594 About 2s 2021-03-05 487 / 685 0.711 About 2s 2021-03-06 102 / 149 0.685 About 2s

[0329] Table 6

[0330] Order batch Scheduling Results Order fulfillment rate time consuming 2021-03-02 188 / 298 0.631 About 4 minutes 2021-03-03 273 / 437 0.625 About 6 minutes 2021-03-04 285 / 473 0.600 About 6 minutes 2021-03-05 493 / 685 0.720 About 8 minutes 2021-03-06 115 / 149 0.772 About 2 minutes

[0331] Based on the same inventive concept, the present application embodiment provides a scheduling device, see Fig.11 , Fig.11 A schematic diagram of a scheduling device provided in an embodiment of the present application, the device comprising:

[0332] The information acquisition module 1101 is used to acquire the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range;

[0333] The pending order sequence determination module 1102 is used to determine a plurality of random order sequences as the current pending order sequences; wherein any order sequence represents the sequence between the pending orders;

[0334] The order scheduling module 1103 is used to schedule each pending order sequence according to the pending order sequence within the scheduling time range based on the order information and the inventory information, and obtain the order fulfillment rate of the orders scheduled according to the pending order sequence;

[0335] Elite order sequence selection module 1104, used to select the first preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0336] The pending order sequence optimization module 1105 is used to perform cross processing and / or mutation processing on the current elite order sequence based on a genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; trigger the order scheduling module 1103 until the preset termination condition is reached, and use the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of the pending orders within the scheduling time range.

[0337] Based on the scheduling device provided in the embodiment of the present application, the order information of the order (i.e., pending order) that needs to be scheduled within the scheduling time range can be obtained, as well as the inventory information of each material required for each pending order within the scheduling time range. Each pending order is randomly sorted to obtain multiple order sequences (i.e., each pending order sequence). Since the material constraints and delivery constraints for each pending order can be determined according to the order information and the inventory information, therefore, for each pending order sequence, each pending order can be scheduled within the scheduling time range according to the pending order sequence under the material constraints and delivery constraints of each pending order. It is also possible to determine the order fulfillment rate that is scheduled according to the pending order sequence.

[0338] Subsequently, the order sequence of the first preset number of orders with the largest order fulfillment rate can be selected as the current elite order sequence. The current elite order sequence can be cross-processed and / or mutated based on the genetic algorithm to obtain multiple optimized order sequences as new pending order sequences. Then, according to each new pending order sequence, each pending order is scheduled within the scheduling time range. When the preset termination condition is reached, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of each pending order. In this way, the order sequence with a larger order fulfillment rate (i.e., the elite order sequence) can be cyclically selected, and each pending order can be scheduled within the scheduling time range based on the optimized elite order sequence, so that an order sequence with a higher order fulfillment rate can be obtained, and the scheduling result obtained by scheduling according to the order sequence, that is, the order can be reasonably scheduled to effectively complete the order.

[0339] In one embodiment, the pending order sequence optimization module 1105 is specifically used to combine the current elite order sequences in pairs to obtain multiple elite order sequence pairs; for each elite order sequence pair, a specified number of orders at the same position in the two order sequences included in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair; for each order sequence included in each exchanged elite order sequence pair, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current pending order sequences.

[0340] In one embodiment, the information acquisition module is specifically used to receive pending order information and pending inventory information; filter the received information based on the scheduling time range, and clean the abnormal data in the filtered information to obtain the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range.

[0341] The present application also provides a scheduling device for use with a GPU, see Fig.12 , Fig.12 A schematic diagram of the structure of another scheduling device provided in an embodiment of the present application, the device comprising:

[0342] The information receiving module 1201 is used to receive the order information of each pending order within the scheduling time range sent by the CPU, the inventory information of each material required for each pending order within the scheduling time range, and the current order of each pending order;

[0343] The pending order scheduling module 1202 is used to schedule each pending order sequence within the scheduling time range according to the pending order sequence based on the order information and the inventory information, and obtain the order fulfillment rate of the orders scheduled according to the pending order sequence;

[0344] The order fulfillment rate sending module 1203 is used to send the order fulfillment rate scheduled according to the current order sequence to be processed to the CPU, so that the CPU selects the first preset number of order sequences with the largest order fulfillment rate from the current order sequence to be processed as the current elite order sequence, and sends the current elite order sequence to the GPU;

[0345] The order sequence processing module 1204 is used to perform cross processing and / or mutation processing on the current elite order sequence based on a genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; trigger the pending order scheduling module 1202 so that when the CPU reaches a preset termination condition, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of the pending orders within the scheduling time range.

[0346] Based on the scheduling device provided in the embodiment of the present application, the CPU and GPU can be combined to realize order scheduling, and an order sequence with a high order fulfillment rate can be obtained, as well as a scheduling result obtained by scheduling according to the order sequence, that is, the orders can be reasonably scheduled to effectively complete the orders. In addition, the CPU's processing capability for logically complex streaming tasks and the GPU's ability to process concurrent tasks can be combined to execute steps with low parallelism and small computational complexity on the CPU, and steps with high parallelism and large computational complexity on the GPU to realize order scheduling, which can improve the efficiency of order scheduling while realizing reasonable order scheduling.

[0347] In one embodiment, the order sequence processing module 1204 includes:

[0348] The first exchange submodule is used for exchanging a specified number of orders at the same position in two order sequences contained in each elite order sequence pair to obtain an exchanged elite order sequence pair; wherein the multiple elite order sequence pairs are obtained by the CPU combining the current elite order sequences in pairs;

[0349] The second exchange submodule is used to exchange the positions of two orders in each order sequence included in each exchanged elite order sequence pair according to a preset probability to obtain the current order sequence to be processed.

[0350] In one embodiment, the first exchange submodule is specifically used to exchange, for each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair through a thread allocated to the elite order sequence pair in the GPU to obtain an exchanged elite order sequence pair;

[0351] and / or,

[0352] The second exchange submodule is specifically used to exchange the positions of two orders in each order sequence included in each elite order sequence pair after the exchange according to a preset probability through the thread allocated to the order sequence in the GPU to obtain the current order sequences to be processed.

[0353] In one embodiment, the pending order scheduling module 1202 is specifically used to schedule each pending order sequence within the scheduling time range according to the pending order sequence through the thread allocated to the pending order sequence in the GPU, based on the order information and the inventory information, to obtain the order completion rate scheduled according to the pending order sequence.

[0354] In one embodiment, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range;

[0355] The pending order scheduling module 1202 includes:

[0356] The to-be-scheduled order selection submodule is used to select a currently unselected to-be-scheduled order according to the sequence of the to-be-scheduled orders as the current to-be-scheduled order;

[0357] The first determination submodule is used to trigger the to-be-scheduled order selection submodule when there is no target production cycle that meets the agreed delivery date of the current to-be-scheduled order within the scheduling time range, until there is no unselected to-be-scheduled order in the to-be-scheduled order sequence;

[0358] The quantity of materials required by the current order to be scheduled is not greater than the inventory quantity of materials required by the current order to be scheduled within the target production cycle; and the target production cycle is before the agreed delivery date of the current order to be scheduled;

[0359] The second determination submodule is used to determine the target production cycle as the production cycle of the current order to be scheduled when the target production cycle exists within the scheduling time range; based on the material quantity of the material required for the current order to be scheduled, update the inventory quantity of the material required for the current order to be scheduled within the target production cycle; trigger the order to be scheduled selection submodule until there is no unselected order to be processed in the order to be processed sequence;

[0360] The order fulfillment rate calculation submodule is used to calculate the ratio of the number of pending orders with a determined production cycle to the total number of pending orders, and obtain the order fulfillment rate scheduled according to the sequence of the pending orders.

[0361] In one embodiment, the order information of a pending order further includes: an order identifier of the pending order; the inventory information further includes: a material identifier of each material required for each pending order;

[0362] The information receiving module 1201 is specifically used to receive the first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order sequence of each pending order sent by the CPU;

[0363] The order of each pending order is represented by a one-dimensional first array; the first array contains the order identifiers of the pending orders; the agreed delivery dates of the pending orders are represented by a one-dimensional second array, and the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs;

[0364] The material identification of each material required for each pending order is represented by a two-dimensional third array; the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material that needs to be represented by the material identification; the designated array unit is the row or column to which the element belongs;

[0365] The material quantity of each of the pending orders is represented by a two-dimensional fourth array; the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively;

[0366] The inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range is represented by a two-dimensional fifth array; the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively;

[0367] The to-be-scheduled order selection submodule is specifically configured to select a currently unselected to-be-scheduled order as the current to-be-scheduled order according to the arrangement order of the order identifiers in the first array corresponding to the order of the to-be-scheduled orders;

[0368] The device also includes:

[0369] An information query module is used to select a currently unselected pending order as the current order to be scheduled in the sequence of the pending orders, and then query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled in the second array to obtain the agreed delivery date of the current order to be scheduled; query the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled in the third array as the target material identifier; query the number of materials consistent with the position of the target material identifier in the fourth array to obtain the number of materials required for the current order to be scheduled; query the inventory number corresponding to the target material identifier and the target production cycle in the fifth array to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0370] The present application also provides a scheduling device for use with a CPU, see Fig.13 , Fig.13 A schematic diagram of the structure of another scheduling device provided in an embodiment of the present application, the device comprising:

[0371] The scheduling information acquisition module 1301 is used to acquire the order information of each pending order within the scheduling time range, and the inventory information of each material required for each pending order within the scheduling time range;

[0372] The order sequence determination module 1302 is used to determine a plurality of random order sequences as the current sequence of the pending orders; wherein any order sequence represents the sequence between the pending orders;

[0373] The information sending module 1303 is used to send the order information and the inventory information, as well as the current order sequence of pending orders to the GPU, so that the GPU schedules the pending orders within the scheduling time range according to the pending order sequence for each current order sequence of pending orders based on the order information and the inventory information, obtains the order fulfillment rate scheduled according to the pending order sequence, and sends the order fulfillment rate scheduled according to the current order sequence of pending orders to the CPU;

[0374] The elite selection module 1304 is used to select the first preset number of order sequences with the largest order fulfillment rate from the current pending order sequences as the current elite order sequence, and send the current elite order sequence to the GPU so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; return to execute the step of scheduling the pending orders within the scheduling time range according to each current pending order sequence based on the order information and the inventory information to obtain the order fulfillment rate of scheduling according to the pending order sequence;

[0375] The final scheduling result determination module 1305 is used to, when a preset termination condition is reached, use the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of the pending orders within the scheduling time range.

[0376] Based on the scheduling device provided in the embodiment of the present application, the CPU and GPU can be combined to realize order scheduling, and an order sequence with a high order fulfillment rate can be obtained, as well as a scheduling result obtained by scheduling according to the order sequence, that is, the orders can be reasonably scheduled to effectively complete the orders. In addition, the CPU's processing capability for logically complex streaming tasks and the GPU's ability to process concurrent tasks can be combined to execute steps with low parallelism and small computational complexity on the CPU, and steps with high parallelism and large computational complexity on the GPU to realize order scheduling, which can improve the efficiency of order scheduling while realizing reasonable order scheduling.

[0377] In one embodiment, the elite selection module 1304 is specifically used to select a preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence;

[0378] The current elite order sequences are combined in pairs to obtain multiple elite order sequence pairs, and the multiple elite order sequence pairs are sent to the GPU, so that the GPU exchanges, for each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair to obtain the exchanged elite order sequence pairs; for each order sequence contained in each exchanged elite order sequence pair, the positions of the two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequences to be processed.

[0379] In one embodiment, the order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range, and the order identification of the pending order; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range, and the material identification of each material required for each pending order;

[0380] The device also includes:

[0381] An array generation module is used for generating a one-dimensional first array representing the order of pending orders for each current order of pending orders before sending the order information and the inventory information and the current order of pending orders to the GPU; wherein a first array contains order identifiers of the pending orders; generating a one-dimensional second array representing the agreed delivery dates of the pending orders; wherein the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs; generating a two-dimensional third array representing the material identifier of each material required for the pending orders; wherein the elements in the third array are material identifiers, and a specified array unit to which any material identifier in the third array belongs is consistent with the pending order of the material that needs to be represented by the material identifier. The specified array element is the row or column to which the element belongs; a two-dimensional fourth array is generated, which represents the material quantity of each material required for each pending order; wherein the elements in the fourth array are the material quantity, and the dimension of the fourth array is consistent with that of the third array; the material identification and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array, respectively; for each current pending order sequence, a two-dimensional fifth array is generated, which represents the inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range; wherein the elements in the fifth array are the inventory quantity, and the rows and columns of the fifth array represent the production cycles and material identifications included in the scheduling time range, respectively;

[0382] The information sending module 1303 is specifically used to send the first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order of pending orders to the GPU, so that the GPU selects a pending order that is not currently selected as the current order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the order of pending orders for each current order of pending orders; after selecting a pending order that is not currently selected as the current order to be scheduled according to the order of pending orders, in the second array, query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled to obtain the agreed delivery date of the current order to be scheduled; in the third array, query the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled as the target material identifier; in the fourth array, query the number of materials consistent with the position of the target material identifier to obtain the number of materials required for the current order to be scheduled; in the fifth array, query the inventory number corresponding to the target material identifier and the target production cycle to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

[0383] In one embodiment, the scheduling information acquisition module 1301 is specifically used to receive pending order information and pending inventory information; filter the received information based on the scheduling time range, and perform data cleaning on abnormal data in the filtered information to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range;

[0384] and / or,

[0385] The device also includes:

[0386] The inventory information updating module is used to update the inventory information according to the final scheduling result after taking the scheduling result of the pending orders with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range when the preset termination condition is reached.

[0387] The present application also provides an electronic device, such as Fig.14 As shown, including:

[0388] Memory 1401, used for storing computer programs;

[0389] The processor 1402 is used to implement the steps of any of the scheduling methods described in the above embodiments when executing the program stored in the memory 1401.

[0390] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 1402, the communication interface, and the memory 1401 communicate with each other via the communication bus.

[0391] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0392] The communication interface is used for communication between the above electronic device and other devices.

[0393] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0394] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0395] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above scheduling methods are implemented.

[0396] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any scheduling method in the above embodiments.

[0397] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0398] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0399] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system, device, electronic device, storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0400] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A scheduling method, characterized in that: The method comprises: Obtaining order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range; Determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders; For each current pending order sequence, based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence to obtain an order fulfillment rate for scheduling according to the pending order sequence; wherein the order fulfillment rate for scheduling according to a pending order sequence is: the ratio of the number of pending orders that can be completed within the scheduling time range after scheduling according to the pending order sequence to the total number of pending orders; Select the first preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence; Based on the genetic algorithm, the current elite order sequence is cross-processed and / or mutated to obtain multiple optimized order sequences as the current order sequence to be processed; Return to executing the step of scheduling each pending order sequence currently in progress within the scheduling time range according to the pending order sequence based on the order information and the inventory information, and obtaining the order fulfillment rate of the orders scheduled according to the pending order sequence, until a preset termination condition is reached, and taking the scheduling result of the pending order sequence with the highest order fulfillment rate as the final scheduling result of each pending order within the scheduling time range.

2. The method according to claim 1, characterized in that The genetic algorithm is used to perform cross processing and / or mutation processing on the current elite order sequence to obtain multiple optimized order sequences as the current order sequences to be processed, including: Combine the current elite order sequences in pairs to obtain multiple elite order sequence pairs; For each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair; For each order sequence contained in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence of each pending order.

3. The method according to claim 1, characterized in that: The obtaining of order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range, includes: Receive pending order information and pending inventory information; The received information is filtered based on the scheduling time range, and abnormal data in the filtered information is cleaned to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range.

4. A scheduling method, characterized in that: Applied to a graphics computing unit (GPU), the method comprises: Receive order information of each pending order within a scheduling time range sent by a central processing unit CPU, inventory information of each material required for each pending order within the scheduling time range, and the current order of each pending order; For each current pending order sequence, based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence to obtain an order fulfillment rate for scheduling according to the pending order sequence; wherein the order fulfillment rate for scheduling according to a pending order sequence is: the ratio of the number of pending orders that can be completed within the scheduling time range after scheduling according to the pending order sequence to the total number of pending orders; Sending the order fulfillment rates scheduled according to the current order sequence of pending orders to the CPU, so that the CPU selects the first preset number of order sequences with the largest order fulfillment rates from the current order sequence of pending orders as the current elite order sequence, and sending the current elite order sequence to the GPU; Based on the genetic algorithm, the current elite order sequence is cross-processed and / or mutated to obtain multiple optimized order sequences as the current order sequence to be processed; Return to execute the method based on the order information and the inventory information, schedule each pending order within the scheduling time range according to the current sequence of each pending order, and obtain the order fulfillment rate scheduled according to the sequence of pending orders, so that when the CPU reaches the preset termination condition, the scheduling result of the pending order sequence with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range.

5. The method according to claim 4, characterized in that The genetic algorithm is used to perform cross processing and / or mutation processing on the current elite order sequence to obtain multiple optimized order sequences as the current order sequences to be processed, including: For each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair; wherein the multiple elite order sequence pairs are obtained by the CPU combining the current elite order sequences in pairs; For each order sequence contained in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence of each pending order.

6. The method according to claim 5, characterized in that For each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged to obtain an exchanged elite order sequence pair, including: For each elite order sequence pair, a specified number of orders at the same position in two order sequences included in the elite order sequence pair are exchanged by a thread allocated to the elite order sequence pair in the GPU to obtain an exchanged elite order sequence pair; and / or, For each order sequence included in each elite order sequence pair after the exchange, the positions of two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequence to be processed, including: For each order sequence included in each elite order sequence pair after the exchange, the thread allocated to the order sequence in the GPU is used to exchange the positions of two orders in the order sequence according to a preset probability to obtain the current order sequences to be processed.

7. The method according to claim 4, characterized in that The step of scheduling each pending order sequence according to the pending order sequence within the scheduling time range based on the order information and the inventory information to obtain the order fulfillment rate of the pending orders scheduled according to the pending order sequence includes: For each current sequence of pending orders, the threads allocated to the sequence of pending orders in the GPU are used to schedule each pending order within the scheduling time range according to the sequence of pending orders based on the order information and the inventory information, so as to obtain the order fulfillment rate scheduled according to the sequence of pending orders.

8. The method according to any one of claims 4 to 7, characterized in that: The order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range; Based on the order information and the inventory information, the pending orders are scheduled within the scheduling time range according to the pending order sequence, and the order fulfillment rate of the orders scheduled according to the pending order sequence is obtained, including: According to the order of pending orders, select a pending order that is not currently selected as the current order to be scheduled; When there is no target production cycle that satisfies the agreed delivery date of the current to-be-scheduled order within the scheduling time range, returning to the step of selecting a currently unselected to-be-scheduled order as the current to-be-scheduled order according to the sequence of the to-be-scheduled orders, until there is no unselected to-be-scheduled order in the sequence of the to-be-scheduled orders; The quantity of materials required by the current order to be scheduled is not greater than the inventory quantity of materials required by the current order to be scheduled within the target production cycle; and the target production cycle is before the agreed delivery date of the current order to be scheduled; When the target production cycle exists within the scheduling time range, the target production cycle is determined as the production cycle of the current order to be scheduled; based on the material quantity of the material required for the current order to be scheduled, the inventory quantity of the material required for the current order to be scheduled within the target production cycle is updated; and the step of selecting a currently unselected order to be processed as the current order to be scheduled according to the order to be processed is returned to execute until there is no unselected order to be processed in the order to be processed; The ratio of the number of pending orders with a determined production cycle to the total number of pending orders is calculated to obtain an order fulfillment rate for scheduling according to the sequence of the pending orders.

9. The method according to claim 8, characterized in that The order information of a pending order further includes: the order identification of the pending order; the inventory information further includes: the material identification of each material required for each pending order; The receiving central processing unit CPU sends order information of each pending order within the scheduling time range, inventory information of each material required for each pending order within the scheduling time range, and the current sequence of each pending order, including: Receive the first array, the second array, the third array, the fourth array and the fifth array corresponding to the order of each current pending order sent by the CPU; The order of each pending order is represented by a one-dimensional first array; the first array contains the order identifiers of the pending orders; the agreed delivery dates of the pending orders are represented by a one-dimensional second array, and the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs; The material identification of each material required for each pending order is represented by a two-dimensional third array; the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material that needs to be represented by the material identification; the designated array unit is the row or column to which the element belongs; The material quantity of each of the pending orders is represented by a two-dimensional fourth array; the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively; The inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range is represented by a two-dimensional fifth array; the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively; The step of selecting a currently unselected pending order according to the pending order sequence as the current pending order to be scheduled includes: According to the arrangement order of the order identifiers in the first array corresponding to the order of the pending orders, select a pending order that is not currently selected as the current order to be scheduled; After selecting a currently unselected pending order according to the pending order sequence as the current pending order, the method further includes: In the second array, query the agreed delivery date at the position represented by the order identifier of the current order to be scheduled to obtain the agreed delivery date of the current order to be scheduled; In the third array, query the material ID recorded in the specified array unit corresponding to the order ID of the current order to be scheduled as the target material ID; In the fourth array, the number of materials that are consistent with the position of the target material identifier is searched to obtain the number of materials required for the current order to be scheduled; In the fifth array, the inventory quantity corresponding to the target material identifier and the target production cycle is queried to obtain the inventory quantity of each material required for the current order to be scheduled within the target production cycle.

10. A scheduling method, characterized in that: Applied to a central processing unit (CPU), the method comprises: Obtaining order information of each pending order within a scheduling time range, and inventory information of each material required for each pending order within the scheduling time range; Determine a plurality of random order sequences as the current sequence of pending orders; wherein any order sequence represents the sequence between the pending orders; Sending the order information and the inventory information, as well as the current order of pending orders to a graphics computing unit (GPU), so that the GPU schedules the pending orders within the scheduling time range according to the pending order order based on the order information and the inventory information for each current order of pending orders, obtains the order fulfillment rate for scheduling according to the pending order order, and sends the order fulfillment rate for scheduling according to the current order of pending orders to the CPU; wherein the order fulfillment rate for scheduling according to a pending order order is: the ratio of the number of pending orders that can be completed within the scheduling time range after scheduling according to the pending order order to the total number of pending orders; Select the first preset number of order sequences with the largest order fulfillment rate from the current pending order sequences as the current elite order sequence, and send the current elite order sequence to the GPU, so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current pending order sequences; return to execute the step of scheduling the pending orders within the scheduling time range according to each current pending order sequence based on the order information and the inventory information to obtain the order fulfillment rate of the scheduled order according to the pending order sequence; When the preset termination condition is reached, the scheduling result of the sequence of pending orders with the highest order fulfillment rate is used as the final scheduling result of the pending orders within the scheduling time range.

11. The method according to claim 10, characterized in that The method further comprises: selecting a preset number of order sequences with the largest order fulfillment rate from the current order sequences to be processed as the current elite order sequence, and sending the current elite order sequence to the GPU, so that the GPU performs cross processing and / or mutation processing on the current elite order sequence based on the genetic algorithm to obtain multiple optimized order sequences as the current order sequences to be processed, including: Select the first preset number of order sequences with the highest order fulfillment rate from the current pending order sequences as the current elite order sequence; The current elite order sequences are combined in pairs to obtain multiple elite order sequence pairs, and the multiple elite order sequence pairs are sent to the GPU, so that the GPU exchanges, for each elite order sequence pair, a specified number of orders at the same position in the two order sequences contained in the elite order sequence pair to obtain the exchanged elite order sequence pairs; for each order sequence contained in each exchanged elite order sequence pair, the positions of the two orders in the order sequence are exchanged according to a preset probability to obtain the current order sequences to be processed.

12. The method according to claim 10, characterized in that The order information of a pending order includes: the agreed delivery date and the quantity of materials required for the pending order within the scheduling time range, and the order identification of the pending order; the inventory information includes: the inventory quantity of each material required for each pending order within each production cycle included in the scheduling time range, and the material identification of each material required for each pending order; Before sending the order information and the inventory information, as well as the current order of each order to be processed to the graphics computing unit GPU, the method further includes: For each current order sequence to be processed, a one-dimensional first array representing the order sequence to be processed is generated; wherein one first array contains order identifiers of each order to be processed; Generate a one-dimensional second array representing the agreed delivery dates of the pending orders; wherein the position of an agreed delivery date in the second array is the order identifier of the pending order to which the agreed delivery date belongs; Generate a two-dimensional third array representing the material identification of each material required for each of the pending orders; wherein the elements in the third array are material identifications, and the designated array unit to which any material identification in the third array belongs corresponds to the order identification of the pending order for the material represented by the material identification; the designated array unit is the row or column to which the element belongs; Generate a two-dimensional fourth array representing the material quantity of the materials required for each of the pending orders; wherein the elements in the fourth array are the material quantity, and the fourth array has the same dimension as the third array; the material identifier and material quantity of any material required for the pending order are recorded at the same position in the third array and the fourth array respectively; For each current sequence of pending orders, a two-dimensional fifth array is generated, which represents the inventory quantity of each material required for each pending order in each production cycle included in the scheduling time range; wherein the elements in the fifth array are the inventory quantities, and the rows and columns of the fifth array represent the production cycles and material identifiers included in the scheduling time range, respectively; The sending the order information and the inventory information, as well as the current sequence of the orders to be processed to a graphics computing unit GPU, includes: The first array, the second array, the third array, the fourth array and the fifth array corresponding to the current order of pending orders are sent to a graphics computing unit (GPU), so that the GPU selects a currently unselected pending order as the current order to be scheduled according to the arrangement order of the order identifiers in the first array corresponding to the order of pending orders for each current order of pending orders; after selecting a currently unselected pending order as the current order to be scheduled according to the order of pending orders, in the second array, the agreed delivery date at the position represented by the order identifier of the current order to be scheduled is queried to obtain the agreed delivery date of the current order to be scheduled; in the third array, the material identifier recorded in the specified array unit corresponding to the order identifier of the current order to be scheduled is queried as the target material identifier; in the fourth array, the number of materials consistent with the position of the target material identifier is queried to obtain the number of materials required for the current order to be scheduled; in the fifth array, the inventory number corresponding to the target material identifier and the target production cycle is queried to obtain the inventory number of each material required for the current order to be scheduled within the target production cycle.

13. The method according to claim 10, characterized in that The obtaining of order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range, includes: Receive pending order information and pending inventory information; The received information is filtered based on the scheduling time range, and abnormal data in the filtered information is cleaned to obtain order information of each pending order within the scheduling time range, and inventory information of each material required for each pending order within the scheduling time range; and / or, After the scheduling result of the order of pending orders with the highest order fulfillment rate is used as the final scheduling result of each pending order within the scheduling time range when the preset termination condition is reached, the method further includes: The inventory information is updated according to the final scheduling result.

14. A scheduling system, characterized in that: The system comprises: a central processing unit (CPU) and a graphics computing unit (GPU); The CPU is used to execute the method described in any one of claims 10 to 13; The GPU is used to execute the method described in any one of claims 4-9.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1-3, 4-9 or 10-13 is implemented.

Citation Information

Patent Citations

  • Production scheduling system and method using genetic algorithm based on elite solution pool

    CN101271543A

  • Hybrid genetic algorithm-based MES (Manufacturing Execution System) production planning and scheduling method

    CN105629927A

  • Order data processing method, device and equipment

    CN114492993A

  • Order allocation model based on unified warehouse allocation and establishment and application method thereof

    CN116307536A

  • Plann scheduling method and device, electronic equipment and storage medium

    CN116432914A