Canvas workflow-based batch task processing method, apparatus, equipment, and media

CN122367112BActive Publication Date: 2026-08-14SHENZHEN RABBIT PREMISE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0002]现有智能创作画布产品,在工作流复用与工业化批量生产上存在严重的能力短板:其一,多数产品的画布工作流仅支持单次编辑与执行,无法保存为可复用的应用模板,用户每次生成同类内容都需要重新搭建工作流,重复操作繁琐,效率极低;其二,少数支持模板保存的产品,模板复用操作复杂,需要用户手动替换每个节点的素材与参数,无法实现填表即生成的极简操作,非技术背景的用户无法上手,无法适配企业批量生产的需求;其三,现有产品无完善的批量生成能力,无法通过 Excel 导入批量数据,一次性触发数十上百条任务的并行执行,仅支持单次单条生成,面对大规模内容生产需求时,完全无法满足;其四,模板与批量生成功能完全割裂,保存的模板无法直接用于批量生成,需要重新配置参数映射,操作链路长,数据易出错;其五,无完善的批量任务执行监控、结果预览、校对、下载全流程管控,批量生成的结果无法高效筛选与处理,无法适配企业级工业化内容生产的全流程需求

Benefits of technology

通过建立标准化的工作流模板保存机制,实现了从单次创作到批量生成的跨越。通过自动识别批量变量参数与固定常量参数,系统能够动态生成批量数据导入模板,将复杂的AI工作流配置转化为简单的填表操作,极大降低了非技术用户的使用门槛。通过解析批量数据并创建多个独立的批量任务,系统实现了内容的大规模并行生成,显著提升了生产效率。同时,固定常量参数的全局复用保证了生成质量的统一性,而任务间的独立性则确保了大规模生产中单点故障不影响整体进度,适配企业级批量内容生产的全流程需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122367112B_ABST
    Figure CN122367112B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, device, and medium for batch task processing based on a canvas workflow. The method includes: in response to a user's template saving operation on a canvas interface, acquiring target workflow data; the target workflow data includes multiple node connection relationship data and initial parameter configuration data for at least one node; determining batch variable parameters and fixed constant parameters based on the initial parameter configuration data; generating a batch data import template based on the batch variable parameters; in response to a batch data upload operation, acquiring a target batch data table, and determining multiple tasks to be executed based on the target batch data table; and creating and executing multiple independent batch tasks based on the multiple tasks to be executed, the fixed constant parameters, and the multiple node connection relationship data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of canvas template generation technology, and in particular to a batch task processing method, apparatus, equipment and medium based on canvas workflow. Background Technology

[0002] Existing intelligent creation canvas products have serious shortcomings in workflow reuse and industrialized mass production: First, most products' canvas workflows only support single editing and execution, and cannot be saved as reusable application templates. Users need to rebuild the workflow every time they generate similar content, resulting in repetitive, tedious, and extremely inefficient operations. Second, the few products that support template saving have complex template reuse operations, requiring users to manually replace the materials and parameters at each node. This cannot achieve the extremely simple operation of generating content simply by filling in a form, making it difficult for users without technical backgrounds to use and unable to meet the needs of enterprise mass production. Third, existing products lack comprehensive batch generation capabilities and cannot be used with Excel. Importing batch data triggers the parallel execution of dozens or hundreds of tasks at once, but only supports single-item generation, which is completely inadequate for large-scale content production needs; fourth, the template and batch generation functions are completely separate, and saved templates cannot be used directly for batch generation, requiring reconfiguration of parameter mapping, resulting in a long operation chain and data errors; fifth, there is no comprehensive batch task execution monitoring, result preview, proofreading, and download process control, making it impossible to efficiently filter and process batch-generated results, and failing to adapt to the full-process needs of enterprise-level industrial content production. Summary of the Invention

[0003] In view of the above, this application provides a batch task processing method, apparatus, device and medium based on canvas workflow, the purpose of which is to solve the above technical problems.

[0004] Firstly, this application provides a batch task processing method based on a canvas workflow, the method comprising: In response to the user's template saving operation on the canvas interface, the target workflow data is obtained; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; Based on the initial parameter configuration data, determine the batch variable parameters and fixed constant parameters, including: traversing each node in the target workflow data and extracting the parameter key-value pairs of each node from the initial parameter configuration data; for any parameter key-value pair, determine whether it is associated with a preset batch flag bit, or determine whether its parameter value conforms to preset dynamic variable characteristics; if so, determine the parameter key-value pair as a batch variable parameter and record its corresponding node identifier and parameter name; if not, determine the parameter key-value pair as a fixed constant parameter and add it to the reuse parameter set; Based on the batch variable parameters, a batch data import template is generated; In response to a batch data upload operation, a target batch data table is obtained, and based on the target batch data table, multiple data entries for tasks to be executed are determined. Based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data, multiple independent batch tasks are created and executed.

[0005] Secondly, this application provides a batch task processing device based on a canvas workflow, the batch task processing device based on a canvas workflow includes: The first acquisition module is used to acquire target workflow data in response to the user's template saving operation on the canvas interface; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; The determination module is used to determine batch variable parameters and fixed constant parameters based on the initial parameter configuration data, including: traversing each node in the target workflow data and extracting the parameter key-value pairs of each node from the initial parameter configuration data; for any parameter key-value pair, determining whether it is associated with a preset batch flag bit, or determining whether its parameter value conforms to preset dynamic variable characteristics; if so, determining the parameter key-value pair as a batch variable parameter and recording its corresponding node identifier and parameter name; if not, determining the parameter key-value pair as a fixed constant parameter and adding it to the reuse parameter set; The generation module is used to generate a batch data import template based on the batch variable parameters; The second acquisition module is used to acquire a target batch data table in response to a batch data upload operation, and determine multiple task data to be executed based on the target batch data table. An execution module is created to create and execute multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data.

[0006] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the batch task processing method based on canvas workflow as described in any embodiment of the first aspect.

[0007] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the batch task processing method based on canvas workflow as described in any embodiment of the first aspect.

[0008] The technical solutions provided in this application have the following advantages compared with the prior art: By establishing a standardized workflow template saving mechanism, the system has achieved a leap from single-creation to batch generation. Through automatic identification of batch variable parameters and fixed constant parameters, the system can dynamically generate batch data import templates, transforming complex AI workflow configurations into simple form-filling operations, significantly lowering the barrier to entry for non-technical users. By parsing batch data and creating multiple independent batch tasks, the system achieves large-scale parallel content generation, significantly improving production efficiency. Simultaneously, the global reuse of fixed constant parameters ensures consistent generation quality, while the independence between tasks ensures that single-point failures in large-scale production do not affect the overall progress, adapting to the full-process requirements of enterprise-level batch content production. Attached Figure Description

[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating a preferred embodiment of the batch task processing method based on canvas workflow in this application; Figure 2 This is a schematic diagram of a preferred embodiment of the batch task processing device based on canvas workflow of this application; Figure 3 This is a schematic diagram of a preferred embodiment of the electronic device of this application; The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0013] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.

[0014] Reference Figure 1 The diagram shown is a flowchart illustrating an embodiment of the batch task processing method based on a canvas workflow according to this application. This method is executed by an electronic device, which can be implemented by a software system and / or a hardware system. The batch task processing method based on a canvas workflow includes: Step 101: In response to the user's template saving operation on the canvas interface, obtain the target workflow data; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node.

[0015] The canvas interface is an interactive area for users to perform visual editing. This area supports building automated processing workflows through drag-and-drop, linking, and other methods.

[0016] The template saving operation is an action in which a user clicks on a specific control to persistently store the complete workflow currently built in the canvas interface as a reusable object.

[0017] Target workflow data is a structured collection of data that describes a complete automated processing flow. This collection includes all components that make up the flow and their interrelationships. For example, for an e-commerce poster generation flow, target workflow data includes all the node information and connection information required from inputting the product name to outputting the final poster.

[0018] Node connection relationship data describes the data flow and logical sequence between different processing units. For example, in a data structure, it may be represented as the output port of node A being connected to the input port of node B, indicating that the processing result of node A will be used as the input data of node B. This description of the connection path is node connection relationship data.

[0019] The initial parameter configuration data of a node is a specific numerical or textual setting set within a particular processing unit to control the behavior of that unit.

[0020] In some embodiments, when a user completes workflow setup on the canvas interface and triggers the template save operation, all underlying data that the current canvas interface rendering depends on can be read and encapsulated into target workflow data.

[0021] Step 102: Based on the initial parameter configuration data, determine the batch variable parameters and fixed constant parameters.

[0022] Batch variable parameters are parameters that need to be replaced one by one based on the batch data input from external sources when generating batches using a reused workflow template.

[0023] Fixed constant parameters are parameters that remain unchanged for all generated tasks when reusing workflow templates for batch generation.

[0024] In some embodiments, determining the batch variable parameters and fixed constant parameters based on the initial parameter configuration data includes: S11, traverse each node in the target workflow data and extract the parameter key-value pairs of each node from the initial parameter configuration data.

[0025] Nodes are the basic processing units that make up a workflow. Each node encapsulates specific functional logic or model invocation capabilities. Examples include text-to-image nodes, large language model nodes, or image zoom-in nodes seen in the canvas interface.

[0026] A parameter key-value pair is a data structure used to describe a specific attribute of a node, consisting of a parameter name and a parameter value.

