CN113971087A - Task allocation method, device and system and computer storage medium - Google Patents
Task allocation method, device and system and computer storage medium Download PDFInfo
- Publication number
- CN113971087A CN113971087A CN202010718488.7A CN202010718488A CN113971087A CN 113971087 A CN113971087 A CN 113971087A CN 202010718488 A CN202010718488 A CN 202010718488A CN 113971087 A CN113971087 A CN 113971087A
- Authority
- CN
- China
- Prior art keywords
- judging
- workstation
- target
- group
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06316—Sequencing of tasks or work
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- Educational Administration (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Operations Research (AREA)
- General Business, Economics & Management (AREA)
- Marketing (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a task allocation method, a device, a system and a computer storage medium, wherein the method comprises the following steps: when the target security inspection equipment generates a task to be distributed, determining a graph judgment workstation in an idle state in a target group associated with the target security inspection equipment; and distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state. The invention can avoid task allocation in the whole network range of the centralized graph judging system, and has the advantages of small bandwidth requirement on the backbone network of the system and suitability for the situation of limited bandwidth of the backbone network.
Description
Technical Field
The invention belongs to the technical field of security inspection, and particularly relates to a task allocation method, a task allocation device, a task allocation system and a computer storage medium.
Background
In a centralized graph judgment system (or referred to as a "remote centralized graph judgment system"), two implementations of centralized distribution and distributed distribution are mainly used as the existing task distribution ways.
The centralized distribution is realized by a special scheduling module, the scheduling module is connected with all the security inspection equipment and the chart judging workstations in the centralized chart judging system through a backbone network, and the security inspection tasks generated by the security inspection equipment are optimally distributed in all the chart judging workstations. In the process of task allocation, huge task data needs to be transmitted in the whole network of the centralized graph judging system, the requirement on the bandwidth of a backbone network is high, and once the bandwidth of the backbone network is limited, the problems of transmission delay and task allocation failure occur.
Distributed allocation is realized by using a certain rule to elect a main node in each distributed node of the centralized graph judging system for uniform decision, the main election and decision can be completed only by depending on more than half of node confirmation in the whole centralized graph judging system, and the problems of high requirement on the bandwidth of a backbone network of the centralized graph judging system, transmission delay and failure in task allocation occur once the bandwidth of the backbone network is limited exist.
Disclosure of Invention
Embodiments of the present invention provide a task allocation method, an apparatus, a system, and a computer storage medium, which solve one of the technical problems that an existing task allocation method has a high requirement on a backbone network bandwidth, and is prone to cause transmission delay and task allocation failure due to the limitation of the backbone network bandwidth.
In one aspect, an embodiment of the present invention provides a task allocation method, where the method includes:
when a target security inspection device generates a task to be distributed, determining a graph judgment workstation in an idle state in a target group associated with the target security inspection device;
and distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state.
Preferably, before determining the chart workstation in an idle state in the target group associated with the target security inspection device when the target security inspection device generates the task to be allocated, the method further comprises:
dividing the security check equipment in the system according to the geographical area to which each security check equipment in the centralized judging graph system belongs and/or the network connection structural relationship among the security check equipment in the system to obtain a plurality of groups;
a arbitration map station is configured for each group.
Preferably, the target packet comprises at least one of:
grouping where the target security inspection equipment is located;
the target security inspection equipment comprises a group where the target security inspection equipment is located and an adjacent group of the group where the target security inspection equipment is located, wherein the adjacent group is at least one group located in a preset area range of the group where the target security inspection equipment is located.
Preferably, when the target security inspection device includes at least two security inspection devices, the allocating a target graph judging workstation to the task to be allocated according to the preset priority order of the graph judging workstations in the idle state specifically includes:
for any one of the at least two security check devices, respectively performing the following steps:
sending the tasks to be distributed generated by the tasks to be distributed to a first graph judging workstation in the idle state according to the preset priority sequence of the graph judging workstations in the idle state in the target group, starting timing, and recording as a first time length;
and under the condition that the task to be allocated is not processed by the first graph judging workstation and the first time length is less than a preset threshold value, sending the task to be allocated to a second graph judging workstation according to a preset priority sequence of the graph judging workstations in an idle state in the target group.
As an embodiment, the second graph determining workstation includes: and in the chart judging workstations in the idle state in the target group, the chart judging workstations after the first chart judging workstation are prioritized.
As another embodiment, before sending the task to be allocated to the second map judging workstation according to the preset priority order of the map judging workstations in the idle state in the target packet, the method further includes:
acquiring the working state of the graph judging workstation in the target group to determine the graph judging workstation in an idle state currently in the target group;
sending the task to be allocated to a second graph judging workstation according to a preset priority order of the graph judging workstations in an idle state in the target group, wherein the task to be allocated specifically comprises the following steps:
sending the tasks to be distributed to a second graph judging workstation according to the preset priority sequence of the graph judging workstation currently in an idle state in the target grouping,
wherein, the second chart judging workstation comprises: and in the graph judging workstations in the idle state currently in the target group, prioritizing the first graph judging workstation.
Preferably, when the target group includes the group in which the target security inspection device is located and the adjacent group, the priority of the map judging workstation of the group in which the target security inspection device is located is higher than that of the map judging workstation in the adjacent group.
Preferably, when the target security inspection device generates a task to be assigned, the determining a graph workstation in an idle state in a target group associated with the target security inspection device specifically includes:
when the target security inspection equipment generates a task to be distributed:
determining a graph judging workstation in an idle state in a group where the target security inspection equipment is located;
and under the condition that the graph judging workstation in the idle state does not exist in the group where the target security inspection equipment is located, determining the graph judging workstation in the idle state in the adjacent group.
Preferably, the preset priority order is determined according to at least one of the following:
the distance between the graph judging workstation in the idle state and the target security inspection equipment;
the current task number distributed by the graph judging workstation in the idle state;
and the number of the historical tasks distributed to the graph judging workstation in the idle state.
In another aspect, an embodiment of the present invention provides a task allocation apparatus, where the apparatus includes:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a chart workstation in an idle state in a target group associated with a target security inspection device when the target security inspection device generates a task to be distributed;
and the distribution module is used for distributing target graph judging workstations to the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state.
In another aspect, an embodiment of the present invention provides a task allocation system, where the system includes:
a target security inspection device comprising at least one security inspection device;
a graph judging workstation;
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the task allocation method described above.
In still another aspect, an embodiment of the present invention provides a computer storage medium, where computer program instructions are stored, and when the computer program instructions are executed by a processor, the method for task allocation as described above is implemented.
According to the task allocation method, the device and the system as well as the computer storage medium, when the target security inspection equipment generates the task to be allocated, the graph judgment workstation in an idle state is determined in the target group associated with the target security inspection equipment; and then distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations. In this way, in the embodiment of the present application, tasks are allocated only in the graph judging workstation in the idle state corresponding to the target group associated with the target security inspection device, rather than in the whole network range of the centralized graph judging system. Compared with the existing task allocation mode which needs to allocate tasks in the whole network range of the centralized graph judging system, the task allocation method only allocates the tasks to be allocated generated by the security inspection equipment in a limited range, reduces the transmission quantity of task data in a backbone network of the system, and has the advantages of small bandwidth requirement on the backbone network and capability of being suitable for the situation of limited bandwidth of the backbone network.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating one of the connection modes between a security inspection device and a mapping workstation in a plurality of groups divided by an embodiment of the invention;
FIG. 2 is a flowchart illustrating a task allocation method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an embodiment of a task allocation method according to the present invention;
FIG. 4 is another embodiment of a task allocation method according to an embodiment of the present invention;
FIG. 5 is a flowchart of another embodiment of a task allocation method according to an embodiment of the present invention;
FIG. 6 is a flowchart of a task allocation method according to another embodiment of the present invention
FIG. 7 is a schematic diagram of a task allocation system according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a task allocation apparatus according to another embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the centralized graph judging system, both the centralized distribution mode and the distributed distribution mode have the problems of high bandwidth requirement on a backbone network of the centralized graph judging system, and transmission delay and task distribution failure once the bandwidth of the backbone network is limited.
Subsequently, it was found through research that the causes of the above problems can be summarized as follows: tasks to be distributed need to be distributed among the ranges of all the graph judging workstations in the centralized graph judging system, and huge data volume has higher requirement on the bandwidth of a backbone network of the system during transmission. For example, in a centralized distribution manner, task data generated by all security inspection devices in the centralized graph judgment system are gathered to the scheduling module, and the scheduling module also distributes the task data among all graph judgment stations in the system, so that a huge amount of data has a high requirement on the bandwidth of a backbone network of the system during transmission. Similarly, in the distributed allocation mode, the distributed task allocation scheduling in the whole network range of the centralized graph judgment system also has higher requirements on the bandwidth of the backbone network of the system.
In order to solve the problem of the prior art, embodiments of the present invention provide a task allocation method, apparatus, system, and computer storage medium. First, a task allocation method provided by an embodiment of the present invention is described below.
In the embodiment of the invention, all the security inspection devices in the centralized judging graph system are grouped firstly. For example, 100 security inspection devices in the whole centralized judgment graph system are divided into 10 groups, and each group comprises a certain number of security inspection devices. Preferably, in the embodiment of the present invention, the security inspection devices in the centralized judgment map system are divided according to the geographical area to which each security inspection device in the centralized judgment map system belongs and/or the network connection structural relationship between the security inspection devices in the centralized judgment map system, so as to obtain a plurality of groups. For example, a plurality of security inspection devices belonging to a station, building or other building are divided into a group according to the geographical region to which each security inspection device in the centralized judgment map system belongs. For another example, according to the network connection structure relationship between the security inspection devices in the centralized judgment graph system, the security inspection devices in a plurality of stations which are physically connected in the network connection structure are divided into one group. Therefore, by the preferable grouping mode, the advantages of high processing speed and short time can be achieved when tasks are subsequently distributed in the group.
And configuring a judging graph workstation for each group while grouping the security inspection equipment in the centralized judging graph system. As a preferred mode, the number of chart workstations in each group is preferably determined according to the number of security inspection devices in the group and/or the number of tasks to be allocated in the group, so that under normal passenger flow pressure, the chart workstations in each group can process the tasks to be allocated generated by all the security inspection devices in the group.
In order to relieve the pressure on the image interpretation workstations in the groups when the passenger flow is large, the security inspection device in each group preferably establishes a communication connection with the image interpretation workstation in the adjacent group in addition to the image interpretation workstation in the group in which the security inspection device is located. Wherein, for each security inspection device, its adjacent groups include, for example: one group or a plurality of groups located in the range of the preset area of the group in which the security inspection equipment is located. In this way, for the security inspection equipment in each group, when the passenger flow of the group is large, or when the chart judging workstations in the group are all in a busy state, the tasks to be allocated can be allocated to the chart judging workstations in the idle state in the adjacent groups, so that the pressure of the chart judging workstations in the group is relieved.
Fig. 1 schematically illustrates a connection between a security inspection device and a mapping workstation in a plurality of groups according to an embodiment of the present invention. As shown in FIG. 1, the security devices in each grouping may be connected to the chart workstations in one or more adjacent groupings, e.g., the security devices in grouping A establish communication connections with the chart workstations of adjacent groupings B, C and D, respectively, while only the security devices of grouping C, for example, in adjacent groupings B, C and D establish communication connections with the chart workstations of grouping A. That is, the security inspection device of each group may select whether to connect the mapping stations of a certain adjacent group according to the actual situation, and the present invention is not limited thereto. Preferably, the security devices in each group are connected to the arbitration stations of one to five adjacent groups.
As a way of establishing a communication connection, for example, each security inspection apparatus holds configuration information of all the stations in the group in which it is located and in the adjacent group. Through the configuration information, the security inspection equipment can establish communication connection with the packet in which the security inspection equipment is located and the chart judging workstations in the selected adjacent packets, and monitor the working states of the chart judging workstations connected with the security inspection equipment.
Fig. 2 is a flowchart illustrating a task allocation method according to an embodiment of the present invention. As shown in fig. 2, the task allocation method includes:
step S11: when the target security inspection equipment generates a task to be distributed, determining a graph judgment workstation in an idle state in a target group associated with the target security inspection equipment;
step S12: and distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state in the target grouping.
It should be noted that, in the embodiment of the present invention, the target security inspection device may be understood as one or more security inspection devices, and the target chart workstation may be understood as one or more chart workstations. That is, the target security inspection device includes at least one security inspection device, and the target mapping station includes at least one mapping station.
Fig. 3 is an implementation manner of a task allocation method according to an embodiment of the present invention. As an embodiment, when a target security inspection device generates a task to be allocated, the task is allocated in a graph judging workstation in a group (hereinafter referred to as the "group") where the target security inspection device is located, and when no graph judging workstation is available in the group, the task to be allocated is allocated to a graph judging workstation in an idle state in an adjacent group of the group where the target security inspection device is located.
Specifically, in step S11, when the target security inspection apparatus generates a task to be assigned, it is first determined whether there is a chart determination workstation in an idle state in the group.
When there is a graph judging workstation in an idle state in the group, in step S12, allocating target graph judging workstations for the tasks to be allocated according to the preset priority order of the graph judging workstations in the idle state in the group.
As shown in fig. 3, specifically, after the target security inspection apparatus generates the task to be assigned, the target security inspection apparatus performs step S31: and acquiring the working state of the image judging workstation in the group. Next, in step S32, it is determined whether or not there is a map determination station in an idle state in the group based on the result obtained in step S31. When there is a map judging workstation in an idle state in the group, step S33 is executed: and sending the tasks to be distributed to the first graph judging workstation according to the sequence from high to low of the preset priority of the graph judging workstations in the idle state in the group. In step S33, the first arbitration station refers to the arbitration station with the highest priority among arbitration stations in the idle state in the group.
Next, step S34 is executed: and judging whether the task to be distributed is processed by the first graph judging workstation or not. When the task to be distributed is processed by the first graph judging workstation, the task distribution is successful; when the task to be allocated is not processed by the first map determination workstation, step S35 is executed: and sending the task to be distributed to a second graph judging workstation according to the preset priority sequence of the graph judging workstations in the idle state in the group. In step S35, the second arbitration map station is included in the arbitration map stations in the group in the idle state, and one or more arbitration map stations that are prioritized after the first arbitration map station.
Preferably, in order not to affect the allocation of subsequently generated tasks to be allocated, the embodiment of the present invention defines the allocation time of each task to be allocated. For example, a threshold value is set, and if the task to be allocated is not processed by any of the map determination workstations when the threshold value is reached, the task to be allocated is finished being allocated.
Specifically, in step S33, for example, when the task to be assigned is sent to the first mapping workstation, the timing is started and recorded as the first time length. After the step S34 determines that the task to be allocated is not processed by the first map determining workstation, the following steps are further executed: judging whether the first time length is smaller than a preset threshold value, wherein:
when the first time length is greater than or equal to a preset threshold value, stopping distributing the tasks to be distributed;
and when the first time length is less than a preset threshold value, sending the task to be distributed to a second graph judging workstation according to a preset priority sequence of the graph judging workstations in the idle state in the group.
It should be further noted that, in the process of allocating the tasks to be allocated to the second map determining stations according to the preset priority order, for each map determining station in the second map determining stations, the process is the same as that of the first map determining station. Specifically, in the process of allocating the tasks to be allocated to the second map judging workstations according to the preset priority order, for each map judging workstation in the second map judging workstations, the following steps are further executed:
when the task to be distributed is processed by the graph judging workstation, outputting successful distribution information;
when the task to be distributed is not processed by the graph judging workstation, judging whether the first time length is smaller than a preset threshold value, wherein:
when the first time length is greater than or equal to a preset threshold value, stopping distributing the tasks to be distributed;
and when the first time length is less than a preset threshold value, sending the task to be distributed to other graph judging workstations arranged behind the graph judging workstation according to the preset priority sequence of the graph judging workstations in the idle state in the group.
For another situation, during the period of the passenger flow peak, all the chart judging workstations in the group are in a busy state, and no chart judging workstation in an idle state exists in the group. At this time, step S33' is performed: and allocating the tasks to be allocated to the graph judging workstations in the idle state in the adjacent groups.
In step S33', the graph determining stations in the idle state in the adjacent group are determined first, and then the target graph determining stations are allocated to the task to be allocated according to the preset priority order of the graph determining stations in the idle state in the adjacent group.
The specific process of step S33' is similar to the above process of task allocation in the graph determination workstation in the group, except that the allocation objects of the tasks to be allocated are changed from the group to the adjacent group, please refer to the description of step S31 to step S35, and will not be described again.
Under the condition that no map judging workstation in an idle state exists in the group, the tasks to be allocated are allocated to the map judging workstations in the idle state in the adjacent groups, so that the map judging pressure of the map judging workstations in the group can be relieved, and the tasks to be allocated generated in the group can be normally allocated and processed when the passenger flow leaps. Through the cooperative work among the sub-groups, the load balance within a certain range at the peak time of the passenger flow is realized.
Fig. 4 is another implementation of the task allocation method according to an embodiment of the present invention. Unlike the embodiment shown in fig. 3, the embodiment shown in fig. 4 preferably updates the preset priority order of the arbitration map workstations in the target group according to the change of the working state of the arbitration map workstations in the target group, and allocates the tasks to be allocated according to the preset priority order of the arbitration map workstations in the target group updated last time.
As shown in fig. 4, specifically, at step S44: after the task to be allocated is not processed by the first mapping workstation, the method further includes step S45: and acquiring the working state of the graph judging workstation in the group so as to determine the graph judging workstation in the idle state currently in the group.
Then, in step S46, the tasks to be allocated are sent to the second map judging workstation in the order from high to low according to the preset priority of the map judging workstation currently in the idle state in the target group.
Correspondingly, it should be further explained here that, in the process of allocating the tasks to be allocated in the second map determining workstation according to the preset priority order, for each map determining workstation in the second map determining workstation, the following steps are further performed:
when the task to be distributed is not processed by the graph judging workstation, acquiring the working state of the graph judging workstation in the group so as to determine the graph judging workstation in an idle state currently in the group;
and sending the tasks to be distributed to the graph judging workstations with the first priority order from high to low according to the preset priority of the graph judging workstations in the idle state in the target group.
Taking the first map judging workstation as the a map judging workstation, and the second map judging workstation comprising the b map judging workstation and the c map judging workstation as an example, when the task to be allocated is not processed by the a map judging workstation, the a map judging workstation is changed from the idle state to the busy state. At this time, by acquiring the working states of the map judging workstations in the target group, the map judging workstations currently in the idle state are determined to be the map judging workstations b and the map judging workstations c in the target group. And then, sending the tasks to be distributed to the graph judging workstations with the first priority order according to the preset priority order of the graph judging workstations b and the graph judging workstations c, and if the priority of the graph judging workstations b is higher than that of the graph judging workstations c, sending the tasks to be distributed to the graph judging workstations b.
In addition, if there is no map determination workstation in the idle state in the group, step S43' is executed: and allocating the tasks to be allocated to the graph judging workstations in the idle state in the adjacent groups.
The specific process of step S43' is similar to the process of task allocation in the graph determination workstation in the group shown in fig. 4 except that the allocation objects of the tasks to be allocated are changed from the group to the adjacent group, please refer to the description of step S41 to step S46, and will not be described again here.
Fig. 5 is a flowchart of another implementation of a task allocation method according to an embodiment of the present invention. As still another embodiment, unlike the embodiment shown in fig. 3, in the embodiment shown in fig. 5: when the target grouping comprises the group and the adjacent grouping, all available chart judging stations in the idle state in the group and the adjacent grouping are sequenced according to a uniform priority rule, and task allocation is carried out from the chart judging work station with the highest priority.
As shown in fig. 5, step S51 is first executed: and acquiring the working states of the graph judging workstations in the group and the adjacent groups. Next, in step S52, the chart determination workstation in the idle state in the present group and the adjacent group is determined according to the result obtained in step S51. And then, according to the preset priority of the graph judging workstations in the idle state in the group and the adjacent groups from high to low, the tasks to be distributed are sent to the first graph judging workstation.
In step S53, the first arbitration station is the arbitration station with the highest priority among all arbitration stations in the idle state in the group and the adjacent group.
Next, step S54 is executed: and judging whether the task to be distributed is processed by the first graph judging workstation or not. When the task to be distributed is monitored to be processed by the first graph judging workstation, the task distribution is successful; when the task to be allocated is not processed by the first map determination workstation, step S55 is executed: and sending the task to be distributed to a second graph judging workstation according to the preset priority order of the graph judging workstations in the idle state in the group and the adjacent groups. In step S55, the second map determination station is a map determination station that is in an idle state in the group and the adjacent group and is prioritized behind the first map determination station.
Preferably, in order not to affect the allocation of subsequently generated tasks to be allocated, the embodiment of the present invention defines the allocation time of each task to be allocated. For example, a threshold value is set, and if the task to be allocated is not processed by any of the map determination workstations when the threshold value is reached, the task to be allocated is finished being allocated.
Specifically, in step S53, for example, when the task to be assigned is sent to the first mapping workstation, the timing is started and recorded as the first time length. After the step S54 determines that the task to be allocated is not processed by the first map determining workstation, the following steps are further executed: judging whether the first time length is smaller than a preset threshold value, wherein:
when the first time length is greater than or equal to a preset threshold value, stopping distributing the tasks to be distributed;
and when the first time length is less than a preset threshold value, sending the task to be distributed to a second graph judging workstation according to a preset priority sequence of the graph judging workstations in the idle state in the group and the adjacent groups.
It should be further noted that, in the process of allocating the tasks to be allocated to the second map determining stations according to the preset priority order, for each map determining station in the second map determining stations, the process is the same as that of the first map determining station. Specifically, in the process of allocating the tasks to be allocated to the second map judging workstations according to the preset priority order, for each map judging workstation in the second map judging workstations, the following steps are further executed:
when the task to be distributed is processed by the graph judging workstation, outputting successful distribution information;
when the task to be distributed is not processed by the graph judging workstation, judging whether the first time length is smaller than a preset threshold value, wherein:
when the first time length is greater than or equal to a preset threshold value, stopping distributing the tasks to be distributed;
and when the first time length is less than a preset threshold value, sending the tasks to be distributed to other graph judging workstations arranged behind the graph judging workstations according to the preset priority sequence of the graph judging workstations in the idle state in the group and the adjacent groups.
Preferably, in the embodiment shown in fig. 5, the arbitration station of the group in which the target security inspection apparatus is located has a higher priority than arbitration stations in adjacent groups. Thus, because the priority of the graph judging work station of the group is higher than that of the graph judging work stations in the adjacent groups, the tasks to be distributed can be firstly distributed among the graph judging work stations of the group, and then distributed among the graph judging work stations in the adjacent groups under the condition that the group has no graph judging work stations in an idle state.
Fig. 6 is a flowchart of another implementation of a task allocation method according to an embodiment of the present invention. Unlike the embodiment shown in fig. 5, the embodiment shown in fig. 6 preferably updates the preset priority order of the arbitration map workstations in the target group according to the change of the working state of the arbitration map workstations in the target group, and allocates the tasks to be allocated according to the preset priority order of the arbitration map workstations in the target group updated last time.
As shown in fig. 6, specifically, at step S64: after the task to be allocated is not processed by the first mapping workstation, the method further includes step S65: and acquiring the working states of the graph judging workstations in the group and the adjacent groups so as to determine the graph judging workstations in the idle state currently in the group and the adjacent groups.
Then, in step S66, the tasks to be allocated are sent to the second map determination workstation in the order from high to low according to the preset priority of the map determination workstation currently in the idle state in the group and the adjacent group.
Correspondingly, it should be further explained here that, in the process of allocating the tasks to be allocated in the second map determining workstation according to the preset priority order, for each map determining workstation in the second map determining workstation, the following steps are further performed:
when the task to be distributed is not processed by the graph judging workstation, acquiring the working states of the graph judging workstations in the group and the adjacent group so as to determine the graph judging workstation in the idle state currently in the group and the adjacent group;
and sending the tasks to be distributed to the graph judging workstations with the first priority order from high to low according to the preset priority of the graph judging workstations in the idle state in the group and the adjacent groups.
Preferably, the predetermined priority order is determined according to at least one of the following: the distance between the graph judging workstation in an idle state in the target group and the target security inspection equipment; the current task number distributed by the graph judging workstation in an idle state in the target grouping; and the historical task quantity distributed to the chart judging workstations in the idle state in the target group.
For example, as the distance between the map judging workstation in an idle state in a target group and the target security inspection equipment is closer and closer, the priority is higher and higher; and the priority of the graph judging workstation with less distributed current task quantity or historical task quantity is higher.
Fig. 7 is a schematic structural diagram of a task allocation system according to another embodiment of the present invention. As shown in fig. 7, the system includes:
a target security inspection device 701, the target security inspection device including at least one security inspection device;
a mapping workstation 702;
a processor 703 and a memory 704 storing computer program instructions;
the processor 703, when executing the computer program instructions, implements the task allocation method provided by embodiments of the present invention.
Preferably, the processor 703 and the memory 704 are both electronic devices carried by the target security apparatus 701 itself.
Specifically, the processor 703 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing an embodiment of the present invention.
Memory 704 may include mass storage for data or instructions. By way of example, and not limitation, memory 704 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, tape, or Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 704 may include removable or non-removable (or fixed) media, where appropriate. The memory 704 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 704 is a non-volatile solid-state memory. In certain embodiments, memory 704 comprises Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 703 implements any of the task allocation methods in the above embodiments by reading and executing computer program instructions stored in the memory 704.
In one example, the task distribution system can also include a communication interface 705 and a bus 710. As shown in fig. 3, the processor 703, the memory 704, and the communication interface 705 are connected by a bus 710 to complete communication therebetween.
The communication interface 705 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present invention.
Bus 710 comprises hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 710 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
Fig. 8 is a schematic structural diagram of a task allocation apparatus according to another embodiment of the present invention. As shown in fig. 8, the task assigning apparatus 800 includes:
a determining module 801, configured to determine, when a target security inspection device generates a task to be allocated, a map judging workstation in an idle state within a target group associated with the target security inspection device;
an allocating module 802, configured to allocate a target graph judging workstation to a task to be allocated according to a preset priority order of graph judging workstations in an idle state.
In addition, in combination with the task allocation method in the foregoing embodiment, the embodiment of the present invention may be implemented by providing a computer storage medium. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the task allocation methods of the above embodiments.
In summary, according to the task allocation method, apparatus, system and computer storage medium of the embodiments of the present invention, when a target security inspection device generates a task to be allocated, a graph judgment workstation in an idle state is first determined in a target group associated with the target security inspection device; and then distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations. In this way, in the embodiment of the present application, tasks are allocated only in the graph judging workstation in the idle state corresponding to the target group associated with the target security inspection device, rather than in the whole network range of the centralized graph judging system. Compared with the existing task allocation mode which needs to allocate tasks in the whole network range of the centralized graph judging system, the task allocation method only allocates the tasks to be allocated generated by the security inspection equipment in a limited range, reduces the transmission quantity of task data in a backbone network of the system, and has the advantages of small bandwidth requirement on the backbone network and capability of being suitable for the situation of limited bandwidth of the backbone network.
In addition, the following defects exist in the existing task allocation mode:
for example, a centralized allocation manner has strong dependency on a scheduling module, and if the scheduling module fails, the whole centralized graph judgment system cannot work. For another example, the distributed allocation method requires that more than half of the nodes can normally work, so once "partition" occurs (the centralized judgment graph system is divided into a plurality of small areas due to network failure, etc., the nodes in the areas are communicated but the different areas are not communicated), the partition with less than half of the nodes cannot normally work. Even more extreme, if the system is split into multiple small partitions, it may cause each partition to fail to work properly, eventually leading to system level paralysis. In addition, since the distributed consistency needs to be ensured, after the partition recovery, a certain time is needed to perform synchronization, re-election and the like between the nodes, which results in a long system recovery time.
According to the embodiment of the invention, an independent contention mode is adopted, namely each security inspection device can independently distribute tasks according to the priority sequence of the image judging workstation, so that each security inspection device is not influenced by the normal task distribution of the security inspection device due to the fault of other security inspection devices or scheduling modules, and the robustness of the system is good.
The embodiment of the invention adopts an independent contention mode, and after the node where any safety inspection equipment is located recovers from the fault, the other nodes cannot be influenced, the recovered node can start to work immediately, the fault recovery time is short, and the stability and the recovery capability of the system are improved.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.
Claims (12)
1. A method of task allocation, the method comprising:
when a target security inspection device generates a task to be distributed, determining a graph judgment workstation in an idle state in a target group associated with the target security inspection device;
and distributing target graph judging workstations for the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state.
2. The task assignment method according to claim 1, wherein when a target security inspection device generates a task to be assigned, the method further comprises, before determining a destination image workstation in an idle state within a target group associated with the target security inspection device:
dividing the security check equipment in the system according to the geographical area to which each security check equipment in the centralized judging graph system belongs and/or the network connection structural relationship among the security check equipment in the system to obtain a plurality of groups;
a arbitration map station is configured for each group.
3. The task allocation method according to claim 1, wherein the target packet comprises at least one of:
grouping where the target security inspection equipment is located;
the target security inspection equipment comprises a group where the target security inspection equipment is located and an adjacent group of the group where the target security inspection equipment is located, wherein the adjacent group is at least one group located in a preset area range of the group where the target security inspection equipment is located.
4. The task allocation method according to claim 3, wherein, when the target security inspection device includes at least two security inspection devices, the allocating a target graph judging workstation to the task to be allocated according to the preset priority order of the graph judging workstation in the idle state specifically includes:
for any one of the at least two security check devices, respectively performing the following steps:
sending the tasks to be distributed generated by the tasks to be distributed to a first graph judging workstation in the idle state according to the preset priority sequence of the graph judging workstations in the idle state in the target group, starting timing, and recording as a first time length;
and under the condition that the task to be allocated is not processed by the first graph judging workstation and the first time length is less than a preset threshold value, sending the task to be allocated to a second graph judging workstation according to a preset priority sequence of the graph judging workstations in an idle state in the target group.
5. The task allocation method according to claim 4, wherein the second judging station comprises: and in the chart judging workstations in the idle state in the target group, the chart judging workstations after the first chart judging workstation are prioritized.
6. The task allocation method according to claim 4, wherein before the tasks to be allocated are sent to a second map judging workstation according to a preset priority order of the map judging workstations in the idle state in the target group, the method further comprises:
acquiring the working state of the graph judging workstation in the target group to determine the graph judging workstation in an idle state currently in the target group;
sending the task to be allocated to a second graph judging workstation according to a preset priority order of the graph judging workstations in an idle state in the target group, wherein the task to be allocated specifically comprises the following steps:
sending the task to be allocated to a second graph judging workstation according to a preset priority order of the graph judging workstation currently in an idle state in the target group, wherein the second graph judging workstation comprises: and in the graph judging workstations in the idle state currently in the target group, prioritizing the first graph judging workstation.
7. The task allocation method according to claim 3, wherein when the target group includes the group in which the target security inspection device is located and the adjacent group, the priority of the mapping workstation of the group in which the target security inspection device is located is higher than that of the mapping workstation in the adjacent group.
8. The task allocation method according to claim 3, wherein when the target security inspection device generates the task to be allocated, determining the graph determination workstation in an idle state within the target group associated with the target security inspection device specifically comprises:
when the target security inspection equipment generates a task to be distributed:
determining a graph judging workstation in an idle state in a group where the target security inspection equipment is located;
and under the condition that the graph judging workstation in the idle state does not exist in the group where the target security inspection equipment is located, determining the graph judging workstation in the idle state in the adjacent group.
9. The task allocation method according to claim 1, wherein the predetermined priority order is determined according to at least one of the following:
the distance between the graph judging workstation in the idle state and the target security inspection equipment;
the current task number distributed by the graph judging workstation in the idle state;
and the number of the historical tasks distributed to the graph judging workstation in the idle state.
10. A task assigning apparatus, characterized in that the apparatus comprises:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a chart workstation in an idle state in a target group associated with a target security inspection device when the target security inspection device generates a task to be distributed;
and the distribution module is used for distributing target graph judging workstations to the tasks to be distributed according to the preset priority sequence of the graph judging workstations in the idle state.
11. A task distribution system, the system comprising:
a target security inspection device comprising at least one security inspection device;
a graph judging workstation;
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a task allocation method as claimed in any one of claims 1 to 9.
12. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement a task allocation method as claimed in any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010718488.7A CN113971087A (en) | 2020-07-23 | 2020-07-23 | Task allocation method, device and system and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010718488.7A CN113971087A (en) | 2020-07-23 | 2020-07-23 | Task allocation method, device and system and computer storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113971087A true CN113971087A (en) | 2022-01-25 |
Family
ID=79585379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010718488.7A Pending CN113971087A (en) | 2020-07-23 | 2020-07-23 | Task allocation method, device and system and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113971087A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114219501A (en) * | 2022-02-22 | 2022-03-22 | 杭州衡泰技术股份有限公司 | Sample labeling resource allocation method, device and application |
CN115460291A (en) * | 2022-08-23 | 2022-12-09 | 成都智元汇信息技术股份有限公司 | Inter-group scheduling method based on central configuration, central server and system |
CN117112816A (en) * | 2023-10-20 | 2023-11-24 | 浙江啄云智能科技有限公司 | Sorting method, device, equipment and storage medium for security inspection images |
CN117726144A (en) * | 2024-02-07 | 2024-03-19 | 青岛国彩印刷股份有限公司 | Intelligent digital printing management system and method based on data processing |
-
2020
- 2020-07-23 CN CN202010718488.7A patent/CN113971087A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114219501A (en) * | 2022-02-22 | 2022-03-22 | 杭州衡泰技术股份有限公司 | Sample labeling resource allocation method, device and application |
CN114219501B (en) * | 2022-02-22 | 2022-06-28 | 杭州衡泰技术股份有限公司 | Sample labeling resource allocation method, device and application |
CN115460291A (en) * | 2022-08-23 | 2022-12-09 | 成都智元汇信息技术股份有限公司 | Inter-group scheduling method based on central configuration, central server and system |
CN115460291B (en) * | 2022-08-23 | 2023-05-02 | 成都智元汇信息技术股份有限公司 | Inter-group scheduling method based on center configuration, center server and system |
CN117112816A (en) * | 2023-10-20 | 2023-11-24 | 浙江啄云智能科技有限公司 | Sorting method, device, equipment and storage medium for security inspection images |
CN117112816B (en) * | 2023-10-20 | 2024-02-02 | 浙江啄云智能科技有限公司 | Sorting method, device, equipment and storage medium for security inspection images |
CN117726144A (en) * | 2024-02-07 | 2024-03-19 | 青岛国彩印刷股份有限公司 | Intelligent digital printing management system and method based on data processing |
CN117726144B (en) * | 2024-02-07 | 2024-05-07 | 青岛国彩印刷股份有限公司 | Intelligent digital printing management system and method based on data processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113971087A (en) | Task allocation method, device and system and computer storage medium | |
CN108156074B (en) | Protection switching method, network equipment and system | |
US8107431B2 (en) | Master station in communications system and access control method | |
CN101873269B (en) | Data retransmission device and method for distributing buffer to ports | |
CN106301987B (en) | Message loss detection method, device and system | |
CN110858986A (en) | Bandwidth adjusting method, device, communication equipment and computer readable storage medium | |
CN111884875A (en) | Offline device determination method and device | |
KR101388530B1 (en) | Apparatus and method for link duplication in mobile communication system | |
US8619627B2 (en) | Automatic determination of groupings of communications interfaces | |
US6584100B1 (en) | System for establishing a transmission sequence for plural terminals in a wireless network | |
Rios et al. | A hybrid multiple-access protocol for data and voice-packet over local area networks | |
JP3092580B2 (en) | Band allocation method and transmission system | |
JPS61280130A (en) | Transmission right control method | |
CN115118635A (en) | Time delay detection method, device, equipment and storage medium | |
CN108337135B (en) | Communication control system, method and device | |
CN110602711A (en) | Spectrum resource allocation method, device and system based on satellite network single-hop link establishment | |
US7672231B1 (en) | System for multiplying communications capacity on a time domain multiple access network using slave channeling | |
CN111405670A (en) | Resource allocation method, device, equipment and computer storage medium | |
CN110995621B (en) | Method and switch for selecting uplink port to communicate | |
JPH07135502A (en) | Method and device for controlling allocation of time slot | |
CN114039937B (en) | Network resource management method and related equipment | |
US20230269194A1 (en) | Method For Transmitting a Data Element Between a First Control Unit of a Vehicle and a Second Control Unit of the Vehicle, Computer-Readable Medium, System and Vehicle | |
CN112514495B (en) | Time distribution method and time distribution device | |
CN111601376B (en) | Message transmission method, system, terminal device and storage medium | |
CN112788778B (en) | Data sending method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |