Method, device, server and medium for performing tasks

Through the pluggable design of pre-occupying public resources and custom business information, the problems of high coupling and poor reuse caused by different device command flows in logistics task scheduling are solved, and the task execution success rate and scheduling flexibility are improved. More efficient task coordination.

CN113641492BActive Publication Date: 2025-01-07BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110916623.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-11
Publication Date
2025-01-07
Estimated Expiration
2041-08-11

AI Technical Summary

Technical Problem

In the logistics task scheduling, the coupling is high due to different equipment command flows, and new equipment cannot be added directly, and the reusability is poor, resulting in low task execution success rate and insufficient scheduling flexibility.

Method used

By preserving public resources as a prerequisite in the task sequence, the task execution success rate is improved, and the task scheduling method is expanded through pluggable design of custom business information, improving the flexibility and reusability of task scheduling.

Benefits of technology

It improves the success rate of task execution and scheduling flexibility, reduces coupling, enhances the reusability of task scheduling, and supports multi-device coordination and flexible business process design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113641492B_ABST
    Figure CN113641492B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose methods, devices, servers and media for executing tasks. A specific implementation of the method includes: obtaining preset type task information, wherein the preset type task information includes information about a task sequence that needs to be executed by at least one preset device and public resources that need to be occupied by the task; in response to determining that the public resources that need to be occupied are successfully pre-occupied, sending a preset type task to a target preset device, wherein the target preset device includes a preset device corresponding to the task to which the successfully pre-occupied public resources belong; in response to receiving a task processing result sent by the target preset device, further executing the task indicated by the task information based on preset custom business information; in response to determining that the task indicated by the task information has been executed and meets the resource release conditions, releasing the public resources corresponding to the preset type task information. This implementation improves the flexibility and reusability of task scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, server, and medium for executing a task. Background Art

[0002] With the rapid development of Internet technology, task scheduling management in the fields of intelligent warehousing and smart logistics has also been increasingly applied. For example, tasks such as cargo transportation and handling in the warehousing and logistics field often require the coordination of multiple devices such as self-driving cars, robotic arms, conveyor belts, stackers, and elevators, which consist of a series of tasks such as calling AGV (Automated Guided Vehicle), robotic arm grabbing tasks, and cargo showering tasks in cargo shower rooms.

[0003] In the prior art, the above-mentioned logistics tasks are often based on a fixed business process. During development, different interfaces are developed according to different businesses to aggregate information and then forward it. As a result, new equipment cannot be directly added to the original process because different devices are implemented based on different command streams. In addition, the coupling is high, which is not conducive to reuse. Summary of the invention

[0004] Embodiments of the present disclosure provide methods, devices, servers, and media for performing tasks.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for executing a task, the method comprising: obtaining preset type task information, wherein the preset type task information includes information on a task sequence to be executed by at least one preset device and public resources to be occupied by the task, the public resources including resources to be competed for and occupied by at least two tasks; in response to determining that the public resources to be occupied are successfully pre-occupied, issuing a preset type task to a target preset device, wherein the target preset device includes a preset device corresponding to the task to which the successfully pre-occupied public resources belong; in response to receiving a task processing result sent by the target preset device, further executing the task indicated by the preset type task information based on preset custom business information; in response to determining that the task indicated by the preset type task information has been completed and a resource release condition has been met, releasing the public resources corresponding to the preset type task information.

[0006] In a second aspect, an embodiment of the present disclosure provides a device for executing tasks, the device comprising: an acquisition unit, configured to acquire preset type task information, wherein the preset type task information includes information on a task sequence to be executed by at least one preset device and public resources to be occupied by the task, and the public resources include resources to be competed for and occupied between at least two tasks; a sending unit, configured to, in response to determining that the public resources to be occupied are successfully pre-occupied, send the preset type task to a target preset device, wherein the target preset device includes the preset device corresponding to the task to which the successfully pre-occupied public resources belong; an execution unit, configured to, in response to receiving a task processing result sent by the target preset device, further execute the task indicated by the preset type task information based on preset custom business information; a releasing unit, configured to release the public resources corresponding to the preset type task information in response to determining that the task indicated by the preset type task information has been completed and a resource release condition has been met.

[0007] In a third aspect, an embodiment of the present disclosure provides a server, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.

[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0009] The method, device, server and medium for executing tasks provided by the embodiments of the present disclosure improve the success rate of task execution by pre-occupying public resources as a prerequisite for executing tasks in a task sequence indicated by preset type task information; and expand the task scheduling method through a pluggable design that supports preset custom business information, thereby improving the flexibility and reusability of task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0012] Figure 2a is a flow chart of one embodiment of a method for performing a task according to the present disclosure;

[0013] Figure 2b , 2cis a schematic diagram of common resources in one embodiment of a method for performing a task according to the present disclosure;

[0014] Figure 3 is a schematic diagram of an application scenario of a method for performing a task according to an embodiment of the present disclosure;

[0015] Figure 4 is a flowchart of yet another embodiment of a method for performing a task according to the present disclosure;

[0016] Figure 5 is a structural schematic diagram of an embodiment of an apparatus for performing a task according to the present disclosure;

[0017] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0018] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0019] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0020] Figure 1 An exemplary architecture 100 is shown to which the method for performing a task or the apparatus for performing a handling task of the present disclosure can be applied.

[0021] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0022] The terminal devices 101, 102, 103 interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices that can perform actions in handling tasks, including but not limited to self-driving cars, robotic arms, conveyor belts, stackers, elevators, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0023] The server 105 may be a server providing various services, such as a background server that issues specific tasks to the terminal devices 101, 102, 103, such as a TMC (Transaction Message Center). The background server may analyze and process the acquired handling task information, and issue the handling task to the terminal device according to the processing result.

[0024] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, software or software modules used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0025] It should be noted that the method for executing a task provided by the embodiments of the present disclosure is generally executed by the server 105 , and accordingly, the device for executing a task is generally disposed in the server 105 .

[0026] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0027] Continuing to refer to FIG. 2 , a process 200 of an embodiment of a method for performing a task according to the present disclosure is shown. The method for performing a task comprises the following steps:

[0028] Step 201, obtaining preset type task information.

