An operator graph-based image processing pipeline automatic construction method and system

CN122887668APending Publication Date: 2026-10-09HANGZHOU INTERNATIONAL INNOVATION INSTITUTE OF BEIHANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610877517.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

对于第一类手工编写脚本的方案,流程逻辑与业务代码高度耦合,当处理需求发生变化(例如调整步骤顺序、增加条件分支)时,需要重新修改和测试代码,导致方案的复用性差、维护成本高昂

Benefits of technology

本发明通过统一的数据结构和自动化的构建引擎,将可视化的、易于理解的流程图,直接转化为可执行的高性能图像处理流水线。具体的,通过统一的算子图元数据结构,用户通过拖拽连线完成的流程图,可直接被系统解析和运行,实现了所配即所得,极大降低了图像处理算法流程的构建门槛;通过基于图论规则的合法性校验,在执行前自动检测配置冲突和逻辑错误,避免了因流程设计缺陷导致的运行时崩溃或结果异常,提升了系统的整体稳定性和可靠性;通过统一的参数来源解析,支持条件节点、并行节点、合并节点等多种逻辑控制节点,能够处理复杂的现实场景,最后通过输出映射规则,能将任意复杂的处理结果整理为标准化格式。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887668A_ABST
    Figure CN122887668A_ABST
Patent Text Reader

Abstract

The application discloses an operator graph-based image processing pipeline automatic construction method and system, and belongs to the technical field of industrial vision image processing. First, operator graph metadata generated by a visual editor is acquired, including a node set and an edge set, and nodes in the node set are logical units for defining an image processing flow. The legality of the operator graph metadata is verified based on graph theory rules. After the verification, a node execution chain is automatically constructed and executed with a start node as an entrance and according to an execution order defined by the edge set. In the execution process, the parameter source of an operation node is intelligently parsed, complex logic such as conditional branching, parallelism and merging is supported, and finally, a standardized result is generated through an output mapping rule of an end node. The application realizes code as graph, directly converts visual design into an executable pipeline, and significantly improves the development efficiency, flexibility and reliability of the image processing flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial visual image processing technology, and in particular relates to an automatic construction method and system for image processing pipelines based on operator graphs. Background Technology

[0002] In industrial manufacturing scenarios, such as character recognition, defect detection, or quality assessment of components like wheel hubs and castings, images are typically acquired using industrial cameras and analyzed through a series of image processing steps (such as image enhancement, filtering, region localization, and feature recognition). These processing steps need to be combined into a complete processing pipeline according to a specific logic and sequence to achieve the transformation from raw images to final business results (such as recognized text, defect identification, and pass / fail judgment).

[0003] Currently, there are two main technical solutions for building and executing such industrial image processing pipelines. The first involves algorithm engineers manually writing processing scripts for specific business scenarios, hard-coding and concatenating various independent image processing algorithms in a fixed order. The second solution provides users with a graphical workflow editing interface at the system front end, allowing them to visually configure processing steps and their logical relationships by dragging and dropping nodes and connecting lines. However, this type of graphical configuration is usually only a schematic diagram of the workflow design; its defined data structure is inconsistent with the data structure required by the actual execution engine at the back end, and cannot be directly understood and executed by the backend system. In actual execution, developers often still need to manually write or generate the corresponding execution code based on the graphical configuration at the front end. Whether it's a manual script or indirect generation based on a graphical configuration, the sources of parameters required for node operation (such as from fixed configurations, workflow inputs, or upstream node outputs), the transmission of results between nodes, the logical selection of conditional branches, and the organization and mapping of the final output results—these key logics are usually scattered across different code modules or configuration files, lacking a unified, structured description and scheduling mechanism.

[0004] The aforementioned existing technical solutions have significant drawbacks. For the first type of manually written script solution, the process logic is highly coupled with the business code. When processing requirements change (e.g., adjusting the step order or adding conditional branches), the code needs to be modified and tested again, resulting in poor reusability and high maintenance costs. For the second type of graphical configuration solution, because its configuration information is disconnected from the execution logic, it cannot achieve WYSIWYG (What You Configure Is What You Get). After process adjustments, it also faces tedious adaptation work and is prone to problems such as incorrect parameter binding, disordered execution order, or inconsistent output fields due to manual conversion errors. Therefore, there is an urgent need for a method that can directly, automatically, and reliably convert visually configured processes into backend executable instruction chains, uniformly realizing the structured description, logic verification, parameter parsing, process scheduling, and result processing of the process, thereby reducing development and maintenance costs and improving the flexibility and reliability of industrial vision processing systems. Summary of the Invention

