Data processing method and device, electronic equipment and storage medium
By combining task and robot data, the total task execution time is determined to optimize scheduling, the problem of unreasonable allocation of robot tasks is solved and the robot work efficiency in urban governance is improved.
Patent Information
- Application Number
- CN202411114378.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-17
AI Technical Summary
In urban governance, robots face problems such as poor task scheduling, untimely task processing, unreasonable robot task allocation, and uneven overall work saturation, resulting in inefficiency.
By obtaining the task set and the robot set, combining it into multiple scheduling instances, and determining the total task execution time based on the target robot data and target task data in the scheduling instance, filtering out the target scheduling data to optimize task allocation and improving the robot's work efficiency.
The rational allocation of robot tasks is achieved, the overall work efficiency is improved, and the timeliness of task processing and the balance of work saturation is ensured.
Smart Images

Figure CN119141594A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a data processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, with the continuous development of artificial intelligence technology, robots are being used more and more widely in various fields. Among them, robots, as a type of robot that can autonomously complete urban governance tasks, have been widely used in parks, streets, factories and other places. However, in practical applications, robots often face the problem of poor task scheduling, resulting in untimely task processing, unreasonable robot task allocation, and uneven overall work saturation. Therefore, an efficient robot task scheduling solution is urgently needed to solve these problems. Summary of the invention
[0003] The embodiment of the present invention provides a data processing method, aiming to provide an efficient robot task scheduling solution, which can achieve the effect of reasonable allocation of robot tasks and improve the overall work efficiency of the robot. Multiple scheduling instances are obtained by combining task sets and robot sets, and the total task execution time of each scheduling instance is determined according to the target robot data and at least one target task data in the scheduling instance. The scheduling instance is screened by the total task execution time to obtain the target scheduling data. The robot is scheduled for task by the target scheduling data, which can improve the overall work efficiency of the robot.
[0004] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising the following steps:
[0005] Acquire a task set and a robot set, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data;
[0006] Combining the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of the scheduling instances including a target robot data and at least one target task data;
[0007] For each of the scheduling instances, based on one of the target robot data and at least one of the target task data, determining a total task execution time corresponding to each of the scheduling instances;
[0008] Based on the total task execution time, target scheduling data is determined in the plurality of scheduling instances, wherein the target scheduling data includes at least one target robot data and all the task data in the task set.
[0009] Optionally, the acquiring of the task set and the robot set includes:
[0010] Create an initial task set and an initial robot set;
[0011] Acquire the task data of all tasks, wherein the task data includes task status;
[0012] Adding the task data to the initial task set according to the task status to obtain the task set;
[0013] Acquire the robot data of all robots, wherein the robot data includes robot status;
[0014] The robot data is added to the initial robot set according to the robot state to obtain the robot set.
[0015] Optionally, the task data further includes a task location and a remaining task time, the robot data further includes a robot location, and for each of the scheduling instances, based on one of the target robot data and at least one of the target task data, determining a total task execution time corresponding to each of the scheduling instances includes:
[0016] For each of the scheduling instances, if there is only one target task data, determining a first task calculation time according to the robot position in the target robot data and the task position in the target task data;
[0017] Determine the total task execution time corresponding to the scheduling instance based on the first task calculation time and the task remaining time in the target task data;
[0018] For each of the scheduling instances, if there are multiple target task data, determining the second task calculation time according to the robot position in the target robot data and the task positions in the multiple target task data;
[0019] Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
[0020] Optionally, determining the second task calculation time according to the robot position in the target robot data and the task positions in the plurality of target task data includes:
[0021] Numbering the plurality of target task data and sorting them according to the numbers;
[0022] Based on the plurality of task positions of the plurality of target task data, determining a task path in order of the serial numbers, wherein the task path includes the plurality of task positions;
[0023] Determining a second task calculation time according to the robot position in the target robot data and each of the task positions in the task path;
[0024] Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
[0025] Optionally, the task data further includes task priority and task creation time, and the step of numbering the plurality of target task data and sorting them by the numbers includes:
[0026] Determine the number of the target task data based on the task priority and the task creation time, wherein the higher the task priority and the longer the task creation time, the smaller the number;
[0027] The target task data are sorted according to the corresponding numbers.
[0028] Optionally, determining target scheduling data in the plurality of scheduling instances based on the total task execution time includes:
[0029] Among the multiple scheduling instances, at least one scheduling instance with the smallest sum of total task execution time is determined as target scheduling data.
[0030] Optionally, determining target scheduling data in the plurality of scheduling instances based on the total task execution time includes:
[0031] Sorting the plurality of scheduling instances in ascending order of the total task execution time to obtain a first scheduling instance set, wherein the first scheduling instance set includes the sorted plurality of scheduling instances;
[0032] In the first scheduling instance set, the scheduling instances that meet the screening conditions are sequentially screened out according to the sorting and added to the second scheduling instance set as available scheduling instances; wherein the screening conditions include: the target task data and the target robot data in the scheduling instance appear for the first time in the second scheduling instance set; or, the scheduling instance includes the target task data in the first available scheduling instance, and the target task data in the scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance is the available scheduling instance in the second scheduling instance set that has the same target robot data as the scheduling instance, and the second available scheduling instance is the available scheduling instance in the second scheduling instance set that has different target robot data from the scheduling instance;
[0033] In the second scheduling instance set, if all the target task data have corresponding available scheduling instances, the screening is stopped, and a final scheduling instance set is obtained based on the second scheduling instance set after the screening is completed;
[0034] Based on the final scheduling instance set, target scheduling data is determined.
[0035] In a second aspect, an embodiment of the present invention further provides a data processing device, the data processing device comprising:
[0036] A first acquisition module is used to acquire a task set and a robot set, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data;
[0037] A first processing module, configured to combine the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of which includes a target robot data and at least one target task data;
[0038] A second processing module is used to determine, for each of the scheduling instances, a total task execution time corresponding to each of the scheduling instances based on one of the target robot data and at least one of the target task data;
[0039] The third processing module is used to determine target scheduling data in the multiple scheduling instances based on the total task execution time, and the target scheduling data includes at least one target robot data and all the task data in the task set.
[0040] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method provided in the embodiment of the present invention when executing the computer program.
[0041] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the data processing method provided in the embodiment of the invention are implemented.
[0042] In an embodiment of the present invention, a task set and a robot set are obtained, wherein the task set includes multiple task data, and the robot set includes multiple robot data; the multiple task data in the task set are combined with the multiple robot data in the robot set to obtain multiple scheduling instances, wherein each scheduling instance includes a target robot data and at least one target task data; for each scheduling instance, based on a target robot data and at least one target task data, the total task execution time corresponding to each scheduling instance is determined; based on the total task execution time, target scheduling data is determined in multiple scheduling instances, wherein the target scheduling data includes at least one target robot data and all task data in the task set. Multiple scheduling instances are obtained by combining the task set and the robot set, and the total task execution time of each scheduling instance is determined according to the target robot data and at least one target task data in the scheduling instance, and the scheduling instance is screened by using the total task execution time to obtain the target scheduling data, and the robot is scheduled for tasks by using the target scheduling data, which can improve the robot's overall work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present invention;
[0045] Figure 2 is a structural schematic diagram of a data processing device provided in an embodiment of the present invention;
[0046] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] like Figure 1 As shown, Figure 1 : is a flow chart of a data processing method provided by an embodiment of the present invention, the data processing method comprising the steps of:
[0049] 101. Obtain a task set and a robot set.
[0050] In an embodiment of the present invention, the above data processing method can be applied to an urban governance platform. The above urban governance platform can be built based on a server or a distributed server. The above urban governance platform is deployed with functional applications such as a monitoring device communication interface and a robot communication interface to support intelligent urban governance. The above urban governance platform communicates with the monitoring equipment deployed in the target city through the monitoring device communication interface to obtain the monitoring data collected by the monitoring equipment. The above urban governance platform communicates with the robots deployed in the target city through the robot communication interface to send tasks to the corresponding robots so that the robots perform the corresponding tasks. Through the above urban governance platform, ultra-large-scale urban governance can be carried out through monitoring equipment and robots.
[0051] The above-mentioned task set includes multiple task data, and the above-mentioned task data can be obtained by performing task identification based on the real-time monitoring data collected by the monitoring equipment deployed in the target city. The above-mentioned real-time monitoring data can be pedestrian data, vehicle data, weather data, garbage cleaning data, etc. The above-mentioned monitoring equipment can be a monitoring camera. The above-mentioned real-time monitoring data can be the stream data collected by the monitoring equipment, or it can be structured data or semi-structured data after the stream data collected by the monitoring equipment is structured. The above-mentioned task data can also be obtained by manual reporting.
[0052] The above-mentioned task data may include task identification, task priority, robot number, task calculation time, task remaining time, task location, task status, task creation time, etc. Among them, the task identification is used to indicate that the task is different from other tasks. Task priority indicates whether the task needs to be prioritized or not. The higher the priority, the more priority it needs. The robot number indicates which robot the task is assigned to. If it is not assigned to a specific robot, it is empty or a default value. The task calculation time indicates the time required for the robot corresponding to the robot number to reach the task location. The remaining time of the task indicates the time required for the corresponding robot to perform the task. If the robot has not reached the task location, the remaining time of the task is the longest task time. If the robot has reached the task location, the remaining time is the longest task time minus the time after the robot reaches the task location. The task location indicates the location where the task occurs, which is also the location the robot needs to reach. The task status indicates whether the task has been assigned, whether it has been executed, and to which step the task has been executed. The task status may include unassigned, assigned, executing, processing, and completed. Unassigned means that the task has not been assigned to a specific robot, assigned means that the task has been assigned to a specific robot but the robot has not yet taken action, executing means that the robot to which the task is assigned is heading to the task location of the task, processing means that the robot to which the task is assigned has arrived at the task location of the task and is processing the task, and completed means that the robot to which the task is assigned has completed the processing. Task creation time indicates the time when the task data is added to the task collection.
[0053] The task data in the task collection has a task status of unassigned or assigned. The task data with a task status of executing, processing, or completed will not be added to the task collection.
[0054] The robot set includes a plurality of robot data, and the robot data is uploaded by robots deployed in the target city.
[0055] The robot data includes the robot number, robot position, robot status, etc. The robot number is used to distinguish the robot from other robots. The robot position indicates the location of the robot at the current moment. The robot status indicates whether the machine is performing a task.
[0056] When the robot data in the robot set has a robot status of executing a task and the task status of the task being executed is in progress, the robot data will be removed from the robot set, while robots in other states will not be removed from the robot set. It is understandable that when the robot status is executing a task and the task status of the task being executed is in progress, it means that the position of the robot is changing, and it is impossible to accurately calculate the corresponding task calculation time in the task data when the task is assigned to the robot.
[0057] Taking the cleaning task as an example, the task data structure of the cleaning task is: Cleaning task cleanTask: Each robot goes to the designated collection device area to perform cleaning actions. The cleaning task includes information (task ID: taskId; task priority priority; robot number: robotNo; task calculation time: preTime; task remaining time: remainTime; cleaning position: cleanPosition; task status taskStatus (unassigned 0, assigned 1, executing 2, cleaning 3, completed 4); task creation time createTime).
[0058] The robot data structure of the robot is: robot robot: (number: robotNo, current position of the robot: robotPosition, whether it is executing a task: isTasking (yes 1, no 0)).
[0059] Robot set robotSet: except for the robot associated with cleanTask whose taskStatus is 2, other robots are included in robotSet.
[0060] Task set taskSet: taskStatus is unassigned / assigned. All cleanTasks are included in taskSet.
[0061] 102. Combine multiple task data in the task set with multiple robot data in the robot set to obtain multiple scheduling instances.
[0062] In an embodiment of the present invention, multiple task data in a task set are combined with multiple robot data in a robot set, so that each robot data corresponds to at least one task data, and one robot data and the corresponding at least one task data constitute a scheduling instance, that is, each scheduling instance includes a target robot data and at least one target task data.
[0063] 103. For each scheduling instance, based on a target robot data and at least one target task data, determine a total task execution time corresponding to each scheduling instance.
[0064] In an embodiment of the present invention, after obtaining multiple scheduling instances, the total task execution time can be calculated for each scheduling instance to obtain the total task execution time required for each scheduling instance. The above-mentioned total task execution time may include the sum of the task calculation time and the task remaining time in each target task data, that is, the sum of the time required for the target robot to reach the task position and the time required for the target robot to perform task processing.
[0065] 104. Based on the total task execution time, determine target scheduling data in multiple scheduling instances.
[0066] In the embodiment of the present invention, target scheduling data can be screened out from multiple scheduling instances based on the goal of minimizing the total task execution time.
[0067] The above-mentioned target scheduling data includes at least one target robot data and all the task data in the task set. It can be understood that all target tasks can be performed by one target robot or by multiple target robots together.
[0068] In an embodiment of the present invention, a task set and a robot set are obtained, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data; the plurality of task data in the task set are combined with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, wherein each scheduling instance includes a target robot data and at least one target task data; for a scheduling instance, based on a target robot data and at least one target task data, the total task execution time corresponding to each scheduling instance is determined; based on the total task execution time, target scheduling data is determined in a plurality of scheduling instances, wherein the target scheduling data includes at least one target robot data and all task data. Multiple scheduling instances are obtained by combining the task set and the robot set, and the total task execution time of each scheduling instance is determined according to the target robot data and at least one target task data in the scheduling instance, and the scheduling instance is screened by using the total task execution time to obtain the target scheduling data, and the robot is scheduled for tasks by using the target scheduling data, so as to improve the work efficiency of the robot as a whole.
[0069] It can be understood that in the specific implementation of this application, it involves monitoring data, task data, robot data, urban governance data and other related data. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training, deployment and calling of large models, must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0070] Optionally, in the step of obtaining a task set and a robot set, an initial task set and an initial robot set can be created; task data of all tasks are obtained, the task data including task status; the task data is added to the initial task set according to the task status to obtain a task set; robot data of all robots are obtained, the robot data including robot status, and the robot data is added to the initial robot set according to the robot status to obtain a robot set.
[0071] In an embodiment of the present invention, the above-mentioned task status can be used to indicate whether the task is assigned, whether it is executed and to which step the task is executed. The above-mentioned task status may include unassigned, assigned, executing, processing, and completed, wherein unassigned means that the task is not assigned to a specific robot, assigned means that the task has been assigned to a specific robot but the robot has not yet taken action, executing means that the robot to which the task is assigned is heading to the task location of the task, processing means that the robot to which the task is assigned has arrived at the task location of the task and is processing the task, and completed means that the robot to which the task is assigned has completed processing.
[0072] Task data with unassigned and assigned task statuses may be added to the initial task set to obtain a task set.
[0073] The robot status indicates whether the machine is executing a task. The robot status can include executing a task or not executing a task. For a robot data, if its robot status is executing a task and the task status of the task being executed is in progress, it will not be added to the initial robot set. For robot data in other cases, it will be added to the initial robot set.
[0074] In a possible embodiment, the robot data of all robots can be added to the initial robot set to obtain a robot set to be processed; in the robot set to be processed, the robot data to be deleted is determined, and the robot status in the robot data to be deleted is executing a task, and the task status in the corresponding assigned task data is executing, which means that the position of the robot may change at any time; the robot data to be deleted can be deleted from the robot set to be processed, and after all the robot data to be deleted in the robot set to be processed are deleted, a robot set is obtained.
[0075] Taking the cleaning task as an example, independent threads maintain the addition and deletion operations of the robotSet and taskSet data sets.
[0076] For the robot set robotSet: initialize the normal robot and add it to robotSet. The robot is removed from robotSet only when isTasking is 1 and the associated cleanTask taskStatus is 2. Other scenarios are included in robotSet.
[0077] For the task set taskSet: cleanTask includes taskStatus in taskSet when it is 0 / 1, and removes it from taskSet in other states.
[0078] By constructing a task set based on task status, it is possible to filter out task data that is being executed, processed, and completed. By constructing a robot set based on robot status, it is possible to filter out robots whose positions cannot be determined, thereby improving the accuracy of task allocation.
[0079] Optionally, the task data also includes task position and task remaining time, and the robot data also includes robot position. For each scheduling instance, based on a target robot data and at least one target task data, in the step of determining the total task execution time corresponding to each scheduling instance, for a scheduling instance, if there is only one target task data, the first task calculation time can be determined according to the robot position in the target robot data and the task position in the target task data; the total task execution time corresponding to the scheduling instance can be determined based on the first task calculation time and the task remaining time in the target task data; for a scheduling instance, if there are multiple target task data, the second task calculation time can be determined according to the robot position in the target robot data and the task positions in multiple target task data; and the total task execution time corresponding to the scheduling instance can be determined based on the sum of the second task calculation time and the task remaining time in multiple target task data.
[0080] In the embodiment of the present invention, the task location indicates the location where the task occurs, and is also the location that the robot needs to reach. The task remaining time indicates the time required for the corresponding robot to perform the task. If the robot has not reached the task location, the task remaining time is the maximum task time. If the robot has reached the task location, the remaining time is the maximum task time minus the time after the robot reaches the task location.
[0081] For each scheduling instance, if there is only one target task, the time required for the target robot to move from the robot position to the task position can be calculated based on the robot's walking speed to obtain the first task calculation time. The first task calculation time is added to the remaining task time to obtain the total task execution time corresponding to the scheduling instance.
[0082] For each scheduling instance, if there are multiple target task data, there will be multiple task positions. The task position in the previous task data can be used as the robot position corresponding to the next task data, and then the total time required for the robot position to reach each task position in turn is calculated to obtain the second task calculation time. The sum of the remaining task time in all target task data is calculated to obtain the total task remaining time, and the total task remaining time is added to the second task calculation time to obtain the total task execution time corresponding to the scheduling instance.
[0083] Taking the cleaning task as an example, cleanTask preTime: The task calculation time is mainly calculated by the two coordinate positions of cleanPosition and robotPosition. When a robot is assigned 2 cleanTasks, the end position information of the first task needs to be used as robotPosition when calculating the preTime of the second cleanTask. Robot total task time: The robot total task execution time is the sum of the preTime of all cleanTasks associated with the robot when taskStatus is 1 + remainTime of taskStatus is 3.
[0084] Suppose there are three tasks, task t1 (taskStatus = 1, preTime = 10s, remainTime = 20s), task t2 (taskStatus = 1, preTime = 20s, remainTime = 20s), task t3 (taskStatus = 3, remainTime = 15s), then the total task execution time of the robot is 10 + 20 + 20 + 20 + 15 = 85s. That is, the total task execution time of this scheduling instance is 85s.
[0085] Optionally, in the step of determining the second task calculation time based on the robot position in the target robot data and the task position in multiple target tasks, the multiple target task data can be numbered and sorted by number; based on the multiple task positions of the multiple target task data, a task path is determined by sorting by number, and the task path includes multiple task positions; based on the robot position in the target robot data and each of the task positions in the task path, the second task calculation time is determined; based on the second task calculation time and the sum of the remaining time of the tasks in the multiple target task data, the total task execution time corresponding to the scheduling instance is determined.
[0086] In the embodiment of the present invention, if there are multiple target task data in a scheduling instance, they can be sorted according to the numbers of the target task data. The numbers of the target task data from small to large can represent the execution order of the tasks corresponding to the target task data, and the tasks with small numbers are executed first. Therefore, when there are multiple target task data in a scheduling instance, the task positions corresponding to the multiple target task data can be sorted and connected according to the order of numbers from small to large to form a task path. The nodes on the task path represent the task positions.
[0087] The time required for the target robot to complete the task path can be calculated based on the robot's walking speed as the second task calculation time. The sum of the remaining time of all target task data is calculated to obtain the total remaining time of the task. The total remaining time of the task is added to the second task calculation time to obtain the total task execution time corresponding to the scheduling instance.
[0088] When a scheduling instance has multiple target task data, the second task calculation time can be accurately calculated.
[0089] Optionally, the task data also includes task priority and task creation time. Multiple target tasks are numbered. In the step of sorting by number, the number of the target task data can be determined based on the task priority and task creation time. The higher the task priority and the longer the task creation time, the smaller the number. The target task data is sorted according to the corresponding number.
[0090] In the embodiment of the present invention, the task priority indicates whether the task needs to be processed first or not. The higher the priority, the more priority is needed. The task creation time indicates the time when the task data is added to the task set. The numbering of the target task data from small to large can indicate the execution order of the tasks corresponding to the target task data, and the tasks with small numbers are executed first.
[0091] Taking the cleaning task as an example, the tasks are numbered according to their priority and createTime, such as 1, 2, 3, etc. The higher the priority and the closer the createTime is, the smaller the number is, which means it will be executed first.
[0092] Optionally, in the step of determining target scheduling data from multiple scheduling instances based on the total task execution time, at least one scheduling instance having the smallest sum of total task execution time from the multiple scheduling instances may be determined as the target scheduling data.
[0093] In the embodiment of the present invention, after the total task execution time of multiple scheduling instances is obtained, a scheduling instance combination with the smallest total task execution time may be selected to determine the target scheduling data.
[0094] Take the cleaning task as an example. Given taskSet(t1, t2, t3) and robot(r1, r2)
[0095] Perform task numbering operations on the task set taskSet. The numbers are, for example, 1, 2, 3, ... The higher the priority, the closer the createTime, and the smaller the number, which means it will be executed first.
[0096] Combine the unit data in the task set taskSet and the robot set robotSet to give all theoretically possible task scheduling instances, and calculate the total task execution time of each scheduling instance.
[0097] By robot classification, multiple scheduling instances are output as follows:
[0098] r1: e1(r1#t1(10s)), e2(r1#t2(15s)), e3(r1#t3(13s)), e4(r1#t1 / t2(2 1s)), e5(r1#t1 / t3(23s)), e6(r1#t2 / t3(28s)), e7(r1#t1 / t2 / t3(35s));
[0099] r2: e8(r2#t1(16s)), e9(r2#t2(22s)), e10(r2#t3(17s)), e11(r2#t1 / t2(27 s)), e12(r2#t1 / t3(25s)), e13(r2#t2 / t3(26s)), e14(r2#t1 / t2 / t3(37s)).
[0100] Exemplarily, e1(r1#t1 / t2(10s)) represents the total task execution time of 10s for the r1 robot to execute tasks t1 and t2.
[0101] Under the condition that all cleaning tasks cleanTask can be included in the scheduling, the scheduling instance combination with the smallest total task execution time is selected. The final scheduling solution is calculated based on the above theoretical scheduling instance as follows:
[0102] e1(r1#t1(10s)), e13(r2#t2 / t3(26s)), the total task execution time is only 36s, which means that the r1 robot executes the t1 task and the r2 robot executes the t2 / t3 task. That is, the target scheduling data is (r1#t1, r2#t2 / t3).
[0103] By combining the target scheduling data with the shortest total working time, the work efficiency conversion rate is highest.
[0104] Optionally, in the step of determining the target scheduling data from the plurality of scheduling instances based on the total task execution time, the plurality of scheduling instances may be sorted in order of the total task execution time from small to large to obtain a first scheduling instance set, the first scheduling instance set including the sorted plurality of scheduling instances; in the first scheduling instance set, the scheduling instances that meet the screening conditions are sequentially screened out according to the sorting and added to the second scheduling instance set as available scheduling instances; wherein the screening conditions include: the target task data and the target robot data in the scheduling instance appear for the first time in the second scheduling instance set; or, the scheduling instance includes the target task data in the first available scheduling instance, and the target task data in the scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance is an available scheduling instance in the second scheduling instance set that has the same target robot data as the scheduling instance, and the second available scheduling instance is an available scheduling instance in the second scheduling instance set that has different target robot data from the scheduling instance; in the second scheduling instance set, if all target task data have corresponding available scheduling instances, the screening is stopped, and a final scheduling instance set is obtained based on the second scheduling instance set after the screening is completed; and the target scheduling data is determined based on the final scheduling instance set.
[0105] In an embodiment of the present invention, after obtaining the first scheduling instance set, the first scheduling instance is screened, and according to the above-mentioned screening conditions, the first scheduling instance in the first scheduling instance set can be directly added as an available scheduling instance to the second scheduling instance set; after the first scheduling instance is added as an available scheduling instance to the second scheduling instance set, the scheduling instances in the first scheduling instance set are screened in turn. During the screening process, the scheduling instance to be screened is taken as the current scheduling instance. If the target robot data and target task data in the current scheduling instance appear for the first time in the second scheduling instance set, the current scheduling instance can be directly added as an available scheduling instance to the second scheduling instance set. In the case where the target robot data and target task data in the current scheduling instance do not appear for the first time in the second scheduling instance set, if the current scheduling instance includes the target task data in the first available scheduling instance, and the target task data in the current scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance in the second scheduling instance set is replaced with the current scheduling instance. If the current scheduling instance does not include the target task data in the first available scheduling instance, and / or the target task data in the current scheduling instance has been correspondingly associated with the target robot data in the second available scheduling instance, the current scheduling instance is discarded. The target robot data of the first available scheduling instance is the same robot data as the target robot data in the current scheduling instance; the target robot data of the second available scheduling instance is different robot data from the target robot data in the current scheduling instance. In the second scheduling instance set, each time an available scheduling instance is added or replaced, it is detected whether all target task data have corresponding available scheduling instances in the second scheduling instance set. If all target task data have corresponding available scheduling instances in the second scheduling instance set, the screening is stopped to obtain the final scheduling instance set; based on the final scheduling instance set, the target scheduling data is determined.
[0106] After obtaining the first scheduling instance set, multiple scheduling instances can be sorted in ascending order of total task execution time, and screening can be performed based on the multiple sorted scheduling instances in the first scheduling instance set. The scheduling instances that meet the conditions are traversed and screened and added to the second scheduling instance set. In the second scheduling instance set, if all target task data have corresponding available scheduling instances in the second scheduling instance set, the screening is stopped, and the second scheduling instance set after the screening is completed is determined as the final scheduling instance set, which can improve the screening speed of the scheduling instance.
[0107] Take the cleaning task as an example. Given taskSet(t1, t2, t3) and robot(r1, r2)
[0108] Perform task numbering operations on the task set taskSet. The numbers are, for example, 1, 2, 3, ... The higher the priority, the closer the createTime, and the smaller the number, which means it will be executed first.
[0109] Combine the unit data in the task set taskSet and the robot set robotSet to give all theoretically possible task scheduling instances, and calculate the total task execution time of each scheduling instance.
[0110] By robot classification, multiple scheduling instances are output as follows:
[0111] r1: e1(r1#t1(10s)), e2(r1#t2(15s)), e3(r1#t3(13s)), e4(r1#t1 / t2(2 1s)), e5(r1#t1 / t3(23s)), e6(r1#t2 / t3(28s)), e7(r1#t1 / t2 / t3(35s));
[0112] r2: e8(r2#t1(16s)), e9(r2#t2(22s)), e10(r2#t3(17s)), e11(r2#t1 / t2(27 s)), e12(r2#t1 / t3(25s)), e13(r2#t2 / t3(26s)), e14(r2#t1 / t2 / t3(37s)).
[0113] Exemplarily, e1(r1#t1 / t2(10s)) represents the total task execution time of 10s for the r1 robot to execute tasks t1 and t2.
[0114] All scheduling instances are sorted in ascending order according to the total task execution time, and the first set of scheduling instances is obtained as follows:
[0115] e1(r1#t1(10s)), e3(r1#t3(13s)), e2(r1#t2(15s)), e8(r2#t1(16s)), e 10(r2#t3(17s)), e4(r1#t1 / t2(21s)), e9(r2#t2(22s)), e5(r1#t1 / t3(2 3s)), e12(r2#t1 / t3(25s)), e13(r2#t2 / t3(26s)), e11(r2#t1 / t2(27s)) , e6(r1#t2 / t3(28s)), e7(r1#t1 / t2 / t3(35s)), e14(r2#t1 / t2 / t3(37s).
[0116] Filter the scheduling instances from the beginning to the end, and include the ones that meet the conditions in the second scheduling instance set: Since the target task data t1 and the target robot data r1 in the scheduling instance e1 (r1#t1(10s)) appear for the first time in the second scheduling instance set, e1 (r1#t1(10s)) is included as an available scheduling instance in the second scheduling instance set. It is not true that all the target task data have corresponding available scheduling instances in the second scheduling instance set, and the scheduling instance e3 (r1#t3(13s)) is selected as the current scheduling instance. Since the target robot data r1 in the current scheduling instance e3 (r1#t3(13s)) does not appear for the first time in the second scheduling instance set, and the current scheduling instance e3 (r1#t3(13s)) does not include the target task data t1 in the first available scheduling instance e1 (r1#t1(10s)), the current scheduling instance e3 (r1#t3(13s)) is discarded, and the above discarding can be understood as not being included in the second scheduling instance set. Continue to filter the scheduling instance e2(r1#t2(15s)) as the current scheduling instance. Since the target robot data r1 in the current scheduling instance e2(r1#t2(15s)) does not appear for the first time in the second scheduling instance set, and the current scheduling instance e2(r1#t2(15s)) does not include the target task data t1 in the first available scheduling instance e1(r1#t1(10s)), the current scheduling instance e2(r1#t2(15s)) is discarded. Continue to filter the scheduling instance e8(r2#t1(16s)) as the current scheduling instance. Since the target task data t1 in the current scheduling instance e8(r2#t1(16s)) is not the first time to appear in the second scheduling instance set, and the target task data t1 in the current scheduling instance e8(r2#t1(16s)) has been correspondingly associated with the target robot data r1 in the second available scheduling instance e1(r1#t1(10s)), the current scheduling instance e8(r2#t1(16s)) is discarded. Continue to filter the scheduling instance e8(r2#t1(16s)) as the current scheduling instance. Since the target task data t3 and the target robot data r2 in the current scheduling instance e10(r2#t3(17s)) appear for the first time in the second scheduling instance set, the current scheduling instance e10(r2#t3(17s)) is directly included in the second scheduling instance set as an available scheduling instance.It is detected that the corresponding available scheduling instances for all target task data in the second scheduling instance set are not established, and the scheduling instance e4(r1#t1 / t2(21s)) is continued to be screened as the current scheduling instance. Since the target task data t1 in the current scheduling instance e4(r1#t1 / t2(21s)) does not appear for the first time in the second scheduling instance set, the current scheduling instance e4(r1#t1 / t2(21s)) includes the target task data t1 in the first available scheduling instance e1(r1#t1(10s)), and the target task data t1 / t2 in the current scheduling instance e4(r1#t1 / t2(21s)) is not associated with the target robot data r2 in the second available scheduling instance e10(r2#t3(17s)), then e4(r1#t1 / t2(21s)) replaces the first available scheduling instance e1(r1#t1(10s)). At this time, all target task data t1, t2, t3 have corresponding available scheduling instances in the second scheduling instance set (e10(r2#t3(17s)) and e4(r1#t1 / t2(21s))), and the screening is completed.
[0117] After calculation, the final scheduling plan is as follows: e10(r2#t3(17s)), e4(r1#t1 / t2(21s)) means that the r2 robot performs the t3 task, and the r1 robot performs the t1 / t2 task. That is, the target scheduling data is (r2#t3, r1#t1 / t2). It can be seen that when the calculation reaches e4(r1#t1 / t2(21s)), the screening ends and no subsequent scheduling instances need to be screened.
[0118] The above screening method can quickly see the scheduling effect, and some tasks can be completed more efficiently.
[0119] like Figure 2 As shown, an embodiment of the present invention provides a data processing device, the data processing device comprising:
[0120] A first acquisition module 201 is used to acquire a task set and a robot set, wherein the task set includes a plurality of task data and the robot set includes a plurality of robot data;
[0121] A first processing module 202 is used to combine the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of which includes a target robot data and at least one target task data;
[0122] The second processing module 203 is used to determine, for each of the scheduling instances, a total task execution time corresponding to each of the scheduling instances based on one of the target robot data and at least one of the target task data;
[0123] The third processing module 204 is used to determine target scheduling data in the multiple scheduling instances based on the total task execution time, and the target scheduling data includes at least one target robot data and all the task data in the task set.
[0124] Optionally, the first acquisition module 201 is also used to create an initial task set and an initial robot set; obtain the task data of all tasks, the task data including task status; add the task data to the initial task set according to the task status to obtain the task set; obtain the robot data of all robots, the robot data including robot status; add the robot data to the initial robot set according to the robot status to obtain the robot set.
[0125] Optionally, the task data also includes a task position and a remaining task time, and the robot data also includes a robot position. The second processing module 203 is also used to determine, for each of the scheduling instances, if there is only one target task data, a first task calculation time based on the robot position in the target robot data and the task position in the target task data; determine a total task execution time corresponding to the scheduling instance based on the first task calculation time and the remaining task time in the target task data; for each of the scheduling instances, if there are multiple target task data, determine a second task calculation time based on the robot position in the target robot data and the task positions in multiple target task data; and determine the total task execution time corresponding to the scheduling instance based on the sum of the second task calculation time and the remaining task time in multiple target task data.
[0126] Optionally, the second processing module 203 is also used to number the multiple target task data and sort them according to the numbers; based on the multiple task positions of the multiple target task data, determine the task path according to the sorting of the numbers, the task path includes the multiple task positions; determine the second task calculation time according to the robot position in the target robot data and the each task position in the task path; determine the total task execution time corresponding to the scheduling instance based on the second task calculation time and the sum of the remaining time of the tasks in the multiple target task data.
[0127] Optionally, the task data also includes task priority and task creation time. The second processing module 203 is also used to determine the number of the target task data based on the task priority and the task creation time. The higher the task priority and the longer the task creation time, the smaller the number. The target task data is sorted according to the corresponding number.
[0128] Optionally, the third processing module 204 is further configured to determine, among the multiple scheduling instances, at least one scheduling instance having the smallest sum of total task execution time as target scheduling data.
[0129] Optionally, the third processing module 204 is further used to sort the multiple scheduling instances in the order of the total task execution time from small to large, to obtain a first scheduling instance set, the first scheduling instance set including the sorted multiple scheduling instances; in the first scheduling instance set, the scheduling instances that meet the screening conditions are sequentially screened out according to the sorting and added to the second scheduling instance set as available scheduling instances; wherein the screening conditions include: the target task data and the target robot data in the scheduling instance appear for the first time in the second scheduling instance set; or, the scheduling instance includes the target task data in the first available scheduling instance, and the scheduling instance The target task data in the first available scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance is an available scheduling instance in the second scheduling instance set that has the same target robot data as the scheduling instance, and the second available scheduling instance is an available scheduling instance in the second scheduling instance set that has different target robot data from the scheduling instance; in the second scheduling instance set, if all the target task data have corresponding available scheduling instances, stop screening, and obtain a final scheduling instance set based on the second scheduling instance set after screening; based on the final scheduling instance set, determine the target scheduling data.
[0130] like Figure 3 As shown, an embodiment of the present invention further provides an electronic device, including a processor, and the processor can execute any one of the above data processing methods.
[0131] Specifically, it includes a processor 301 and a memory 302, and a computer program for executing the data processing method which is stored in the memory 302 and can be run on the processor 301, wherein:
[0132] The processor 301 runs the computer program of the data processing method stored in the memory 302 to perform the following steps:
[0133] Acquire a task set and a robot set, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data;
[0134] Combining the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of the scheduling instances including a target robot data and at least one target task data;
[0135] For each of the scheduling instances, based on one of the target robot data and at least one of the target task data, determining a total task execution time corresponding to each of the scheduling instances;
[0136] Based on the total task execution time, target scheduling data is determined in the plurality of scheduling instances, wherein the target scheduling data includes at least one target robot data and all the task data in the task set.
[0137] Optionally, the acquiring of the task set and the robot set executed by the processor 301 includes:
[0138] Create an initial task set and an initial robot set;
[0139] Acquire the task data of all tasks, wherein the task data includes task status;
[0140] Adding the task data to the initial task set according to the task status to obtain the task set;
[0141] Acquire the robot data of all robots, wherein the robot data includes robot status;
[0142] The robot data is added to the initial robot set according to the robot state to obtain the robot set.
[0143] Optionally, the task data further includes a task position and a remaining task time, the robot data further includes a robot position, and the processor 301 determines, for each of the scheduling instances, a total task execution time corresponding to each of the scheduling instances based on one of the target robot data and at least one of the target task data, including:
[0144] For each of the scheduling instances, if there is only one target task data, determining a first task calculation time according to the robot position in the target robot data and the task position in the target task data;
[0145] Determine the total task execution time corresponding to the scheduling instance based on the first task calculation time and the task remaining time in the target task data;
[0146] For each of the scheduling instances, if there are multiple target task data, determining the second task calculation time according to the robot position in the target robot data and the task positions in the multiple target task data;
[0147] Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
[0148] Optionally, the processor 301 determines the second task calculation time according to the robot position in the target robot data and the task positions in the plurality of target task data, including:
[0149] Numbering the plurality of target task data and sorting them according to the numbers;
[0150] Based on the plurality of task positions of the plurality of target task data, determining a task path in order of the serial numbers, wherein the task path includes the plurality of task positions;
[0151] Determining a second task calculation time according to the robot position in the target robot data and each of the task positions in the task path;
[0152] Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
[0153] Optionally, the task data further includes a task priority and a task creation time, and the numbering of the plurality of target task data and sorting by the numbering performed by the processor 301 includes:
[0154] Determine the number of the target task data based on the task priority and the task creation time, wherein the higher the task priority and the longer the task creation time, the smaller the number;
[0155] The target task data are sorted according to the corresponding numbers.
[0156] Optionally, the determining of target scheduling data in the plurality of scheduling instances based on the total task execution time performed by the processor 301 includes:
[0157] Among the multiple scheduling instances, at least one scheduling instance with the smallest sum of total task execution time is determined as target scheduling data.
[0158] Optionally, the determining of target scheduling data in the plurality of scheduling instances based on the total task execution time performed by the processor 301 includes:
[0159] Sorting the plurality of scheduling instances in ascending order of the total task execution time to obtain a first scheduling instance set, wherein the first scheduling instance set includes the sorted plurality of scheduling instances;
[0160] In the first scheduling instance set, the scheduling instances that meet the screening conditions are sequentially screened out according to the sorting and added to the second scheduling instance set as available scheduling instances; wherein the screening conditions include: the target task data and the target robot data in the scheduling instance appear for the first time in the second scheduling instance set; or, the scheduling instance includes the target task data in the first available scheduling instance, and the target task data in the scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance is the available scheduling instance in the second scheduling instance set that has the same target robot data as the scheduling instance, and the second available scheduling instance is the available scheduling instance in the second scheduling instance set that has different target robot data from the scheduling instance;
[0161] In the second scheduling instance set, if all the target task data have corresponding available scheduling instances, the screening is stopped, and a final scheduling instance set is obtained based on the second scheduling instance set after the screening is completed;
[0162] Based on the final scheduling instance set, target scheduling data is determined.
[0163] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the computer program implements the various processes of the data processing method or the application-side data processing method provided by the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0164] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0165] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A data processing method, characterized in that: The method comprises the following steps: Acquire a task set and a robot set, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data; Combining the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of the scheduling instances including a target robot data and at least one target task data; For each of the scheduling instances, based on one of the target robot data and at least one of the target task data, determining a total task execution time corresponding to each of the scheduling instances; Based on the total task execution time, target scheduling data is determined in the plurality of scheduling instances, wherein the target scheduling data includes at least one target robot data and all the task data in the task set.
2. The data processing method according to claim 1, characterized in that: The step of obtaining a task set and a robot set includes: Create an initial task set and an initial robot set; Obtaining task data of all tasks, wherein the task data includes task status; Adding the task data to the initial task set according to the task status to obtain the task set; Acquire robot data of all robots, wherein the robot data includes robot status; The robot data is added to the initial robot set according to the robot state to obtain the robot set.
3. The data processing method according to claim 2, characterized in that: The task data further includes a task location and a task remaining time, the robot data further includes a robot location, and for each of the scheduling instances, based on one of the target robot data and at least one of the target task data, determining a total task execution time corresponding to each of the scheduling instances, including: For each of the scheduling instances, if there is only one target task data, determining a first task calculation time according to the robot position in the target robot data and the task position in the target task data; Determine the total task execution time corresponding to the scheduling instance based on the first task calculation time and the task remaining time in the target task data; For each of the scheduling instances, if there are multiple target task data, determining the second task calculation time according to the robot position in the target robot data and the task positions in the multiple target task data; Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
4. The data processing method according to claim 3, characterized in that: The determining of the second task calculation time according to the robot position in the target robot data and the task positions in the plurality of target task data comprises: Numbering the plurality of target task data and sorting them according to the numbers; Based on the plurality of task positions of the plurality of target task data, determining a task path in order of the serial numbers, wherein the task path includes the plurality of task positions; Determining a second task calculation time according to the robot position in the target robot data and each of the task positions in the task path; Based on the second task calculation time and the sum of the remaining time of the tasks in the plurality of target task data, the total task execution time corresponding to the scheduling instance is determined.
5. The data processing method according to claim 4, characterized in that: The task data also includes task priority and task creation time. The numbering of the plurality of target task data and sorting by the numbers includes: Determine the number of the target task data based on the task priority and the task creation time, wherein the higher the task priority and the longer the task creation time, the smaller the number; The target task data are sorted according to the corresponding numbers.
6. The data processing method according to any one of claims 1 to 5, characterized in that: The determining target scheduling data in the plurality of scheduling instances based on the total task execution time includes: Among the multiple scheduling instances, at least one scheduling instance with the smallest sum of total task execution time is determined as target scheduling data.
7. The data processing method according to any one of claims 1 to 5, characterized in that: The determining target scheduling data in the plurality of scheduling instances based on the total task execution time includes: Sorting the plurality of scheduling instances in ascending order of the total task execution time to obtain a first scheduling instance set, wherein the first scheduling instance set includes the sorted plurality of scheduling instances; In the first scheduling instance set, the scheduling instances that meet the screening conditions are sequentially screened out according to the sorting and added to the second scheduling instance set as available scheduling instances; wherein the screening conditions include: the target task data and the target robot data in the scheduling instance appear for the first time in the second scheduling instance set; or, the scheduling instance includes the target task data in the first available scheduling instance, and the target task data in the scheduling instance is not correspondingly associated with the target robot data in the second available scheduling instance, the first available scheduling instance is the available scheduling instance in the second scheduling instance set that has the same target robot data as the scheduling instance, and the second available scheduling instance is the available scheduling instance in the second scheduling instance set that has different target robot data from the scheduling instance; In the second scheduling instance set, if all the target task data have corresponding available scheduling instances, the screening is stopped, and a final scheduling instance set is obtained based on the second scheduling instance set after the screening is completed; Based on the final scheduling instance set, target scheduling data is determined.
8. A data processing device, characterized in that: The data processing device comprises: A first acquisition module is used to acquire a task set and a robot set, wherein the task set includes a plurality of task data, and the robot set includes a plurality of robot data; A first processing module, configured to combine the plurality of task data in the task set with the plurality of robot data in the robot set to obtain a plurality of scheduling instances, each of which includes a target robot data and at least one target task data; A second processing module is used to determine, for each of the scheduling instances, a total task execution time corresponding to each of the scheduling instances based on one of the target robot data and at least one of the target task data; The third processing module is used to determine target scheduling data in the multiple scheduling instances based on the total task execution time, and the target scheduling data includes at least one target robot data and all the task data in the task set.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the data processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the data processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Vehicle-mounted wireless charging device for avoiding impact on driving safety
CN108551185A
Heterogeneous robot cluster task allocation method, system and device and storage medium
CN113256125A
Robot scheduling method, scheduling platform and system
CN114415691A
Automatic driving sanitation vehicle scheduling method, device and equipment and storage medium
CN115358589A
Task scheduling system and method for logistics transfer robot
CN116679636A