[0027] In some embodiments, nodes can be accessed one by one in a predetermined order. Whenever a node is accessed, the initial parameter configuration data corresponding to that node is read, all defined parameter items are extracted from the configuration data, and each parameter is converted into a standard parameter key-value pair format.

[0028] S12, for any parameter key-value pair, determine whether it is associated with a preset batch marker bit, or determine whether its parameter value conforms to the preset dynamic variable characteristics.

[0029] A batch tag is a metadata label used during the template design phase to explicitly declare that a parameter is a variable that needs to be replaced during batch generation.

[0030] Dynamic variable characteristics are specific patterns in the syntax or structure of parameter values ​​that distinguish them from static constants. These patterns indicate that the value of the parameter depends on external input data.

[0031] In some embodiments, after extracting each parameter key-value pair, it can be checked whether the current parameter key-value pair carries a batch flag. This check can be performed by reading a specific flag field from the parameter metadata; if the value of this field is true, it is determined that a preset batch flag is associated. If no batch flag is found, the parameter value portion of the parameter key-value pair is further analyzed, and the parameter value is matched against a preset dynamic variable feature rule base. The matching process includes detecting whether the parameter value string contains a specific placeholder identifier, or detecting whether the parameter value conforms to the format specifications of dynamic resources such as URLs and file paths.

[0032] S13, if so, then the parameter key-value pair is determined as a batch variable parameter, and its corresponding node identifier and parameter name are recorded.

[0033] A node identifier is a unique identification code assigned to each node within the system.

[0034] The parameter name is a name used within a node to distinguish different configuration items.

[0035] In some embodiments, a parameter key-value pair can be determined as a batch variable parameter when it is confirmed that the parameter key-value pair meets the batch flag bit condition or the dynamic variable characteristic condition.

[0036] S14, if not, then the parameter key-value pair is identified as a fixed constant parameter and added to the reuse parameter set.

[0037] The reused parameter set is a data container used to store and manage all fixed constant parameters. Parameters in this set can be shared and invoked by all batch task instances to avoid redundant storage and configuration.

[0038] In some embodiments, a parameter key-value pair may be determined as a fixed constant parameter when it is confirmed that the parameter key-value pair is neither associated with a batch flag bit nor conforms to the characteristics of a dynamic variable.

[0039] In this embodiment, a sophisticated parameter recognition mechanism significantly improves the intelligence level of the workflow template. By traversing nodes and extracting parameter key-value pairs, the system can comprehensively capture the configuration details of the workflow. By introducing a dual judgment logic of batch flag bits and dynamic variable characteristics, the system can accurately distinguish which parameters are variables that need to be replaced in batches and which are constants that should be kept constant, avoiding the tediousness and error-proneness of manual configuration.

[0040] Step 103: Generate a batch data import template based on the batch variable parameters.

[0041] A batch data import template is a structured data table file whose column headers are determined by batch variable parameters, guiding users to fill in the required differentiated data for batch generation.

[0042] In some embodiments, a batch data import template can be constructed after all batch variable parameters are specified. For example, a blank table structure can be created first, and each specified batch variable parameter can be iterated through to convert the parameter name or parameter name with node annotations of each batch variable parameter into a column of the table.

[0043] Step 104: In response to the batch data upload operation, obtain the target batch data table, and determine multiple data entries for tasks to be executed based on the target batch data table.

[0044] Batch data upload is an interactive behavior in which users import completed batch data into a template file and transfer it to the system.

[0045] The target batch data table is a raw data file uploaded by the user that contains specific batch production instructions. For example, the user might fill out an Excel file containing one hundred rows of information about different products.

[0046] The task data to be executed is the smallest unit of data parsed from the target batch data table to drive the execution of a single workflow instance. Each piece of task data to be executed corresponds to an independent content generation.

[0047] In some embodiments, determining multiple task data entries to be executed based on the target batch data table includes: S21, Read each row of data record in the target batch data table.

[0048] A data record is a complete set of input data stored row by row in the target batch data table, and each row of data record corresponds to an independent generation task requirement.

[0049] S22, for each data record, verify whether its data format conforms to the specifications of the batch data import template, and verify whether the resource links contained therein are valid.

[0050] Data format refers to whether the values ​​of each field in a data record conform to the preset types and rules of the batch data import template.

[0051] Resource links are network addresses in data records that point to external media files, and can be used to import images, videos, or audio materials in batches.

[0052] Error logs are text files or data structures used by the system during the verification process to record the row numbers, specific fields, and reasons for all failed verifications.

[0053] In some embodiments, for data format validation, the field structure of the current data record can be compared with the specification of the batch data import template; for resource link validation, it can detect whether there are fields in the data record that conform to the link format, attempt to send a request to the resource link, check whether the link can be accessed normally, and whether the returned content type matches the expected media type.

[0054] S23. If the verification passes, the current row of data records will be converted into a task to be executed.

[0055] In some embodiments, after a data record successfully passes all verification steps, a new task data object can be created, each field in the data record can be traversed, and the field values ​​can be assigned to the corresponding internal system parameters according to the column-parameter mapping relationship defined in the batch data import template, thereby constructing a task data to be executed.

[0056] S24. If the verification fails, an error log is generated and the data record in that row is removed.

[0057] Error logs are text files or data structures used by the system during the verification process to record the row numbers, specific fields, and reasons for all failed verifications.

[0058] Removal is an operation in which the system abandons further processing of data records that have failed the current verification and does not convert them into data for tasks to be executed.

[0059] In this embodiment, a strict row-level data verification mechanism is introduced to ensure the execution quality of batch tasks from the source. By performing dual verification of data format and resource links, the system can effectively intercept invalid or erroneous input data, avoiding task execution failures and resource waste caused by dirty data.

[0060] Step 105: Based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data, create and execute multiple independent batch tasks.

[0061] Batch tasks are automated processes initiated within the system based on individual task data and fixed workflow logic. Multiple batch tasks can run independently, either in parallel or sequentially.

[0062] In some embodiments, creating and executing multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data includes: S31, for each piece of data to be executed, copy the target workflow data to obtain a copy workflow data.

[0063] A replica workflow data is a separate, modifiable copy of the target workflow data.

[0064] S32, take the values ​​of the batch variable parameters in the task data to be executed and fill them into the corresponding node parameter positions in the replica workflow data.

[0065] The values ​​of batch variable parameters are the specific parameter values ​​in the data of the task to be executed that need to be injected into the workflow from external batch data.

[0066] Node parameter location refers to a specific field or attribute within a particular node in the replica workflow data, used to store parameter values.

[0067] In some embodiments, after generating the replica workflow data, the task data to be executed can be parsed to extract all batch variable parameter values ​​contained therein, as well as the node identifiers and parameter names corresponding to these values. Then, all nodes in the replica workflow data can be traversed. When a node identifier is found to match the node identifier recorded in the task data to be executed, the node parameter position corresponding to the specific parameter name under that node is located, and the batch variable parameter values ​​in the task data to be executed are written into the node parameter position, overwriting the original placeholders or default values.

[0068] S33, fill the fixed constant parameters from the reuse parameter set into the corresponding node parameter positions in the replica workflow data.

[0069] In some embodiments, after the dynamic variables are populated, each fixed constant parameter record in the reuse parameter set can be traversed, the node parameter position matching the parameter name can be searched in the replica workflow data, and the fixed constant parameter value in the reuse parameter set can be populated.

[0070] S34, based on the connection relationship data of the multiple nodes, schedule and execute the replica workflow data to generate an independent batch task.

[0071] In this embodiment, a highly flexible and stable batch production is achieved by introducing a mechanism of workflow data replication and parameter separation and filling. By creating an independent copy of the workflow data for each task to be executed, data isolation and stability are ensured when massive tasks are executed concurrently.

[0072] In some embodiments, the step of creating and executing multiple independent batch tasks based on the multiple sets of task data to be executed, the fixed constant parameters, and the multiple node connection relationship data further includes: S41, for each piece of task data to be executed, determine the cross-node reference relationship of the batch variable parameter values ​​included therein; the cross-node reference relationship refers to the relationship in which the output result generated by the first node is referenced by the second node as an input parameter.

[0073] Cross-node reference relationships are dynamic data dependency logics that exist between different processing nodes within a workflow, meaning that the calculation result of the previous node will serve as the input condition for the next node.

[0074] The first node is the source node responsible for producing intermediate or final results in a cross-node reference relationship.

[0075] The second node is a target node in a cross-node reference relationship that needs to consume the output of the first node as its own input.

[0076] In some embodiments, the task data to be executed and its associated fixed constant parameters can be scanned to check for special reference markers and to see if any node's input parameter configuration contains variable names or placeholders pointing to the output ports of other nodes. If a second node's parameter configuration references the output of the first node, then a cross-node reference relationship can be determined.

[0077] S42, Based on the cross-node reference relationship, the fixed constant parameter, and the multiple node connection relationship data, construct a dynamic parameter parsing tree; the leaf nodes of the dynamic parameter parsing tree are the fixed constant parameters in the task data to be executed, the intermediate nodes are the processing nodes in the workflow, and the root node is the output result of the processing node.

[0078] A dynamic parameter parse tree is a tree-like data structure used to represent the execution order and parameter dependencies of a workflow. This structure determines the order in which nodes are instantiated.