[0005] To address the above problems, this invention proposes an automatic construction method and system for image processing pipelines based on operator graphs.

[0006] The technical solution adopted in this invention is as follows: In a first aspect, this invention proposes an automatic construction method for an image processing pipeline based on operator graphs, comprising the following steps: S1. Obtain the operator graph metadata corresponding to the image processing pipeline generated and serialized by the visual editor. The operator graph metadata includes a node set and an edge set. The nodes in the node set are logical units that define the image processing flow. Each node is labeled with a node identifier, node type, node name, and node configuration. The edge set is used to describe the logical relationship and execution order between nodes. Each edge is labeled with an edge identifier, source node identifier, target node identifier, and edge type. S2. Perform a validity check on the operator graph metadata based on graph theory rules; S3. Based on the verified operator graph metadata, taking the start node as the entry point, and according to the execution order defined by the edge set, automatically construct and execute the node execution chain; the execution process includes: When the execution reaches an operation node, the parameter source in its node configuration is parsed and the image processing operation corresponding to the node is executed according to the actual parameter value obtained from the parsing. The parameter source includes custom parameters, pipeline input parameters and previous node output parameters. When execution reaches a condition node, the obtained image data is evaluated according to the condition judgment logic in its node configuration, and the corresponding branch path is selected to continue execution based on the evaluation result. When execution reaches a parallel node, all its subsequent branches are started and executed in parallel at the same time. When execution reaches the merge node, the execution results from multiple preceding nodes are aggregated; When execution reaches the end node, the output of one or more specified preceding nodes is organized into a standardized pipeline output result according to the predefined output mapping rules in its node configuration.

[0007] Furthermore, the node identifier, node type, node name, and node configuration of each node in the node set are specifically as follows: The node identifier is used to uniquely identify a node in the node set; The node type is used to define the function of the node, including start node, end node, operation node, condition node, parallel node, and merge node; the operation node is equipped with an operation identifier and is bound to an image processing operator; The node name is used to identify the node in the front-end visual interface; The node configuration is used to define the execution logic of the node. For operation nodes, it includes the parameter configuration of image processing operators; for condition nodes, it includes condition judgment expressions; for end nodes, it includes output mapping rules; and for start nodes, parallel nodes, and merge nodes, the node configuration is empty.

[0008] Furthermore, each node in the node set is also labeled with its two-dimensional coordinate position information on the front-end visualization interface.

[0009] Furthermore, the edge identifier, source node identifier, target node identifier, and edge type of each edge in the edge set are specifically as follows: The edge identifier is used to uniquely identify an edge in the edge set; The source node identifier is used to indicate the upstream node to which the edge is connected; The target node identifier is used to indicate the downstream node connected by the edge; The edge type is used to define the logical relationship between nodes, including ordinary edges, true branch edges, and false branch edges; among them, ordinary edges are used to connect adjacent nodes that do not have conditional branches, indicating a sequential execution relationship; true branch edges are used to connect conditional nodes with the subsequent nodes pointed to when the condition judgment result is true; false branch edges are used to connect conditional nodes with the subsequent nodes pointed to when the condition judgment result is false.

[0010] Furthermore, the validity verification process based on graph theory rules includes: Verify that there exists one and only one start node and one end node in the node set; The condition node is verified to be connected to both true and false branch edges. Verify that each node in the node set can be reached from the starting node according to the execution order defined by the edge set.

[0011] Furthermore, the step of parsing the source of parameters in the node configuration and performing the image processing operation corresponding to the node based on the parsed actual parameter values ​​specifically includes: If the parameter source is a custom parameter, then the preset fixed value in the node configuration is directly used as the actual parameter value; If the parameter source is a pipeline input parameter, then the corresponding actual parameter value is obtained from the pipeline input parameter set received by the start node according to the parameter name; If the parameter source is the output parameter of the preceding node, then the actual parameter value is extracted from the output result of the corresponding preceding node that has been executed and cached, based on the specified node identifier and output name.

