CN111598486A - Task grouping method, platform, server and storage medium - Google Patents
Task grouping method, platform, server and storage medium Download PDFInfo
- Publication number
- CN111598486A CN111598486A CN202010518064.6A CN202010518064A CN111598486A CN 111598486 A CN111598486 A CN 111598486A CN 202010518064 A CN202010518064 A CN 202010518064A CN 111598486 A CN111598486 A CN 111598486A
- Authority
- CN
- China
- Prior art keywords
- task
- tasks
- combination
- similarity
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 75
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 238000009826 distribution Methods 0.000 claims abstract description 99
- 230000015654 memory Effects 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 3
- 230000010365 information processing Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 12
- 238000012545 processing Methods 0.000 description 12
- 238000001914 filtration Methods 0.000 description 10
- 230000009286 beneficial effect Effects 0.000 description 8
- 238000012163 sequencing technique Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000012549 training Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004904 shortening Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06311—Scheduling, planning or task assignment for a person or group
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0633—Lists, e.g. purchase orders, compilation or processing
- G06Q30/0635—Processing of requisition or of purchase orders
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Human Resources & Organizations (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Educational Administration (AREA)
- Game Theory and Decision Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention relates to the technical field of information processing, and discloses a task grouping method, a platform, a server and a storage medium, wherein the task grouping method comprises the following steps: combining each task to obtain each task combination; sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps: determining whether the currently traversed task combination does not include the grouped tasks; responding to the fact that the currently traversed task combination does not include the grouped tasks, and obtaining each residual task except the currently traversed task combination and the grouped tasks from each task; sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; the tasks in the task grouping are grouped tasks, and the tasks can be distributed based on the obtained task grouping by grouping the tasks, so that the distribution efficiency is improved.
Description
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a task grouping method, a platform, a server, and a storage medium.
Background
Currently, in the field of real-time delivery, when the order scheduling is performed by the scheduling platform, the order is distributed according to a single order, that is, a single order is distributed, and after a user places an order, the server distributes the order to delivery personnel for delivery.
However, the inventors found that at least the following problems exist in the related art: when the order quantity is large, if a single order is distributed, the distribution efficiency is low.
Disclosure of Invention
An object of embodiments of the present invention is to provide a task grouping method, a platform, a server, and a storage medium, which enable task allocation based on obtained task grouping by performing task grouping, and are advantageous to improve allocation efficiency.
In order to solve the above technical problem, an embodiment of the present invention provides a task grouping method, including: combining each task to obtain each task combination; sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps: determining whether the currently traversed task combination does not include the grouped tasks; responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task; sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
The embodiment of the invention also provides a task grouping platform, which comprises: the combination module is used for combining each task to obtain each task combination; the first traversal module is used for sequentially traversing the task combinations meeting the preset traversal conditions and executing the following steps: determining whether the currently traversed task combination does not include the grouped tasks; responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task; the second traversal module is used for sequentially traversing all the residual tasks and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
Embodiments of the present invention also provide a server, including a memory and a processor, where the memory stores a computer program, and the processor executes the program to perform: combining each task to obtain each task combination; sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps: determining whether the currently traversed task combination does not include the grouped tasks; responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task; sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
Embodiments of the present invention also provide a non-volatile storage medium for storing a computer-readable program for a computer to perform the task grouping method described above.
Compared with the prior art, the implementation mode of the invention has the main differences and the effects that: combining each task, sequentially traversing each task combination meeting preset traversing conditions, and executing the following steps once every task combination is traversed: determining whether the currently traversed task combination does not include the grouped tasks, responding to the fact that the currently traversed task combination does not include the grouped tasks, obtaining all the remaining tasks except the currently traversed task combination and the grouped tasks from all the tasks, sequentially traversing all the remaining tasks, and adding the traversed remaining tasks meeting preset conditions into the currently traversed task combination to obtain task groups; wherein, the task in the task grouping is the task which has completed the grouping. That is, each time a task combination of tasks is traversed to a task combination which does not include a completed packet, whether a task which can be added to the currently traversed task combination exists in the remaining tasks of the not-yet-completed packet is determined, so that the task grouping is realized. By grouping the tasks, the tasks can be distributed based on the obtained task groups, and the distribution efficiency can be improved.
In addition, the sequentially traversing the remaining tasks, and adding the traversed remaining tasks meeting the preset condition to the currently traversed task combination to obtain a task group, including: and traversing all the residual tasks in sequence, adding the residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group, and stopping traversing until the number of the tasks in the task group reaches a preset task upper limit. By setting the time for stopping traversal, namely stopping traversal when the number of tasks in the task group reaches the preset upper limit of the tasks, the upper limit value of the number of tasks in the task group can be set according to actual needs, and the task group can be conveniently carried out according to the actual needs.
In addition, the similarity of any two tasks in the task combination meeting the preset traversal condition is greater than the preset first similarity. Because the probability that tasks with lower similarity are finally divided into one task group is lower, the similarity of any two tasks in the task combinations meeting the preset traversal condition is greater than the preset first similarity, the number of the traversed task combinations is reduced while the rationality of the task groups is not influenced, the traversal speed is increased, and the task grouping speed is increased.
In addition, combining each task to obtain each task combination comprises: combining each task in pairs to obtain each task combination; the sequentially traversing task combination meeting the preset traversing conditions comprises the following steps: calculating the similarity of each task combination; the similarity of each task combination is the similarity between two tasks in each task combination; and traversing the task combinations meeting preset traversing conditions in sequence according to the similarity of each task combination. That is to say, each task is combined pairwise at the beginning, the increase of the number of combinations due to the increase of the upper limit of the tasks (namely, the increase of the number of the tasks in each group) is avoided, the complexity of combination is favorably reduced, meanwhile, the complexity of calculating the similarity of each task pair is also reduced, and further, the complexity of grouping the tasks into a whole is reduced. The embodiment of the invention can realize that the task grouping complexity is not increased under the condition of improving the task upper limit of the task grouping; therefore, the processing load of the server in task grouping can be reduced, and the processing efficiency can be improved.
In addition, according to the similarity of each task combination, sequentially traversing the task combinations meeting preset traversing conditions, including: dividing the task combinations meeting the preset traversal conditions into a plurality of preset similarity intervals according to the similarity of each task combination; the similarity intervals are obtained by dividing continuous numerical value intervals; acquiring the arrangement sequence of the plurality of similarity intervals; wherein, in the similarity intervals, the larger the upper limit value is, the earlier the ranking order is; according to the arrangement sequence of the similarity intervals, sequentially traversing the task combinations meeting preset traversal conditions in the similarity intervals from front to back; and the traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random. Considering the small difference of the similarity, the small difference can be ignored in practical application, therefore, a similar bucket sorting mode is adopted, each bucket represents a similarity interval, and according to the arrangement sequence of the similarity intervals, the task combinations which meet the preset traversing conditions in the similarity intervals are traversed from front to back in sequence. The traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random, namely the task combinations (the task combinations with slight similarity difference) in the same similarity interval are not further sequenced, so that the sequencing speed is improved, the sequencing complexity is reduced, the task grouping complexity is reduced, and the task grouping efficiency is improved. In addition, the task combinations falling within the same similarity interval can be considered to have small similarity difference, so that the influence of the task combinations on the grouping result can be ignored.
In addition, the preset conditions include: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity; the tasks are combined pairwise, and the number of the obtained task combinations isWherein n is the total number of tasks combined pairwise; after the calculating the similarity of each task combination, the method further includes: storing the similarity of each task combination; the similarity between the traversed residual tasks and each task in the currently traversed task combination is obtained in the following way: and searching the similarity of each task in the traversed residual task and the currently traversed task combination according to the stored similarity of each task combination. That is to say, all possible combination modes obtained by combining each task pairwise are obtained, and then after the similarity of each task combination is calculated, the similarity of each task combination is stored, so that the similarity of the traversed remaining tasks and all tasks in the currently traversed task combination can be directly searched from the previously calculated similarity of each task combination. The similarity of all task combinations calculated at the beginning is fully utilized, and the direct searching of the similarity is beneficial to improving the speed of determining whether the traversed residual tasks can be added into the currently traversed task combination, thereby being beneficial to improving the speed of finishing task grouping.
Drawings
FIG. 1 is a flowchart of a task grouping method provided in accordance with a first embodiment of the present invention;
FIG. 2 is a flowchart of a task grouping method provided according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a task grouping method provided according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a task grouping method provided in accordance with a fourth embodiment of the present invention;
FIG. 5 is a schematic diagram of a task grouping platform provided in accordance with a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to a sixth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
The first embodiment of the invention relates to a task grouping method which is applied to a server. The application scenario of the present embodiment can be understood as follows: when task allocation is performed, task grouping is performed on all tasks to be allocated, and the tasks allocated in the same task group are assigned to task performers at one time. Wherein, the task can be a picking task and a distributing task, such as: however, the tasks in the present embodiment are only examples of the above, and the specific implementation is not limited thereto. Taking the delivery order as an example, in the process of assigning the delivery order, reasonable order grouping is beneficial to improving the order taking willingness of a rider, improving the order taking efficiency, shortening the order taking time and reducing the delivery cost to a certain extent. Order grouping is a part of the whole order assignment process, and if the grouping complexity is high and the assignment delay is several seconds, the whole order assignment process is greatly influenced. The present embodiment provides a task grouping method, which can reduce the processing load of a server when performing task grouping and improve the processing efficiency without increasing the complexity of task grouping when the task upper limit of task grouping is improved.
The following is a detailed description of the implementation details of the task grouping method of the present embodiment, and the following is only provided for the convenience of understanding and is not necessary for implementing the present embodiment.
Fig. 1 may be referred to as a flowchart of a task grouping method in this embodiment, and the method includes:
and step S101, combining each task to obtain each task combination.
Each task is a task to be assigned and needs to be grouped.
In one example, the server may receive task messages from various clients, which may be packaged into data packets at the clients and sent to the server by way of wireless communication. In this embodiment, the server obtains each task to be assigned, which needs to be task-grouped, according to the received task message from each client.
Specifically, the combination mode of each task can be two-by-two combination, namely, one task combination comprises two tasks; three-three combination is also possible, i.e. one task combination comprises three tasks. However, in a specific implementation, a combination mode may be set according to actual needs, and this embodiment is not particularly limited to this.
Step S102, sequentially traversing the task combinations meeting the preset traversing conditions, and determining whether the currently traversed task combinations do not include the grouped tasks; if so, step S103 is performed, otherwise step S105 is performed.
In one example, the task combination satisfying the preset traversal condition may be: and combining all the obtained tasks.
In another example, the similarity of any two tasks in the task combination meeting the preset traversal condition is greater than the preset first similarity. The preset first similarity can be set according to actual needs. For example, the task combination includes two tasks, and if the similarity between the two tasks in the task combination is greater than the first similarity, the task combination is a task combination that meets the preset traversal condition. For another example, more than two tasks in the task combination, for example, the task combination includes three tasks, and if the similarity between any two tasks in the three tasks is greater than the first similarity, the task combination is a task combination that meets the preset traversal condition.
In a specific implementation, the similarity between two tasks may be calculated as follows: and calculating the similarity between the two tasks according to the characteristic data of the two tasks. After receiving the task messages sent by the clients, the server can analyze the received task messages through at least one processor, so as to obtain the characteristic data of the task.
In one example, the task is a delivery task, and the feature data of the delivery task may include at least one of: and distributing the feature data of the task dimension, the feature data of the user dimension, the feature data of the merchant dimension and the feature data of the objective factor dimension. And the similarity between the two distribution tasks is calculated by considering various factors, so that the method is more comprehensive and accurate. The characteristic data of the distribution task dimension can comprise distribution distance, distribution routes, distribution time periods and the like; the feature data of the merchant dimension may include location information of the merchant, and the feature data of the user dimension may include location information of the user. In addition, the characteristic data of the user dimension and the characteristic data of the business dimension may further include information capable of reflecting the distribution difficulty, for example, information on whether the user address or the business address is near to a bicycle or not, whether an elevator exists or not, and the like. The characteristic data of the objective factor dimension may include time, weather, and the like.
In one example, according to the feature data of two tasks in the task combination, the similarity of the task combination can be calculated by: and calling a pre-trained similarity model, inputting the respective characteristic data of the two tasks in the task combination into the similarity model, and outputting the similarity of the two tasks by the similarity model. Wherein, the value range of the similarity is usually between 0 and 1.
In one example, where the task is a delivery task, the training data of the similarity model may include: the method comprises the following steps that the specific distribution end carries characteristic data of a distribution task, the specific distribution end is assigned with the characteristic data of a next distribution task, and the specific distribution end really receives the result of the next distribution task; wherein, the specific distribution end is the distribution end which is determined from the historical data and has carried the distribution task amount of 1. And selecting the distribution end which is determined in the historical data and has the loaded distribution task amount of 1, and training the similarity model by considering the real rejection result of the next distribution task by the specific distribution end, so that the training result of the model is more accurate. In another example, the training data for similarity may further include: the method comprises the following steps that feature data of a selected distribution task of a multi-order distribution end, feature data of a next distribution task assigned by the multi-order distribution end and a real refusal result of the next distribution task of the multi-order distribution end are obtained; the multi-order delivery end is the delivery end which is determined from historical data and has carried the delivery task amount larger than 1, and the selected delivery task is the delivery task selected from the multiple delivery tasks carried by the multi-order delivery end.
In a specific implementation, according to the feature data of the two delivery tasks, the way of calculating the similarity between the delivery tasks may also be: and scoring the similarity according to a preset scoring strategy and the characteristic data of the two distribution tasks. The scoring strategy may include different scoring items, such as a scoring item of a distribution task dimension, a scoring item of a user dimension, a scoring item of a merchant dimension, and a scoring item of an objective factor dimension. According to the feature data of the distribution task dimension, similarity scores of the scoring items of the two distribution tasks based on the distribution task dimension are obtained through calculation, and similarly, similarity scores of the scoring items of the two distribution tasks based on other dimensions can be obtained through calculation according to the feature data of the two distribution tasks based on other dimensions. And finally, weighting the similarity scores of the scoring items of all dimensions, and taking the weighted similarity scores as the calculated similarity between the two delivery tasks. Wherein, the weighting coefficient corresponding to the scoring item of each dimensionality can be set according to actual needs.
In this embodiment, a task combination satisfying the preset traversal condition may be selected from the task combinations obtained by combining, and then the task combinations satisfying the preset traversal condition are sequentially traversed, and it is determined whether the currently traversed task combination does not include the grouped tasks. If the task combination traversed currently does not include the tasks of the completed packet, step S103 is executed, otherwise step S105 is executed.
Step S103, in response to that the currently traversed task combination does not include the grouped tasks, acquiring each residual task except the currently traversed task combination and the grouped tasks from each task.
In one example, if it is determined that the currently traversed task combination does not include the grouped tasks, each of the remaining tasks may be obtained from the respective tasks except for the currently traversed task combination and the grouped tasks. The remaining tasks may also be understood as tasks that are not completed in a group, except for the tasks in the currently traversed task group, obtained from the respective tasks.
And step S104, traversing each residual task in sequence, and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group.
Wherein, the task in the task grouping is the task which has completed the grouping.
Specifically, each time a residual task is traversed, whether the traversed residual task meets a preset condition can be judged, and if the preset condition is met, the residual task is added into the currently traversed task combination to obtain a task group; and if the preset condition is not met, continuously traversing the next remaining task.
In one example, all remaining tasks may be traversed all the way through. That is, the conditions for stopping traversing the remaining orders are: and traversing all the remaining tasks.
In another example, traversal may be stopped upon determining that the number of tasks in a task group reaches a preset upper task limit. That is, the conditions for stopping traversing the remaining orders are: the number of tasks in the task group reaches a preset upper limit of tasks. The preset task upper limit can be set according to actual needs, and is used for representing the maximum number of tasks allowed to exist in one task group. In a specific implementation, when the preset upper task limit is determined, the current total number of tasks to be grouped and the number of task performers who can perform the tasks may be combined. The preset upper limit of the tasks can be dynamically adjusted according to actual needs, for example, the preset upper limit of the tasks can be properly increased under the condition that the total number of the tasks is large and the number of task executors is small; and the preset upper limit of the tasks can be properly reduced under the condition that the total number of the tasks is small and the number of task executors is large. The task takes delivery orders as an example, the task performer takes a rider as an example, and when the total quantity of the delivery orders is larger than the preset order quantity and the number of the deliverable riders is smaller than the preset rider quantity, the preset order upper limit can be properly increased, so that more orders can be contained in one order group, and the order distribution can be completed quickly. By setting the time for stopping traversal, namely stopping traversal when the number of tasks in the task group reaches the preset upper limit of the tasks, the upper limit value of the number of tasks in the task group can be set according to actual needs, and the task group can be conveniently carried out according to the actual needs.
In a specific implementation, if the currently traversed task combination does not include the grouped tasks, the currently traversed task combination may be referred to as a target task combination, and for one traversed target task combination, after determining that a condition for stopping traversing the remaining orders is satisfied, all the traversed remaining tasks satisfying a preset condition are added to the target task combination to obtain one task group.
In one example, the preset condition includes at least one of:
preset condition 1: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity;
preset condition 2: the distribution included angle between the traversed residual tasks and each task in the currently traversed task combination is smaller than a preset included angle; the task is a distribution task, and a distribution included angle is determined according to a distribution route corresponding to the traversed residual tasks and a distribution route corresponding to the task in the currently traversed task combination;
preset condition 3: the difference between the distribution distance corresponding to the traversed residual tasks and the distribution distance corresponding to each task in the currently traversed task combination is smaller than a preset first distance; wherein the tasks are distribution tasks;
preset condition 4: the distance between the distribution starting place corresponding to the traversed residual tasks and the distribution starting place corresponding to each task in the currently traversed task combination is smaller than a preset second distance; wherein the task is a distribution task.
Specifically, the preset second similarity mentioned in the preset condition 1 may be set according to actual needs.
In one example, in step S101, the tasks are combined, and the number of task combinations obtained isNamely, each task is combined pairwise to obtain all possible combination forms. And after calculating the similarity of each task combination, storing the similarity of each task combination. Therefore, when determining the similarity between the traversed remaining task and each task in the currently traversed task combination, the similarity between the traversed remaining task and the task in the currently traversed task combination can be directly searched according to the stored similarity of each task combination. For example, the task combination formed by the remaining tasks and each task in the currently traversed task combination may be determined. Then, according to the similarity of each stored task combination, the similarity of the remaining tasks and the task combination formed by each task currently traversed to the task combination is searched. Finally, judging whether the similarity of the task combination formed by the searched remaining tasks and each task in the currently traversed task combination is greater than a preset second similarity; if yes, the traversed residual task meets the preset condition 1. That is to say, all possible combination modes obtained by combining each task pairwise are obtained, and then after the similarity of each task combination is calculated, the similarity of each task combination is stored, so that the similarity of the traversed remaining tasks and all tasks in the currently traversed task combination can be directly searched from the previously calculated similarity of each task combination. The similarity of all task combinations calculated at the beginning is fully utilized, and the direct searching of the similarity is beneficial to improving the speed of determining whether the traversed residual tasks can be added into the currently traversed task combination, thereby being beneficial to improving the speed of finishing task grouping。
In another example, the similarity between the traversed remaining task and each task in the currently traversed task combination may also be directly calculated with reference to the above manner of calculating the similarity between the two tasks, and whether the calculated similarity of the task combination composed of the remaining task and each task in the currently traversed task combination is greater than the preset second similarity is determined; if yes, the traversed residual task meets the preset condition 1.
It should be noted that, in order to ensure that the similarity between each task in the finally obtained task group is high, so as to improve the effectiveness and the practicability of the task group, the requirement on whether the traversed remaining tasks can be added to the currently traversed task combination is generally strict, and therefore, the preset second similarity may be set to be relatively large, and the specific size of the preset second similarity may be set by a person skilled in the art according to actual needs, which is not limited in this embodiment.
Specifically, the preset included angle mentioned in the preset condition 2 can be set according to actual needs. The task is a delivery task, and it can be understood that the delivery task has a corresponding delivery starting location, such as a merchant location, a delivery destination location, such as a user location, and a delivery route corresponding to the delivery task is: the delivery task corresponds to a connection between a delivery starting location and a delivery destination location, such as a connection between a merchant location and a user location. Therefore, the distribution routes corresponding to the traversed remaining tasks can be obtained, and the distribution route corresponding to each task in the currently traversed task combination can be obtained. And then acquiring a distribution included angle between the distribution route corresponding to the traversed rest tasks and the distribution route corresponding to each task in the currently traversed task combination. It can be understood that each task in the traversed remaining task and the currently traversed task combination has a corresponding distribution included angle, and if it is determined that the distribution included angle of each task in the traversed remaining task and the currently traversed task combination is smaller than the preset included angle, it may be determined that the traversed remaining task satisfies the preset condition 2.
Specifically, the preset first distance mentioned in the preset condition 3 may be set according to actual needs. The task is a delivery task, it can be understood that the delivery task has a corresponding delivery starting location, such as a merchant location, a delivery destination location, such as a user location, and a delivery distance corresponding to the delivery task is: a delivery distance between a delivery origin location and a delivery destination location, such as a distance between a merchant location and a user location. Therefore, the distribution distance corresponding to the traversed remaining tasks can be obtained, and the distribution distance corresponding to each task in the currently traversed task combination can be obtained. And then obtaining the difference between the distribution distance corresponding to the traversed residual tasks and the distribution distance corresponding to each task in the currently traversed task combination. It can be understood that each task in the traversed remaining task and the currently traversed task combination has a corresponding distribution distance difference, and if it is determined that the distribution distance difference between the traversed remaining task and each task in the currently traversed task combination is smaller than the preset first distance, it may be determined that the traversed remaining task satisfies the preset condition 3.
Specifically, the preset second distance mentioned in the preset condition 4 may be set according to actual needs. Where the task is a delivery task, it is understood that the delivery task has a corresponding delivery origin location, such as a merchant location. Therefore, the distribution starting positions corresponding to the traversed remaining tasks can be obtained, and the distribution starting position corresponding to each task in the currently traversed task combination can be obtained. And then obtaining the distance between the distribution starting position corresponding to the traversed rest tasks and the distribution starting position corresponding to each task in the currently traversed task combination. It can be understood that the traversed remaining tasks and each task in the currently traversed task combination have a corresponding distance between the delivery start places, and if it is determined that the distance between the traversed remaining tasks and the delivery start place of each task in the currently traversed task combination is smaller than the preset second distance, it may be determined that the traversed remaining tasks satisfy the preset condition 4.
In a specific implementation, if the currently traversed task combination includes a task that has completed a packet, the currently traversed task combination is not processed, and the next task combination is continuously traversed.
Step S105: determining whether all task combinations meeting preset traversal conditions are traversed or not; if so, the process ends, otherwise, the step S102 is executed continuously, and the next task combination is traversed continuously.
That is, when it is determined that all task combinations satisfying the preset traversal condition have not been traversed, the next task combination is traversed until all task combinations satisfying the preset traversal condition have been traversed.
After traversing all the task combinations meeting the preset traversing conditions, a plurality of task groups can be obtained, and the rest tasks which are not divided into any task group can be grouped into one group, wherein the grouping refers to that one task group comprises one task. Finally, all task groups can be integrated, that is, the results of the task groups are summarized, and at this time, the flow of the whole task group is finished.
The following explains the present embodiment with a specific example, and for convenience of description, the present embodiment is described with an example that 5 tasks are currently required to be grouped, and it can be understood that in a specific implementation, the number of tasks required to be grouped is much greater than 5. And combining the 5 tasks to obtain 10 task combinations, and if the similarity of any two tasks in the task combinations meeting the preset traversal condition is greater than 0.8, traversing other 9 task combinations except the task combination 10 in sequence because the similarity of the task combination 10 (task 1 and task 3) is less than 0.8. The results of similarity calculations for the 9 task combinations are shown in table 1:
TABLE 1
Task composition | Degree of similarity |
Task combination 1 (task 1, task 2) | 0.99 |
Task combination 2 (task 1, task 5) | 0.98 |
Task combination 3 (task 2, task 5) | 0.97 |
Task combination 4 (task 3, task 4) | 0.96 |
Task combination 5 (task 2, task 4) | 0.9 |
Task combination 6 (task 1, task 4) | 0.89 |
Task combination 7 (task 3, task 5) | 0.84 |
Task combination 8 (task 2, task 3) | 0.83 |
Task combination 9 (task 4, task 5) | 0.81 |
The task combination 1 to the task combination 9 can be sequentially traversed from large to small according to the similarity, and it can be understood that, since the task combination 1 is the first traversed task combination, that is, the traversed task combination 1 does not include the tasks of completed packets, the currently traversed task combination 1 can be referred to as a target task combination. Then, each remaining task except the target task combination, that is, the currently traversed task combination 1 and the grouped tasks, is obtained from the 5 tasks, it can be seen from table 1 that the remaining tasks are tasks 3 to 5, the tasks 3 to 5 are sequentially traversed, the determined remaining task meeting the preset condition is task 5, and then the task 5 is added into the task combination 1 to obtain a task group 1, where the task group 1 includes: task 1, task 2, task 5.
And traversing to the task combination 2, and determining that the task combination 2 is not the target task combination and splitting the task combination 2 because the tasks 1 and 5 in the task combination 2 are completely grouped and are grouped into the task group 1. In this case, from the server perspective, the task group 2 is broken down, which means that no processing is performed on the task group 2.
And traversing to the task combination 3, wherein the task 2 and the task 5 in the task combination 3 are already grouped and are already grouped into the task group 1, so that the task combination 3 can be determined not to be the target task combination, and the task combination 3 is disassembled.
And then traversing to a task group 4, wherein the task 3 and the task 4 in the task group 4 are both tasks of incomplete grouping, the currently traversed task group 4 can be called a target task group, and the task 3 and the task 4 in the task group 4 are taken as tasks in the task group 2 when the task of incomplete grouping does not exist. It can be understood that if there are remaining tasks, it will be continuously determined whether the remaining tasks meet the preset condition, i.e. whether the remaining tasks can be added to the task group 4.
Finally, a task group 1 and a task group 2 are obtained. When task assignment is carried out, 3 tasks in the task group 1 are assigned to the same task performer, and 2 tasks in the task group 2 are assigned to the same task performer.
The above examples in the present embodiment are only for convenience of understanding, and do not limit the technical aspects of the present invention.
Compared with the prior art, the method combines each task, sequentially traverses each task combination meeting the preset traversal condition, and executes the following steps once when traversing to one task combination: determining whether the currently traversed task combination does not include the grouped tasks, responding to the fact that the currently traversed task combination does not include the grouped tasks, obtaining all the remaining tasks except the currently traversed task combination and the grouped tasks from all the tasks, sequentially traversing all the remaining tasks, and adding the traversed remaining tasks meeting preset conditions into the currently traversed task combination to obtain task groups; wherein, the task in the task grouping is the task which has completed the grouping. That is, each time a task combination of tasks is traversed to a task combination which does not include a completed packet, whether a task which can be added to the currently traversed task combination exists in the remaining tasks of the not-yet-completed packet is determined, so that the task grouping is realized. By grouping the tasks, the tasks can be distributed based on the obtained task groups, and the distribution efficiency can be improved.
The following description specifically describes implementation details of the task grouping method of this embodiment, and the following description is only provided for the sake of understanding, and is not necessary for implementing this embodiment.
Referring to fig. 2, a flowchart of a task grouping method in this embodiment may include:
step S201, performing pairwise combination on each task to obtain each task combination.
In an example, pairwise combining each task to obtain an implementation manner of each task combination may be: and selecting any two tasks from the tasks to be combined to obtain all combination forms as the obtained task combinations. That is, after each task is combined two by two, the number of task combinations obtained isWherein n is the total number of tasks combined in pairsAn amount;the number of all task combinations obtained by optionally combining 2 tasks in the n tasks is shown. For example, the number of all task combinations obtained by optionally combining 2 tasks among 10 tasks is as follows
In another example, pairwise combining the tasks to obtain an implementation manner of each task combination may be: and combining each task in pairs to obtain each task combination without the same task. That is, there is no repetitive task in each task combination obtained by combining two tasks. For example, after a task a and a task b form a task combination, the task a and the task b will not appear in other task combinations.
Step S202, calculating the similarity of each task combination.
And the similarity of each task combination is the similarity between two tasks in each task combination. As for the similarity calculation method between two tasks, reference may be made to the similarity calculation method in the first embodiment, which is not specifically limited in this embodiment.
Step S203, according to the similarity of each task combination, sequentially traversing the task combinations meeting the preset traversing conditions, and determining whether the currently traversed task combination does not include the tasks which are grouped; if so, step S204 is performed, otherwise step S206 is performed.
For example, the task combinations meeting the preset traversal condition may be sequentially traversed from large to small according to the similarity of each task combination, and it is determined whether the currently traversed task combination does not include the task that has completed the grouping, where the task that does not include the completed grouping may be referred to as a target task combination.
In one example, the task combination satisfying the preset traversal condition is as follows: all task combinations with over-similarity are calculated.
In another example, the task combination satisfying the preset traversal condition is as follows: and calculating the task combination with the similarity larger than the preset first similarity in all the task combinations with the calculated similarity.
And step S204, responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task.
And step S205, traversing each residual task in sequence, and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group.
Steps S204 to S205 are substantially the same as steps S103 to S104 in the first embodiment, and are not repeated here.
Step S206: determining whether all task combinations meeting preset traversal conditions are traversed or not; if so, the process ends, otherwise, the process continues to step S203, and the next task combination continues to be traversed.
The following explains the present embodiment by a specific example, the task grouping takes order grouping as an example, and if there are 10 current orders, there are 45 order combinations; the sequence of the similarity from large to small is assumed as follows: (1,2), (1,3), (1,4), (1,5) … … (1,10), (2,3), (2,4), (2,5), … … (2,10), (3,4), (3,5), (3,6), … … (2,10) … … (8,9), (8,10), (9,10)
If the first similarity is not set, the order combination meeting the preset traversal condition is as follows: calculating all the order combinations with the similarity, namely sequentially traversing all the order combinations according to the similarity sequence, and processing the traversed order combinations as follows:
when traversing to the order combination (1,2), it is found that both orders 1,2 are not grouped, and the remaining orders at this time include: order 3-order 10; assume that the remaining orders are traversed to get order grouping (1,2,3)
When traversing to the order combination (1,3), and finding that the orders 1,3 are already grouped, not processing the order combination (1, 3);
when traversing to the order combination (1,4), and finding that the order 1 is already grouped, not processing the order combination (1, 4);
……
when traversing to the order combination (4,5), finding that the orders 4,5 are not grouped, wherein the remaining orders at this time comprise orders 6-10 (namely, the orders of all the orders 1-10 except the currently traversed (4,5) and the grouped orders 1,2, 3); assuming that the order group (4,5,6) is obtained after traversing the rest orders;
when traversing to the order combination (4,6), and finding that the orders 4,6 are already grouped, the order combination (4,6) is not processed;
……
upon traversing to the order combination (7,8), it is found that neither order 7,8 is grouped, the remaining orders at this point include: 9-10 orders; assuming that the order group (7,8, 9,10) is obtained after traversing the rest orders; all orders are grouped to completion.
If the preset first similarity is 95%, screening all order combinations with the similarity larger than 95% from all the order combinations, and if 25 screened order combinations exist, sequencing according to the similarity of the 25 order combinations and sequentially traversing the 25 order combinations; the processing of the traversed order combination is similar to that described above.
The above examples in the present embodiment are only for convenience of understanding, and do not limit the technical aspects of the present invention.
Compared with the prior art, the embodiment combines each task two by two at the beginning, does not increase the combination quantity due to the increase of the upper limit of the tasks (namely, the quantity of the tasks in each group is increased), is beneficial to reducing the complexity of combination, and simultaneously reduces the complexity of calculating the similarity of each task combination, thereby reducing the complexity of grouping the tasks into a whole. The grouping mode provided by the embodiment of the invention adopts a grouping mode of adding a new task into a task combination by taking the task combination (2 tasks) as a reference, so that the task grouping complexity is not increased under the condition of improving the task upper limit of the task grouping; therefore, the processing load of the server in task grouping can be reduced, and the processing efficiency can be improved.
Taking the delivery orders as an example, the tasks are grouped by the task grouping method in the present embodiment. Namely, a new order is added into the order pair by taking the order pair (2 orders) as a reference, and order grouping supporting high order upper limit is realized. Compared with the earlier method of only 2 single-group, the method can realize the combination of at most 3 single, 4 single or n single into one order group without increasing the grouping complexity. It can be understood that a plurality of orders are combined into a group, which is beneficial to improving the order taking willingness of a rider, improving the order taking efficiency and shortening the order taking time. More orders with high similarity are combined together, and one-time assignment can also improve rider experience and reduce distribution cost.
The following description specifically describes implementation details of the task grouping method of this embodiment, and the following description is only provided for the sake of understanding, and is not necessary for implementing this embodiment.
Referring to fig. 3, a flowchart of a task grouping method in this embodiment may include:
step S301, combining each task in pairs to obtain each task combination.
And step S302, filtering each task combination according to a preset filtering rule to obtain each filtered task combination.
Wherein, the filtering rules can be set according to actual needs. The filtering rules are used to filter out task combinations that are made up of significantly different tasks. For example, if the task is a delivery order, the filtering may be performed according to the generation time interval, the expected arrival time interval, the distance between the delivery start locations, and other rules of two delivery orders in each task combination. For example, delivery order pairs that are too long in production intervals, too long in expected delivery intervals, and too far apart from the delivery start may be filtered out.
Step S303, calculating the similarity of each task combination after filtering.
Step S304, according to the similarity of each task combination after filtering, sequentially traversing the task combinations meeting the preset traversing conditions, and determining whether the currently traversed task combination does not include the tasks which have completed grouping; if so, step S305 is performed, otherwise step S307 is performed.
In step S305, in response to that the currently traversed task combination does not include the grouped tasks, each of the remaining tasks is acquired from each task except for the currently traversed task combination and the grouped tasks.
And S306, traversing all the residual tasks in sequence, and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group.
Step S307, determining whether all task combinations meeting preset traversal conditions are traversed; if so, the process ends, otherwise, the process continues to step S304, and the next task combination continues to be traversed.
Compared with the prior art, in the embodiment, each task combination is filtered according to the preset filtering rule to obtain the filtered task combination, so that the task combinations with obviously poor similarity can be filtered before the similarity is calculated, the number of the task combinations with the similarity needing to be calculated subsequently is reduced, and the execution speed is accelerated.
The following description specifically describes implementation details of the task grouping method of this embodiment, and the following description is only provided for the sake of understanding, and is not necessary for implementing this embodiment.
Fig. 4 may be referred to as a flowchart of a task grouping method in this embodiment, and the method includes:
step S401, combining each task in pairs to obtain each task combination.
Step S402, calculating the similarity of each task combination.
Steps S401 to S402 are substantially the same as steps S201 to S202 in the second embodiment, and are not repeated herein to avoid repetition.
Step S403, according to the similarity of each task combination, dividing the task combinations meeting the preset traversal condition into a plurality of preset similarity intervals.
Wherein, a plurality of similarity intervals are obtained by dividing continuous numerical value intervals. In a specific implementation, the plurality of similarity intervals obtained by division do not overlap with each other. For example, the similarity intervals into which the continuous value interval [ 0.81 ] is divided include: [0.80.84), [ 0.840.88), [ 0.880.92), [ 0.920.96), [ 0.961). The preset traversal condition has been described in the above embodiments, and in order to avoid repetition, this embodiment is not described again.
In one example, the task combinations meeting the preset traversal condition may be determined according to the similarity of each task combination. And then dividing the task combination meeting the preset traversal condition into a plurality of preset similarity intervals according to the task combination meeting the preset traversal condition.
In another example, whether the task combination is the task combination meeting the preset traversal condition may be determined according to the similarity of the task combinations; and if the task combination is the task combination meeting the preset traversal condition, dividing the task combination into similarity intervals in which the similarities of the task combinations are located according to the similarities of the task combinations. And if the task combination is the task combination which does not meet the preset traversal condition, the task combination is not processed.
For example, currently, 5 tasks need to be grouped, 10 task combinations are obtained by combining every two tasks, the similarity of the 10 task combinations is calculated, and if the similarity of the task combinations meeting the preset traversal condition is larger than 0.8, since the similarity of the task combination 10 (task 1, task 3) is smaller than 0.8, the other 9 task combinations except the task combination 10 are divided into a plurality of preset similarity intervals. The similarity of the 9 task combinations and the similarity interval into which the 9 task combinations are divided can be shown in table 2 below. It should be noted that the 5 tasks in table 1 are different from the 5 tasks in table 2, and therefore the similarity between the 5 tasks in table 1 is different from the similarity between the 5 tasks in table 2.
TABLE 2
Task composition | Degree of similarity | Interval of similarity |
Task combination 1 (task 1, task 2) | 0.97 | [0.96 1) |
Task combination 2 (task 1, task 5) | 0.98 | [0.96 1) |
Task combination 3 (task 2, task 5) | 0.99 | [0.96 1) |
Task combination 4 (task 3, task 4) | 0.96 | [0.96 1) |
Task combination 5 (task 2, task 4) | 0.89 | [0.88 0.92) |
Task combination 6 (task 1, task 4) | 0.9 | [0.88 0.92) |
Task combination 7 (task 3, task 5) | 0.84 | [0.84 0.88) |
Task combination 8 (task 2, task 3) | 0.81 | [0.8 0.84) |
Task combination 9 (task 4, task 5) | 0.83 | [0.8 0.84) |
In step S404, an arrangement order of the plurality of similarity intervals is obtained.
In the plurality of similarity sections, the higher the upper limit value is, the higher the ranking order is. Referring to the example in table 2, the sequence of the plurality of similarity intervals is, from front to back: [ 0.961), [ 0.880.92), [ 0.840.88, [ 0.80.84).
It can be understood that, in the present embodiment, the sorting manner of each task combination may be understood as a bucket sorting. Each bucket represents a similarity interval, and the task combination meeting the preset traversal condition is divided into a plurality of preset similarity intervals, which can be understood as follows: dividing the task combination meeting the preset traversal condition into a plurality of preset buckets, and then sequencing similarity intervals represented by the buckets to obtain the arrangement sequence of the buckets.
Step S405, according to the arrangement sequence of the multiple similarity intervals, sequentially traversing the task combinations which meet preset traversal conditions in the multiple similarity intervals from front to back, and determining whether the currently traversed task combinations do not include the grouped tasks; if so, step S406 is performed, otherwise step S408 is performed.
And the traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random.
In one example, referring to table 2, the combination of tasks divided into [ 0.961) may be traversed first, followed by the combination of tasks divided into [ 0.880.92), followed by the combination of tasks divided into [ 0.840.88), and followed by the combination of tasks divided into [ 0.80.84). When traversing 4 task combinations (task combination 1 to task combination 4) divided into [ 0.961), the traversal order of the 4 task combinations is random; when traversing 2 task combinations (task combination 5 and task combination 6) divided into [ 0.880.92), the traversal order of the 2 task combinations is random; when traversing 2 task combinations (task combination 8 and task combination 9) divided into [0.80.84), the traversal order for these 2 task combinations is random.
In addition, since the implementation of determining whether the currently traversed task combination does not include the task of the completed packet has been described in the first embodiment, this embodiment is not described again.
In step S406, in response to that the currently traversed task combination does not include the grouped tasks, each of the remaining tasks is obtained from each of the tasks except for the currently traversed task combination and the grouped tasks.
And step S407, traversing all the residual tasks in sequence, and adding the traversed residual tasks meeting the preset conditions into the current traversed task combination to obtain task groups.
Step S408, determining whether all task combinations meeting preset traversal conditions are traversed or not; if so, the process ends, otherwise, the process continues to step S405, and the next task combination continues to be traversed.
Steps S406 to S408 are substantially the same as steps S204 to S206 in the second embodiment of the present invention, and are not repeated here.
In a specific implementation, after the step S401 is executed, the steps of: filtering each task combination according to a preset filtering rule to obtain each filtered task combination, where step S402 may be to calculate a similarity of each filtered task combination.
The above examples in the present embodiment are only for convenience of understanding, and do not limit the technical aspects of the present invention.
Compared with the prior art, the method considers the small difference of the similarity and can be ignored in practical application, so that a similar bucket sorting mode is adopted, and the task combinations meeting the preset traversing conditions in the multiple similarity intervals are sequentially traversed from front to back according to the arrangement sequence of the multiple similarity intervals. The traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random, namely the task combinations (the task combinations with slight similarity difference) in the same similarity interval are not further sequenced, so that the sequencing speed is improved, the sequencing complexity is reduced, the task grouping complexity is reduced, and the task grouping efficiency is improved. In addition, the task combinations falling within the same similarity interval can be considered to have small similarity difference, so that the influence of the task combinations on the grouping result can be ignored.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fifth embodiment of the present invention relates to a task grouping platform, as shown in fig. 5, including: the combination module 501 is used for combining each task to obtain each task combination; a first traversal module 502, configured to sequentially traverse the task combinations that satisfy the preset traversal condition, and execute the following steps: determining whether the currently traversed task combination does not include the grouped tasks; responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task; a second traversal module 503, configured to sequentially traverse the remaining tasks, and add the traversed remaining tasks meeting the preset condition to the currently traversed task combination to obtain a task group; wherein the tasks in the task grouping are the tasks of the completed grouping
In one example, the similarity of any two tasks in the task combination meeting the preset traversal condition is greater than a preset first similarity.
In one example, the combining the tasks to obtain the task combinations includes: combining each task in pairs to obtain each task combination; the sequentially traversing task combination meeting the preset traversing conditions comprises the following steps: calculating the similarity of each task combination; the similarity of each task combination is the similarity between two tasks in each task combination; and traversing the task combinations meeting preset traversing conditions in sequence according to the similarity of each task combination.
In an example, sequentially traversing the task combinations meeting the preset traversal condition according to the similarity of each task combination includes: dividing the task combinations meeting the preset traversal conditions into a plurality of preset similarity intervals according to the similarity of each task combination; the similarity intervals are obtained by dividing continuous numerical value intervals; acquiring the arrangement sequence of the plurality of similarity intervals; wherein, in the similarity intervals, the larger the upper limit value is, the earlier the ranking order is; according to the arrangement sequence of the similarity intervals, sequentially traversing the task combinations meeting preset traversal conditions in the similarity intervals from front to back; and the traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random.
In one example, the preset condition includes at least one of: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity; the distribution included angle between the traversed residual tasks and each task in the currently traversed task combination is smaller than a preset included angle; the task is a distribution task, and the distribution included angle is determined according to a distribution route corresponding to the traversed residual tasks and a distribution route corresponding to the task added into the currently traversed task combination; the difference between the distribution distance corresponding to the traversed residual tasks and the distribution distance corresponding to each task in the currently traversed task combination is smaller than a preset first distance; the tasks are distribution tasks; the distance between the distribution starting place corresponding to the traversed residual tasks and the distribution starting place corresponding to each task in the currently traversed task combination is smaller than a preset second distance; the tasks are distribution tasks.
In one example, the preset conditions include: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity; the tasks are combined pairwise, and the number of the obtained task combinations isWherein n is the total number of tasks combined pairwise; after the calculating the similarity of each task combination, the method further includes: storing the similarity of each task combination; the similarity between the traversed residual tasks and each task in the currently traversed task combination is obtained in the following way: and searching the similarity of each task in the traversed residual task and the currently traversed task combination according to the stored similarity of each task combination.
In one example, the sequentially traversing the remaining tasks, and adding the task meeting the preset condition to the currently traversed task combination to obtain a task group includes: and traversing the residual tasks in sequence, adding the residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group, and stopping traversing until the number of the tasks in the task group reaches a preset task upper limit.
It should be understood that this embodiment is an example of the apparatus corresponding to the first to fourth embodiments, and may be implemented in cooperation with the first to fourth embodiments. The related technical details and technical effects mentioned in the first to fourth embodiments are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first to fourth embodiments.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A sixth embodiment of the present invention relates to a server, as shown in fig. 6, including: at least one processor 601; and a memory 602 communicatively coupled to the at least one processor 601; and a communication component 603 communicatively coupled to the scanning device, the communication component 603 receiving and transmitting data under control of the processor 601; wherein the memory 602 stores instructions executable by the at least one processor 601, the instructions being executable by the at least one processor 601 to implement:
combining each task to obtain each task combination;
sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
Specifically, the server includes: one or more processors 601 and a memory 602, one processor 601 being illustrated in fig. 6. The processor 601 and the memory 602 may be connected by a bus or other means, and fig. 6 illustrates an example of a connection by a bus. The memory 602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 601 executes various functional applications of the device and data processing by running nonvolatile software programs, instructions, and modules stored in the memory 602, that is, implements the above-described delivery task grouping method.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 602 may optionally include memory 602 located remotely from the processor 601, and these remote memories 602 may be connected to external devices via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 602 and, when executed by the one or more processors 601, perform the task grouping method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A seventh embodiment of the invention relates to a non-volatile storage medium for storing a computer-readable program for causing a computer to perform some or all of the above method embodiments.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.
The embodiment of the application provides A1. a task grouping method, which comprises the following steps:
combining each task to obtain each task combination;
sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
A2. According to the task grouping method of a1, traversing the remaining tasks in sequence, and adding the traversed remaining tasks meeting the preset condition to the currently traversed task combination to obtain a task group, includes:
and traversing all the residual tasks in sequence, adding the residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group, and stopping traversing until the number of the tasks in the task group reaches a preset task upper limit.
A3. According to the task grouping method described in a1, the combining the tasks to obtain task combinations includes:
combining each task in pairs to obtain each task combination;
the sequentially traversing task combination meeting the preset traversing conditions comprises the following steps:
calculating the similarity of each task combination; the similarity of each task combination is the similarity between two tasks in each task combination;
and traversing the task combinations meeting preset traversing conditions in sequence according to the similarity of each task combination.
A4. According to the task grouping method described in a3, sequentially traversing task combinations satisfying a preset traversal condition according to the similarity of each task combination includes:
dividing the task combinations meeting the preset traversal conditions into a plurality of preset similarity intervals according to the similarity of each task combination; the similarity intervals are obtained by dividing continuous numerical value intervals;
acquiring the arrangement sequence of the plurality of similarity intervals; wherein, in the similarity intervals, the larger the upper limit value is, the earlier the ranking order is;
according to the arrangement sequence of the similarity intervals, sequentially traversing the task combinations meeting preset traversal conditions in the similarity intervals from front to back; and the traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random.
A5. According to the task grouping method of any one of A1 to A4, the similarity of any two tasks in the task combination meeting the preset traversal condition is greater than the preset first similarity.
A6. According to the task grouping method of a1, the preset condition at least includes one of the following:
the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity;
the distribution included angle between the traversed residual tasks and each task in the currently traversed task combination is smaller than a preset included angle; the task is a distribution task, and the distribution included angle is determined according to a distribution route corresponding to the traversed residual tasks and a distribution route corresponding to a task in the currently traversed task combination;
the difference between the distribution distance corresponding to the traversed residual tasks and the distribution distance corresponding to each task in the currently traversed task combination is smaller than a preset first distance; wherein the task is a distribution task;
the distance between the distribution starting place corresponding to the traversed residual tasks and the distribution starting place corresponding to each task in the currently traversed task combination is smaller than a preset second distance; wherein the task is a distribution task.
A7. The task grouping method according to A3 or a4, wherein the preset conditions include: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity;
the tasks are combined pairwise, and the number of the obtained task combinations isWherein n is the total number of tasks combined pairwise;
after the calculating the similarity of each task combination, the method further includes:
storing the similarity of each task combination;
the similarity between the traversed residual tasks and each task in the currently traversed task combination is obtained in the following way:
and searching the similarity of each task in the traversed residual task and the currently traversed task combination according to the stored similarity of each task combination.
An embodiment of the present application provides a b1. a task grouping platform, including:
the combination module is used for combining each task to obtain each task combination;
the first traversal module is used for sequentially traversing the task combinations meeting the preset traversal conditions and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
the second traversal module is used for sequentially traversing all the residual tasks and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
An embodiment of the present application provides c1. a server, including a memory and a processor, where the memory stores a computer program, and the processor executes, when executing the program:
combining each task to obtain each task combination;
sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
C2. The server according to C1, the processor when running a program performs the task grouping method as described in any one of a2 to a7.
A non-volatile storage medium storing a computer-readable program for causing a computer to perform the task grouping method as described in any one of a1 to a7 is provided by embodiments of the present application.
Claims (10)
1. A method for task grouping, comprising:
combining each task to obtain each task combination;
sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
2. The task grouping method according to claim 1, wherein the traversing the respective remaining tasks in sequence, and adding the traversed remaining tasks satisfying a preset condition to the currently traversed task combination to obtain a task group, comprises:
and traversing all the residual tasks in sequence, adding the residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group, and stopping traversing until the number of the tasks in the task group reaches a preset task upper limit.
3. The task grouping method according to claim 1, wherein the combining the tasks to obtain the task combinations comprises:
combining each task in pairs to obtain each task combination;
the sequentially traversing task combination meeting the preset traversing conditions comprises the following steps:
calculating the similarity of each task combination; the similarity of each task combination is the similarity between two tasks in each task combination;
and traversing the task combinations meeting preset traversing conditions in sequence according to the similarity of each task combination.
4. The task grouping method according to claim 3, wherein sequentially traversing the task combinations satisfying a preset traversal condition according to the similarity of each task combination comprises:
dividing the task combinations meeting the preset traversal conditions into a plurality of preset similarity intervals according to the similarity of each task combination; the similarity intervals are obtained by dividing continuous numerical value intervals;
acquiring the arrangement sequence of the plurality of similarity intervals; wherein, in the similarity intervals, the larger the upper limit value is, the earlier the ranking order is;
according to the arrangement sequence of the similarity intervals, sequentially traversing the task combinations meeting preset traversal conditions in the similarity intervals from front to back; and the traversal sequence of the task combinations which are divided into the same similarity interval and meet the preset traversal condition is random.
5. The task grouping method according to any one of claims 1 to 4, wherein the similarity of any two tasks in the task combination satisfying the preset traversal condition is greater than a preset first similarity.
6. The task grouping method according to claim 1, wherein the preset condition comprises at least one of:
the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity;
the distribution included angle between the traversed residual tasks and each task in the currently traversed task combination is smaller than a preset included angle; the task is a distribution task, and the distribution included angle is determined according to a distribution route corresponding to the traversed residual tasks and a distribution route corresponding to a task in the currently traversed task combination;
the difference between the distribution distance corresponding to the traversed residual tasks and the distribution distance corresponding to each task in the currently traversed task combination is smaller than a preset first distance; wherein the task is a distribution task;
the distance between the distribution starting place corresponding to the traversed residual tasks and the distribution starting place corresponding to each task in the currently traversed task combination is smaller than a preset second distance; wherein the task is a distribution task.
7. The task grouping method according to claim 3 or 4, wherein the preset condition comprises: the similarity between the traversed residual tasks and each task in the currently traversed task combination is greater than a preset second similarity;
the tasks are combined pairwise, and the number of the obtained task combinations isWherein n is the total number of tasks combined pairwise;
after the calculating the similarity of each task combination, the method further includes:
storing the similarity of each task combination;
the similarity between the traversed residual tasks and each task in the currently traversed task combination is obtained in the following way:
and searching the similarity of each task in the traversed residual task and the currently traversed task combination according to the stored similarity of each task combination.
8. A task grouping platform, comprising:
the combination module is used for combining each task to obtain each task combination;
the first traversal module is used for sequentially traversing the task combinations meeting the preset traversal conditions and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
the second traversal module is used for sequentially traversing all the residual tasks and adding the traversed residual tasks meeting the preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
9. A server comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the program performs:
combining each task to obtain each task combination;
sequentially traversing the task combinations meeting the preset traversing conditions, and executing the following steps:
determining whether the currently traversed task combination does not include the grouped tasks;
responding to the fact that the currently traversed task combination does not include the grouped tasks, and acquiring each residual task except the currently traversed task combination and the grouped tasks from each task;
sequentially traversing all the residual tasks, and adding the traversed residual tasks meeting preset conditions into the currently traversed task combination to obtain a task group; wherein the tasks in the task group are the grouped tasks.
10. A non-volatile storage medium storing a computer-readable program for causing a computer to execute the task grouping method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010518064.6A CN111598486B (en) | 2020-06-09 | 2020-06-09 | Task grouping method, platform, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010518064.6A CN111598486B (en) | 2020-06-09 | 2020-06-09 | Task grouping method, platform, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111598486A true CN111598486A (en) | 2020-08-28 |
CN111598486B CN111598486B (en) | 2023-11-10 |
Family
ID=72190099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010518064.6A Active CN111598486B (en) | 2020-06-09 | 2020-06-09 | Task grouping method, platform, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111598486B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115098240A (en) * | 2022-07-25 | 2022-09-23 | 中诚华隆计算机技术有限公司 | Multiprocessor application scheduling method and system and storage medium |
CN115695166A (en) * | 2022-11-01 | 2023-02-03 | 中电云数智科技有限公司 | Large-scale storage cluster capacity expansion grouping method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105719009A (en) * | 2015-07-24 | 2016-06-29 | 北京小度信息科技有限公司 | Method and device for processing distribution tasks |
CN107292701A (en) * | 2017-05-25 | 2017-10-24 | 北京小度信息科技有限公司 | Order group technology and device |
CN107392512A (en) * | 2016-11-25 | 2017-11-24 | 北京小度信息科技有限公司 | Grouped task method and apparatus |
CN108776880A (en) * | 2018-06-04 | 2018-11-09 | 浪潮软件股份有限公司 | A kind of discrete point angle grouping allocator based on GIS |
CN110059918A (en) * | 2019-03-06 | 2019-07-26 | 平安科技(深圳)有限公司 | Lawyer's competition for orders method, apparatus, medium and electronic equipment |
CN110097411A (en) * | 2018-01-31 | 2019-08-06 | 阿里巴巴集团控股有限公司 | A kind of list object generation method, inquiry sheet list generation method and device |
CN110909222A (en) * | 2019-10-12 | 2020-03-24 | 中国平安人寿保险股份有限公司 | User portrait establishing method, device, medium and electronic equipment based on clustering |
CN111178752A (en) * | 2019-12-27 | 2020-05-19 | 北京顺达同行科技有限公司 | Order form dispatching method and device, computer equipment and storage medium |
-
2020
- 2020-06-09 CN CN202010518064.6A patent/CN111598486B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105719009A (en) * | 2015-07-24 | 2016-06-29 | 北京小度信息科技有限公司 | Method and device for processing distribution tasks |
CN107392512A (en) * | 2016-11-25 | 2017-11-24 | 北京小度信息科技有限公司 | Grouped task method and apparatus |
CN107292701A (en) * | 2017-05-25 | 2017-10-24 | 北京小度信息科技有限公司 | Order group technology and device |
CN110097411A (en) * | 2018-01-31 | 2019-08-06 | 阿里巴巴集团控股有限公司 | A kind of list object generation method, inquiry sheet list generation method and device |
CN108776880A (en) * | 2018-06-04 | 2018-11-09 | 浪潮软件股份有限公司 | A kind of discrete point angle grouping allocator based on GIS |
CN110059918A (en) * | 2019-03-06 | 2019-07-26 | 平安科技(深圳)有限公司 | Lawyer's competition for orders method, apparatus, medium and electronic equipment |
CN110909222A (en) * | 2019-10-12 | 2020-03-24 | 中国平安人寿保险股份有限公司 | User portrait establishing method, device, medium and electronic equipment based on clustering |
CN111178752A (en) * | 2019-12-27 | 2020-05-19 | 北京顺达同行科技有限公司 | Order form dispatching method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
钱钧等: "一种基于词袋模型的大规模图像层次化分组算法" * |
陈波: "时间窗约束下的快递车辆动态调度问题研究" * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115098240A (en) * | 2022-07-25 | 2022-09-23 | 中诚华隆计算机技术有限公司 | Multiprocessor application scheduling method and system and storage medium |
CN115098240B (en) * | 2022-07-25 | 2022-11-15 | 中诚华隆计算机技术有限公司 | Multiprocessor application scheduling method and system and storage medium |
CN115695166A (en) * | 2022-11-01 | 2023-02-03 | 中电云数智科技有限公司 | Large-scale storage cluster capacity expansion grouping method and device |
Also Published As
Publication number | Publication date |
---|---|
CN111598486B (en) | 2023-11-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108681857B (en) | Distribution order distribution method and device and computer readable storage medium | |
CN109685609B (en) | Order allocation method and device, electronic equipment and storage medium | |
CN106878415B (en) | Load balancing method and device for data consumption | |
CN111598486A (en) | Task grouping method, platform, server and storage medium | |
CN113179331B (en) | Distributed special protection service scheduling method facing mobile edge calculation | |
Berghida et al. | EBBO: an enhanced biogeography-based optimization algorithm for a vehicle routing problem with heterogeneous fleet, mixed backhauls, and time windows | |
CN109934537A (en) | Order allocation method, device, server and storage medium | |
CN115062868A (en) | Pre-polymerization type vehicle distribution path planning method and device | |
CN115657616A (en) | Task allocation method based on AGV (automatic guided vehicle) scheduling system | |
CN116050540A (en) | Self-adaptive federal edge learning method based on joint bi-dimensional user scheduling | |
CN112199407B (en) | Data packet ordering method, device, equipment and storage medium | |
CN111144659B (en) | Logistics scheduling method and device, computer equipment and storage medium | |
CN112036697A (en) | Task allocation method and device, readable storage medium and electronic equipment | |
CN115334010A (en) | Query information processing method and device, storage medium and electronic device | |
CN112506644B (en) | Task scheduling method and system based on cloud edge-side hybrid computing mode system | |
CN115564374A (en) | Collaborative multitask redistribution method, device, equipment and readable storage medium | |
CN111311150B (en) | Distribution task grouping method, platform, electronic equipment and storage medium | |
CN112468546B (en) | Account position determining method, device, server and storage medium | |
CN112272227B (en) | Edge computing task scheduling method based on computation graph | |
CN114779813A (en) | Multi-unmanned aerial vehicle dynamic task allocation method based on improved contract network algorithm | |
CN114077947A (en) | Distribution scheduling method, device, electronic equipment and storage medium | |
CN111539592B (en) | Task allocation method and device, readable storage medium and electronic equipment | |
CN112787870B (en) | Parallel flexible Skyline service discovery method with service quality perception | |
EP3216167B1 (en) | Orchestrator and method for virtual network embedding using offline feedback | |
CN110309367A (en) | Method, the method and apparatus of information processing of information classification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |