Waybill task execution method and device, electronic equipment and computer readable medium
By prioritizing and dividing tasks in the waybill task table that meet the status conditions, the problem of low execution efficiency of waybill tasks is solved, and efficient execution of waybill tasks and dynamic adjustment of computing resources are achieved.
Patent Information
- Application Number
- CN202210237090.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-03-11
AI Technical Summary
Existing technologies suffer from low efficiency in executing waybill tasks, an inability to distinguish waybill tasks, and low utilization of computing resources.
By identifying tasks whose status meets the conditions in the preset waybill task table as target task groups, dividing the area according to task priority, and performing waybill task execution operations according to the execution area configuration information, waybill task execution results are generated.
This improved the execution efficiency of waybill tasks and the utilization rate of computing resources, preventing tasks with longer execution times from blocking tasks with shorter execution times, thus achieving efficient task execution.
Smart Images

Figure CN114625505B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of computer technology, and particularly, to a waybill task execution method and device, electronic equipment and computer readable medium. BACKGROUND
[0002] The waybill task execution method is a method for allocating waybill tasks to complete execution operations. At present, when executing waybill tasks, the commonly used method is to put the to-be-executed waybill tasks into a message queue, and then the server processes the waybill tasks in the message queue.
[0003] However, when the above method is used to execute waybill tasks, the following technical problems often exist:
[0004] Firstly, since the commonly used method puts the to-be-executed waybill tasks into a message queue, the waybill tasks cannot be distinguished, thereby reducing the execution efficiency of the waybill tasks;
[0005] Secondly, the same computing resources are used to process the waybill tasks in the message queue, and the computing resources are not adjusted according to the needs of different waybill tasks, thereby reducing the utilization rate of the computing resources. SUMMARY
[0006] The summary part of the present disclosure is used to introduce the concepts in a brief form, which will be described in detail in the specific embodiments part. The summary part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0007] Some embodiments of the present disclosure propose a waybill task execution method, device, electronic equipment and computer readable medium to solve one or more of the technical problems mentioned in the background part.
[0008] In a first aspect, some embodiments of the present disclosure provide a waybill task execution method, which comprises: determining waybill tasks in a preset waybill task table whose task states satisfy a preset condition as target tasks to obtain a target task group, wherein the waybill task table comprises waybill tasks and task states corresponding to the waybill tasks; determining priorities of each target task in the target task group to obtain a task priority information group; performing regional division on the target tasks in the target task group according to the task priority information group to generate a set of regional division task groups; performing a waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to a preset execution region configuration information to generate a set of waybill task execution results, and adding the set of waybill task execution results to a preset waybill task execution result table.
[0009] Optionally, the method further comprises: sending the updated waybill task execution result table to a display terminal for display.
[0010] Optionally, the method further comprises: creating a waybill task, and determining a task state of the created waybill task as an initial state; and adding the created waybill task and the corresponding task state to the waybill task table.
[0011] Optionally, the method further comprises: updating a task state corresponding to each target task in the target task group to a to-be-executed state; and in response to determining that a waybill task execution operation of a regional division task in the set of regional division task groups is completed, updating a task state corresponding to the regional division task to a completed state.
[0012] Optionally, the target task in the target task group comprises at least one piece of document information; and the determining the priority of each target task in the target task group to obtain the task priority information group comprises: determining a number of pieces of document information included in each target task in the target task group to obtain a number of pieces of document information; and determining the priority of each target task in the target task group according to the number of pieces of document information to obtain the task priority information group.
[0013] Optionally, the preset execution region configuration information comprises an execution region resource proportion corresponding to each regional division task group in the set of regional division task groups; and the performing a waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to the preset execution region configuration information to generate a set of waybill task execution results comprises: determining a task resource proportion consumed by the waybill task execution operation corresponding to the regional division task group in a preset time period; and in response to determining that the task resource proportion is less than a first preset threshold, reducing the execution region resource proportion corresponding to the regional division task group.
[0014] Optionally, the performing a waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to the preset execution region configuration information to generate a set of waybill task execution results further comprises: in response to determining that the task resource proportion is greater than a second preset threshold, increasing the execution region resource proportion corresponding to the regional division task group.
[0015] In a second aspect, some embodiments of the present disclosure provide a waybill task execution device. The device comprises: a first determination unit configured to determine a waybill task in a preset waybill task table as a target task when a task state of the waybill task meets a preset condition, to obtain a target task group, wherein the waybill task table comprises a waybill task and a task state corresponding to the waybill task; a second determination unit configured to determine a priority of each target task in the target task group, to obtain a task priority information group; a region division unit configured to divide the target tasks in the target task group according to the task priority information group, to generate a set of region division task groups; and a generation unit configured to perform a waybill task execution operation on each region division task in each region division task group in the set of region division task groups according to preset execution region configuration information, to generate a waybill task execution result group, and to add the waybill task execution result group to a preset waybill task execution result table.
[0016] Optionally, the waybill task execution device further comprises a display unit. The display unit is configured to send the updated waybill task execution result table to a display terminal for display.
[0017] Optionally, the waybill task execution device further comprises a creation unit and an addition unit. The creation unit is configured to create a waybill task, and to determine a task state of the created waybill task as an initial state. The addition unit is configured to add the created waybill task and the corresponding task state to the waybill task table.
[0018] Optionally, the waybill task execution device further comprises a first update unit and a second update unit. The first update unit is configured to update a task state corresponding to each target task in the target task group as a to-be-executed state. The second update unit is configured to update a task state corresponding to a region division task in the set of region division task groups as a completed state in response to determining that the waybill task execution operation of the region division task is completed.
[0019] Optionally, each target task in the target task group comprises at least one document information. The second determination unit is further configured to determine a number of document information included in each target task in the target task group, to obtain a document information number group. The priority of each target task in the target task group is determined according to the document information number group, to obtain the task priority information group.
[0020] Optionally, the preset execution area configuration information includes an execution area resource proportion corresponding to each regional division task group in the set of regional division task groups; and the generation unit is further configured to determine a task resource proportion consumed by the task execution operation of the shipping order corresponding to the regional division task group within a preset time period; and in response to determining that the task resource proportion is less than a first preset threshold, reduce the execution area resource proportion corresponding to the regional division task group.
[0021] Optionally, the generation unit is further configured to, in response to determining that the task resource proportion is greater than a second preset threshold, increase the execution area resource proportion corresponding to the regional division task group.
[0022] In a third aspect, some embodiments of the present disclosure provide an electronic device, 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 described in any of the implementations of the first aspect.
[0023] In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program is executed by a processor to implement the method described in any of the implementations of the first aspect.
[0024] The above various embodiments of the present disclosure have the following beneficial effects: the execution efficiency of the shipping order task can be improved by the shipping order task execution method of some embodiments of the present disclosure. Specifically, the reason why the related shipping order task execution method reduces the execution efficiency of the shipping order task is that the commonly used method puts the to-be-executed shipping order task into the message queue, so that the shipping order task cannot be distinguished. Based on this, the shipping order task execution method of some embodiments of the present disclosure first determines the shipping order task in the preset shipping order task table whose task state meets the preset condition as a target task, and obtains a target task group. The target task to be executed can be selected from the shipping order task table. Then, the priority of each target task in the target task group is determined, and a task priority information group is obtained. By determining the priority of the target task, the shipping order task can be distinguished according to the priority of the target task. Next, according to the task priority information group, the target tasks in the target task group are regionally divided to generate a set of regionally divided task groups. Since the execution time of target tasks with different priorities is different. By regionally dividing the target tasks with different priorities into different execution regions, it can be avoided that the target task with a long execution time blocks the execution of the target task with a short execution time, resulting in a decrease in execution efficiency. Finally, according to the preset execution region configuration information, the shipping order task execution operation is performed on each regionally divided task in each regionally divided task group in the set of regionally divided task groups to generate a set of shipping order task execution results, and the set of shipping order task execution results is added to the preset shipping order task execution result table. By introducing the execution region configuration information, the regionally divided tasks included in each regionally divided task group in the set of regionally divided task groups can be executed simultaneously. Thus, the execution efficiency of the shipping order task can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0025] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent by describing in detail some embodiments thereof with reference to the attached drawings. Throughout the drawings, the same or similar reference numerals refer to the same or similar elements. It should be understood that the drawings are schematic and elements and features are not necessarily to scale.
[0026] Figure 1 is a schematic diagram of an application scenario of the shipping order task execution method of some embodiments of the present disclosure;
[0027] Figure 2 is a flowchart of the shipping order task execution method according to some embodiments of the present disclosure;
[0028] Figure 3 is a flowchart of another embodiment of the shipping order task execution method according to the present disclosure;
[0029] Figure 4is a schematic diagram of creating a waybill task in some embodiments of the waybill task performing method according to the present disclosure;
[0030] Figure 5 is a structural schematic diagram of some embodiments of the waybill task performing apparatus according to the present disclosure;
[0031] Figure 6 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0032] Embodiments of the present disclosure will be described in detail below with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided so as to make the present disclosure more thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes, and are not intended to limit the scope of protection of the present disclosure.
[0033] It should also be noted that, for the sake of description, only the parts related to the present application are shown in the drawings. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0034] It should be noted that the concepts of “first”, “second”, etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the adjectives “one”, “multiple” mentioned in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as “one or more”.
[0036] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0037] The present disclosure will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0038] Figure 1 is a schematic diagram of one application scenario of the waybill task performing method of some embodiments of the present disclosure.
[0039] In Figure 1In the application scenario of the method, first, the computing device 101 can determine the waybill tasks in the preset waybill task table 102 whose task states satisfy preset conditions as target tasks, to obtain a target task group 103, wherein the waybill task table 102 includes waybill tasks and task states corresponding to the waybill tasks. As an example, the initial state can be represented by a digital identifier (for example, 0). Next, the computing device 101 can determine the priority of each target task in the target task group 103, to obtain a task priority information group 104. Then, the computing device 101 can divide the target tasks in the target task group 104 into regions according to the task priority information group 104, to generate a set of regionally divided task groups 105. Finally, the computing device 101 can perform a waybill task execution operation on each regionally divided task in each regionally divided task group in the set of regionally divided task groups 105 according to preset execution region configuration information 106, to generate a waybill task execution result group 107, and add the waybill task execution result group 107 to a preset waybill task execution result table 108.
[0040] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made herein.
[0041] It should be understood that Figure 1 The number of computing devices in the above description is only illustrative. According to the needs of implementation, there can be any number of computing devices.
[0042] With reference to the above description, Figure 2 Fig. 200 shows a flow 200 of some embodiments of the waybill task execution method according to the present disclosure. The flow 200 of the waybill task execution method includes the following steps:
[0043] In step 201, the waybill tasks in the preset waybill task table whose task states satisfy preset conditions are determined as target tasks, to obtain a target task group.
[0044] In some embodiments, the execution subject of the waybill task execution method (such as the computing device 101) can determine the waybill tasks in the preset waybill task table whose task states satisfy preset conditions as target tasks, to obtain a target task group. Figure 1The computing device 101 shown can determine a waybill task in a preset waybill task table as a target task, and obtain a target task group, where the waybill task table includes a waybill task and a task state corresponding to the waybill task. The preset condition can be that the task state corresponding to the waybill task is an initial state. The initial state can be used to represent that the waybill task is not executed. The initial state can be represented by a digital identifier (for example, 0). The preset waybill task table can be a data table used to store waybill tasks. The waybill task can be used to represent user order information with an initial state. The target task group can be used to represent various target tasks that need to be executed.
[0045] As an example, the user order task can refer to all order information of the user within a period of time (for example, within a month). It can also be the price information (for example, shipping fee, etc.) of the goods obtained by the user through the terminal device.
[0046] In step 202, the priority of each target task in the target task group is determined, and a task priority information group is obtained.
[0047] In some embodiments, the execution subject can determine the priority of each target task in the target task group, and obtain a task priority information group. Wherein, the priority of the target task can be determined according to the data occupancy (for example, in bytes) of the target task. First, the data occupancy of each target task in the target task group can be determined. Then, the priority of each target task in the target task group can be divided according to a plurality of preset priority division intervals. Finally, the priority of the target task can be determined as the task priority information. Thus, the task priority information group can be obtained. The task priority information can include the target task and the corresponding priority. In addition, the number of priority division intervals in the plurality of preset priority division intervals can represent the number of priority levels.
[0048] As an example, two priority division intervals are preset. Then, the target tasks in the target task group can be divided into two priority levels. Wherein, the two priority division intervals can be "first priority: [1 byte-1 megabyte], second priority: (1 megabyte-1 terabyte]".
[0049] In step 203, the target tasks in the target task group are regionally divided according to the task priority information group, to generate a set of regionally divided task groups.
[0050] In some embodiments, the execution subject can perform regional division on the target tasks in the target task group according to the task priority information set to generate a set of regional division task groups. The regional division can be to determine the execution region corresponding to the target tasks in the target task group. The execution region can be used for performing the task execution operation on the divided target tasks. Each regional division task group in the set of regional division task groups can correspond to a different execution region. The execution region can correspond to the priority one by one. Thus, the target tasks at different priorities can be divided into different execution regions through regional division. This can avoid the target task with a long execution time from blocking the target task with a short execution time, and improve the task execution efficiency.
[0051] In step 204, the execution subject can perform the waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to the preset execution region configuration information to generate a set of waybill task execution results, and add the set of waybill task execution results to the preset waybill task execution result table.
[0052] In some embodiments, the execution subject can perform the waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to the preset execution region configuration information to generate a set of waybill task execution results, and add the set of waybill task execution results to the preset waybill task execution result table. The preset execution region configuration information can be the computing resources (such as the number of threads or central processor resources, etc.) included in each execution region for executing the regional division tasks in the regional division task group. Thus, the regional division tasks in each regional division task group in the set of regional division task groups can be executed simultaneously. The set of waybill task execution results can correspond to the execution region and the regional division task group. The waybill task execution result can be used to represent the completion of the waybill task execution operation on the regional division task. The waybill task execution operation can be to determine the total price in each waybill task. It can also be to determine the total transportation time in the waybill task, etc. This is not specifically limited herein. The preset waybill task execution result table can be used to store the waybill task execution result. Adding the set of waybill task execution results to the preset waybill task execution result table can be used to record the waybill task execution result and update the waybill task execution result table.
[0053] Optionally, the execution subject can also send the updated waybill task execution result table to the display terminal for display. The updated waybill task execution result table can be displayed.
[0054] Optionally, the execution subject can also perform the following steps:
[0055] In a first step, a shipping order task is created, and a task state of the created shipping order task is determined as an initial state. The creation of the shipping order task can refer to setting the obtained shipping order information, which needs to be executed by the shipping order task, as the shipping order task. The initial state can be used to represent that the shipping order task is not executed.
[0056] In a second step, the created shipping order task and the corresponding task state are added to the shipping order task table. In this way, the shipping order task table can be updated in real time.
[0057] As an example, as shown in FIG. 3, a computing task 301 can be created first, and a task state of the created shipping order task 301 is determined as an initial state 302. Then, the created shipping order task 301 and the corresponding task state 302 are added to the shipping order task table 303. Figure 3
[0058] Optionally, the execution subject can further perform the following steps:
[0059] In a first step, the task state corresponding to each target task in the target task group is updated to a to-be-executed state. The to-be-executed state can be used to represent that the target task needs to be executed by the shipping order task.
[0060] In a second step, in response to determining that the shipping order task execution operation of the region division task in the region division task group set is completed, the task state corresponding to the region division task for which the shipping order task execution operation is completed is updated to a completed state. The updating of the task state can be used to distinguish the shipping order tasks in different task states, so as to avoid repeated execution of the tasks and reduce the execution efficiency.
[0061] The above various embodiments of the present disclosure have the following beneficial effects: the shipment task execution method of some embodiments of the present disclosure can improve the execution efficiency of the shipment task. Specifically, the reason why the related shipment task execution method reduces the execution efficiency of the shipment task is that the commonly used method puts the to-be-executed shipment task into the message queue, so that the shipment task cannot be distinguished. Based on this, the shipment task execution method of some embodiments of the present disclosure first determines the shipment task in the preset shipment task table whose task state meets the preset condition as a target task, and obtains a target task group. The target task to be executed can be selected from the shipment task table. Then, the priority of each target task in the target task group is determined, and a task priority information group is obtained. By determining the priority of the target task, the shipment task can be distinguished according to the priority of the target task. Next, according to the task priority information group, the target tasks in the target task group are regionally divided to generate a set of regionally divided task groups. Since the execution time of target tasks with different priorities is different. By regionally dividing the target tasks with different priorities into different execution regions, it can be avoided that the target task with a long execution time blocks the execution of the target task with a short execution time, resulting in a decrease in execution efficiency. Finally, according to the preset execution region configuration information, the shipment task execution operation is performed on each regionally divided task in each regionally divided task group in the set of regionally divided task groups to generate a set of shipment task execution results, and the set of shipment task execution results is added to the preset shipment task execution result table. By introducing the execution region configuration information, the regionally divided tasks included in each regionally divided task group in the set of regionally divided task groups can be executed simultaneously. Thus, the execution efficiency of the shipment task can be improved.
[0062] Further reference is made to Figure 4 which shows the flow 400 of another embodiments of the shipment task execution method. The flow 400 of the shipment task execution method includes the following steps:
[0063] Step 401, determine the shipment task in the preset shipment task table whose task state meets the preset condition as a target task, and obtain a target task group.
[0064] In some embodiments, the specific implementation of step 401 and the technical effects brought about can be referred to Figure 2 The step 201 in the corresponding embodiments will not be repeated here.
[0065] Step 402, determine the number of document information included in each target task in the target task group, and obtain a set of document information numbers.
[0066] In some embodiments, the execution subject of the shipment task execution method (such as Figure 1The computing device 101 shown can determine the number of bill information included in each target task in the target task group by the counting unit to obtain a bill information number group. The target task in the target task group can include at least one bill information. The bill information can refer to the price information of an item that needs to be operated by the shipping task. It can also refer to the price information of each item in the user order that needs to be operated by the shipping task.
[0067] Step 403, according to the bill information number group, determine the priority of each target task in the target task group, and obtain a task priority information group.
[0068] In some embodiments, the execution subject can determine the priority of each target task in the target task group according to the bill information number group to obtain a task priority information group. First, the priority value corresponding to the target task can be generated. Then, the generated priority value can be determined as the task priority information. The priority value corresponding to each target task can be generated by the following formula:
[0069]
[0070] Where Y represents the priority value. M represents the preset maximum priority value. C represents the number of bill information corresponding to the target task. f represents the preset priority division factor.
[0071] As an example, the preset maximum priority value can be 1. The number of bill information corresponding to the target task can be 10. The preset priority division factor can be the ratio of the estimated computing resource processing amount to the number of computing resource servers.
[0072] As another example, the preset priority division factor can also be adjusted according to the distribution of the priority of the shipping task. The number of bill information included in each target task in the target task group can be normally distributed. If the position represented by the mean of the normal distribution represents that the number of bill information included in the target task is small, it can represent that the number of bill information included in the target task is small. Therefore, the priority division factor can be lowered to reduce the priority value. So that more computing resources can be allocated to execute this kind of target task. Thus, improve the utilization of computing resources.
[0073] Specifically, the smaller the priority value can represent the higher priority of the target task.
[0074] Step 404, according to the task priority information group, divide the target task in the target task group into regions to generate a set of region division task groups.
[0075] In some embodiments, the execution subject can divide the target tasks in the target task group according to the task priority information group to generate a set of region-divided task groups. The priority value in the task priority information can be determined to have a corresponding relationship with a priority value region in a preset priority value region group. The preset priority value region group can be used to represent the division region of each priority. Each priority value region can be used to represent a priority. If the priority value is in a priority value region, it can be determined that the target task corresponding to the priority value is in the priority represented by the priority value region. Thus, the priority of the target task can be determined. Finally, the target tasks in the same priority can be determined as a region-divided task group. Thus, the set of region-divided task groups can be obtained. Therefore, the target tasks of different priorities can be divided into different execution regions. This avoids the situation that the target task with a long execution time blocks the target task with a short execution time, resulting in a decrease in execution efficiency.
[0076] In step 405, according to the preset execution region configuration information, each region-divided task in each region-divided task group in the set of region-divided task groups is subjected to a waybill task execution operation to generate a set of waybill task execution results, and the set of waybill task execution results is added to a preset waybill task execution result table.
[0077] In some embodiments, the preset execution region configuration information can include an execution region resource proportion corresponding to each region-divided task group in the set of region-divided task groups. The execution subject can perform a waybill task execution operation on each region-divided task in each region-divided task group in the set of region-divided task groups according to the preset execution region configuration information to generate a set of waybill task execution results, which can include the following steps:
[0078] First, the proportion of task resources consumed by the waybill task execution operation corresponding to the region-divided task group in a preset time period is determined. The waybill task execution operation corresponding to the region-divided task group can be monitored to determine the proportion of the preconfigured computing resources consumed in the preset time period (for example, 10 minutes). The preconfigured computing resources can be the execution region computing resources corresponding to the region-divided task group. The execution region computing resources can be preconfigured according to the priority of the execution region.
[0079] In the second step, in response to determining that the task resource proportion is less than the first preset threshold, the execution region resource proportion corresponding to the regional division task group is reduced. Wherein, the task resource proportion less than the first preset threshold (for example, 20%) can represent that the pre-set computing resource amount of the execution region corresponding to the regional division task group is far more than the computing resource amount used for performing the waybill task execution operation on the regional division task. Therefore, the execution region resource proportion corresponding to the regional division task group can be reduced. Thus, the dynamic adjustment of the computing resource is realized. The computing resource can be adjusted according to the needs of different waybill tasks. The utilization rate of the computing resource is improved.
[0080] As an example, the execution region resource proportion corresponding to the regional division task group can be reduced by half.
[0081] In some optional implementations of some embodiments, the execution subject performing the waybill task execution operation on each regional division task in each regional division task group in the regional division task group set to generate the waybill task execution result group according to the pre-set execution region configuration information can further include the following steps:
[0082] In response to determining that the task resource proportion is greater than the second preset threshold, the execution region resource proportion corresponding to the regional division task group is increased. Wherein, the task resource proportion greater than the second preset threshold (for example, 80%) can represent that the pre-set computing resource amount of the execution region corresponding to the regional division task group is close to the computing resource amount used for performing the waybill task execution operation on the regional division task. Therefore, in order to avoid the reduction of computing efficiency caused by full or even overload of the computing resource, the execution region resource proportion corresponding to the regional division task group can be increased. Thus, the dynamic adjustment of the computing resource is realized. The computing resource can be adjusted according to the needs of different waybill tasks. The utilization rate of the computing resource is improved.
[0083] As an example, the execution region resource proportion corresponding to the regional division task group can be increased by half.
[0084] From Figure 4 It can be seen that, compared with the description of some embodiments corresponding to Figure 2 The flow 400 of the waybill task execution method in some embodiments corresponding to Figure 4 embodies the steps of determining the priority of the target task and dynamically adjusting the computing resource. Thus, not only can the waybill tasks be distinguished to improve the execution efficiency of the waybill tasks, but also the computing resource can be dynamically adjusted. The utilization rate of the computing resource is improved.
[0085] Further reference to Figure 5As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a waybill task execution device, which device embodiments correspond to those method embodiments, and the device can be specifically applied in various electronic devices. Figure 2
[0086] As shown in Figure 5 The waybill task execution device 500 of some embodiments includes a first determination unit 501, a second determination unit 502, a region division unit 503, and a generation unit 504. The first determination unit 501 is configured to determine, as target tasks, waybill tasks in a preset waybill task table whose task states satisfy a preset condition, to obtain a target task group, wherein the waybill task table includes waybill tasks and task states corresponding to the waybill tasks; the second determination unit 502 is configured to determine priorities of each target task in the target task group, to obtain a task priority information group; the region division unit 503 is configured to perform region division on the target tasks in the target task group according to the task priority information group, to generate a set of region division task groups; and the generation unit 504 is configured to perform a waybill task execution operation on each region division task in each region division task group in the set of region division task groups according to preset execution region configuration information, to generate a waybill task execution result group, and add the waybill task execution result group to a preset waybill task execution result table.
[0087] In some optional implementations of some embodiments, the waybill task execution device 500 can further include a display unit. The display unit is configured to send the updated waybill task execution result table to a display terminal for display.
[0088] In some optional implementations of some embodiments, the waybill task execution device 500 can further include a creation unit and an addition unit. The creation unit is configured to create a waybill task, and determine a task state of the created waybill task as an initial state; and the addition unit is configured to add the created waybill task and the corresponding task state to the waybill task table.
[0089] In some optional implementations of some embodiments, the waybill task execution device 500 can further include a first update unit and a second update unit. The first update unit is configured to update a task state corresponding to each target task in the target task group to a to-be-executed state; and the second update unit is configured to update, in response to determining that a region division task in the set of region division task groups has completed a waybill task execution operation, a task state corresponding to the region division task to a completed state.
[0090] In some optional implementations of some embodiments, the target task in the target task group can include at least one piece of bill information; and the second determination unit in the waybill task execution apparatus 500 can be further configured to determine the number of pieces of bill information included in each target task in the target task group to obtain a bill information number group; and determine the priority of each target task in the target task group according to the bill information number group to obtain a task priority information group.
[0091] In some optional implementations of some embodiments, the preset execution area configuration information includes an execution area resource proportion corresponding to each region division task group in the region division task group set; and the generation unit in the waybill task execution apparatus 500 can be further configured to determine a task resource proportion consumed by the waybill task execution operation corresponding to the region division task group within a preset time period; and in response to determining that the task resource proportion is less than a first preset threshold, reduce the execution area resource proportion corresponding to the region division task group.
[0092] In some optional implementations of some embodiments, the generation unit in the waybill task execution apparatus 500 can be further configured to, in response to determining that the task resource proportion is greater than a second preset threshold, increase the execution area resource proportion corresponding to the region division task group.
[0093] It can be understood that the units described in the apparatus 500 correspond to the respective steps in the method described with reference to Figure 2 Thus, the operations, features and advantages described above for the method also apply to the apparatus 500 and the units included therein, which will not be described here again.
[0094] Reference is made below to Figure 6 which shows a structural schematic diagram of an electronic device 600 suitable for implementing some embodiments of the present disclosure. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the function and use range of the embodiments of the present disclosure.
[0095] As shown in Figure 6 , the electronic device 600 can include a processing apparatus (such as a central processor, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or loaded from a storage apparatus 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 apparatus 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0096] In general, the following devices can 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, and the like; output devices 607, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; and communication devices 609. The communication devices 609 can allow the electronic device 600 to communicate wirelessly or via a wired connection with other devices to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it is understood that not all of the shown devices are required to be implemented or present. More or fewer devices can alternatively be implemented or present. Figure 6 Each block shown in the flowcharts can represent a device or multiple devices, as desired.
[0097] In particular, processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network via the communication devices 609, or installed from the storage devices 608, or installed from the ROM 602. When the computer program is executed by the processing devices 601, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are performed.
[0098] Note that the computer readable medium in some embodiments of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program used by an instruction execution system, apparatus or device, or that can be used by or in connection with an instruction execution system, apparatus or device. In some embodiments of the present disclosure, the computer readable signal medium can include a computer readable program code propagated in or on a carrier medium, in which the computer readable program code is embodied. Such propagated computer readable program code can take many forms, including but not limited to, an electromagnetic signal, an optical signal or any suitable combination of the foregoing. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. Program code embodied on a computer readable medium can be transmitted using any suitable medium, including but not limited to, wire, cable, wireless, RF, infrared or any suitable combination of the foregoing.
[0099] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0100] The computer readable medium can be included in the electronic device, or can exist separately from the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determine a waybill task in a preset waybill task table as a target task, where the task state of the waybill task meets a preset condition, and obtain a target task group, where the waybill task table includes a waybill task and a task state corresponding to the waybill task; determine a priority of each target task in the target task group, and obtain a task priority information group; perform regional division on the target tasks in the target task group according to the task priority information group, to generate a set of regional division task groups; perform a waybill task execution operation on each regional division task in each regional division task group in the set of regional division task groups according to preset execution region configuration information, to generate a set of waybill task execution results, and add the set of waybill task execution results to a preset waybill task execution result table.
[0101] Computer program code for carrying out operations of some embodiments of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0102] The computer program product of the first aspect can include a computer readable storage medium. The computer readable storage medium can include instructions. The instructions can include one or both of: instructions that configure a general purpose computer to become a special purpose computer capable of implementing the method of the first aspect; and instructions that configure a special purpose computer to become a special purpose computer capable of implementing the method of the first aspect.
[0103] The units described in some embodiments of the present disclosure can be implemented by means of software, or implemented by means of hardware. The described units can also be provided in a processor, for example, a processor can be described as: a processor includes a first determining unit, a first determining unit, a region division unit and a generating unit. Among them, the name of these units does not constitute a limitation to the unit itself in some cases, for example, the first determining unit can also be described as "a unit for determining a target task group".
[0104] The functions described above in the specification can be implemented, at least in part, by one or more hardware logic components. For example, and without limitation, non-limiting examples of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chips (SOCs), complex programmable logic devices (CPLDs), etc.
Claims
1. A method for executing a waybill task, comprising: The waybill tasks whose task status meets the preset conditions in the preset waybill task table are identified as target tasks to obtain target task groups. The waybill task table includes waybill tasks and their corresponding task statuses. Determine the priority of each target task in the target task group to obtain a task priority information group, wherein determining the priority of each target task in the target task group to obtain a task priority information group includes: determining the priority of the target task based on the data usage of the target task; Based on the task priority information group, the target tasks in the target task group are divided into regions to generate a set of region-divided task groups. According to the preset execution region configuration information, the waybill task execution operation is performed on each region division task in each region division task group in the region division task group set to generate a waybill task execution result group, and the waybill task execution result group is added to the preset waybill task execution result table. The preset execution region configuration information is the computing resources included in each execution region for executing the region division tasks in the region division task group.
2. The method according to claim 1, wherein, The method further includes: The updated waybill task execution result table is sent to the display terminal for display.
3. The method according to claim 1, wherein, The method further includes: Create a waybill task and set the task status of the created waybill task to the initial state; Add the created waybill task and its corresponding task status to the waybill task table.
4. The method according to claim 3, wherein, The method further includes: Update the task status of each target task in the target task group to the pending execution status; In response to determining that the waybill task execution operation corresponding to the area division task in the area division task group set has been completed, the task status corresponding to the area division task whose waybill task execution operation has been completed is updated to the completed status.
5. The method according to claim 1, wherein, The target tasks in the target task group include at least one document information; as well as The step of determining the priority of each target task in the target task group to obtain a task priority information group includes: Determine the number of document information items included in each target task in the target task group to obtain a document information item count group; Based on the number of document information groups, the priority of each target task in the target task group is determined to obtain the task priority information group.
6. The method according to claim 1, wherein, The preset execution region configuration information includes the execution region resource ratio corresponding to each region-divided task group in the set of region-divided task groups; and The step of performing waybill task execution operations on each regional task in each regional task group of the regional task group set according to the preset execution region configuration information to generate a waybill task execution result group includes: Determine the percentage of task resources consumed by the waybill task execution operations corresponding to the regional task group within a preset time period; In response to determining that the resource ratio of the task is less than a first preset threshold, the resource ratio of the execution area corresponding to the regional division task group is reduced.
7. The method according to claim 6, wherein, The step of performing waybill task execution operations on each regional task in each regional task group of the regional task group set according to preset execution region configuration information to generate a waybill task execution result group further includes: In response to determining that the resource ratio of the task is greater than a second preset threshold, the resource ratio of the execution region corresponding to the regional division task group is increased.
8. A waybill task execution device, comprising: The first determining unit is configured to determine the waybill tasks whose task status in the preset waybill task table meets the preset conditions as target tasks, thereby obtaining a target task group, wherein the waybill task table includes waybill tasks and the task status corresponding to the waybill tasks. The second determining unit is configured to determine the priority of each target task in the target task group to obtain a task priority information group, wherein determining the priority of each target task in the target task group to obtain the task priority information group includes: determining the priority of the target task based on the data usage of the target task. The region division unit is configured to divide the target tasks in the target task group into regions according to the task priority information group, so as to generate a set of region-divided task groups. The generation unit is configured to perform waybill task execution operations on each regional division task in each regional division task group in the set of regional division task groups according to preset execution region configuration information to generate a waybill task execution result group, and to add the waybill task execution result group to a preset waybill task execution result table, wherein the preset execution region configuration information is the computing resources included in each execution region for executing regional division tasks in the regional division task group.
9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Task scheduling method and device, storage medium and server node
CN110377406A
Resource allocation method and device, storage medium and electronic equipment
CN111798113A