[0012] Furthermore, in step S3, the aggregation of execution results from multiple preceding nodes specifically involves: Get all incoming edges of the merge node, and extract the output of the corresponding predecessor node from the cached node execution results based on the source node identifier of each incoming edge. If there is only one predecessor node execution result, directly use that result as the output of the merge node. If there are multiple predecessor nodes execution results, integrate all predecessor node execution results into a list as the output of the merge node.

[0013] Furthermore, the step of organizing the outputs of one or more specified front-end nodes into a standardized pipeline output result according to the predefined output mapping rules in its node configuration specifically includes: Read the predefined output mapping rules in the node configuration of the end node, wherein the output mapping rules define the mapping relationship between standardized output parameters and the specified outputs of one or more preceding nodes; For each standardized output parameter, determine its mapping relationship: if the mapping relationship format points to the output of a specific predecessor node, then extract the specified value from the execution result of the corresponding predecessor node; if the mapping fails, then fall back to the preset default value.

[0014] Furthermore, it also includes step S4: During the execution of step S3, execution log information is recorded synchronously. The execution log information includes the start and end time of node execution, node type and name, parameter parsing completion status, conditional expression and its evaluation result, operation execution result, output parameter summary and exception information.

[0015] Secondly, the present invention discloses an automatic image processing pipeline construction system based on operator graphs, which is used to implement the above-mentioned automatic image processing pipeline construction method based on operator graphs.

[0016] The beneficial effects of this invention are: This invention transforms visually appealing and easily understood flowcharts directly into executable, high-performance image processing pipelines through a unified data structure and an automated construction engine. Specifically, through a unified operator graph metadata structure, flowcharts created by users through drag-and-drop connections can be directly parsed and run by the system, achieving WYSIWYG (What You Configure Is What You Get) and significantly lowering the barrier to entry for building image processing algorithm workflows. By using graph theory-based rule-based validity checks, configuration conflicts and logical errors are automatically detected before execution, preventing runtime crashes or abnormal results caused by workflow design flaws and improving the overall stability and reliability of the system. Through unified parameter source parsing, it supports various logical control nodes such as conditional nodes, parallel nodes, and merging nodes, enabling the handling of complex real-world scenarios. Finally, through output mapping rules, arbitrarily complex processing results can be organized into a standardized format. Attached Figure Description

[0017] Figure 1 This is a diagram of the architecture of the present invention; Figure 2 This is a schematic diagram of the operator graph metadata structure; Figure 3 This is a flowchart for operator graph validity verification; Figure 4 It is a flowchart for the automatic construction of an operator graph into an execution chain; Figure 5 This is a diagram illustrating the source analysis of node parameters; Figure 6 This is a diagram illustrating the merging of conditional branches and results; Figure 7 This is a schematic diagram of the output mapping; Figure 8 This is the first half of the flowchart of an industrial character recognition implementation example; Figure 9 This is the latter half of the flowchart of an industrial character recognition implementation example. Detailed Implementation

[0018] The present invention will be further described and illustrated below with reference to specific embodiments. The embodiments described are merely examples of the content of this disclosure and do not limit the scope of the invention. The technical features of each embodiment in the present invention can be combined accordingly, provided that there is no mutual conflict.

[0019] The accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0020] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0021] like Figure 1 As shown, the automatic construction method for image processing pipelines based on operator graphs proposed by the inventors can be implemented through a modular system, mainly including: (1) User Visual Editor Module As the entry point for system-user interaction, it provides an intuitive graphical user interface (GUI) or interactive canvas. In this module, users do not need to write low-level code; they can drag and drop nodes representing different functions into the workspace, such as image enhancement operators and character region positioning operators, and intuitively define the dependencies and data flow between nodes using the connection tool.

[0022] To lower the barrier to entry, the editor has a rich built-in component library and pre-built templates; after configuration, the front end serializes this visual flowchart into a structured operator graph metadata.

[0023] (2) Operator graph metadata module It receives node layout, connection relationships, and parameter configuration information from the visual editor, parses these visual front-end elements, and converts them into machine-readable standardized operator graph metadata; the structure of the operator graph metadata is as follows: Figure 2 As shown, it consists of two parts: The node set is a list that records each logical step in the process. Each node is a logical unit in the image processing workflow and is labeled with at least the following fields: Node ID: A unique identifier for a node.