[0079] Leaf nodes are child nodes in a dynamic parameter parse tree.

[0080] Intermediate nodes are nodes in the dynamic parameter parse tree that represent processing logic. They receive the outputs of leaf nodes or other intermediate nodes as inputs and generate new outputs.

[0081] The root node is the final output of the dynamic parameter parse tree, representing the final output of the entire workflow.

[0082] In some embodiments, after determining the cross-node reference relationships, an empty tree structure can be created. By traversing multiple node connection relationship data, each processing node in the workflow is mapped to a potential intermediate node in the tree. The batch variable parameter values ​​in the task data to be executed and the fixed constant parameters in the reuse parameter set are added as leaf nodes to the bottom layer of the tree. Furthermore, based on the cross-node reference relationships and node connection relationship data, parent-child connections are established between leaf nodes and intermediate nodes, and the final output node of the workflow is set as the root node, thus constructing a dynamic parameter parsing tree.

[0083] S43, Traverse the dynamic parameter parse tree and perform the following operations: S431, if it is detected that the input parameters of the current processing node include a placeholder referencing the output results of other nodes, then the instantiation of the current processing node is paused, and the upstream node referenced by the current processing node is instantiated.

[0084] The currently processed node is the intermediate node that is being analyzed or is about to be executed during the traversal of the dynamic parameter parse tree.

[0085] Reference placeholders are special symbols or variable names used in node parameter configurations to mark data that needs to be dynamically obtained from other nodes.

[0086] Instantiation is the process of creating an executable task object or process in the runtime environment based on the node definition and specific input parameters.

[0087] An upstream node is a node in the dynamic parameter parse tree that is located before the current processing node and whose output is depended upon by the current processing node.

[0088] S432, call the upstream node to execute, obtain the upstream output result, and fill the reference placeholder with the upstream output result to generate node input parameters.

[0089] The upstream output is the data result generated after the upstream node has finished executing.

[0090] Backfilling is the process of replacing the original placeholders in the parameter configuration of the downstream node with the actual data obtained from the execution of the upstream node.

[0091] The node input parameters are a complete set of parameters that have been determined after the backfilling operation and can be directly used to drive node calculations.

[0092] S433, based on the node input parameters, instantiate and schedule the current processing node for execution.

[0093] In some embodiments, after obtaining complete node input parameters, the instantiated current processing node can be submitted to the task scheduler. The scheduler then runs the node according to the priority determined by the dynamic parameter parse tree and generates the output results.

[0094] S434, Repeat the above steps until all processing nodes are instantiated and executed, and the creation and execution of the multiple independent batch tasks are completed.

[0095] Repeating the above steps means repeating the process from 431 to 433.

[0096] In this embodiment, by introducing cross-node reference relationship resolution and dynamic parameter parse tree mechanisms, the problem of execution order of dynamic data dependencies in complex AI workflows is fundamentally solved. By identifying the reference relationship between the first node and the second node, the system can intelligently construct the execution topology, rather than rigidly executing in a fixed order.

[0097] In some embodiments, prior to creating and executing multiple independent batch tasks, the method further includes: S51, retrieve the total number of available points in the user's account, and the point consumption value required to execute a single batch task.

[0098] A user account is a virtual profile created by the system to record a user's resource rights and consumption activities. This account is linked to the user's login credentials and is used to store information such as points balance.

[0099] The points consumption value is a pre-set deduction standard based on the computing power cost required to execute a specific workflow task.

[0100] S52, based on the total number of available points and the point consumption value, determine the maximum number of executable tasks, and limit the total number of batch tasks created to not exceed the maximum number of executable tasks.

[0101] The maximum number of executable tasks is the theoretically maximum number of tasks that can be successfully executed, calculated based on the user's current account balance and the cost of a single task.

[0102] S53: During task execution, when the status of any batch task changes to success, the corresponding point consumption value of that task is deducted.

[0103] The task execution process is the time period from when the system scheduling engine starts the workflow node to when the final result file is generated and stored.

[0104] Task status indicates the current lifecycle stage of a batch of tasks. Common statuses include waiting, running, success, and failure.

[0105] S54: When the status of any batch task changes to failure, refund the points consumed for that task to the user account.

[0106] In this embodiment, a precise balance between platform resources and user rights is achieved by introducing a task-granular points management mechanism. By calculating and limiting the maximum number of executable tasks based on the total available points and point consumption value before task creation, the system effectively prevents users from submitting too many tasks, avoiding the waste of ineffective computing resources. By implementing a strategy of charging for successful tasks and refunding for failed tasks, the system ensures that the platform receives its due revenue when tasks succeed while protecting the legitimate rights of users when tasks fail, greatly enhancing user trust and experience with the platform.