[0029] In this embodiment, the execution subject (such as Figure 1The server 105 shown in the figure can obtain the preset type task information through a wired connection or a wireless connection. The preset type task information may include information about the task sequence to be executed by at least one preset device and the public resources to be occupied by the task. The public resources may include resources to be occupied by at least two tasks.

[0030] In this embodiment, the above-mentioned execution subject can obtain pre-stored preset type task information locally, or obtain preset type task information sent by an electronic device (such as an upstream device) that is in communication with it. Among them, the above-mentioned preset equipment may include various equipment for scheduling to perform preset type tasks. It may include but is not limited to at least one of the following: an autonomous driving vehicle, a robotic arm, a conveyor belt, a stacker, and an elevator. The above-mentioned public resources may generally include static equipment, such as elevators, robotic arms, and the like. The above-mentioned preset type tasks may accordingly include but are not limited to at least one of the following: calling AGV tasks, handling tasks, robotic arm grabbing tasks, cargo shower room cargo shower tasks, etc.

[0031] As an example, when the execution of task 1 depends on device A, device B, and device C in sequence, the execution of task 2 depends on device D and device C in sequence, and the execution of task 3 depends on device E and device C in sequence, the device C is a public resource.

[0032] In some optional implementations of this embodiment, the execution subject may also obtain task information according to the following steps:

[0033] The first step is to receive the handling tasks to be parsed issued by the warehouse management system.

[0034] In these implementations, the execution entity may receive the unresolved transport tasks issued by the warehouse management system (WMS) in various ways. The unresolved transport tasks are used to indicate the transport start point and the transport end point of the target goods. As an example, the unresolved transport tasks may include "transporting goods x from shelf 007, area A, to shelf 003, area C, area 7".

[0035] In the second step, the handling task to be analyzed is analyzed according to preset rules to generate a task sequence including tasks that need to be performed by at least one preset device.

[0036] In these implementations, the execution subject may parse the handling tasks to be parsed received in the first step according to preset rules in various ways to generate a task sequence including tasks that need to be performed by at least one preset device. The preset rules may be used to indicate the correspondence between the handling tasks to be parsed and the task sequence of tasks that need to be performed by at least one preset device. As an example, the tasks in the task sequence may be combined as preset detachable parts to obtain the complete task indicated by the handling tasks to be parsed.

[0037] The third step is to search the preset public resource configuration table for information on the public resources that need to be occupied and that correspond to the tasks in the task sequence.

[0038] In these implementations, the execution subject can search for information on the public resources that need to be occupied corresponding to the tasks in the task sequence generated in the second step from the preset public resource configuration table in various ways. The preset public resource configuration table can be used to indicate the corresponding relationship between the tasks and the public resources that need to be occupied.

[0039] The fourth step is to generate the transport task information according to the generated task sequence and the corresponding information of the public resources that need to be occupied.

[0040] In these implementations, according to the task sequence generated in the second step and the corresponding information on the public resources to be occupied found in the third step, the execution subject can generate the handling task information in various ways. As an example, the execution subject can combine the task sequence generated in the second step and the corresponding information on the public resources to be occupied found in the third step to generate the handling task information. Optionally, the execution subject can also generate a corresponding identifier for the handling task information to distinguish different handling task information.

[0041] Optionally, based on the above optional implementation, the above preset type task information may include a subtask sequence group, wherein the subtask sequence in the above subtask sequence group may include at least one subtask.

[0042] In these implementations, the above subtasks are usually used to characterize a single action event of a device. They can be regarded as the smallest execution unit of a device process. Usually, the subtask sequences in the above subtask sequence group can be executed sequentially or in parallel. The subtasks in the above subtask sequence are usually executed sequentially.

[0043] Based on the above optional implementation, this solution can decompose the complete preset type task indicated by the preset type task information to form multiple subtask sequence groups. Since the subtask sequences in the subtask sequence group can be executed in parallel, it greatly alleviates the problem that other tasks cannot be executed due to the long process of a complete preset type task and the device resources occupied cannot be released for a long time.

[0044] Optionally, based on the above optional implementation, see Figure 2b , the above preset public resource configuration table can be generated by the following steps:

[0045] S1. Determine whether there is only one path between a first common resource occupied by a first subtask sequence and a second common resource occupied by a second subtask sequence.

[0046] In these implementations, the execution subject may first determine the first subtask sequence (eg Figure 2b The first common resource occupied by subtask A in Figure 2b Device 1 in the second subtask sequence (eg Figure 2b The second common resource (e.g. Figure 2b Is there only one path between the devices in 2)?

[0047] Optionally, the first subtask sequence and the second subtask sequence may belong to the same preset type of task information.

[0048] S2. Determine, according to the subtask sequence group to which the second subtask sequence belongs, whether the first common resource is a common resource required to be occupied by a next subtask sequence of the second subtask sequence.

[0049] In these implementations, according to the subtask sequence group to which the second subtask sequence belongs, the execution subject may determine whether the first common resource in step S1 is a common resource required to be occupied by the next subtask sequence of the second subtask sequence.

[0050] S3. Determine, according to the subtask sequence group to which the first subtask sequence belongs, whether the second common resource is a common resource required to be occupied by a next subtask sequence of the first subtask sequence.

[0051] In these implementations, according to the subtask sequence group to which the first subtask sequence belongs, the execution subject may determine whether the second common resource in step S1 is a common resource required to be occupied by the next subtask sequence of the first subtask sequence.

[0052] S4. In response to determining that all three of the above are yes, increase the number of the first common resource or the second common resource.

[0053] In these implementations, in response to determining that all three of the above are true, the execution subject may increase the number of the first public resource or the second public resource. Figure 2c , the execution entity may increase the number of the second public resources corresponding to the first subtask sequence by 1 in the preset public resource configuration table.

[0054] Based on the above optional implementation methods, this solution can solve the above resource hedging problem by increasing the number of first public resources or second public resources, thereby increasing the rationality of the public resource configuration table and helping to improve the execution efficiency of preset type tasks.

[0055] Step 202: In response to determining that the public resources to be occupied are successfully pre-occupied, a preset type task is issued to a target preset device.

[0056] In this embodiment, in response to determining that the public resource to be occupied is successfully pre-occupied, the execution subject may issue a preset type task to the target preset device. The target preset device may include a preset device corresponding to the task to which the successfully pre-occupied public resource belongs. The preset type task is usually a task in a task sequence that needs to be executed by at least one of the preset devices.

[0057] In this embodiment, the execution subject may pre-occupy the public resources in various ways. As an example, the execution subject may select a task that needs to occupy the public resources from the task sequence that needs to be executed by the at least one preset device, and determine whether the public resources that need to be occupied by the task can be occupied (for example, whether they are in an idle state). In response to determining that the public resources can be occupied, the execution subject may determine that the pre-occupation is successful. Then, the execution subject may send the task to the target preset device for executing the task as a preset type task.

[0058] In some optional implementations of this embodiment, in response to determining that the public resources to be occupied are successfully pre-occupied, the execution subject may also send the preset type to the target preset device according to the following steps:

[0059] The first step is to select a preset type of task information from at least one preset type of task information obtained, and perform the following polling steps:

[0060] In these implementations, the execution subject may store the acquired preset type task information. The execution subject may select the preset type task information from the stored plurality of preset type task information, and perform the following steps S1-S3:

[0061] S1. Determine whether the public resources required to be occupied corresponding to the first subtask sequence in the subtask sequence group in the selected preset type task information are successfully pre-occupied.

[0062] In these implementations, the execution subject may determine whether the public resources required to be occupied corresponding to the first subtask sequence in the subtask sequence group in the selected preset type task information are successfully pre-occupied in a manner similar to the above.

[0063] S2. In response to determining that the pre-occupancy is successful, sending the selected preset type task information.

[0064] In these implementations, in response to determining that the pre-occupancy is successful, the execution subject may issue the selected preset type task information. As an example, the execution subject may send the preset type task in the selected preset type task information to the corresponding preset device.

[0065] S3, determining whether there is any unselected task information of a preset type in the at least one preset task information acquired;

[0066] In these implementations, the execution entity may determine whether there is any unselected task information of a preset type in the acquired at least one task information of a preset type.

[0067] In the second step, in response to determining that the information exists, reselect unselected preset type task information from the acquired at least one preset type task information, and continue to execute the above polling step.

[0068] In these implementations, in response to determining that there is, the execution subject may reselect unselected preset type task information from the acquired at least one preset type task information, and continue to execute the above steps S1-S3.

[0069] Based on the above optional implementation methods, this solution provides a method for processing preset type tasks that successfully pre-occupy public resources in a polling manner, enriching the scheduling method of preset type tasks.

[0070] In some optional implementations of this embodiment, in response to determining that the public resources to be occupied are successfully pre-occupied, the execution subject may also issue a preset type task to the target preset device according to the following steps:

[0071] The first step is to query the delivery method corresponding to the first subtask sequence in the preset type task information corresponding to the successfully reserved public resource according to the preset delivery method comparison table.

[0072] In these implementations, according to the preset dispatching method comparison table, the execution subject can query the dispatching method corresponding to the first subtask group in the preset type task information corresponding to the successfully reserved public resource. The dispatching method comparison table can be used to characterize the correspondence between the subtask sequence and the dispatching method.

[0073] In the second step, according to the queried delivery method, the corresponding interface is called to deliver the preset type task to the agent corresponding to the target preset device.

[0074] In these implementations, according to the delivery method found in the first step, the execution subject can call the corresponding interface in various ways to deliver the preset type task to the agent corresponding to the target preset device. The agent can specifically execute the corresponding task delivery step.

[0075] Based on the above optional implementation methods, this solution can set the task delivery method by configuring the preset delivery method comparison table, thereby enriching the task delivery method.

[0076] Step 203: in response to receiving the task processing result sent by the target preset device, further executing the task indicated by the preset type task information based on the preset custom service information.

[0077] In this embodiment, in response to receiving the task processing result sent by the target preset device, the above-mentioned execution subject can further execute the task indicated by the preset type task information based on the preset custom business information in various ways. Among them, the above-mentioned preset custom business information can be used to indicate whether there are additional custom task processes. As an example, in response to determining that there are no additional custom task processes, the above-mentioned execution subject can continue to execute the next task of the task corresponding to the above-mentioned task processing result. As another example, in response to determining that there are additional custom task processes, the above-mentioned execution subject can first execute the above-mentioned custom task process. In response to determining that the above-mentioned custom task process has been executed, the above-mentioned execution subject can continue to execute the next task of the task corresponding to the above-mentioned task processing result.

[0078] Step 204: in response to determining that the task indicated by the preset type task information is completed and satisfies the resource release condition, release the public resources corresponding to the preset type task information.

[0079] In this embodiment, in response to determining that the task indicated by the preset type task information is completed and meets the resource release condition, the execution subject may release the public resource corresponding to the preset type task information in various ways. The resource release condition may include whether the current node belongs to a preset resource release node. The resource release condition may also include that the current node is the last node of the task.

[0080] As an example, the execution subject may modify the state of the public resources occupied by the completed task to idle.

[0081] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of a method for performing a task according to an embodiment of the present disclosure. Figure 3 In the application scenario, the server 301 obtains preset type task information 302. The preset type task information 302 may include a task sequence consisting of tasks 3021, 3022, and 3023 and information 3024, 2025, and 3026 of public resources that the corresponding tasks need to occupy. In response to determining that task 3021 successfully pre-occupies device 1, the server 301 sends a preset type task (e.g., Figure 3 In response to receiving the task processing result 304 sent by the target device 3031, the server 301 can further execute tasks 3022 and 3023 based on the custom business information 305 (for example, "empty") (for example, sending tasks 3022 and 3023 to the target devices 3032 and 3033 in sequence). In response to receiving the information 307 indicating successful execution sent by the target device 3033, the server 301 can determine that the task execution is completed and release the resources of device 1, device 2, and device 3.

[0082] At present, one of the existing technologies is usually based on a fixed business process. During development, different interfaces are developed according to different businesses to aggregate information and then forward it. As a result, new devices cannot be directly added to the original process because different devices are implemented based on different command flows, and the coupling is high, which is not conducive to reuse. The method provided by the above-mentioned embodiment of the present disclosure improves the success rate of task execution by taking pre-occupied public resources as a prerequisite for executing tasks in the task sequence indicated by the preset type of task information; and the task scheduling method is expanded by supporting a pluggable design of preset custom business information, thereby improving the flexibility and reusability of task scheduling.

[0083] Further references Figure 4 , which shows a process 400 of another embodiment of a method for performing a task. The process 400 of the method for performing a task includes the following steps:

[0084] Step 401, obtaining preset type task information.

[0085] In this embodiment, the preset type task information may include a subtask sequence group, wherein the subtask sequence in the subtask sequence group may include subtasks.

[0086] Step 402: In response to determining that the public resources to be occupied are successfully pre-occupied, a preset type task is issued to a target preset device.

[0087] Step 403 , in response to receiving the task processing result sent by the target preset device, querying whether there is a custom service matching the task processing result according to the preset custom service configuration table.

[0088] In this embodiment, in response to receiving the task processing result sent by the target preset device, the execution subject (for example Figure 1 The server 105 shown in the figure can query whether there is a custom service matching the task processing result according to the preset custom service configuration table in various ways. Among them, the preset custom service configuration table can be used to indicate various custom services. As an example, it can include but is not limited to at least one of the following: adding a service before event creation, adding an event representing resource release after the task is completed; adding a service before task execution; adding a feedback event after task execution, etc.

[0089] In some optional implementations of this embodiment, the above-mentioned preset custom business configuration table may include a custom reflection method. The above-mentioned custom reflection method may be generated according to the identifier of the preset type task information, the identifier of the subtask sequence group, and the identifier of the subtask in the subtask sequence. The above-mentioned custom reflection method may be used to indicate that at least one of the following is executed when the preset point is executed: issuing a custom task, feeding back task completion information, occupying the first device resources, releasing the second device resources, and reporting device status information.

[0090] In these implementations, the first device resources and the second device resources may be the same or different, which is not limited here.

[0091] Based on the above optional implementation methods, this solution can complete functions such as custom task issuance, task completion notification, device resource occupation / release, and device status information reporting on demand through custom reflection methods, thereby improving the flexibility of preset type task scheduling.

[0092] In some optional implementations of this embodiment, in response to receiving the task processing result sent by the target preset device, the execution subject may query whether there is a custom service matching the task processing result according to the preset custom service configuration table through the following steps:

[0093] The first step is to determine whether to execute the scheduling of subsequent node tasks according to a preset device scheduling mode in response to receiving the task processing results sent by at least two target preset devices.

[0094] In these implementations, in response to receiving the task processing results sent by at least two target preset devices, the execution subject can determine whether to execute the scheduling of subsequent node tasks according to the preset device scheduling mode in various ways. The device scheduling mode can include at least one of the following: serial, parallel, and dependent.

[0095] In these implementations, as an example, for node task A and node task B, the above serial mode can be used to characterize that action B is executed after A is completed. The above parallel mode can be used to characterize that action B can be executed while A is executed, and the scheduling of subsequent node tasks can be performed only after both actions are completed. The above dependency mode can be used to characterize that the tasks of nodes A and B can be executed at the same time, but the scheduling of subsequent node tasks can only be performed after the main node (such as node task A) is completed, and whether the auxiliary node (such as node task B) is completed has no direct impact on the scheduling of subsequent node tasks.

[0096] In the second step, in response to determining to schedule the execution of subsequent node tasks, querying whether there is a custom service matching the task processing result according to a preset custom service configuration table.

[0097] In these implementations, in response to determining the scheduling of executing subsequent node tasks, the execution subject may query whether there is a custom service matching the task processing result according to a preset custom service configuration table by a method consistent with the above description.

[0098] Based on the above optional implementations, this solution can implement different node task scheduling methods through the application of the three defined device scheduling modes, thereby helping to improve the flexibility and effect of preset type task scheduling.

[0099] Step 404: In response to determining that it exists, call a custom processing method in a preset reflection table that matches the custom service to process the defined service.

[0100] In this embodiment, in response to determining the existence, the execution subject can call the custom processing method matching the custom business in the preset reflection table to process the defined business in various ways. Among them, the preset reflection table can be used to indicate the corresponding relationship between the custom business and the custom processing method. The custom business can be used to indicate the implementation of various custom functions. The custom processing method can be used to indicate the specific logic for implementing the above functions.

[0101] Step 405 , in response to determining that the task processing result indicates that the last subtask in the corresponding subtask sequence has been executed, pre-occupying the common resources required to be occupied by the next subtask sequence of the corresponding subtask sequence in the subtask sequence group.

[0102] In this embodiment, in response to determining that the task processing result indicates that the last subtask in the corresponding subtask sequence has been executed, the above-mentioned execution entity can pre-occupy the common resources required for the next subtask sequence of the corresponding subtask sequence in the subtask sequence group in a manner similar to the method described in the aforementioned embodiment.

[0103] Step 406: in response to determining that the task indicated by the preset type task information is completed and satisfies the resource release condition, release the public resources corresponding to the preset type task information.

[0104] The above steps 401, 402 and 406 are respectively consistent with steps 201, 202 and 204 and their optional implementations in the aforementioned embodiments. The above descriptions of steps 201, 202, 204 and their optional implementations are also applicable to steps 401, 402 and 406, and will not be repeated here.

[0105] from Figure 4 It can be seen that the process 400 of the method for executing tasks in this embodiment embodies the steps of calling the custom processing method matching the custom business in the preset reflection table to process the custom business when the custom business matching the task processing result is found according to the preset custom business configuration table, and the step of pre-occupying the public resources required for the next subtask sequence of the corresponding subtask sequence in the subtask sequence group in response to determining that the task processing result indicates that the last subtask in the corresponding subtask sequence has been executed. Therefore, the scheme described in this embodiment can solve the problem of different business logic processing required in different periods and different business scenarios of the execution of each action in the preset type task through the configuration of the preset reflection table and the custom processing method, and greatly improve the scheduling flexibility of the preset type task through the pluggable setting of the custom event, and provide a task execution method across subtask sequences in a subtask sequence group.

[0106] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for performing a task, which is similar to FIG. 2 or FIG. Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0107] like Figure 5 As shown, the apparatus 500 for executing a task provided in this embodiment includes an acquisition unit 501, a sending unit 502, an execution unit 503 and a release unit 504. The acquisition unit 501 is configured to acquire preset type task information, wherein the preset type task information includes information about a task sequence to be executed by at least one preset device and public resources to be occupied by the task, and the public resources include resources to be occupied by at least two tasks; the sending unit 502 is configured to, in response to determining that the public resources to be occupied are successfully pre-occupied, send the preset type task to the target preset device, wherein the target preset device includes the preset device corresponding to the task to which the public resources successfully pre-occupied belong; the execution unit 503 is configured to, in response to receiving the task processing result sent by the target preset device, further execute the task indicated by the preset type task information based on the preset custom business information; the release unit 504 is configured to, in response to determining that the task indicated by the preset type task information is completed and the resource release condition is met, release the public resources corresponding to the preset type task information.

[0108] In this embodiment, the specific processing of the acquisition unit 501, the sending unit 502, the execution unit 503 and the release unit 504 in the device 500 for performing the task and the technical effects brought about by them can be respectively referred to the relevant descriptions of step 201, step 202, step 203 and step 204 in the corresponding embodiment of Figure 2, and will not be repeated here.

[0109] In some optional implementations of this embodiment, the acquisition unit 501 may be further configured to: receive the handling tasks to be parsed issued by the warehouse management system, wherein the handling tasks to be parsed are used to indicate the handling starting point and the handling end point of the target goods; parse the handling tasks to be parsed according to preset rules, and generate a task sequence including tasks that need to be performed by at least one preset device; search for information on the public resources that need to be occupied corresponding to the tasks in the task sequence from a preset public resource configuration table; and generate handling task information based on the generated task sequence and the corresponding information on the public resources that need to be occupied.

[0110] In some optional implementations of this embodiment, the preset type task information may include a subtask sequence group, wherein the subtask group in the subtask sequence group may include a subtask sequence.

[0111] In some optional implementations of the present embodiment, the above-mentioned preset public resource configuration table can be generated by the following steps: determining whether there is only one path between the first public resource occupied by the first subtask sequence and the second public resource occupied by the second subtask sequence; determining whether the first public resource is the public resource that needs to be occupied by the next subtask sequence of the second subtask sequence based on the subtask sequence group to which the second subtask sequence belongs; determining whether the second public resource is the public resource that needs to be occupied by the next subtask sequence of the first subtask sequence based on the subtask sequence group to which the first subtask sequence belongs; in response to determining that all three of the above are yes, increasing the number of the first public resource or the second public resource.

[0112] In some optional implementations of the present embodiment, the sending unit 502 may be further configured to: select preset type task information from at least one preset type task information obtained, and perform the following polling steps: determine whether the public resources required to be occupied corresponding to the first subtask sequence in the subtask sequence group in the selected preset type task information have been successfully pre-occupied; in response to determining that they have been successfully pre-occupied, send the selected preset type task information; determine whether there is preset type task information that has not been selected in at least one preset type task information obtained; in response to determining that there is, re-select preset type task information that has not been selected from at least one preset type task information obtained, and continue to perform the above polling steps.

[0113] In some optional implementations of this embodiment, the above-mentioned sending unit 502 can be further configured to: query the sending method corresponding to the first subtask sequence in the preset type task information corresponding to the public resources that have been successfully pre-occupied according to the preset sending method comparison table; according to the queried sending method, call the corresponding interface to send the preset type task to the agent corresponding to the target preset device.

[0114] In some optional implementations of the present embodiment, the execution unit 503 may be further configured to: in response to receiving a task processing result sent by a target preset device, query according to a preset custom service configuration table whether there is a custom service that matches the task processing result; in response to determining that there is, call a custom processing method that matches the custom service in a preset reflection table to process the custom service; in response to determining that the task processing result indicates that the last subtask in the corresponding subtask sequence has been executed, pre-occupy the common resources that the corresponding subtask sequence needs to occupy for the next subtask sequence in the subtask sequence group.

[0115] In some optional implementations of this embodiment, the above-mentioned preset custom business configuration table may include a custom reflection method. The above-mentioned custom reflection method may be generated according to the identifier of the preset type task information, the identifier of the subtask sequence group, and the identifier of the subtask in the subtask sequence. The above-mentioned custom reflection method may be used to indicate that at least one of the following is executed when the preset point is executed: issuing a custom task, feeding back task completion information, occupying the first device resources, releasing the second device resources, and reporting device status information.

[0116] In some optional implementations of this embodiment, the above-mentioned execution unit 503 can be further configured to: in response to receiving task processing results sent by at least two target preset devices, determine whether to execute scheduling of subsequent node tasks according to a preset device scheduling mode, wherein the device scheduling mode includes at least one of the following: serial, parallel, and dependent; in response to determining to execute scheduling of subsequent node tasks, query whether there is a custom business that matches the task processing results according to a preset custom business configuration table.

[0117] The device provided by the above-mentioned embodiment of the present disclosure improves the success rate of task execution by the execution unit 503 by using the sending unit 502 to pre-occupy public resources as a prerequisite for executing tasks in the task sequence indicated by the preset type task information obtained by the acquisition unit 501; and expands the task scheduling method through a pluggable design that supports preset custom business information, thereby improving the flexibility and reusability of task scheduling.

[0118] Reference below Figure 6 , which shows an electronic device (eg Figure 1 A schematic diagram of the structure of the server in (a) 600. Figure 6 The server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0119] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0120] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0121] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0122] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0123] The computer-readable medium may be included in the electronic device; or it may exist independently and not be assembled into the server. The computer-readable medium carries one or more programs. When the one or more programs are executed by the server, the server: obtains preset type task information, wherein the preset type task information includes information about the task sequence to be executed by at least one preset device and the public resources to be occupied by the task, and the public resources include resources to be occupied by at least two tasks; in response to determining that the public resources to be occupied are successfully pre-occupied, the preset type task is sent to the target preset device, wherein the target preset device includes the preset device corresponding to the task to which the public resources successfully pre-occupied belong; in response to receiving the task processing result sent by the target preset device, the task indicated by the preset type task information is further executed based on the preset custom business information; in response to determining that the task indicated by the preset type task information is completed and the resource release condition is met, the public resources corresponding to the handling task information are released.