[0024] Node types include start nodes, end nodes, operation nodes, condition nodes, merge nodes, and parallel nodes. Operation nodes can be image enhancement operators, region localization operators, character recognition operators, grayscale operators, size normalization operators, feature extraction operators, object detection operators, image classification operators, image segmentation operators, quality assessment operators, etc. Each operator can be implemented using algorithms commonly used in the field of image processing, which will not be described in detail here. Condition nodes can be image brightness judgment conditions, image sharpness judgment conditions, object existence judgment conditions, color channel judgment conditions, format judgment conditions, image size judgment conditions, etc., and can be set according to the image processing task.

[0025] Node name: The name of the node used for display.

[0026] Operation identifier (for operation nodes): Specifies the specific image processing algorithm (such as image enhancement algorithm A) that the node is bound to.

[0027] Node configuration: A structure containing parameter source configuration (defining the source of each input parameter during the node's runtime) and output mapping configuration (mainly used for end nodes, defining how to organize the final output). For start nodes, parallel nodes, and merge nodes, their node configurations are empty.

[0028] Location information: The two-dimensional coordinates of the node on the canvas of the visual editor. It is used to locate the display position of the node during front-end rendering and does not participate in the execution logic of the back-end.

[0029] The edge set is a list that records the connections between nodes. Each edge describes the execution order between nodes and is labeled with at least the following fields: Edge Identifier (ID): A unique identifier for an edge.

[0030] Source node identifier: This refers to the unique identifier of the upstream node to which this edge is connected, indicating which node the process logic or data flows out from.

[0031] Target node identifier: This refers to the unique identifier of the downstream node connected by this edge, indicating which node the process logic or data flow is directed to.

[0032] Edge types include ordinary edges, true branch edges, and false branch edges, used to represent different logical relationships between nodes. Ordinary edges are used to connect adjacent nodes that do not have conditional branches, representing the sequential data flow; true branch edges start from the conditional node and point to the subsequent node to be executed when the conditional expression evaluates to true; false branch edges start from the conditional node and point to the subsequent node to be executed when the conditional expression evaluates to false.

[0033] (3) Pipeline validity verification module This module performs a validity check on the operator graph metadata according to preset system rules. If a configuration conflict or logical error is found, the module will intercept the request and provide a highlight notification to the user's visual editor interface for specific error location information. If the check passes, the downstream execution chain will be automatically constructed.

[0034] It mainly includes three types: basic graph structure verification, node specificity verification, and reachability verification, among which: Basic graph structure validation includes: checking that the node set contains exactly one start node and one end node, serving as the unique entry and exit points for the process; checking that all node identifiers are unique to avoid ambiguity when referencing them; and checking that the nodes pointed to by the source and target node identifiers of each edge actually exist in the node set.

[0035] Node-specific verification includes: for all nodes of type operation, checking whether their operation identifier points to a valid image processing operator that has been registered in the system backend, ensuring that the node has the ability to execute; for all nodes of type condition, checking that they must be connected to both true branch edges and false branch edges, ensuring that the branch logic is complete.

[0036] Reachability verification includes: starting from the starting node, traversing all connection paths defined by the edge set, and checking whether it is possible to reach all other nodes in the graph, avoiding isolated nodes or infinite loop logic where the ending node cannot be reached.

[0037] like Figure 3 As shown, the system performs multi-dimensional validity checks on the read operator graph metadata to ensure it meets execution requirements. The verification process adopts a step-by-step checking and termination strategy upon encountering an error: First, it obtains the node set and edge set from the operator graph metadata, performs basic graph structure checks, verifies that the node set has one and only one start node and one end node, and verifies that all node identifiers are unique and that the source and target nodes of all edges exist in the node set; if the above checks pass, it enters node-specific checks, checking one by one whether the operation node is bound to a valid operation identifier and whether the condition node has both true and false branch edges; if the specific checks pass, it enters reachability checks, checking whether all other nodes in the graph can be reached from the start node; after all three checks pass, the verification result is output; if any step fails, the process is immediately terminated and a specific verification failure message is output.

[0038] (4) Automatic Execution Chain Construction Module Based on the verified metadata, this module is responsible for compiling the abstract operator graph metadata into a sequence of executable instructions at the underlying level, and then converting it into operations that are executed sequentially.

[0039] like Figure 4 As shown, after the process starts, initialization is performed first, which involves reading the operator graph metadata, establishing node indices and edge relationships, and locating the start node. Upon entering the loop execution phase, the currently pending nodes are continuously acquired, and the image processing operator execution module performs branching processing based on node type: if the current node is an operation node, the parameter source is parsed and the image processing operator is executed; if the current node is a condition node, the condition expression is evaluated and the corresponding branch path is selected; if the current node is a parallel node, all subsequent nodes pointed to by its outgoing edges are traversed sequentially, and the execution of each branch is initiated one by one; if the current node is a merging node, the execution results of each preceding node are aggregated after all incoming edges have been executed; if the current node is a termination node, the final output is organized according to the output mapping rules. The output of a node can be an image (image data), a set of non-image data (such as a list or array), or a structured object containing multiple named data items (such as images, text, numbers, coordinates, etc.). The results of nodes that have already been executed are cached; when an executed node is accessed again, the cached results are reused directly to avoid repeated execution.

[0040] (5) Image processing operator execution module This module schedules the corresponding algorithm library sequentially or concurrently, processes the incoming image data stream, performs split processing based on node type, and generates intermediate processing results. The process is as follows: If the current node is an operation node, parse the parameter source in its node configuration and execute the image processing operation corresponding to that node based on the parsed actual parameter values, such as... Figure 5 As shown, the parameter sources include user-defined parameters, pipeline input parameters, and front-end node output parameters; In this embodiment, the node configuration will specify the exact source of each input parameter, and the format may be: "custom: fixed value" indicates that this parameter is a custom parameter and uses the preset fixed value directly.

[0041] "input: parameter name" indicates that this parameter is obtained from the process's global input parameter table.

[0042] "node: Preceding Node ID: Output Name" indicates that this parameter extracts specific output from the execution result of the specified preceding node.

[0043] Based on the parsed source, the system retrieves the specific values ​​of all parameters in real time. For example, for a parameter with the source "node: image enhancement node: output_image", the system will retrieve the image data named output_image from the cached results of the image enhancement node. Once all parameters are ready, the system calls the image processing operator corresponding to the node's operation identifier to perform the calculation.

[0044] If the current node is a condition node, the obtained image data is evaluated according to the condition judgment logic in its node configuration, and the corresponding branch path is selected to continue execution based on the evaluation result. The condition judgment logic is the condition expression defined in the node configuration. Based on whether the calculation result is true or false, the subsequent path is determined along the corresponding true branch edge or false branch edge. In this embodiment, for example, the condition expression is "the average brightness value of the image is >128". The expression is evaluated to obtain a Boolean value result, and then the subsequent node pointed to by the true branch edge or false branch edge is selected to continue execution. The branch path that is not selected is skipped in this round of execution.

[0045] If the current node is a merging node, a result aggregation operation is performed to merge the execution results of multiple specified predecessor nodes. A merging node has multiple incoming edges and one outgoing edge, with its incoming edges coming from multiple different predecessor nodes. The aggregation process is as follows: First, all incoming edges of the merging node are obtained. Based on the source node identifier of each incoming edge, the output of the corresponding predecessor node is extracted from the cached node execution results. Then, aggregation is performed according to the following rules: when there is only one predecessor node's execution result, that result is directly used as the output of the merging node; when there are multiple predecessor nodes' execution results, the execution results of all predecessor nodes are integrated into a list and used as the output of the merging node.

[0046] like Figure 6 This is an example containing condition nodes, operation nodes, and merge nodes, demonstrating a pipelined processing mechanism for conditional branching and result merging. When the process reaches a condition node, it evaluates the expression based on the preset logic "whether the image brightness meets the set conditions," and guides the process to different branches based on the evaluation result of "true" or "false": if the condition is met, it enters the branch of the bright image enhancement processing node; if the condition is not met, it enters the branch of the dark image enhancement processing node.

[0047] After the branch processing is completed, the results converge at the merge node. According to the rules of this embodiment, when there is only one execution result of the preceding branch, the merge node directly uses that result as its output; when there are multiple execution results of the preceding branches, the merge node integrates all the results into a list as its output, and uses this list as the input data for subsequent nodes to pass to the next processing stage.

[0048] If the current node is a parallel node, then all subsequent nodes pointed to by its outgoing edges are traversed sequentially, and the execution of each branch is initiated one by one. A parallel node has one incoming edge and multiple outgoing edges. Its function is to split a single execution flow into multiple parallel branches, each branch independently executing its own image processing logic. During execution, the system enters each branch sequentially according to the order of its outgoing edges, executing all nodes on that branch one by one, and caching the execution results. When all branches have been executed, the final nodes of each branch converge to the downstream merging node through their respective outgoing edges, where the merging node aggregates the execution results of each branch. It should be noted that parallel nodes and merging nodes are used in pairs.

[0049] After completing the logical processing of the current node, the next node is obtained according to the edge relationship defined in the graph structure. It is then determined whether the current node is the end node: if the end node has not been reached, the loop body is returned to continue executing the subsequent logic; if the end node has been reached, the calculation result of the entire execution chain is finally output according to the predefined output mapping rules in the node configuration, and the process ends.

[0050] (6) Output mapping module To address the diverse output formats of image processing tasks, this module is responsible for converting the results generated by the operator execution module into a unified output structure expected by the user, according to preset mapping rules.

[0051] like Figure 7 As shown, the node configuration of the end node defines the final standardized pipeline output parameter list, where each parameter specifies which output field of which preceding node its value should be obtained. For example: "result_image: node: image processing node A: enhanced_image" indicates that the parameter named result_image in the final output result is derived from the execution result of the preceding image processing node, specifically by extracting the data named enhanced_image from the result object of that node.

[0052] "Recognize text: node: character recognition node B: text" means that the parameter named "recognize text" in the final output result is derived from the execution result of the preceding character recognition node, specifically by extracting the data named "text" from the result object of that node.

[0053] "Confidence: node: score node C: score" means that the parameter named confidence in the final output result comes from the execution result of the preceding score node, specifically by extracting the data named score from the result object of that node.

[0054] If a node pointed to by a certain mapping relationship is not executed or the specified field does not exist in the result, the default value preset for that output parameter will be used to fill it, and the result will be checked for integrity and type.

[0055] (7) Final result output module As the endpoint of the data processing pipeline, this module receives the mapped results and outputs the results (result_image, recognized text, confidence score) to the business system according to a JSON structure with fixed field names and types.

[0056] (8) Log recording module This module receives the running status and execution results from the pipeline validity verification module to the image processing operator execution module in real time, and records detailed logs.

[0057] like Figure 8 and Figure 9 As shown, taking the wheel hub character recognition scenario as an example, its logical steps include: inputting a wheel hub image, image enhancement, brightness condition judgment, selecting different enhancement strategies based on brightness, region localization, parallel execution of character recognition and quality assessment, result aggregation, and output of recognition results, thus involving a total of 12 nodes. Based on this scenario, the system executes in the order of defining nodes, legality checking, automatically constructing the execution chain, and execution processing, as follows: The system first parses the operator graph metadata built by the user in the visual editor, clarifying that the pipeline contains 12 nodes, and the definition and configuration of each node are as follows: Image Input Node (Start Node): The node type is Start Node, and the node configuration is empty. This node serves as the pipeline entry point, receiving externally input wheel hub image data as pipeline input parameters.

[0058] Image Enhancement Node (Operation Node): This node is of type operation, and the bound operation identifier is the image enhancement algorithm. The parameter sources in its node configuration are set as follows: the image parameter source is "input:image", meaning the original wheel hub image is obtained from the pipeline input parameters; other enhancement parameters (such as the contrast coefficient) source is "custom", meaning preset fixed values ​​are used. After execution, this node outputs the enhanced image data.

[0059] Brightness Condition Judgment Node (Condition Node): The node type is a condition node, and its condition expression in the node configuration is "average brightness value of the image > preset threshold". This node receives image data output by the preceding image enhancement node, calculates its average brightness value, and performs a condition judgment: if the brightness value is greater than the preset threshold, it enters the bright image processing node along the true branch edge; if the brightness value is less than or equal to the preset threshold, it enters the dark image processing node along the false branch edge.

[0060] Bright image processing node (operation node): This node is an operation node and is bound to a bright image enhancement algorithm. Its parameters are derived from the output parameters of the preceding node ("node: image enhancement node: output_image"), and it performs further optimization processing on images whose brightness already meets the requirements.

[0061] Dark image processing node (operation node): This node is an operation node and is bound to a dark image enhancement algorithm. Its parameters are derived from the output parameters of the preceding node ("node: image enhancement node: output_image"), and it performs noise reduction and brightness enhancement processing on images that do not meet the brightness requirements.

[0062] The result merge node (merge node): The node type is merge node, and the node configuration is empty. This node has two incoming edges, one from the bright graph processing node and the other from the dark graph processing node. Since only one branch in the conditional branches will actually be executed, the merge node only receives the execution result of one preceding branch, and directly uses this result as the output of the merge node according to the aggregation rules.

[0063] Region localization node (operation node): The node type is operation node, bound to the character region localization algorithm. Its parameters come from the output parameters of the preceding node ("node: result merging node: output"). It locates the region containing the character from the image output by the merging node, and outputs the localization coordinates and the cropped region image.

[0064] Parallel Processing Node (Parallel Node): This node is of type parallel node and its configuration is empty. It has one incoming edge and multiple outgoing edges, and its function is to split the single execution flow into multiple parallel branches: one branch points to the character recognition node, and another branch points to the quality evaluation node. The system enters each branch sequentially according to the outgoing edge order, and each branch independently executes its own image processing logic.

[0065] Character recognition node (operation node): This node is of operation type and is bound to a character recognition algorithm. Its parameters are derived from the output parameters of the preceding node ("node: region positioning node: region_image"). It recognizes the located character region image and outputs the recognized text and confidence score.

[0066] Quality assessment node (operation node): This node is an operation node and is bound to an image quality assessment algorithm. Its parameters are derived from the output parameters of the preceding node ("node: region localization node: region_image"). It performs quality assessment on the located region image and outputs a quality score.

[0067] Result Summary Node (Merge Node): This node is of type Merge Node and its configuration is empty. It has two incoming edges, one from the Character Recognition node and the other from the Quality Assessment node. Since both branches have been executed, the Merge Node receives the execution results of both preceding branches and integrates them into a list as its output, according to the aggregation rules.

[0068] Output mapping node (end node): This node is of type end node, and its configuration defines the output mapping rules: "Recognized Text" maps to "node:Character Recognition Node:text", "Confidence Score" maps to "node:Character Recognition Node:score", "Quality Score" maps to "node:Quality Assessment Node:quality_score", and "Region Image" maps to "node:Region Location Node:region_image". The system extracts the output values ​​from the corresponding preceding nodes according to the mapping rules, organizes them into a standardized JSON structure, and returns it to the business system.

[0069] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, all technical solutions obtained through equivalent substitution or transformation fall within the protection scope of the present invention.

Claims

1. A method for automatically constructing an image processing pipeline based on operator graphs, characterized in that, Includes the following steps: S1. Obtain the operator graph metadata corresponding to the image processing pipeline generated and serialized by the visual editor. The operator graph metadata includes a node set and an edge set. The nodes in the node set are logical units that define the image processing flow. Each node is labeled with a node identifier, node type, node name, and node configuration. The edge set is used to describe the logical relationship and execution order between nodes. Each edge is labeled with an edge identifier, source node identifier, target node identifier, and edge type. S2. Perform a validity check on the operator graph metadata based on graph theory rules; S3. Based on the verified operator graph metadata, taking the start node as the entry point, and according to the execution order defined by the edge set, automatically construct and execute the node execution chain; the execution process includes: When the execution reaches an operation node, the parameter source in its node configuration is parsed and the image processing operation corresponding to the node is executed according to the actual parameter value obtained from the parsing. The parameter source includes custom parameters, pipeline input parameters and previous node output parameters. When execution reaches a condition node, the obtained image data is evaluated according to the condition judgment logic in its node configuration, and the corresponding branch path is selected to continue execution based on the evaluation result. When execution reaches a parallel node, all its subsequent branches are started and executed in parallel at the same time. When execution reaches the merge node, the execution results from multiple preceding nodes are aggregated; When execution reaches the end node, the output of one or more specified preceding nodes is organized into a standardized pipeline output result according to the predefined output mapping rules in its node configuration.

2. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, The node identifier, node type, node name, and node configuration of each node in the node set are as follows: The node identifier is used to uniquely identify a node in the node set; The node type is used to define the function of the node, including start node, end node, operation node, condition node, parallel node, and merge node; the operation node is equipped with an operation identifier and is bound to an image processing operator; The node name is used to identify the node in the front-end visual interface; The node configuration is used to define the execution logic of the node. For operation nodes, it includes the parameter configuration of image processing operators. For a condition node, it includes a conditional expression; For the end node, it includes the output mapping rules; for the start node, parallel node, and merge node, their node configuration is empty.

3. The automatic construction method for image processing pipeline based on operator graphs according to claim 2, characterized in that, Each node in the node set is also labeled with its two-dimensional coordinate position information on the front-end visualization interface.

4. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, The edge identifier, source node identifier, target node identifier, and edge type of each edge in the edge set are specifically as follows: The edge identifier is used to uniquely identify an edge in the edge set; The source node identifier is used to indicate the upstream node to which the edge is connected; The target node identifier is used to indicate the downstream node connected by the edge; The edge type is used to define the logical relationship between nodes, including ordinary edges, true branch edges, and false branch edges; among them, ordinary edges are used to connect adjacent nodes that do not have conditional branches, indicating a sequential execution relationship; true branch edges are used to connect conditional nodes with the subsequent nodes pointed to when the condition judgment result is true; false branch edges are used to connect conditional nodes with the subsequent nodes pointed to when the condition judgment result is false.

5. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, The validity verification process based on graph theory rules includes: Verify that there exists one and only one start node and one end node in the node set; The condition node is verified to be connected to both true and false branch edges. Verify that each node in the node set can be reached from the starting node according to the execution order defined by the edge set.

6. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, The process of parsing the parameter sources in the node configuration and performing the image processing operation corresponding to the node based on the parsed actual parameter values ​​specifically includes: If the parameter source is a custom parameter, then the preset fixed value in the node configuration is directly used as the actual parameter value; If the parameter source is a pipeline input parameter, then the corresponding actual parameter value is obtained from the pipeline input parameter set received by the start node according to the parameter name; If the parameter source is the output parameter of the preceding node, then the actual parameter value is extracted from the output result of the corresponding preceding node that has been executed and cached, based on the specified node identifier and output name.

7. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, In step S3, the aggregation of execution results from multiple preceding nodes specifically involves: Get all incoming edges of the merge node, and extract the output of the corresponding predecessor node from the cached node execution results based on the source node identifier of each incoming edge; if there is only one predecessor node execution result, directly use that result as the output of the merge node. If there are execution results from multiple preceding nodes, then the execution results of all preceding nodes are combined into a list as the output of the merged node.

8. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, The step of organizing the outputs of one or more specified front nodes into a standardized pipeline output result according to the predefined output mapping rules in its node configuration specifically includes: Read the predefined output mapping rules in the node configuration of the end node, wherein the output mapping rules define the mapping relationship between standardized output parameters and the specified outputs of one or more preceding nodes; For each standardized output parameter, determine its mapping relationship: if the mapping relationship format points to the output of a specific predecessor node, then extract the specified value from the execution result of the corresponding predecessor node; if the mapping fails, then fall back to the preset default value.

9. The automatic construction method for image processing pipeline based on operator graphs according to claim 1, characterized in that, It also includes step S4: During the execution of step S3, execution log information is recorded synchronously. The execution log information includes the start and end time of node execution, node type and name, parameter parsing completion status, conditional expression and its evaluation result, operation execution result, output parameter summary and exception information.

10. An automatic image processing pipeline construction system based on operator graphs, used to implement the automatic image processing pipeline construction method based on operator graphs as described in claim 1, characterized in that, The system includes: The user visual editor module provides a graphical interface to receive user drag-and-drop and connection operations, and to visually arrange image processing pipelines containing various types of nodes, and generate corresponding operator graph description data. The operator graph metadata module is used to receive the operator graph description data and serialize it into operator graph metadata; The pipeline validity verification module is used to receive the operator graph metadata and verify it based on predefined graph theory rules; The execution chain automatic construction module is used to automatically parse and construct a node execution chain that can be executed sequentially or in parallel, based on the connection relationship defined by the edge set, after the operator graph metadata verification is passed, with the start node as the entry point. The image processing operator execution module is used to run the node execution chain; The output mapping module is used to extract and organize data from the output of one or more specified preceding nodes according to the predefined output mapping rules of the node when the execution chain reaches the end node. The final output module receives the processed data and encapsulates it into standardized pipeline output results. The logging module is used to synchronously record execution log information.