A state-driven collaborative scheduling method for film and television editing tasks
Through the state-driven coordinated scheduling method of film and television editing tasks, the ‘look-link-task’ decoupling model and task state machine are established, which solves the problem of information out-synchronization in the traditional method and improves the efficiency and quality of film and television editing.
Patent Information
- Application Number
- CN202110774518.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-08
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-07-08
AI Technical Summary
Traditional film and television editing management methods realize task planning and allocation through Excel data tables, resulting in information being out of synchronization and the production process cannot be tracked in real time, making it difficult to synchronize task collaborative scheduling data information, affecting the efficiency and quality of film and television editing.
Adopt a state-driven collaborative scheduling method for film and television editing tasks, and design a task state machine and a collaborative scheduling algorithm to realize task state changes and associated task triggering, and design elimination for task blocking problems method.
It effectively solves the problem of information out-synchronization in coordinated scheduling of film and television editing tasks, improves the efficiency and quality of film and television editing, and realizes the systematic management of coordinated scheduling of tasks.
Smart Images

Figure CN113656154B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer task collaborative scheduling, and relates to a state-driven based film and television editing task collaborative scheduling method. Background Art
[0002] In the new era of rapid social development, the diversified development of art and culture has become the mainstream of cultural development. Film and television works have become an important way for people to relax and entertain with their special communication characteristics. In recent years, the government has promulgated a number of policy provisions to fully support the high-quality development of the film and television industry. The high-quality development of the film and television industry is of great significance to the construction of a cultural power in my country and the improvement of the cultural life of the people. To achieve high-quality output of a film and television work, it must be produced in a refined manner. Nowadays, there are many shots in a film. The production of each shot requires the integration of complex 3D models, special effects, animations, sounds, text and other information. There are many production personnel involved in the production of the shots, the relationship between tasks is complex, and the production cycle is long. The traditional film and television editing management method uses Excel data tables to realize the planning and allocation of tasks. It cannot track the execution of tasks in the production process in real time, resulting in "information islands", making it difficult to synchronize data information such as task collaborative scheduling, which has caused great difficulties in improving the efficiency and quality of film and television editing. This management method no longer meets the needs of refined film and television editing management. How to use computer technology to realize the systematic management of the film and television editing process and solve its task planning and collaborative scheduling has become an urgent problem to be solved in the industry.
[0003] Current research on collaborative task scheduling focuses on collaborative scheduling of tasks in production workshops, but there is less research on film and television post-production. The film and television editing process has its own characteristics, and the scheduling scheme of the production workshop cannot be well adapted to the collaborative scheduling of film and television editing tasks. Completing the collaborative scheduling of tasks in the film and television editing process is a specific problem that requires in-depth research in a specific field. Summary of the invention
[0004] The purpose of the present invention is to provide a state-driven collaborative scheduling method for film and television editing tasks to solve the problem of information asynchrony in the current film and television editing field, which still relies on Excel tables for task allocation, supervision, and task flow.
[0005] The technical solution adopted by the present invention is a state-driven collaborative scheduling method for film and television editing tasks, which is specifically implemented in the following steps:
[0006] Step 1: Establish a decoupling model for film and television editing tasks;
[0007] Step 2, according to the decoupled film and television editing task model established in step 1, establish a state machine for the film and television task under the task model, including the task state design and state flow rule design;
[0008] Step 3: Design an algorithm for collaborative scheduling of film and television editing tasks. This algorithm is divided into collaborative scheduling of tasks within a link and collaborative scheduling of tasks between links. During the task flow, the task status change and the triggering of related tasks are completed according to this algorithm;
[0009] Step 4, design a method to eliminate the blocking of film and television editing tasks, which is used to solve the problem that the task state cannot be changed in the state-driven task triggering scheduling, resulting in the blocking of subsequent tasks, and optimize step 3.
[0010] The present invention is also characterized in that:
[0011] Wherein step 1 is specifically implemented as follows:
[0012] Step 1.1, establish a film and television editing task model that decouples “shot-link-task”;
[0013] Step 1.2, design a multi-link model and a multi-link model storage structure;
[0014] Step 1.3, design a multi-task model and a multi-task model storage structure;
[0015] Step 1.1 specifically involves splitting the production process of a film and television lens into links, and splitting the work to be completed in the link into one or more production tasks; a link is the completion process of a lens; a task is the smallest execution unit and scheduling unit in the film and television editing process. In the film and television editing process, the lens is the starting point of the film and television editing process. A lens is bound to one or more production links, and the links have a parallel or sequential relationship. Each link is bound to a root task, and the root task will be divided into multiple subtasks according to the complexity of the task;
[0016] The step 1.2 is specifically as follows: after the film and television lens information is successfully created, it is necessary to design the lens production links according to the lens production requirements, including the types of links, the association relationship between the parallel execution or sequential execution of the links, the production requirements of the links, the estimated start and end time of the links, and the type of work information of the links. In order to realize the storage of the above link content, the data structure designed for the link node is Link{Int asset_id; Int link_pid; String content; Timestamp start_time; Timestamp end_time; Int dept_id; Int task_id}, where asset_id represents the lens ID bound to the link, link_pid represents the association relationship between links, and the post-link link saves the link_id of the pre-link in link_pid. If a link has no pre-link, -1 is saved in this field.
[0017] The step 1.3 is specifically as follows: after the link is successfully created, a production task is created for the link according to the content of the production link and the cycle requirements of the production link. During the task creation process, a link can only be associated with one root task. After the root task is successfully created, the task ID of the root task is updated to the task_id of the link data structure. The relationship between the production link and the root task is stored using a hash table data structure; a multi-tree parent-child task production model is designed, and the data structure supports splitting a task into multiple subtasks, which can be executed concurrently or sequentially; the root node of the tree is also the root task directly bound to the link, and the root task can be further split into multiple subtasks, and the subtask can be further divided into sub-subtasks; the data structure of the task node is Task{Int task_pid; String content; Timestamp start_time; Timestamp end_time; Int user_id; Float total_hour; Int status}; task_pid indicates the parent task of the task. If a task has no parent task, task_pid is set to -1. If a task has a parent task, the content of this field is the ID of the parent task. content indicates the specific content of the task. start_time and end_time indicate the estimated start and end time of the task. user_id is the executor of the task. total_hour indicates the estimated production time of the production task. status indicates the flow status of the task. The default setting is the unstarted status.
[0018] Wherein step 2 is specifically implemented as follows:
[0019] Step 2.1, film and television editing task state model analysis;
[0020] Step 2.2, propose the state transition rules of film and television editing tasks;
[0021] Step 2.1 is as follows: divide the status of the film and television editing task into six major states, P0 means not started, P1 means in progress, P2 means under review, P3 means completed, P4 means paused, P5 means timed out, PT is the temporary state after the parent task is executed for the child task and the preparation work is completed; the major state includes internal states, called small states, and the small state is a subdivision of the major state; in the P0 state, the internal states include NOT_STARTED, WAITING_TO_START, and READY_TO_START, and these small states are marked by the task creator; in the P1 state, it is divided into 7 small states: standard NORMAL, OPEN, IN_PROGRESS in production, OUTSOURCE in task outsourcing, FEEDBACK, TEST, and REDO. The default small state is standard NORMAL. When the task-related file is imported into the film and television editing software, the small state is migrated to OPEN. After the task is sent out for outsourcing, the task status is Outsourcing is in progress in OUTSOURCE status, and the other statuses are manually marked; the P2 status under review is divided into task review APPROVE, pending review PENDING_REVIEW, director review samples DAILIES, and client review CLIENT_REVIEW. After submission for review, the small status is pending review PENDING_REVIEW. When the task level is reviewed, the small status is transferred to APPROVED. The small status of director review and client review is generated by the system according to the review object; the completed status P3 is divided into seven statuses: APPROVED, DIRECTOR_APPROVED, REVISION, FINAL, DELIVERED, OMITTED, and CLOSED. APPROVED is the default small status, and the other small statuses are manually marked; in the paused P4 status, the internal status includes ON_HOLD, IGNORE, and PAUSE, which are manually marked;
[0022] The step 2.2 is specifically as follows:
[0023] Step 2.2.1, design the single task state transition rule. When a single production task is created, the default state is the unstarted P0 state. If the task has a predecessor parent task, when the predecessor task state migrates to the P3 completed state and outputs the production results, the subsequent task is driven to enter the P1 in progress state; when the task submits its own production results for review, the task state automatically migrates to the P2 reviewing state. During the review process, if any level of approval fails, the task state automatically migrates to P1 in progress, and promptly notifies the task executor to restart the production of the task. After the task passes all the review processes, the task state migrates to the P3 completed state; if the ongoing task is still not submitted for review after the end time arrives, the task is marked as a timed task and the state is P5 timed out; when the lens is paused in production, all tasks of the lens, regardless of their current state, will automatically migrate to the P4 paused state;
[0024] Step 2.2.2, design the state transition rules of the parent task that contains subtasks. When the parent task is split into multiple subtasks, each subtask will perform state transition according to the state transition rules of a single task. The state transition of the parent task is related to the state of the subtask. When initializing the task, the states of the parent and child tasks are initialized to P0 not started. If the parent task is the root task bound to a parallel link, or the root task bound to the first link in a sequential link, the parent task will be scheduled after the task start time arrives, and the state will be changed to P1 in progress. If the parent task is the root task bound to a subsequent link in a sequential link, then when the parent task is completed in the previous link and the state is migrated to P3, the parent task will be triggered, and the task state will be migrated to P1 in progress. The parent task paves the way for the execution of the split subtasks. After this part of the work is completed, the status is changed to P2 under review after submission for review. If any level of the review fails, the status is migrated to P1 in progress. If the review passes, the parent task is migrated to the temporary completed state PT, and the subtask scheduling is triggered at this time. If the subtask is a single task, the status is migrated according to the state transition rules of the single task. After all subtask status migrations are completed, the production results of the subtasks are integrated and submitted for review. At this time, the status is migrated to P2 again. If it fails to pass the review, the parent task status is migrated to the temporary state PT again, and the subtask production results are merged again. If it passes the review, the parent task status is migrated to the completed state P3. When the lens is set to pause, both the parent and child tasks flow to P5.
[0025] Step 3 is specifically implemented as follows:
[0026] Step 3.1, determine whether the task is intra-link task collaborative scheduling or inter-link task collaborative scheduling;
[0027] Step 3.2, tasks within a link, using the collaborative scheduling algorithm for tasks within a link;
[0028] Step 3.3, inter-link tasks, adopt inter-link task collaborative scheduling algorithm;
[0029] Step 3.2 is as follows: collaborative scheduling of tasks within a link. The production link of a shot can only be bound to one root task. The root task describes the time node of the task under the production link, the production content and strategy of the task, the urgency of the task, the difficulty of the task and the person responsible for the execution of the task. The complex task is decomposed into multiple subtasks, and the subtasks can be further decomposed according to the complexity of the task;
[0030] Step 3.3 is specifically as follows: collaborative scheduling of tasks between links. The lens production link has two types of links: parallel and sequential. In the parallel link, the production process between links is independent. The idea of copy-on-write is adopted to copy a copy of the lens production material in each parallel production link. The parallel link triggers the root task scheduling through the preset time, and the subtasks of the root task are collaboratively scheduled in accordance with the collaborative scheduling of tasks within the link.
[0031] In the sequential production link, the scheduling of the root task of the subsequent link is related to the root task status of the preceding link. When the root task status of the preceding link is migrated to the P3 status, it means that all tasks in the preceding link have been completed. At the same time, the root task has integrated the results of all tasks in the link into the production results of the link. Since multiple versions of task production results may appear in the whole process of P3, when the small status of the root task is marked as the final version, the scheduling of the root task of the subsequent link is triggered. The production materials of the subsequent link come from the production results output by the root task of the preceding link.
[0032] Step 4 is specifically implemented as follows:
[0033] Step 4.1, calculate the task blocking value;
[0034] Step 4.2, analyze the reasons for task blocking;
[0035] Step 4.3, task blocking tuning;
[0036] Step 4.1 is as follows:
[0037] Step 4.1.1: Calculate the task progress value S under the ideal production at the current time node of the task according to formula (1): estimation , where D present is the current time node, D start is the starting time node of the task, D end The end time node preset for the task:
[0038]
[0039] Step 4.1.2: Calculate the actual production progress S of the task at the current time node according to formula (2): practical , where D actual is the actual working time consumed by the task, H daily Daily working hours:
[0040]
[0041] Step 4.1.3, calculate the blocking value S of the task progress in the actual production environment compared with the ideal state according to formula (3) deviation :
[0042] S devation =S estimation -S practical (3)
[0043] The blocking value S in formula (3) deviation , estimates the progress of the task. When the value is negative, it means that the progress is ahead of schedule. The larger the absolute value, the earlier the progress. When the blocking value is positive, it means that the progress is lagging behind. The larger the absolute value, the more serious the progress lag and the more serious the task blocking.
[0044] The step 4.2 is specifically as follows:
[0045] Step 4.2.1, find the production link bound to the task task, and obtain the type of work dept bound to the production link through the link;
[0046] Step 4.2.2, obtain the executors_list of the worker and the start time, end time, task status, and task working hours of each task in the cycle;
[0047] Step 4.2.3, use pandas to process the data into a data frame format df = pd.DataFrame(executors_list);
[0048] Step 4.2.4, group and count the task performers;
[0049] Step 4.2.5, loop through the earliest start time of the person's task within the statistical period, start, and the latest end time of the person's task within the statistical period, and obtain the working hours and total of all tasks of the member;
[0050] Step 4.2.6, when start is less than end, the date is moved back, and the planned time and actual time of each day are counted cyclically;
[0051] Step 4.2.7, the data is classified by personnel, encapsulated into json data, and the json data is added to the all_executor_time list;
[0052] The step 4.3 is specifically as follows:
[0053] Step 4.3.1, in the task blocking elimination method, the input parameters are task ID, task blocking deviation threshold threshold, and busyness degree of film and television editors busy_degree. In order to meet the business needs of different film and television editing, the parameters of threshold and busy_degree are dynamically adjusted in the form of interface calls.
[0054] Step 4.3.2, calculate the blocking value of the task according to the input task ID. If the blocking value deviation is greater than 0, it means that the task progress is lagging behind;
[0055] Step 4.3.3, when the progress lag deviation value is greater than the system-defined threshold, first obtain the type of work corresponding to the task, then call the personnel busyness analysis algorithm to calculate the workload corresponding to the task executor;
[0056] Step 4.3.4: If the busyness of the task executor is higher than the busyness threshold set by the system, the system will automatically recommend a person with a lower busyness in the job type and bind the person as the task executor;
[0057] Step 4.3.5: If the task blockage is not caused by busy staff, increase the urgency of the task to urge task processing.
[0058] The beneficial effects of the present invention are:
[0059] The present invention deeply studies the specific problems of task collaborative scheduling in the field of film and television editing, and solves the problem of difficult collaborative scheduling of complex and changeable film and television editing tasks. For complex film and television editing tasks, a "shot-link-task" decoupled film and television editing task model is first established. On this basis, according to specific field problems, the film and television editing task status and state migration rules are studied, and a task collaborative scheduling solution based on state driving is designed. This solution is a customized solution in the field of collaborative scheduling of film and television editing tasks, which can well solve the problem of difficult collaborative scheduling of film and television editing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is the "shot-link-task" production task model decoupled in step 1 of the state-driven film and television editing task collaborative scheduling method of the present invention;
[0061] Figure 2 It is a storage structure based on a hash table that associates the links and tasks in step 1 of a state-driven collaborative scheduling method for film and television editing tasks of the present invention;
[0062] Figure 3 It is the tree-based parent-child task storage structure in step 1 of the state-driven film and television editing task collaborative scheduling method of the present invention;
[0063] Figure 4 It is the state transition diagram of the film and television editing task established in step 2 of the state-driven film and television editing task collaborative scheduling method of the present invention;
[0064] Figure 5 The task model including subtasks in step 2 of the state-driven collaborative scheduling method for film and television editing tasks of the present invention;
[0065] Figure 6 It is a task splitting model in the link in step 3 of the state-driven collaborative scheduling method for film and television editing tasks of the present invention;
[0066] Figure 7 It is an activity diagram of collaborative scheduling of tasks within the link in step 3 of a state-driven collaborative scheduling method for film and television editing tasks of the present invention;
[0067] Figure 8 It is the link decomposition of the film and television shots in step 3 of the state-driven film and television editing task collaborative scheduling method of the present invention;
[0068] Fig. 9 It is an activity diagram of task collaborative scheduling between links in step 3 of a state-driven film and television editing task collaborative scheduling method of the present invention;
[0069] Fig.10 It is a task progress blocking deviation monitoring diagram in step 4 of a state-driven film and television editing task collaborative scheduling method of the present invention;
[0070] Fig.11 It is a structural block diagram of a state-driven collaborative scheduling method for film and television editing tasks according to the present invention. DETAILED DESCRIPTION
[0071] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0072] The present invention provides a state-driven collaborative scheduling method for film and television editing tasks, such as Fig.11 As shown, the specific steps are as follows:
[0073] Step 1: Establish a decoupled “shot-link-task” production task model, such as Figure 1 As shown, specifically:
[0074] Step 1.1, split the production process of film and television lenses according to links, and split the work that needs to be completed in the link into one or more production tasks. The link is the completion process of the lens, and its type is fixed, such as animation production, lighting, rendering, etc. Different links correspond to different types of work; the task is the smallest execution unit and scheduling unit in the film and television editing process. In the film and television editing process, the lens is the starting point of the film and television editing process. A lens is bound to one or more production links. There is a parallel or sequential relationship between the links. Each link is bound to a root task. The root task will be divided into multiple sub-tasks according to the complexity of the task. The lens-link-task model, such as Figure 1 As shown. In this figure, this lens is bound to three production links, among which link 1 and link 2 are parallel production links, link 2 and link 3 are sequential production links, link 3 is the subsequent production link of link 2, and the parallel production links are independent of each other in the lens production process. The sequential production link is in the lens production link, and the production materials of the subsequent production link depend on the production results of the previous production link; the root task bound to link 1 is R_task1, the root task bound to link 2 is R_task2, and the root task bound to link 3 is R_task3; the root task R_task2 can be split into multiple subtasks when the task workload is large or the task complexity is high;
[0075] Step 1.2, after the film and television lens information is successfully created, it is necessary to design the lens production links according to the lens production requirements, including the types of links, the relationship between the parallel execution or sequential execution of the links, the production requirements of the links, the estimated start and end time of the link, the type of work information of the link, etc. In order to realize the storage of the above link content, the data structure designed for the link node is Link{Int asset_id; Int link_pid; String content; Timestamp start_time; Timestamp end_time; Int dept_id; Int task_id}, where asset_id represents the lens ID bound to the link, link_pid represents the relationship between links, and the post-link link saves the link_id of the previous link in link_pid. If a link has no previous link, -1 is saved in this field. Figure 1As shown, link 3 is the post-link of link 2, so the link_pid saved in link 3 is the ID information of link 2. If the links are in a parallel relationship, such as link 1 and link 2 are in a parallel relationship, it only needs to be marked as -1 in link_pid. content indicates the production content of the link, start_time and end_time indicate the production cycle of the link, and the storage format is a timestamp. dept_id indicates the type of work information bound to the link, and task_id indicates the root task bound to the link. Since the task has not been created when the link is created, task_id is first set to -1.
[0076] Step 1.3, after the link is successfully created, create a production task for the link according to the content of the production link and the cycle requirements of the production link. During the task creation process, a link can only be associated with one root task. After the root task is successfully created, the task ID of the root task is updated to the task_id of the link data structure. The relationship between the production link and the root task is stored using a hash table data structure, such as Figure 2 Considering that the task volume is too large or the task complexity is high, a multi-tree parent-child task production model is designed as follows Figure 3 This data structure supports splitting a task into multiple subtasks, which can be executed concurrently or sequentially. Figure 3 In the figure, task0 is the root node of the tree, and is also the root task directly bound to the link. The root task task0 is split into task1, task2, and task3 subtasks, and subtask task1 is further divided into task4 and task5. The data structure of the task node is Task{Int task_pid; String content; Timestamp start_time; Timestamp end_time; Int user_id; Float total_hour; Int status}. Among them, task_pid represents the parent task of the task. If a task has no parent task, task_pid is set to -1. If the task has a parent task, the content of this field is the ID of the parent task. Content represents the specific production content of the task. Start_time and end_time represent the estimated start time and end time of the task. User_id is the executor of the task. Total_hour represents the estimated production time of the production task. Status is the flow status of the task, which is set to the unstarted status by default.
[0077] Step 2: Based on the decoupled film and television editing task model established in step 1, a state machine for the film and television task under the task model is established, such as Figure 4 As shown:
[0078] Step 2.1, this manual divides the status of the video editing task into six major states, which are called major states in this manual. Figure 4 The article describes the macro status and migration process of film and television editing tasks. P0 means not started, P1 means in progress, P2 means under review, P3 means completed, P4 means paused, P5 means timed out, and PT is the temporary state after the parent task completes the preparation work for the child task. The macro status includes internal status, which is called small status in the article. Small status is a subdivision of the macro status and is of great significance to the refined management of task status. In the P0 state, the internal status includes NOT_STARTED, WAITING_TO_START, and READY_TO_START. These small statuses are manually marked by the task creator. In the ongoing P1 status, there are 7 small statuses: standard NORMAL, OPEN, IN_PROGRESS, OUTSOURCE, FEEDBACK, TEST, and REDO. The default small status is standard NORMAL. When the task-related file is imported into the film and television editing software, the small status is migrated to OPEN. After the task is sent out for outsourcing, the task status is OUTSOURCE. The remaining statuses are manually marked. The P2 status under review is divided into APPROVE, PENDING_REVIEW, DAILIES, and CLIENT_REVIEW. After submission for review, the small status is PENDING_REVIEW. When the task is reviewed at the first level, the small status is migrated to APPROVE. The small status of director review and customer review is generated by the system according to the review object. The completion status P3 is divided into seven states: APPROVED, DIRECTOR_APPROVED, REVISION, FINAL, DELIVERED, OMITTED, and CLOSED. APPROVED is the default small state, and the remaining small states are manually marked. In the paused P4 state, the internal states include ON_HOLD, IGNORE, and PAUSE, which are manually marked. This article adopts the inter-related method of large states and small states. The large state automatically flows through the state transition model and transition rules. The small state is flexibly configured within the large state, which is convenient for task managers to monitor the specific details of the actual flow of each task;
[0079] Step 2.2, single task status transition rules. When a single production task is created, the default status is the unstarted P0 status. If the task has a predecessor parent task, when the predecessor task status migrates to the P3 completed status and outputs the production results, the subsequent task is driven to enter the P1 in progress status. When the task submits its own production results for review, the status of the task automatically migrates to the P2 reviewing status. During the review process, if any level of approval fails, the task status automatically migrates to P1 in progress, and promptly notifies the task executor to restart the production of the task. After the task passes all review processes, the task status migrates to the P3 completed status. If the ongoing task has not been submitted for review after the end time arrives, the task will be marked as a timed task and the status will be P5 timed out. When the lens is paused in production, all tasks of the lens will automatically migrate to the P4 paused status regardless of their current status.
[0080] Step 2.3, contains the state transition rules of the parent task of the subtask, such as Figure 5 As shown, this parent task is split into multiple subtasks, and each subtask performs state transfer according to the state transition rules of a single task. The state transfer of the parent task is related to the state of the subtask. When initializing the task, the status of both the parent and child tasks are initialized to P0 not started. If the parent task is a root task bound to a parallel link, or a root task bound to the first link in a sequential link, the parent task will be scheduled after the task start time arrives, and the status will be changed to P1 in progress; if the parent task is a root task bound to a subsequent link in a sequential link, then when the parent task is completed in the previous link and the status is transferred to P3, the parent task will be triggered, and the task status will be transferred to P1 in progress. The parent task will pave the way for the execution of the split subtasks. After this part of the work is completed, the status will be changed to P2 under review after submission for review, as shown in If any level of the review fails, the status will be transferred to P1 in progress. If the review passes, the parent task will be transferred to the temporary completed state PT, and the subtask scheduling will be triggered. If the subtask is a single task, the status will be transferred according to the state transition rules of the single task. After all subtask status transfers are completed, the production results of the subtasks are integrated and submitted for review. At this time, the status will be transferred to P2 again. If the review fails, the parent task status will be transferred to the temporary state PT again, and the production results of the subtasks will be merged again. If the review passes, the parent task status will be transferred to the completed state P3. When the lens is set to pause, both the parent and child tasks will flow to P5.
[0081] Step 2.4, the state transition algorithm pseudo code is shown in Table 1:
[0082] Table 1 Pseudo code of state transition algorithm
[0083]
[0084] Step 3: Design a collaborative scheduling mechanism for film and television editing tasks, which is divided into collaborative scheduling of tasks within a link and collaborative scheduling of tasks between links:
[0085] Step 3.2, collaborative scheduling of tasks within a link. The production link of a shot can only be bound to one root task. The root task describes the time node of the task under the production link, the production content and strategy of the task, the urgency of the task, the difficulty of the task, and the person responsible for the execution of the task. In the process of complex film and television lens production, if a single task mode is used within the link, it will affect efficiency on the one hand, and on the other hand, it is difficult to guarantee the production quality because the task is not subdivided. To this end, complex tasks can be decomposed into multiple subtasks, and the subtasks can be further decomposed according to the complexity of the task, as follows Figure 6 As shown in the figure, the root task task0 is decomposed into task1, task2 and task3, and the subtask task1 is decomposed into task4 and task5. The scheduling of task0 is determined by link 1. If link 1 is the post-link of a link, the scheduling of task0 of link 1 needs to be coordinated according to the task coordination method between links. This method will be introduced in step 3.3. In this step, link 1 is temporarily considered to be the parallel link of a certain shot. The scheduling of task0's post-subtasks task1, task2 and task3 is scheduled according to the trigger event of task0's state change. When the state of task0 is incomplete (including P0 not started, P1 in progress, P2 under review, P4 suspended, and P5 timed out), the post-task of task0 is added by the system. Lock hiding logically implements the isolation of tasks between levels. When the hierarchical parent task task0 is executed in parallel for subsequent subtasks, it will make multiple copies of the production materials and submit the operation for review. After the review is passed, the major status of task0 is migrated to the PT temporary completion status. The state-driven mechanism is used to notify the subsequent subtasks associated with the parent task to unlock, and the major status of the subsequent subtask is migrated to the ongoing P2 status, exposing the task to the corresponding task executors. The editing process between subtasks is carried out independently. After the major status of all subtasks is migrated to the P3 completion status, the scheduling of the parent task is driven, and the parent task completes the merging work. The parent task merges the subtask production results and submits it for review again. After the review is completed, the parent task is completed. If the subtasks continue to be split, the collaborative process is consistent with the above method. Figure 6The activity diagram of the corresponding task collaborative scheduling is shown in Figure 7. Task0 is split into three post-tasks. When the state of task0 changes to the PT state, the task scheduling of task1, task2 and task3 is triggered. Task1 is split into task4 and task5. When the state of task1 changes to the PT state, the task scheduling of task4 and task5 is triggered. When the execution completion state of task4 and task5 migrates to the P3 completion state, task1, as the parent task, merges the results of task4 and task5. At the same time, task2 and task3 are also executed in parallel. When the states of task1, task2 and task3 migrate to the P3 completion state, task0 merges the results of its post-tasks task1, task2 and task3. After the merger is completed and submitted for review, task0 will be migrated to the P3 completion state.
[0086] Step 3.3, collaborative scheduling of tasks between links. The production process of a lens has two types of links: parallel and sequential. For example, Figure 8 As shown in the figure, a shot is divided into three production links, among which link 1 and link 2 are parallel production links, and link 3 is the post-link of link 2. In the parallel links, the production process between the links is independent. The idea of copy-on-write is adopted to copy a copy of the production material of the shot in each parallel production link. The parallel link triggers the root task scheduling through the preset time, and the subtasks of the root task are collaboratively scheduled in the way of collaborative scheduling of tasks within the link. In the sequential production link, the scheduling of the root task of the post-link is related to the root task status of the pre-link. When the root task status of the pre-link is migrated to the P3 status, it means that all tasks in the pre-link have been completed at this time, and the root task has integrated the results of all tasks in the link into the production results of the link. Since there may be multiple versions of the task production results in the whole process of P3, when the small status of the root task is marked as the final version, the root task scheduling of the post-link is triggered. The production materials of the post-link come from the production results output by the root task of the pre-link. As shown Fig. 9 It describes the task coordination and scheduling activities between links. Link 1 and Link 2 are two parallel production links of the lens. Link 2 is bound to the post-production link 3. Link 1 and Link 2 are executed in parallel. The root task scheduling of Link 3 is triggered by the state P3 and the small state FINAL of the root task of Link 2. The production results of Link 2 are used as the production material source of Link 3. After the production of Link 3 and Link 1 is completed, the production results of the root tasks of Link 3 and Link 1 are merged to form the production results of the lens.
[0087] Step 4, design a method for eliminating the blocking of film and television editing tasks, which is used to solve the problem that the task status cannot be changed in the state-driven mode, resulting in the blocking of subsequent tasks, and optimize step 3;
[0088] Step 4.1, the calculation result of the task blocking value is as follows Fig.10 As shown;
[0089] Step 4.1.1: Calculate the task progress value S under the ideal production at the current time node of the task according to formula (1): estimation , where D present is the current time node, D start is the starting time node of the task, D end The preset end time node for the task.
[0090]
[0091] Step 4.1.2: Calculate the actual production progress S of the task at the current time node according to formula (2): practical , where D actual is the actual working time consumed by the task, H daily Daily working hours.
[0092]
[0093] Step 4.1.3, calculate the blocking value S of the task progress in the actual production environment compared with the ideal state according to formula (3) deviation .
[0094] S devation =S estimation -S practical (3)
[0095] The blocking value S in formula (3) deviation , estimates the progress of the task. When the value is negative, it means that the progress is ahead of schedule. The larger the absolute value, the earlier the progress. When the blocking value is positive, it means that the progress is lagging behind. The larger the absolute value, the more serious the progress lag and the more serious the task blocking.
[0096] Step 4.2 is as follows:
[0097] The reason for task blocking is largely due to the heavy workload and high busyness of the task executors. Therefore, the busyness analysis of the task executors can clarify the cause of task blocking. The workload statistics algorithm of task executors is as follows:
[0098] Step 4.2.1, find the production link bound to the task task, and obtain the type of work dept bound to the production link through the link;
[0099] Step 4.2.2, obtain the executors_list of the worker of this type, as well as the start time, end time, task status, and task working hours of each task in this cycle;
[0100] Step 4.2.3, use pandas to process the data into a data frame format df = pd.DataFrame(executors_list);
[0101] Step 4.2.4, group and count the task performers;
[0102] Step 4.2.5, loop through the earliest start time of the person's task within the statistical period, start, and the latest end time of the person's task within the statistical period, and obtain the working hours and total of all tasks of the member;
[0103] Step 4.2.6, when start is less than end, the date is moved back, and the planned time and actual time of each day are counted cyclically;
[0104] Step 4.2.7, data is classified by personnel, encapsulated into json data, and added to the all_executor_time list
[0105] Step 4.3 is as follows:
[0106] Step 4.3.1, in the task blocking elimination method, the input parameters are task ID, task blocking deviation threshold threshold, and busyness degree of film and television editors busy_degree. In order to meet the business needs of different film and television editing, the parameters of threshold and busy_degree are dynamically adjusted in the form of interface calls.
[0107] Step 4.3.2, calculate the blocking value of the task according to the input task ID. If the blocking value deviation is greater than 0, it means that the task progress is lagging behind;
[0108] Step 4.3.3, when the progress lag deviation value is greater than the system-defined threshold, first obtain the type of work corresponding to the task, then call the personnel busyness analysis algorithm to calculate the workload corresponding to the task executor;
[0109] Step 4.3.4: If the busyness of the task executor is higher than the busyness threshold set by the system, the system will automatically recommend a person with a lower busyness in the job type and bind the person as the task executor;
[0110] Step 4.3.5: If the task blockage is not caused by busy staff, increase the urgency of the task to urge task processing.
[0111] In order to verify the effectiveness of the state-driven algorithm for the collaborative scheduling of film and television editing tasks proposed in the present invention, a film and television editing task scheduling test set was designed. The present invention conducted a comparative analysis from two aspects: the impact of the decoupling and splitting of film and television editing tasks on the optimization of collaborative scheduling of film and television editing tasks, and the high efficiency of state-driven task collaborative scheduling, to verify the effectiveness of the method proposed in the paper.
[0112] Verify the impact of task decoupling on scheduling optimization. Referring to the Patterson project scheduling problem test set, the present invention designs 6 groups of test problems. The designed test problem parameters include the number of tasks (TN) and task association complexity (TC) in the film and television editing project. The task association complexity parameter ranges from [0,1]. When TC=0, it means that there is no association between the film and television editing tasks. When TC=1, it means that the tasks within the link are fully associated in sequence, and the production links are closely associated in sequence. Test problems are designed according to TN=500 and TN=1000, TC=0.1, TC=0.5, and TC=0.7 parameters. By calculating the expected completion time of decoupled tasks and unsplit tasks, the optimization effect of task splitting and decoupling on task collaborative scheduling is verified. The obtained verification data is shown in Table 2.
[0113] Table 2 The impact of task decoupling on scheduling optimization
[0114]
[0115] From the results in Table 1, we can conclude that: in the same project, as the number of tasks increases, the time consumed by the production period also increases; in the same project, with the same number of production tasks, as the task correlation increases, the number of days to complete the project increases. At the same time, when the task correlation is higher, the number of days consumed by the project when the tasks are decoupled for production is less than when the tasks are not split for production. At the same time, the larger the TN and TC values, the more obvious the effect of shortening the construction period. It can be considered that by decoupling and splitting film and television editing tasks, the concurrency of task production, the efficiency of film and television production, and the shortening of the production cycle of film and television projects can be improved to a certain extent.
[0116] Verify the response time of the state-driven film and television editing task scheduling algorithm. Six groups of experiments were set up. The experimental parameters are consistent with the experimental parameters for verifying the impact of task decoupling on scheduling optimization. The server hardware environment is server system: Centos7.5, server processor: Core(TM)i5-8500CPU@3.00GHz, server memory: 16.00GB, the classic timing scheduling algorithm and the task scheduling optimization method under time constraints are applied to the task collaborative scheduling of film and television editing, and compared with the state-driven film and television task collaborative scheduling method proposed in the present invention. The experimental response time value is calculated according to the average response time of all tasks scheduled in sequence. The experimental data is shown in Table 2.
[0117] Table 3 Comparison of response time of film and television editing task scheduling algorithms
[0118]
[0119] Current research on task collaborative scheduling mainly focuses on job scheduling problems in production workshops, and there is less research on collaborative scheduling of film and television editing tasks. The collaborative scheduling of film and television editing tasks mainly adopts the classic timing scheduling method. The present invention compares the classic timing scheduling method and the task scheduling optimization method under time constraints in the collaborative scheduling of film and television editing tasks. The results show that in a task collaborative scheduling process, when TC is not equal to 0, the program response time of the classic timing scheduling method and the task scheduling optimization method under time constraints is significantly higher than the collaborative scheduling method of film and television editing tasks of the present invention. The main reasons are analyzed as follows: the classic sequential scheduling algorithm schedules tasks according to their start time. As the number of tasks increases, it is necessary to continuously poll the schedulability of the calculation tasks, and the time complexity is O(n); the scheduling method of the task scheduling optimization method under time constraints is based on the sequential scheduling algorithm, and constrains the activity time of unschedulable tasks, which can reduce the task scheduling blocking rate. The algorithm time complexity is also O(n). As the number of tasks increases, the time consumption also increases, and the time consumption is higher than that of the sequential scheduling algorithm; because this method constrains the time schedulability, the unschedulable tasks regain the scheduling rights, so the task blocking rate is lower than the sequential scheduling method; the state-driven film and television task collaboration proposed in this invention Scheduling method, in the process of collaborative scheduling, when the state of a task changes, it is only necessary to query the tasks associated with the task, judge the current state of these tasks, and use the state of the tasks associated with it and the state transition rules as parameters, call the state migration algorithm, and then the state change and collaborative scheduling of the task can be realized. The time complexity of the method of the present invention is O(1); the method proposed in the present invention may cause the associated tasks to be blocked because the state cannot be changed, and the task scheduling blocking rate will be higher than the task scheduling optimization method under time constraints. However, the present invention has designed a task blocking tuning method for the blocking situation, and timely supervised and re-divided the blocked tasks, which can solve the blocking problem well.
Claims
1. A state-driven collaborative scheduling method for film and television editing tasks, characterized in that: Please follow the steps below to implement: Step 1: Establish a decoupling model for film and television editing tasks; The step 1 is specifically implemented according to the following steps: Step 1.1, establish a film and television editing task model with decoupling of "shot-link-task"; The step 1.1 specifically involves dividing the production process of a film and television lens into stages, and dividing the work to be completed in the stage into one or more production tasks; a stage is the completion process of the lens; A task is the smallest execution unit and scheduling unit in the film and television editing process. The shot is the starting point of the film and television editing process. A shot is bound to one or more production links. The links have a parallel or sequential relationship. Each link is bound to a root task. The root task will be divided into multiple subtasks according to the complexity of the task. Step 1.2, design a multi-link model and a multi-link model storage structure; The step 1.2 is specifically as follows: after the film and television lens information is successfully created, it is necessary to design the lens production links according to the lens production requirements, including the types of links, the association relationship between the parallel execution or sequential execution of the links, the production requirements of the links, the estimated start and end time of the links, and the type of work information of the links. In order to realize the storage of the above link content, the data structure designed for the link node is Link{Int asset_id; Int link_pid; String content; Timestamp start_time; Timestamp end_time; Int dept_id; Int task_id}, where asset_id represents the lens ID bound to the link, link_pid represents the association relationship between links, and the post-link link saves the link_id of the pre-link in link_pid. If a link has no pre-link, -1 is saved in this field; Step 1.3, design a multi-task model and a multi-task model storage structure; The step 1.3 is specifically as follows: after the link is successfully created, a production task is created for the link according to the content of the production link and the cycle requirements of the production link. During the task creation process, a link can only be associated with one root task. After the root task is successfully created, the task ID of the root task is updated to the task_id of the link data structure. The relationship between the production link and the root task is stored using a hash table data structure; a multi-tree parent-child task production model is designed, and the data structure supports splitting a task into multiple subtasks, which can be executed concurrently or sequentially; the root node of the tree is also the root task directly bound to the link, and the root task can be further split into multiple subtasks, and the subtask can be further divided into sub-subtasks; the data structure of the task node is Task{Int task_pid;String content;Timestamp start_time;Timestamp end_time;Int user_id; Float total_hour;Int status}; task_pid indicates the parent task of the task. If a task has no parent task, task_pid is set to -1. If a task has a parent task, the content of this field is the ID of the parent task. content indicates the specific content of the task. start_time and end_time indicate the estimated start and end time of the task. user_id is the executor of the task. total_hour indicates the estimated production time of the production task. status indicates the flow status of the task. The default setting is the unstarted status. Step 2, according to the decoupled film and television editing task model established in step 1, establish a state machine for the film and television task under the task model, including the task state design and state flow rule design; Step 3: Design an algorithm for collaborative scheduling of film and television editing tasks. This algorithm is divided into collaborative scheduling of tasks within a link and collaborative scheduling of tasks between links. During the task flow, the task status change and the triggering of related tasks are completed according to this algorithm; Step 4, design a method to eliminate the blocking of film and television editing tasks, which is used to solve the problem that the task state cannot be changed in the state-driven task triggering scheduling, resulting in the blocking of subsequent tasks, and optimize step 3.
2. A state-driven collaborative scheduling method for film and television editing tasks according to claim 1, characterized in that: The step 2 is specifically implemented according to the following steps: Step 2.1, film and television editing task state model analysis; Step 2.2, propose the state transition rules of film and television editing tasks.
3. The method for collaborative scheduling of film and television editing tasks based on state drive according to claim 2, characterized in that: The step 2.1 is specifically as follows: the status of the film and television editing task is divided into six major states, P0 means not started, P1 means in progress, P2 means under review, P3 means completed, P4 means paused, P5 means timed out, PT is the temporary state after the parent task is executed for the child task and the preparation work is completed; the major state includes internal states, called small states, and the small state is a subdivision of the major state; in the P0 state not started, the internal states include not started NOT_STARTED, waiting to start WAITING_TO_START, and ready to start READY_TO_START, and these small states are marked by the task creator; in the P1 state, it is divided into standard NORMAL, OPEN, IN_PROGRESS in production, OUTSOURCE in task outsourcing, FEEDBACK, TEST, and REDO, the default small state is standard NORMAL. When the task-related file is imported into the film and television editing software, the small state is migrated to OPEN. After the task is sent out for outsourcing, the task status is Outsourcing is in progress in OUTSOURCE status, and the other statuses are manually marked; the P2 status under review is divided into task review APPROVE, pending review PENDING_REVIEW, director review samples DAILIES, and client review CLIENT_REVIEW. After submission for review, the small status is pending review PENDING_REVIEW. When the task level is reviewed, the small status is transferred to APPROVED. The small status of director review and client review is generated by the system according to the review object; the completed status P3 is divided into seven statuses: APPROVED, DIRECTOR_APPROVED, REVISION, FINAL, DELIVERED, OMITTED, and CLOSED. APPROVED is the default small status, and the other small statuses are manually marked; in the paused P4 status, the internal status includes ON_HOLD, IGNORE, and PAUSE, which are manually marked; The step 2.2 is specifically as follows: Step 2.2.1, design the single task state transition rule. When a single production task is created, the default state is the unstarted P0 state. If the task has a predecessor parent task, when the predecessor task state migrates to the P3 completed state and outputs the production results, the subsequent task is driven to enter the P1 in progress state; when the task submits its own production results for review, the task state automatically migrates to the P2 reviewing state. During the review process, if any level of approval fails, the task state automatically migrates to P1 in progress, and promptly notifies the task executor to restart the production of the task. After the task passes all the review processes, the task state migrates to the P3 completed state; if the ongoing task is still not submitted for review after the end time arrives, the task is marked as a timed task and the state is P5 timed out; when the lens is paused in production, all tasks of the lens, regardless of their current state, will automatically migrate to the P4 paused state; Step 2.2.2, design the state transition rules of the parent task that contains subtasks. When the parent task is split into multiple subtasks, each subtask will perform state transition according to the state transition rules of a single task. The state transition of the parent task is related to the state of the subtask. When initializing the task, the states of the parent and child tasks are initialized to P0 not started. If the parent task is the root task bound to a parallel link, or the root task bound to the first link in a sequential link, the parent task will be scheduled after the task start time arrives, and the state will be changed to P1 in progress. If the parent task is the root task bound to a subsequent link in a sequential link, then when the parent task is completed in the previous link and the state is migrated to P3, the parent task will be triggered, and the task state will be migrated to P1 in progress. The parent task paves the way for the execution of the split subtasks. After this part of the work is completed, the status is changed to P2 under review after submission for review. If any level of the review fails, the status is migrated to P1 in progress. If the review passes, the parent task is migrated to the temporary completed status PT, and the subtask scheduling is triggered at this time. When the subtask is a single task, the status is migrated according to the state transition rules of the single task. After all subtask status migrations are completed, the production results of the subtasks are integrated and submitted for review. At this time, the status is migrated to P2 again. If it fails to pass the review, the parent task status is migrated to the PT temporary status again, and the subtask production results are merged again. If it passes the review, the parent task status is migrated to P3 completed status. When the lens is set to pause, both parent and child tasks flow to P5.
4. The state-driven collaborative scheduling method for film and television editing tasks according to claim 1, characterized in that: The step 3 is specifically implemented according to the following steps: Step 3.1, determine whether the task is intra-link task collaborative scheduling or inter-link task collaborative scheduling; Step 3.2, tasks within a link, using the collaborative scheduling algorithm for tasks within a link; Step 3.3, inter-link tasks, adopt the inter-link task collaborative scheduling algorithm.
5. A state-driven collaborative scheduling method for film and television editing tasks according to claim 3 or 4, characterized in that: The step 3.2 is specifically as follows: collaborative scheduling of tasks within a link. The production link of a shot can only be bound to one root task. The root task describes the time node of the task under the production link, the production content and strategy of the task, the urgency of the task, the difficulty of the task and the person in charge of the task. The complex task is decomposed into multiple subtasks, and the subtasks can be further decomposed according to the complexity of the task; Step 3.3 is specifically as follows: collaborative scheduling of tasks between links. The lens production link has two types of links: parallel and sequential. In the parallel link, the production process between links is independent. The idea of copy-on-write is adopted to copy a copy of the lens production material in each parallel production link. The parallel link triggers the root task scheduling through the preset time, and the subtasks of the root task are collaboratively scheduled in accordance with the collaborative scheduling of tasks within the link. In the sequential production link, the scheduling of the root task of the subsequent link is related to the root task status of the preceding link. When the root task status of the preceding link is migrated to the P3 status, it means that all tasks in the preceding link have been completed. At the same time, the root task has integrated the results of all tasks in the link into the production results of the link. Since multiple versions of task production results may appear in the entire process of P3, when the small status of the root task is marked as the final version, the scheduling of the root task of the subsequent link is triggered. The production materials of the subsequent link come from the production results output by the root task of the preceding link.
6. The method for coordinating film and television editing tasks based on state drive according to claim 1, characterized in that: The step 4 is specifically implemented according to the following steps: Step 4.1, calculate the task blocking value; Step 4.2, analyze the reasons for task blocking; Step 4.3, task blocking tuning.
7. The state-driven collaborative scheduling method for film and television editing tasks according to claim 6, characterized in that: The step 4.1 is specifically as follows: Step 4.1.1: Calculate the task progress value under the ideal production at the current time node of the task according to formula (1) S estimation ,in D present is the current time node, D start is the starting time node of the task, D end The end time node preset for the task: (1) Step 4.1.2: Calculate the actual production progress of the task at the current time node according to formula (2) ,in The actual working hours consumed for the task. Daily working hours: (2) Step 4.1.3, calculate the blocking value of the task progress in the actual production environment compared with the ideal state according to formula (3) : (3) The blocking value in formula (3) S deviation , estimates the progress of the task. When the value is negative, it means that the progress is ahead of schedule. The larger the absolute value, the earlier the progress. When the blocking value is positive, it means that the progress is lagging behind. The larger the absolute value, the more serious the progress lag and the more serious the task blocking. The step 4.2 is specifically as follows: Step 4.2.1, find the production link bound to the task task, and obtain the type of work dept bound to the production link through the link; Step 4.2.2, obtain the executors_list of the worker and the start time, end time, task status, and task working hours of each task in the cycle; Step 4.2.3, use pandas to process the data into a data frame form df = pd.DataFrame(executors_list); Step 4.2.4, group and count the task performers; Step 4.2.5, loop through the earliest start time of the person's task within the statistical period, start, and the latest end time of the person's task within the statistical period, and obtain the working hours and total of all tasks of the member; Step 4.2.6, when start is less than end, the date is moved back, and the planned time and actual time of each day are counted cyclically; Step 4.2.7, the data is classified by personnel, encapsulated into json data, and the json data is added to the all_executor_time list; The step 4.3 is specifically as follows: Step 4.3.1, in the task blocking elimination method, the input parameters are task ID, task blocking deviation threshold threshold, and busyness degree of film and television editors busy_degree. In order to meet the business needs of different film and television editing, the parameters of threshold and busy_degree are dynamically adjusted in the form of interface calls. Step 4.3.2, calculate the blocking value of the task according to the input task ID. If the blocking value deviation is greater than 0, it means that the task progress is lagging behind; Step 4.3.3, when the progress lag deviation value is greater than the system-defined threshold, first obtain the type of work corresponding to the task, then call the personnel busyness analysis algorithm to calculate the workload corresponding to the task executor; Step 4.3.4: If the busyness of the task executor is higher than the busyness threshold set by the system, the system will automatically recommend a person with a lower busyness in the job type and bind the person as the task executor; Step 4.3.5: If the task blockage is not caused by busy staff, increase the urgency of the task to urge task processing.