[0124] Computer program code for performing the operations of the embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C", Python, or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be arranged in a processor, for example, may be described as: a processor, comprising an acquisition unit, a sending unit, an execution unit, and a release unit. Among them, the names of these units do not constitute a limitation on the unit itself under certain circumstances. For example, the acquisition unit may also be described as "a unit for acquiring preset type task information, wherein the preset type task information includes information on a task sequence to be executed by at least one preset device and public resources to be occupied by the task, and the public resources include resources to be contended for and occupied between at least two tasks."

[0127] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.

Claims

1. A method for performing a task, comprising: Acquire preset type task information, wherein the preset type task information includes information about a task sequence to be executed by at least one preset device and public resources to be occupied by the task, wherein the public resources include resources to be occupied by at least two tasks; In response to determining that the public resource to be occupied is successfully pre-occupied, issuing a preset type task to a target preset device, wherein the target preset device includes a preset device corresponding to the task to which the public resource that has been successfully pre-occupied belongs; In response to receiving the task processing result sent by the target preset device, further executing the task indicated by the preset type task information based on the preset custom service information; In response to determining that the task indicated by the preset type of task information is completed and satisfies a resource release condition, the public resource corresponding to the preset type of task information is released.

2. The method according to claim 1, wherein: The obtaining of preset type task information includes: Receiving a handling task to be resolved issued by a warehouse management system, wherein the handling task to be resolved is used to indicate a handling starting point and a handling end point of target goods; Parsing the to-be-parsed transport tasks according to preset rules to generate a task sequence including tasks that need to be performed by at least one preset device; Searching for information on the public resources that need to be occupied and that correspond to the tasks in the task sequence from a preset public resource configuration table; The transport task information is generated according to the generated task sequence and the corresponding information of the public resources that need to be occupied.