[0107] In some embodiments, after creating and executing multiple independent batch tasks, the method further includes: S61, receive and display the execution results of all executed batch tasks; the execution results include successfully generated file data or failure error messages.

[0108] File data refers to the specific digital content generated after a batch task is successfully completed. This content can be images, videos, audio, or text documents.

[0109] Error messages are descriptions of the specific reasons captured and logged by the system after a batch task fails. For example, a system-returned message may contain prohibited words or the image resource link may be invalid; these descriptions constitute error messages.

[0110] In some embodiments, the task execution database can be queried using the task identifier to extract the corresponding execution results.

[0111] S62, in response to the user's batch download operation, packages and compresses the file data of multiple selected successful tasks, generates and sends download links.

[0112] S63, extract the file data of each successful task and convert it into a feature vector; the feature vector includes one or more of visual feature vectors, text semantic feature vectors, and audio spectrum feature vectors.

[0113] A feature vector is a mathematical representation of unstructured document data that can be understood and compared by computers. This vector can be a multi-dimensional array of numbers.

[0114] Visual feature vectors are feature vectors extracted from image or video frames and used to characterize the visual content of the image.

[0115] Text semantic feature vectors refer to feature vectors extracted from text files, used to represent the deeper meaning of the text.

[0116] Audio spectral feature vectors are feature vectors extracted from audio files, used to characterize the frequency and energy distribution of sound.

[0117] In some embodiments, for image-type file data, a pre-trained visual neural network model can be loaded, the image is input into the model, and the output of the last hidden layer is extracted to obtain a visual feature vector. For text-type file data, a pre-trained text encoder can be loaded to convert the text content into a text semantic feature vector. For audio files, an acoustic feature extraction algorithm can be used to generate an audio spectral feature vector.

[0118] S64, Based on the feature vector, construct a consistency evaluation matrix; the rows and columns of the matrix correspond to different batch tasks, and the matrix element values ​​are the similarity scores between the file data of the corresponding two tasks.

[0119] A consistency evaluation matrix is ​​a two-dimensional data structure used to systematically store and display the degree of content similarity between all batch tasks. The rows and columns of the matrix represent tasks, and the cells represent similarity.

[0120] Similarity score is a quantitative indicator obtained by calculating the distance or cosine of the angle between two feature vectors, used to measure the similarity in content between two file data.

[0121] In some embodiments, an N-by-N two-dimensional array can be initialized, where N is the number of successful tasks. The row and column indices of the array are associated with the unique identifiers of each batch task. The array is traversed, and for any off-diagonal element, the row and column task feature vectors are used to calculate the distance or similarity between the two feature vectors by calling a similarity calculation function. The calculation result is then used as a similarity score and filled into the corresponding element position.

[0122] S65. Based on a preset consistency threshold, traverse the consistency evaluation matrix. If the similarity score between the file data of any two tasks is higher than the preset consistency threshold, it is determined that the file data of the two tasks have a risk of homogenization, and an anomaly marker is added.

[0123] The preset consistency threshold is a pre-set similarity threshold used to determine whether content is excessively repetitive.

[0124] Homogenization risk refers to the potential problem that mass-produced content is highly repetitive in visual or semantic terms, failing to meet diverse production needs.

[0125] Anomaly markers are labels or status tags that the system attaches to task results after detecting problematic data.

[0126] S66, in response to the user's failed task retry operation, re-acquire the pending task data of the corresponding failed task, and return to the step of creating and executing multiple independent batch tasks.

[0127] Returning to the step of creating and executing multiple independent batch tasks can be done by returning to step 105 and re-executing it.

[0128] In this embodiment, by introducing end-to-end result control and intelligent quality inspection mechanisms, the closed-loop efficiency and output quality of batch content production are greatly improved. By introducing feature vectors and consistency evaluation matrices, automated deduplication and homogenization risk warnings for heterogeneous AI-generated content are achieved, solving the core pain point of content diversity in industrial production.

[0129] Reference Figure 2 The diagram shown is a functional module schematic of the batch task processing device 100 based on canvas workflow of this application.

[0130] The canvas workflow-based batch task processing device 100 described in this application is installed in an electronic device. Depending on the functions implemented, the canvas workflow-based batch task processing device 100 includes a first acquisition module 110, a determination module 120, a generation module 130, a second acquisition module 140, and a creation execution module 150. These modules can also be referred to as units, which are a series of computer program segments that can be executed by the electronic device's processor and perform a fixed function, stored in the electronic device's memory.

