A knowledge-guided machine-vision workflow candidate generation and limited parameter tuning method, system, device and storage medium
Patent Information
- Application Number
- CN202611212679.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本发明实施例的目的在于提供一种知识引导的机器视觉Workflow候选生成与有限参数调优方案,旨在解决候选流程依赖人工设计、参数搜索空间大、未验证建议存在现场风险以及评价结论缺少来源和适用边界的问题
[0010]与现有技术相比,本发明通过Tool Metadata、工程记忆和任务约束缩小候选空间;通过不可直接执行的Blueprint及本地预检隔离未验证建议;通过受候选数、样本数和时间预算限制的参数扫描控制测试成本;通过真实回放同时评估误判、漏判、耗时、异常和稳定性,并提供推荐来源、适用条件和风险提示。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of machine vision, industrial software, artificial intelligence-assisted engineering and automatic testing technology, and in particular relates to a knowledge-guided machine vision Workflow candidate generation and finite parameter optimization method, system, device and storage medium. Background Technology
[0002] Machine vision software typically provides tool libraries for image acquisition, preprocessing, positioning, measurement, OCR, defect detection, and communication, as well as graphical editors. Engineers need to select tools according to business objectives, connect workflows, and repeatedly adjust parameters. In complex projects, tool capabilities, parameter meanings, imaging conditions, and on-site processes are interrelated, and workflow design and parameter tuning are highly dependent on the engineer's experience.
[0003] Existing grid search, random search, or black-box optimization methods are prone to generating numerous invalid combinations when there are many parameters, limited samples, or dependencies between tools, making it difficult to control testing time and on-site costs. The text or code output by general artificial intelligence typically lacks knowledge of deployed tools, parameter ranges, and connection constraints, and therefore cannot be directly executed for industrial vision engineering. Summary of the Invention
[0004] The purpose of this invention is to provide a knowledge-guided machine vision workflow candidate generation and finite parameter optimization scheme, which aims to solve the problems of candidate workflow relying on manual design, large parameter search space, unverified suggestions posing on-site risks, and evaluation conclusions lacking sources and applicable boundaries.
[0005] To achieve the above objectives, the present invention provides the following technical solution.
[0006] In a first aspect, one embodiment of the present invention provides a knowledge-guided machine vision Workflow candidate generation and finite parameter optimization system. The system includes a structured task module 100, a candidate Blueprint generation module 200, a local pre-detection module 300, a sample playback module 400, a scoring and optimization module 500, and a ToolMetadata and engineering memory referencing module 600.
[0007] The structured task module 100 receives the task type, detection object, input sample summary, judgment conditions, output results, acceptance criteria, and security constraints. The tool metadata and engineering memory reference module 600 synchronizes currently deployable tool capabilities, tool metadata, historical workflow summaries, and engineering memory references. The candidate blueprint generation module 200 generates a limited number of candidate blueprints under task and knowledge constraints. The local pre-detection module 300 performs compatibility and security checks on the candidates. The sample replay module 400 loads the candidate workflows in an isolated environment and executes the actual tool chain. The scoring and optimization module 500 outputs recommended results based on the replay metrics.
[0008] Secondly, in another embodiment provided by the present invention, a knowledge-guided machine vision Workflow candidate generation and finite parameter tuning method is provided. The method includes: constructing a structured task; recalling ToolMetadata and engineering memory; generating candidate Blueprints; performing local pre-detection; isolating and instantiating samples and performing sample replay; and selecting the best candidate based on a score considering recognition rate, false positive rate, false negative rate, measurement error, runtime, number of Tool anomalies, and stability metrics.
[0009] Thirdly, the present invention also provides an electronic device and a computer-readable storage medium for implementing the above-described method.
[0010] Compared with existing technologies, this invention narrows the candidate space through tool metadata, engineering memory, and task constraints; isolates unverified suggestions through non-executable blueprints and local pre-screening; controls test costs through parameter scanning limited by the number of candidates, the number of samples, and the time budget; and simultaneously evaluates false positives, false negatives, time consumption, anomalies, and stability through real playback, while providing recommended sources, applicable conditions, and risk warnings. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments are briefly introduced below. The following drawings are only some embodiments of the present invention.
[0012] Figure 1 This is a schematic diagram illustrating the process of structured task, candidate Blueprint generation, local pre-detection, sample playback, and scoring selection provided in the embodiments of the present invention.
[0013] Figure 2 This is a schematic diagram of the finite parameter tuning process provided in an embodiment of the present invention.
[0014] Figure 3This is a schematic diagram of the candidate Blueprint verification and isolation instantiation process provided in an embodiment of the present invention.
[0015] exist Figures 1-3 The module includes: 100, Structured Task Module; 200, Candidate Blueprint Generation Module; 300, Local Pre-detection Module; 400, Sample Replay Module; 500, Scoring and Optimization Module; 600, Tool Metadata and Engineering Memory Reference Module; 610, Sensitive Parameter Filtering Module; 620, Single Parameter Scanning Module; 630, Small-Range Combination Search Module; 640, Budget Constraint Stop Module; 710, Blueprint Input Module; 720, Schema and Tool Deployment Validation Module; 730, Connection and Parameter Validation Module; 740, Isolate Instantiation or Reject Record Module. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described are for explaining the invention and are not intended to limit the invention.
[0017] like Figure 1 As shown, in one embodiment of the present invention, the structured task module 100 receives a structured task T. The structured task includes at least a task type, a detection object, an input sample summary, judgment conditions, output results, acceptance criteria, and security constraints. The input sample summary may include the sample source, quantity, category distribution, imaging conditions, and known anomaly types.
[0018] The Tool Metadata and Engineering Memory Reference module 600 describes and provides tool functionality, input / output types, parameter ranges, risk levels, and validation requirements. Optionally, the Tool Metadata also includes the tool version, dependent tools, resource requirements, and exception codes. The Engineering Memory Reference provides historical validation facts that match task type, detection object, tool combination, or parameter changes.
[0019] The candidate Blueprint generation module 200, based on structured tasks, tool metadata, and engineering memory references, first recalls available tool combinations, similar workflows, and experience records, and then generates multiple candidate Blueprints. Each candidate Blueprint includes a tool combination, connection relationships, initial parameters, applicable conditions, risk descriptions, supporting evidence, and suggested validation samples. Candidate generation can employ large language models, rule engines, case reasoning, template matching, search algorithms, or combinations thereof.
[0020] Candidate Blueprints are non-executable suggestions that do not contain PLC control commands or I / O control commands and do not directly override production workflows. Candidate Blueprints should meet the preset schema so that the local pre-check module 300 can perform structure and constraint checks.
[0021] like Figure 3 As shown, the Blueprint input module 710 receives candidate Blueprints. The Schema and Tool deployment validation module 720 confirms that the tool identifier, connection fields, parameter fields, and reference fields are complete and of consistent type, and confirms that the corresponding tool version is available locally. The connection and parameter validation module 730 confirms that the upstream output type is compatible with the downstream input type, confirms that the parameters are within the allowed range and satisfy the parameter dependencies, and confirms that the candidate does not violate project security constraints.
[0022] If any validation fails, the isolation instantiation or rejection logging module 740 rejects the candidate and logs the reason: invalid schema, tool not deployed, connection mismatch, parameter out of bounds, parameter dependency conflict, or security level not met. Blueprints that pass the pre-check are converted into candidate Workflows and executed in an isolated environment separate from the production Workflow.
[0023] like Figure 2 As shown, for a given Tool, the sensitive parameter filtering module 610 filters a small number of sensitive parameters from engineering memory and problem types. For example, for scenarios with a high number of OCR misidentifications, confidence threshold, ROI range, contrast enhancement, and minimum character area can be listed as candidates; for scenarios with missed character detection, parameters related to weak character recognition can be selected, or parameters in the opposite direction to the misidentification problem can be selected.
[0024] The single-parameter scanning module 620 records the replay results of each sensitive parameter within a small range of values. The small-range combination search module 630 selects the top few sensitive parameters from the single-parameter scanning results and performs a combination search. The budget-constrained stopping module 640 monitors the number of candidates, the number of samples, and the upper limit of the testing time; if any upper limit is reached, the current round of testing stops to avoid unbounded expansion of the parameter space. Optionally, parameter candidates can employ Bayesian optimization, heuristic search, or other budget-constrained optimization methods.
[0025] The sample replay module executes one or more candidate workflows from among 400 pairs of OK samples, NG samples, historical misjudged samples, historical missed samples, current project collected samples, and boundary samples. During replay, it records the recognition rate, misjudgment rate, missed judgment rate, measurement error, execution time, number of tool anomalies, and stability indicators. Stability indicators can be determined by the fluctuations in multiple replay results, the frequency of tool anomalies, or the success rate of execution.
[0026] The scoring and selection module 500 calculates a comprehensive score and risk level based on the weighted indicators configured for the project. For security testing scenarios, the weight of false negative rate and tool anomaly count can be increased; for cycle-sensitive scenarios, the weight of runtime can be increased; and for measurement testing scenarios, the weight of measurement error can be increased. Only candidates whose comprehensive scores meet the recommended criteria and whose risk level is controllable are output to engineers.
[0027] The recommendations should at least include the corresponding sample, metric, risk description, applicable conditions, and engineering memory source. If a candidate is only applicable to specific imaging conditions, sample range, or cycle time range, an inapplicable warning should be displayed. The recommendations are only intended to assist engineers in their decision-making; they must be reviewed and confirmed by engineers before being implemented in the production deployment process.
[0028] The above embodiments are merely preferred embodiments of the present invention. In practical applications, the candidate generation method, parameter search method, scoring indicators, and deployment location can be replaced or adjusted according to usage requirements; without departing from the technical concept of the present invention, these replacements and adjustments should all fall within the protection scope of the present invention.
Claims
1. A knowledge-guided machine vision Workflow candidate generation and finite parameter tuning system, characterized in that, The system includes: a structured task module for receiving the task type, detection object, input sample summary, judgment conditions, output results, acceptance indicators, and security constraints of a machine vision project; a tool metadata and engineering memory reference module for providing currently deployable tool capabilities, tool metadata, historical workflow summaries, and engineering memory references; a candidate blueprint generation module for generating multiple candidate blueprints based on the structured task, tool metadata, and engineering memory references; a local pre-inspection module for performing schema validity, tool deployment, input / output connectivity, parameter range, parameter dependencies, and security level checks on the candidate blueprints; a sample playback module for instantiating the verified candidate blueprints into candidate workflows and performing offline sample playback in an isolated environment; and a scoring and selection module for calculating a comprehensive score and risk level based on playback indicators, and recommending risk-controllable candidate workflows or parameter candidates under constraints of the number of candidates, the number of samples, and the test time budget.
2. The system according to claim 1, characterized in that, The Tool Metadata shall include at least one or more of the following: Tool functionality, input / output types, parameter ranges, risk level, verification requirements, Tool version, dependent Tools, resource requirements, and exception codes.
3. The system according to claim 1, characterized in that, The candidate Blueprint generation module is used to recall available tool combinations, similar workflows, and experience records based on task type and detection object, and generate candidate Blueprints that include tool combinations, connection relationships, initial parameters, applicable conditions, risk descriptions, references, and suggested verification samples.
4. The system according to claim 3, characterized in that, The candidate Blueprint is a suggestion object that cannot be directly executed, does not contain PLC control commands or IO control commands, and does not directly cover the production workflow.
5. The system according to claim 1, characterized in that, When the local pre-inspection module fails the verification, it rejects the candidate Blueprint and records the reasons such as invalid schema, tool not deployed, connection mismatch, parameter out of bounds, parameter dependency conflict, or security level not met.
6. The system according to claim 1, characterized in that, The sample replay module is used to execute candidate Workflows on one or more of the following: OK samples, NG samples, historical misjudged samples, historical missed samples, current project collected samples, and boundary samples.
7. The system according to claim 1, characterized in that, The scoring and selection module calculates a comprehensive score and risk level based on recognition rate, false positive rate, false negative rate, measurement error, running time, number of tool anomalies, and stability indicators, and outputs corresponding samples, indicators, risk descriptions, applicable conditions, and engineering memory sources.
8. The system according to claim 1, characterized in that, It also includes a finite parameter tuning module, which is used to filter sensitive parameters from engineering memory and problem types, first performing a single parameter scan, and then performing a small-range combination search on the first few sensitive parameters.
9. The system according to claim 8, characterized in that, Both the single-parameter scan and the small-range combination search are limited by the preset number of candidates, the number of samples, and the upper limit of the test time, and the current round of testing will stop when any upper limit is reached.
10. A knowledge-guided machine vision Workflow candidate generation and finite parameter tuning method, characterized in that, The method is implemented based on the system described in any one of claims 1 to 9. The method includes: constructing a structured task and obtaining Tool Metadata, project memory references, and test budget; generating candidate Blueprints under constraints of Tool connection, parameter range, risk level, and verification requirements; performing local pre-detection on the candidate Blueprints; instantiating the candidate Blueprints that pass the pre-detection into candidate Workflows in an isolated environment and performing sample replay; scoring and selecting the best candidate based on the recognition rate, false positive rate, false negative rate, measurement error, running time, number of Tool anomalies, and stability indicators obtained from the sample replay, and outputting a recommended result with controllable risk.