3. The method according to claim 1, wherein: The preset type task information includes a subtask sequence group, wherein the subtask group in the subtask sequence group includes a subtask sequence.

4. The method according to claim 2, wherein: The preset public resource configuration table is generated by the following steps: Determine whether there is only one path between a first common resource occupied by a first subtask sequence and a second common resource occupied by a second subtask sequence; According to the subtask sequence group to which the second subtask sequence belongs, determining whether the first common resource is a common resource required to be occupied by a next subtask sequence of the second subtask sequence; According to the subtask sequence group to which the first subtask sequence belongs, determining whether the second common resource is a common resource required to be occupied by a next subtask sequence of the first subtask sequence; In response to determining that all three of the above are yes, the number of the first common resources or the second common resources is increased.

5. The method according to claim 3, wherein: In response to determining that the public resource to be occupied is successfully pre-occupied, issuing a preset type task to a target preset device includes: Selecting a preset type of task information from at least one preset type of task information obtained, and performing the following polling steps: determining whether the public resource required to be occupied corresponding to the first subtask sequence in the subtask sequence group in the selected preset type of task information has been successfully pre-occupied; in response to determining that it has been successfully pre-occupied, issuing the selected preset type of task information; determining whether there is any preset type of task information that has not been selected in the at least one preset type of task information obtained; In response to determining that there is, reselecting unselected preset type task information from the acquired at least one preset type task information, and continuing to execute the polling step.