[0131] In this embodiment, the functions of each module / unit are as follows: The first acquisition module 110 is used to acquire target workflow data in response to the user's template saving operation on the canvas interface; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; The determination module 120 is used to determine batch variable parameters and fixed constant parameters based on the initial parameter configuration data; The generation module 130 is used to generate a batch data import template based on the batch variable parameters; The second acquisition module 140 is used to acquire a target batch data table in response to a batch data upload operation, and determine multiple task data to be executed based on the target batch data table. An execution module 150 is created to create and execute multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data.

[0132] The specific implementation of the batch task processing device based on canvas workflow in this application is largely the same as the specific implementation of the batch task processing method based on canvas workflow described above, and will not be repeated here.

[0133] Reference Figure 3 The diagram shown is a schematic representation of a preferred embodiment of the electronic device of this application.

[0134] The electronic device includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. The memory 113 is used to store computer programs, such as batch task processing programs based on canvas workflows. In some embodiments, the processor 111 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 111 can be used to control the overall operation of the electronic device, such as performing data interaction or communication-related control and processing. In this embodiment, the processor 111 is used to run program code stored in the memory 113 or process data.

[0135] The communication interface 112 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The communication interface 112 may also be used to establish a communication connection between the electronic device and other electronic devices.

[0136] The memory 113 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 113 may be an internal storage unit of the electronic device, such as the hard disk or memory of the electronic device. In other embodiments, the memory 113 may also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. of the electronic device. Of course, the memory 113 may include both internal storage units and external storage devices of the electronic device. In this embodiment, the memory 113 can be used to store the operating system and various computer programs installed on the electronic device, such as the program code of a batch task processing program based on a canvas workflow. In addition, the memory 113 can also be used to temporarily store various types of data that have been output or will be output.

[0137] Figure 3 Only an electronic device with component processor 111, communication interface 112, memory 113 and communication bus 114 is shown. However, it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0138] In one embodiment of this application, when the processor 111 executes the program stored in the memory 113, it implements the batch task processing method based on canvas workflow provided in any of the foregoing method embodiments, including: In response to the user's template saving operation on the canvas interface, the target workflow data is obtained; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; Based on the initial parameter configuration data, determine the batch variable parameters and fixed constant parameters; Based on the batch variable parameters, a batch data import template is generated; In response to a batch data upload operation, a target batch data table is obtained, and based on the target batch data table, multiple data entries for tasks to be executed are determined. Based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data, multiple independent batch tasks are created and executed.

[0139] For a detailed explanation of the above steps, please refer to the above. Figure 1 A flowchart illustrating an embodiment of a batch task processing method based on a canvas workflow.

[0140] Furthermore, this application also proposes a computer-readable storage medium that is both non-volatile and volatile. This computer-readable storage medium is any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a data storage area and a program storage area. The program storage area stores a batch task processing program based on a canvas workflow. When executed by a processor, the batch task processing program based on the canvas workflow performs the following operations: In response to the user's template saving operation on the canvas interface, the target workflow data is obtained; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; Based on the initial parameter configuration data, determine the batch variable parameters and fixed constant parameters; Based on the batch variable parameters, a batch data import template is generated; In response to a batch data upload operation, a target batch data table is obtained, and based on the target batch data table, multiple data entries for tasks to be executed are determined. Based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data, multiple independent batch tasks are created and executed.

[0141] The specific implementation of the computer-readable storage medium in this application is largely the same as the specific implementation of the batch task processing method based on the canvas workflow described above, and will not be repeated here.

[0142] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware simulation platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0144] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A batch task processing method based on canvas workflow, characterized in that, The method includes: In response to the user's template saving operation on the canvas interface, the target workflow data is obtained; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; Based on the initial parameter configuration data, determine the batch variable parameters and fixed constant parameters, including: Traverse each node in the target workflow data and extract the parameter key-value pairs for each node from the initial parameter configuration data; For any parameter key-value pair, determine whether it is associated with a preset batch marker bit, or determine whether its parameter value conforms to the preset dynamic variable characteristics; If so, then the parameter key-value pair is identified as a batch variable parameter, and its corresponding node identifier and parameter name are recorded; If not, then the parameter key-value pair is identified as a fixed constant parameter and added to the reuse parameter set; Based on the batch variable parameters, a batch data import template is generated; In response to a batch data upload operation, a target batch data table is obtained, and based on the target batch data table, multiple data entries for tasks to be executed are determined. Based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data, create and execute multiple independent batch tasks; The step of determining multiple task data to be executed based on the target batch data table includes: Read each row of data records from the target batch data table; For each data record, verify whether its data format conforms to the specifications of the batch data import template, and verify whether the resource links contained therein are valid; If the verification passes, the current row of data records will be converted into a task to be executed. If the verification fails, an error log will be generated and the data record in that row will be removed. The process of creating and executing multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data includes: For each piece of task data to be executed, determine the cross-node reference relationship of its batch variable parameter values; the cross-node reference relationship refers to the relationship where the output result generated by the first node is referenced by the second node as an input parameter. Based on the cross-node reference relationship, the fixed constant parameter, and the multiple node connection relationship data, a dynamic parameter parsing tree is constructed; the leaf nodes of the dynamic parameter parsing tree are the fixed constant parameters in the task data to be executed, the intermediate nodes are the processing nodes in the workflow, and the root node is the output result of the processing node. Traverse the dynamic parameter parse tree and perform the following operations: If the input parameters of the current processing node are detected to include placeholders that reference the output results of other nodes, then the instantiation of the current processing node is paused, and the upstream node referenced by the current processing node is instantiated. The upstream node is invoked to execute, the upstream output result is obtained, and the upstream output result is filled back into the reference placeholder to generate node input parameters; Based on the node input parameters, the current processing node is instantiated and scheduled for execution; Repeat the above steps until all processing nodes are instantiated and executed, thus completing the creation and execution of the multiple independent batch tasks.

2. The batch task processing method based on canvas workflow according to claim 1, characterized in that, The process of creating and executing multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data includes: For each task data to be executed, copy the target workflow data to obtain a copy workflow data; Take the values ​​of the batch variable parameters in the task data to be executed and fill them into the corresponding node parameter positions in the replica workflow data; Fill the fixed constant parameters in the reuse parameter set into the corresponding node parameter positions in the replica workflow data; Based on the connection relationship data of the multiple nodes, the replica workflow data is scheduled and executed to generate an independent batch task.

3. The batch task processing method based on canvas workflow according to claim 2, characterized in that, Prior to creating and executing multiple independent batch tasks, the method further includes: Get the total number of available points in the user's account, and the number of points required to execute a single batch task; Based on the total number of available points and the points consumption value, the maximum number of executable tasks is determined, and the total number of batch tasks created is limited to not exceeding the maximum number of executable tasks. During task execution, when the status of any batch task changes to success, the corresponding points consumption value for that task will be deducted. When the status of any batch task changes to failure, the corresponding points consumed for that task will be refunded to the user's account.

4. The batch task processing method based on canvas workflow according to claim 2, characterized in that, After creating and executing multiple independent batch tasks, the method further includes: Receive and display the execution results of all executed batch tasks; the execution results include successfully generated file data or failure error messages; In response to the user's batch download operation, the file data of multiple selected successful tasks are packaged and compressed, and a download link is generated and sent. Extract the file data for each successful task and convert it into a feature vector; the feature vector includes one or more of visual feature vectors, text semantic feature vectors, and audio spectrum feature vectors. Based on the feature vector, a consistency evaluation matrix is ​​constructed; the rows and columns of the consistency evaluation matrix correspond to different batch tasks, and the matrix element values ​​are the similarity scores between the file data of the corresponding two tasks. Based on a preset consistency threshold, the consistency evaluation matrix is ​​traversed. If the similarity score between the file data of any two tasks is higher than the preset consistency threshold, it is determined that the file data of the two tasks have a risk of homogenization, and an anomaly marker is added. In response to the user's failed task retry operation, the system re-acquires the pending task data for the corresponding failed task and returns to the steps of creating and executing multiple independent batch tasks.

5. A batch task processing device based on a canvas workflow, characterized in that, The apparatus for implementing the batch task processing method based on canvas workflow as described in any one of claims 1 to 4, the apparatus comprising: The first acquisition module is used to acquire target workflow data in response to the user's template saving operation on the canvas interface; the target workflow data includes multiple node connection relationship data and initial parameter configuration data of at least one node; The determination module is used to determine batch variable parameters and fixed constant parameters based on the initial parameter configuration data, including: traversing each node in the target workflow data and extracting the parameter key-value pairs of each node from the initial parameter configuration data; for any parameter key-value pair, determining whether it is associated with a preset batch flag bit, or determining whether its parameter value conforms to preset dynamic variable characteristics; if so, determining the parameter key-value pair as a batch variable parameter and recording its corresponding node identifier and parameter name; if not, determining the parameter key-value pair as a fixed constant parameter and adding it to the reuse parameter set; The generation module is used to generate a batch data import template based on the batch variable parameters; The second acquisition module is used to acquire a target batch data table in response to a batch data upload operation, and determine multiple task data to be executed based on the target batch data table. An execution module is created to create and execute multiple independent batch tasks based on the multiple task data to be executed, the fixed constant parameters, and the multiple node connection relationship data.

6. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a computer program stored in memory, it implements the batch task processing method based on canvas workflow as described in any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the batch task processing method based on canvas workflow as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Task flow construction and processing method and device

    CN116243906A

  • Risk decision scheme determination method and device based on financial business workflow, equipment and storage medium

    CN121119697A