6. The method according to claim 3, wherein: The sending of a preset type task to a target preset device includes: According to the preset delivery method comparison table, query the delivery method corresponding to the first subtask sequence in the preset type task information corresponding to the successfully reserved public resource; According to the queried sending mode, the corresponding interface is called to send the preset type task to the agent corresponding to the target preset device.

7. The method according to any one of claims 3 to 6, wherein: The step of further executing the task indicated by the preset type task information based on the preset custom service information in response to receiving the task processing result sent by the preset target device includes: In response to receiving the task processing result sent by the target preset device, querying whether there is a custom service matching the task processing result according to a preset custom service configuration table; In response to determining that the user-defined service exists, calling a user-defined processing method in a preset reflection table that matches the user-defined service to process the user-defined service; In response to determining that the task processing result indicates that the last subtask in the corresponding subtask sequence has been executed, pre-occupying common resources required to be occupied by the next subtask sequence in the subtask sequence group of the corresponding subtask sequence.

8. The method according to claim 7, wherein: The preset custom business configuration table includes a custom reflection method, wherein the custom reflection method is generated according to the identifier of the preset type task information, the identifier of the subtask sequence group and the identifier of the subtask in the subtask sequence, and the custom reflection method is used to indicate that at least one of the following is executed when the preset point is executed: the custom task is issued, the task completion information is fed back, the first device resources are occupied, the second device resources are released, and the device status information is reported.

9. The method according to claim 7, wherein: In response to receiving the task processing result sent by the target preset device, querying whether there is a custom service matching the task processing result according to a preset custom service configuration table, includes: In response to receiving the task processing results sent by at least two of the target preset devices, determining whether to execute the scheduling of subsequent node tasks according to a preset device scheduling mode, wherein the device scheduling mode includes at least one of the following: serial, parallel, and dependent; In response to determining to schedule the execution of subsequent node tasks, a query is made according to a preset custom service configuration table to determine whether there is a custom service that matches the task processing result.

10. A device for performing a task, comprising: An acquisition unit is configured to acquire preset type task information, wherein the preset type task information includes information about a task sequence to be executed by at least one preset device and public resources to be occupied by the task, and the public resources include resources to be occupied by at least two tasks; a sending unit configured to send a preset type task to a target preset device in response to determining that the public resource to be occupied is successfully pre-occupied, wherein the target preset device includes a preset device corresponding to the task to which the public resource that has been successfully pre-occupied belongs; an execution unit, configured to, in response to receiving the task processing result sent by the target preset device, further execute the task indicated by the preset type task information based on the preset custom business information; The releasing unit is configured to release the public resources corresponding to the preset type of task information in response to determining that the task indicated by the preset type of task information is completed and satisfies the resource release condition.

11. A server, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.

12. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method, device and electronic device for assigning use authority of shared equipment

    CN109067748A

  • Inventory preemption method and device, electronic equipment and computer readable medium

    CN113159680A