Industrial black box optimization method based on constraint decomposition and external knowledge gating
By employing constraint decomposition and external knowledge gating methods, the problems of fragmented constraint processing, inefficient utilization of external knowledge, and performance stagnation in industrial black-box optimization have been solved. This has enabled efficient optimization and reproducibility in scenarios such as continuous chemical reactions, thereby improving the efficiency and stability of industrial production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-05
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies in industrial black-box optimization suffer from fragmented constraint processing, inefficient utilization of external knowledge, difficulty in escaping performance stagnation, and insufficient process reproducibility. As a result, the generated optimizers are unable to meet the requirements of auditability and verifiability in high-precision industrial production scenarios such as chemical and semiconductor industries.
By using a method based on constraint decomposition and external knowledge gating, the boundaries of industrial process parameters and evaluation budgets are obtained, and an optimizer skeleton that satisfies the interface contract is generated. Combined with iterative performance monitoring and external knowledge retrieval, path and text deduplication is performed, performance stagnation is detected and a diversity exploration mechanism is triggered, ensuring the traceability of the generation process.
It improves the constraint compliance of industrial black-box optimizers, the accuracy of external knowledge injection, and the reproducibility of the generation process, thereby enhancing the yield convergence and stability in scenarios such as continuous chemical reactions and reducing the number of experiments and generation costs.
Smart Images

Figure CN121787290A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an industrial black-box optimization method based on constraint decomposition and external knowledge gating, belonging to the field of industrial process control and optimization. Background Technology
[0002] Black-box optimization problems are prevalent in industrial scenarios such as continuous chemical reactions, semiconductor lithography processes, and intelligent manufacturing scheduling. The objective function for these problems cannot be obtained analytically; feedback can only be obtained through high-cost field tests (such as chemical pilot production and chip tape-out verification). Furthermore, decision variables are subject to multiple physical constraints, including equipment safety thresholds, energy consumption budgets, and product purity. While traditional heuristic algorithms (such as covariance matrix adaptive strategies, differential evolution, and particle swarm optimization) have been used for these problems, they rely on expert experience for parameter tuning and algorithm selection. Their convergence performance is unstable when migrating across industrial scenarios, making them unsuitable for complex industrial environments with high-dimensional constraints and strong coupling.
[0003] In recent years, the technique of automatically generating candidate optimizers using large language models has been introduced into the field of industrial optimization. This technique generates algorithm code through program synthesis, which theoretically can rapidly expand the search space. However, in practical applications for industrial black-box optimization scenarios, this technique has revealed the following systemic defects:
[0004] First, constraint processing is fragmented. Physical constraints (such as upper temperature limits of reactors and joint limits of robotic arms) and resource constraints (such as experimental budgets and computing power limits) in industrial scenarios lack a systematic code-level mapping mechanism, which causes the generated optimizer to often violate interface contracts or exceed safety boundaries, requiring repeated manual corrections and reducing generation efficiency.
[0005] Secondly, the utilization of external knowledge is inefficient. Existing technologies mostly rely on retrieval augmentation generation (RAG) mechanisms to inject external algorithmic knowledge, but lack a gating mechanism that links with the real-time generation state of the model, which easily leads to the indiscriminate stacking of knowledge fragments and redundant prompts; at the same time, the lack of deduplication processing for the retrieved content results in information noise interfering with the innovation of the optimizer structure.
[0006] Third, performance stagnation is difficult to overcome. In the generation-evaluation closed-loop iteration, the model is prone to falling into the structural homogenization trap, that is, continuously generating optimizer code with similar logic, resulting in performance stagnation; existing technologies lack detection methods and mandatory structural transition mechanisms for such generation process stagnation.
[0007] Fourth, the process reproducibility is insufficient. The random seed is not fixed, the evaluation process lacks a timeout circuit breaker mechanism, and key generation nodes are not archived, making it difficult to trace and reproduce industrial experimental results. This fails to meet the stringent requirements for algorithm auditability and verifiability in high-precision industrial production scenarios such as chemical and semiconductor industries.
[0008] Therefore, there is an urgent need for an intelligent optimizer generation method that can systematically handle industrial constraints, precisely control the injection of external knowledge, efficiently break through generation stagnation, and ensure the reproducibility of the entire process. Summary of the Invention
[0009] This invention provides an industrial black-box optimization method based on constraint decomposition and external knowledge gating to address the problems existing in the prior art.
[0010] The technical solutions adopted in this invention are as follows:
[0011] An industrial black-box optimization method based on constraint decomposition and external knowledge gating includes the following steps:
[0012] S1. Obtain the industrial process parameter boundary, evaluation budget and industrial control system interface contract. The industrial process parameter boundary includes equipment safety constraints and resource consumption constraints. Generate an initial candidate optimizer set based on the industrial process parameter boundary, evaluation budget and basic optimizer template library in the field of industrial optimization.
[0013] S2. Based on equipment safety constraints and resource consumption constraints, as well as the budget counting mechanism based on the evaluation budget and the industrial control system interface contract, the candidate optimizer code structure is reorganized to generate a runnable optimizer skeleton that satisfies interface contract compliance and equipment safety invariants, thus forming the reorganized candidate optimizer.
[0014] S3. Monitor the current cumulative iteration count and industrial process performance index during the iterative execution process. When the cumulative iteration count reaches a preset threshold and the industrial process performance index is lower than the gate threshold, based on the dimension that the industrial process performance index is lower than the gate threshold, retrieve external knowledge fragments from the external knowledge base in the field of industrial process optimization. Deduplicate the execution path and text of the external knowledge fragments, and inject the deduplicated external knowledge fragments into the recombined candidate optimizer.
[0015] S4. Based on a unified random seed and a fixed random number generation logic, perform parallel performance evaluation of the candidate optimizer after injecting external knowledge in an industrial scenario within a preset evaluation timeout period; if the evaluation timeout occurs, record the interruption reason and return to step S2.
[0016] S5. Based on continuous identical division detection and structural fingerprint repetition detection, determine the performance stagnation state of the candidate optimizer after injecting external knowledge. When the performance stagnation of the candidate optimizer after injecting external knowledge or the structural fingerprint repetition is detected, trigger the exploration diversity mechanism.
[0017] S6. Iterate through steps S2 to S5 until the budget is exhausted or the industrial process performance index converges to the preset industrial standard. Archive the parameter configuration, structural adjustment records and performance evaluation results of each iteration, generate checkpoints at a preset frequency, and output the optimal candidate optimizer and its industrial process control parameters adapted to the target industrial scenario.
[0018] Furthermore, the equipment safety constraints include at least one of temperature safety threshold, pressure safety threshold, mechanical motion limit, and energy consumption limit;
[0019] The resource consumption constraints include at least one of the following: experiment count budget, computing power consumption limit, time overhead threshold, and storage usage limit.
[0020] Furthermore, the industrial control system interface contract includes data format specifications, parameter transmission protocols, exception handling mechanisms, and log recording standards;
[0021] The budget counting mechanism includes an experiment count counter, a computing power consumption metering unit, and an iteration count accumulator.
[0022] Furthermore, in step S2, the reorganization of the candidate optimizer code structure also includes: mapping equipment safety constraints and resource consumption constraints to code structure constraints. The categories of code structure constraints include initialization, main loop, update rules, boundary handling, termination, and logging. The initialization constraint corresponds to industrial experiment budget, random seed, industrial process parameter dimension, and boundary reading. The main loop constraint corresponds to industrial optimization iteration, candidate process parameter generation and selection. The update rule constraint corresponds to industrial parameter step size adaptation, covariance update, and process restart strategy. The boundary handling constraint corresponds to industrial parameter pruning / reflection and energy consumption constraint projection. The termination constraint corresponds to industrial budget exhaustion, performance stagnation, and process index detection pass. The log constraint corresponds to industrial process index recording and optimal process path tracing. The candidate optimizer code structure is then modularly decomposed and reorganized according to the categories.
[0023] Furthermore, in S3, the gating threshold is an AUC value, and the range of the AUC value is 0.22-0.30;
[0024] The targeted search returns 2-4 external knowledge fragments, with each fragment limited to 700-900 characters in length.
[0025] Furthermore, in S3, path deduplication includes removing duplicate external knowledge fragments from the same source; text deduplication includes removing external knowledge fragments whose content similarity exceeds a preset threshold.
[0026] Furthermore, in S4, the preset evaluation timeout is 900-1200 seconds; when the time taken for parallel performance evaluation exceeds the preset evaluation timeout, the current evaluation is forcibly interrupted and the reason for the interruption is recorded.
[0027] Furthermore, in S5, the continuous tie detection includes: when the average performance change of the candidate optimizer in 3-10 consecutive iterations is less than 1×10⁻⁶. -4 When this occurs, it is determined to be a performance stagnation;
[0028] The structural fingerprint duplication detection includes: calculating the code structural fingerprint of the candidate optimizer after injecting external knowledge and comparing it with the historical structural fingerprint; when the similarity exceeds a preset threshold, a novelty retry mechanism is triggered, and the novelty retry mechanism retryes 2-4 times.
[0029] Furthermore, in S5, the exploration of diversity mechanisms includes: increasing the sampling temperature when generating the candidate optimizer to 1.2, weakening elite guidance and setting the number of iterations of the S2 to S5 loops to be executed 2-3 times as the cooling step number to maintain structural diversity, and restoring the baseline configuration after the cooling period.
[0030] Furthermore, in S6, a checkpoint is generated once every 10 iterations; the checkpoint includes the code path of the current best candidate optimizer, a snapshot of the industrial process control parameters, and a random seed record.
[0031] The present invention has the following beneficial effects:
[0032] (1) By mapping the boundaries of industrial process parameters (including equipment safety constraints and resource consumption constraints) into code structure constraints such as initialization, main loop, and boundary processing, it helps to reduce the probability of generated candidate optimizers violating interface contracts or exceeding physical safety boundaries, and reduces the cost of invalid generation and manual correction caused by constraint fragmentation.
[0033] (2) Using a dual gating system of iterative threshold and performance index (AUC threshold) to trigger external knowledge retrieval, combined with path deduplication and text deduplication mechanisms, helps to avoid the indiscriminate stacking of external knowledge fragments and information noise, so that the timing of knowledge injection matches the performance weaknesses of industrial scenarios and improves the novelty of the optimizer structure.
[0034] (3) Based on continuous same score detection (the average performance change is less than 1×10 for 3-10 consecutive tests) -4 By using structural fingerprint repetition detection to generate homogeneous states, and by exploring diversity mechanisms (adjusting sampling temperature and weakening elite guidance) to implement forced structural transitions, it is helpful to break the local optimum trap and restore the convergence momentum.
[0035] (4) By using a unified random seed, a preset evaluation timeout circuit breaker (900-1200 seconds), and periodic checkpoint archiving (every 10 rounds of iteration), it helps to achieve traceability of the algorithm generation and evaluation process and meet the requirements of industrial scenarios for auditability of experimental data.
[0036] (5) In industrial black-box optimization scenarios such as continuous chemical reactions, the optimizer generated by the method of this invention shows that the final yield and convergence stability are improved compared with the benchmark method, and the number of experimental iterations required to reach the target yield is reduced. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.
[0038] Figure 2 This is a block diagram of the system corresponding to the method of the present invention.
[0039] Figure 3 This is a flowchart illustrating the constraint decomposition module of the present invention.
[0040] Figure 4 This is a flowchart illustrating the retrieval enhancement module of the present invention.
[0041] Figure 5 This is a comparison chart of the best-so-far (historical best yield) curves for each experiment.
[0042] Figure 6 This is a comparison chart of the best-avg (historical best average) average curves. Detailed Implementation
[0043] The invention will now be further described with reference to the accompanying drawings.
[0044] This implementation takes the optimization of continuous chemical reaction process parameters—a typical industrial black-box optimization scenario—as an application example. It implements an industrial black-box optimization method based on constraint decomposition and external knowledge gating. The decision variables in this industrial scenario include four dimensions: reaction temperature, reaction pressure, feed flow rate, and catalyst ratio. Equipment safety constraints cover temperature ≤150℃ and pressure ≤2.0MPa. Resource consumption constraints are set at energy consumption ≤500kWh per unit time. The core objective of industrial optimization is to maximize the yield of chemical products while meeting the process index requirement of product purity ≥95%.
[0045] The entire method is executed collaboratively by the generation module, constraint decomposition module, retrieval enhancement module, evaluation module, fingerprint deduplication module, stall detection module, diversity exploration module, and log console. The connection and cooperation relationships between the modules are as follows: Figure 2As shown. The log console records the entire process, including dialogues, constraint logs, evaluation trajectories, checkpoints, parameter snapshots, and error and timeout information, providing data support for the traceability and reproducibility of the entire process. The method as a whole follows a closed-loop iterative logic of "generation-evaluation-repair-exploration," as follows... Figure 1 As shown, starting from the parameter module design and generation module initialization, through constraint decomposition and external knowledge injection, evaluation and statistics, stagnation detection and repair, the historical optimal solution is finally output. Throughout the process, the iteration state is judged into three situations: normal, error, and stagnation, and corresponding processing strategies are executed. The specific implementation steps are as follows.
[0046] First, the parameter module design and generation module initialization work were carried out. The industrial process parameter boundaries, evaluation budget, and industrial control system interface contract for the continuous chemical reaction scenario were obtained. The industrial process parameter boundaries include the aforementioned equipment safety constraints and resource consumption constraints. Specifically, the equipment safety constraints are the temperature and pressure safety thresholds and energy consumption limits of the reaction equipment. The resource consumption constraints include the budget for 300 sets of industrial experimental measurements, the upper limit of computing power consumption, and the time consumption threshold. A budget counting mechanism was simultaneously built to support the evaluation budget, including an experiment count counter, a computing power consumption metering unit, and an iteration count accumulator. The industrial control system interface contract was matched to the DCS system requirements of chemical production, including corresponding data format specifications, parameter transfer protocols, exception handling mechanisms, and log recording standards.
[0047] After acquiring the above information, the generation module generates a set of initial candidate optimizers that meet the basic adaptability requirements of the chemical industry scenario, based on the industrial process parameter boundaries and evaluation budget, combined with the basic optimizer template library in the field of industrial optimization. This set includes the core algorithm structure, parameter range, and execution logic framework of the optimizer. The generation module also initializes the optimizer interface contract and boundary pruning / reflection rules, and clarifies the optimal solution return format, laying the foundation for subsequent constraint adaptation and knowledge injection. The log console synchronously records the parameter snapshot and random seed information during the initialization phase, unifies the initial random seed and the random number generation logic of the iteration process, and ensures that the initial conditions are consistent for each run.
[0048] Next, the constraint decomposition module performs constraint decomposition and structural reorganization on the initial candidate optimizers, such as... Figure 3 As shown, the constraint decomposition module takes the code / structure of the candidate optimizer and various industrial constraints as input, and outputs a candidate optimizer with consistent constraints through four major stages: constraint extraction, query construction, structure reconstruction, and interface / budget / boundary invariant verification.
[0049] In practice, the constraint decomposition module first extracts constraints from the candidate optimizer code and industrial test error logs to obtain implicit constraints such as adaptability constraints, performance constraints, resource constraints, and interface contract compliance. Simultaneously, it maps device safety constraints and resource consumption constraints to code structure constraints, which are categorized into six main types: initialization, main loop, update rules, boundary handling, termination, and logging.
[0050] The initialization constraints correspond to the reading requirements of chemical experiment budget, random seed, and industrial process parameter dimensions and boundaries;
[0051] The main loop constraints correspond to the iterative execution of chemical optimization, the generation and selection of candidate process parameters, and the experimental cost accounting logic.
[0052] Update rule constraints correspond to adaptive step size, covariance update, and process restart strategies for chemical parameters;
[0053] Boundary handling constraints correspond to the trimming / reflection of chemical parameters and the projection of energy consumption constraints;
[0054] Termination constraints correspond to the budget exhaustion judgment, performance stagnation judgment, and product purity smoke test pass standards in chemical experiments.
[0055] Log constraints correspond to the requirements for recording process indicators and tracing optimal process paths in chemical production.
[0056] After constructing the query based on the extracted constraints, the constraint decomposition module modularly disassembles and structurally reconstructs the candidate optimizer code structure. It replaces core modules that do not conform to constraints such as adaptive step size, covariance update, and restart strategy. It adjusts iteration triggering conditions, evaluation node settings, and result recording timing, and implements boundary constraints such as pruning / reflection, capacity / sum constraint projection. It prioritizes forming the simplest, runnable algorithm skeleton. Subsequently, it performs interface contract, budget counting, and boundary consistency invariant checks on the reconstructed optimizer. If a missing interface is found, the skeleton is supplemented; if the boundary is unclear, the boundary is abstracted; if the complexity exceeds the threshold, pruning or divide-and-conquer is performed. This ensures that the optimizer's input / output format, parameter passing method, and exception handling mechanism fully comply with the preset industrial control system interface contract. Finally, it generates a runnable optimizer skeleton that satisfies interface contract compliance and equipment safety invariants, forming the reconstructed candidate optimizer. This optimizer is then returned to the main loop to prepare for subsequent external knowledge injection.
[0057] After the optimizer structure is reorganized, the core process of closed-loop iteration begins.
[0058] First, the log console monitors the current iteration number of subsequent loops in real time, and the evaluation module collects industrial process performance indicators synchronously. In this embodiment, the preset threshold for the number of iterations is set to 50 times, and the industrial process performance indicators are selected from core indicators such as chemical product yield, purity, and energy consumption. The corresponding gate threshold is an AUC value of 0.28.
[0059] When the number of iterations reaches 50 and the AUC value corresponding to the industrial process performance index is lower than 0.28, the retrieval enhancement module initiates the external knowledge retrieval and injection process, such as... Figure 4 As shown. The retrieval enhancement module takes the current candidate optimizer, performance / stagnation metrics, and constraint context as input, and goes through seven stages: performance gating, query topic selection, DRoC retrieval Top-K, content deduplication, fragment length limiting, novelty protection, and external knowledge injection, outputting an enhanced candidate optimizer. Specifically, during execution:
[0060] The retrieval enhancement module first determines whether to initiate a retrieval based on performance gating. If the performance threshold is not met, the retrieval process is initiated; otherwise, it skips the process. Subsequently, based on the specific dimensions of the industrial process performance indicators that are lower than the gating threshold, i.e., the performance weakness dimension of low product yield in this embodiment, the module selects query topics. The retrieval topics focus on reaction parameter coupling optimization, high-energy-consumption operating condition parameter adjustment, update rules and typical operators related to product purity improvement, boundary handling and restart strategies, failure mode comparison and repair suggestions. If topic conflicts occur, they are decomposed; if a topic is too weak, the context is supplemented.
[0061] After the topic selection is completed, the search enhancement module performs a DRoC search from an external knowledge base in the field of chemical process optimization. The number of external knowledge fragments returned by the targeted search is set to 3, and the length of each external knowledge fragment is controlled to 800 characters, which is within the range of 700-900 characters.
[0062] After retrieving knowledge fragments, a dual deduplication operation is first performed: path deduplication and text deduplication. Path deduplication removes duplicate knowledge fragments from the same source, while text deduplication removes knowledge fragments with content similarity exceeding a preset threshold to avoid information redundancy and noise. Then, the length of the deduplicated fragments is limited. If it is too long, it is truncated; if it is too short, context is added to ensure that the fragment length meets the requirement of 700-900 characters to avoid injection overload.
[0063] Then, the novelty protection phase begins, explicitly reminding the model that knowledge fragments cannot be copied directly and that substantial changes to the structure / operators are required. If a fragment is found to be non-novel, the topic or enhancement target is reselected. Finally, the processed knowledge fragment is accurately embedded into the reorganized candidate optimizer to complete the external knowledge injection. If the number of iterations does not reach 50 or the industrial process performance index is higher than the preset gate threshold, the retrieval enhancement module will not be started temporarily, and iteration will continue based on the current optimizer structure.
[0064] After external knowledge injection is completed, the fingerprint deduplication module performs structural fingerprint detection on the candidate optimizers after external knowledge injection. The fingerprint deduplication module extracts the code structural fingerprint of the candidate optimizers through AST / structural summary, calculates the similarity matrix between it and the structural fingerprint of the historically generated optimizers, and marks duplicates. If the similarity exceeds a preset threshold, the novelty retry mechanism is triggered.
[0065] In this embodiment, the number of novelty retries is set to 3. The fingerprint deduplication module inputs the structural summary and candidate fingerprints into the mild repair stage, guiding the generation module to generate candidate optimizers with structural differences to avoid structural homogenization.
[0066] After passing the fingerprint deduplication module's inspection, the evaluation module performs parallel performance evaluation on the candidate optimizers. Based on a unified random seed and a fixed random number generation logic, the evaluation module conducts the evaluation within a preset evaluation timeout period. In this embodiment, the preset evaluation timeout period is set to 900 seconds. The evaluation module simultaneously performs parallel performance evaluations on five operating conditions: low conversion rate in chemical engineering, high energy consumption, high purity requirements, equipment limits, and complex coupling. It calculates core evaluation indicators such as AUC and AOCC for each operating condition, and statistically analyzes the mean and standard deviation of product yield, purity, and energy consumption. The evaluation trajectory and indicators are synchronized to the log console. If the parallel performance evaluation takes more than 900 seconds, the evaluation module determines it as an evaluation timeout, immediately forcibly interrupts the current evaluation operation, and records the interruption reasons related to industrial optimization evaluation in detail, such as algorithm freezing, slow convergence, or equipment parameter exceeding limits. It then returns to the constraint decomposition module to reorganize the candidate optimizers based on historical effective structures to avoid timeout risks. If the evaluation does not time out, the evaluation module records the process indicators and execution logs of this evaluation, synchronizes the results to the stagnation detection module, and enters the performance stagnation detection step.
[0067] The stagnation detection module takes the performance data from the evaluation module as input and determines the performance stagnation state of the candidate optimizer through tie / approximate tie detection. In this embodiment, the continuous tie trigger threshold is set to 5 times, that is, when the average change in the industrial scenario performance of the candidate optimizer is less than 1×10 in 5 consecutive iterations of evaluation. -4 When a performance stagnation occurs, the stagnation detection module determines that a performance stagnation has occurred. At the same time, it counts the number of stagnations and calculates the cooldown count. The stagnation determination result and the cooldown count are then input into the minor repair module and the exploration diversity mechanism module, respectively.
[0068] If only a single performance stagnation or structural fingerprint duplication is triggered, the mild repair module performs a mild repair. This module guides the generation module to fine-tune parameters or replace operators in candidate optimizers by applying slight penalties and providing diverse prompts. If performance stagnation or structural fingerprint duplication is detected in a candidate optimizer, and the accumulated stagnation reaches a preset high threshold, the exploration diversity mechanism module triggers the exploration diversity mechanism. This module achieves structural transitions in optimizers through a process of increasing temperature, cooling temperature, and weakening elitism. Specifically, the sampling temperature when the generation module generates candidate optimizers is increased to 1.2, the elitist guidance strategy is weakened, and two iterations are set as cooling steps. Within the cooling steps, the structural diversity of the optimizer is maintained, preventing insufficient optimization caused by switching back to the baseline configuration immediately after entering the exploration diversity mechanism. After the cooling period, the baseline configuration adapted for industrial optimization is automatically restored, and the regular evaluation-optimization cycle is re-entered. The exploration diversity mechanism module synchronizes the major changes and cooling steps to the log console. This mechanism breaks the local optimum trap in industrial black-box optimization, expands the exploration radius, and restores the convergence momentum of process performance.
[0069] Subsequently, the above-mentioned structural reorganization completed by the constraint decomposition module, external knowledge gating injection completed by the retrieval enhancement module, structural fingerprint detection completed by the fingerprint deduplication module, parallel performance evaluation completed by the evaluation module, and stagnation detection and repair completed by the stagnation detection module and the exploration diversity mechanism module are continuously iterated until the termination condition of budget exhaustion or process performance convergence is met.
[0070] In this implementation, when the budget for 300 sets of industrial experimental tests is exhausted, or when the chemical process performance indicators such as product yield ≥92%, purity ≥95%, and energy consumption per unit time ≤500kWh converge to the preset industrial standard, the termination judgment module judges the iteration status throughout the process. If the termination condition is met, the process is terminated; otherwise, the loop continues.
[0071] Throughout the entire iteration process, the log console implements reproducibility assurance measures, archives parameter configurations, structural adjustment records, performance evaluation results, and knowledge injection content for each iteration in real time, and generates checkpoints at a preset frequency of every 10 iterations. The checkpoints include the code path of the current best candidate optimizer, snapshots of industrial process control parameters, random seed records, and key industrial performance evaluation data. The constraint decomposition module and the retrieval enhancement module also synchronize their respective execution logs to the log console to ensure that the optimizer in each iteration meets the industrial constraint requirements, and that external knowledge injection is accurate and efficient.
[0072] Once the termination determination module determines that the termination conditions are met, the entire closed-loop iterative process is terminated. The system outputs the optimal candidate optimizer adapted to the continuous chemical reaction industrial scenario, along with the corresponding industrial process control parameters, namely the reaction temperature, reaction pressure, feed flow rate, and catalyst ratio parameter combination that maximizes product yield. At the same time, the log console fully archives the parameter snapshots, random seeds, process logs, and checkpoint data of the entire process, ensuring the traceability and reproducibility of the entire industrial black-box optimization process. Process engineers can directly use the output optimal candidate optimizer to fine-tune the industrial production parameters of continuous chemical reactions, thereby optimizing process indicators and improving production efficiency.
[0073] To demonstrate the comprehensive advantages of this invention, two statistical charts are selected for presentation.
[0074] Figure 5 To compare the best-so-far (historical best yield) curves for each experiment (dashed line represents the improved version, solid line represents the original elite retention strategy), the improved version shows more frequent and larger step-like leaps in the early and mid-stage iterations (e.g., the yield of the first 100 experiments rapidly increases from 75% to 90%), and the final plateau is significantly higher (final yield ≥ 92%). At the same time, the cross-experiment curves are more convergent and have lower dispersion, indicating that the improved optimizer has a more stable response under different chemical operating conditions, avoiding the problem of excessive yield fluctuations under certain operating conditions in traditional methods.
[0075] Figure 6 For comparison of the best-average (historical best average) curve, the improved version's average curve shows a continuous rise in the first 20-40 iterations and enters a high-level plateau earlier (e.g., the yield stabilizes above 88% after the 30th iteration), and is significantly higher than the original version throughout, reflecting a higher overall average yield and faster convergence (the number of experiments to reach the target yield of 92% is reduced by 40% compared to the original version). Quantitatively, the improved version outperforms the original version using only the elite strategy in terms of final yield, convergence speed, and stability, achieving robust batch solutions to similar industrial black-box problems such as continuous reaction parameter optimization in chemical engineering.
[0076] The embodiments of this invention are not limited to the aforementioned continuous chemical reaction scenarios. They can also be adapted to various industrial black-box optimization scenarios, such as lithography process parameter adjustment in semiconductor manufacturing, robot path planning in intelligent manufacturing, and resource allocation and scheduling in industrial production. By adjusting the boundaries of industrial process parameters, evaluation budgets, industrial control system interface contracts, and various preset thresholds and parameter ranges according to the specific needs of the industrial scenario, and through the collaborative execution of the generation module, constraint decomposition module, retrieval enhancement module, evaluation module, fingerprint deduplication module, stall detection module, diversity exploration module, and log console, an intelligent optimizer adapted to the scenario can be generated using the method of this invention. This solves the problems of poor adaptability and unstable convergence performance of traditional optimization methods across industrial scenarios. In various industrial black-box optimization scenarios, it can achieve systematic constraint processing, efficient utilization of external knowledge, effective exit from performance stalls, and full reproducibility of the optimization process, significantly improving the efficiency, stability, and robustness of industrial black-box optimization.
[0077] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.
Claims
1. An industrial black-box optimization method based on constraint decomposition and external knowledge gating, characterized in that: Includes the following steps: S1. Obtain the industrial process parameter boundary, evaluation budget and industrial control system interface contract. The industrial process parameter boundary includes equipment safety constraints and resource consumption constraints. Generate an initial candidate optimizer set based on the industrial process parameter boundary and evaluation budget. S2. Based on equipment safety constraints and resource consumption constraints, as well as the budget counting mechanism based on the evaluation budget and the industrial control system interface contract, the candidate optimizer code structure is reorganized to generate a runnable optimizer skeleton that satisfies interface contract compliance and equipment safety invariants, thus forming the reorganized candidate optimizer. S3. Monitor the current cumulative iteration count and industrial process performance indicators during the iterative execution process. When the cumulative iteration count reaches a preset threshold and the industrial process performance indicators are lower than the gate threshold, retrieve external knowledge fragments based on the dimension where the industrial process performance indicators are lower than the gate threshold. Perform path deduplication and text deduplication on external knowledge fragments, and inject the deduplicated external knowledge fragments into the recombined candidate optimizer; S4. Based on a unified random seed and a fixed random number generation logic, perform parallel performance evaluation on the candidate optimizers after injecting external knowledge within a preset evaluation timeout period; if the evaluation timeout occurs, record the interruption reason and return to step S2. S5. Based on continuous identical division detection and structural fingerprint repetition detection, determine the performance stagnation state of the candidate optimizer after injecting external knowledge. When the performance stagnation of the candidate optimizer after injecting external knowledge or the structural fingerprint repetition is detected, trigger the exploration diversity mechanism. S6. Iterate through steps S2 to S5 until the termination conditions of budget exhaustion or process performance convergence are met; archive the parameter configuration, structural adjustment records and performance evaluation results of each iteration, generate checkpoints at a preset frequency, and output the optimal candidate optimizer and its industrial process control parameters.
2. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: The equipment safety constraints include at least one of temperature safety threshold, pressure safety threshold, mechanical motion limit, and energy consumption limit. The resource consumption constraints include at least one of the following: experiment count budget, computing power consumption limit, time overhead threshold, and storage usage limit.
3. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: The industrial control system interface contract includes data format specifications, parameter transmission protocols, exception handling mechanisms, and log recording standards. The budget counting mechanism includes an experiment count counter, a computing power consumption metering unit, and an iteration count accumulator.
4. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In step S2, the reorganization of the candidate optimizer code structure also includes: mapping device safety constraints and resource consumption constraints to code structure constraints, wherein the categories of the code structure constraints include initialization, main loop, update rules, boundary handling, termination and logging, and modularly disassembling and reorganizing the candidate optimizer code structure according to the categories.
5. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S3, the gate threshold is the AUC value, and the range of the AUC value is 0.22-0.30; The targeted search returns 2-4 external knowledge fragments, with each fragment limited to 700-900 characters in length.
6. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S3, path deduplication includes removing duplicate external knowledge fragments from the same source; text deduplication includes removing external knowledge fragments whose content similarity exceeds a preset threshold.
7. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S4, the preset evaluation timeout is 900-1200 seconds; when the time taken for parallel performance evaluation exceeds the preset evaluation timeout, the current evaluation is forcibly interrupted and the reason for the interruption is recorded.
8. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S5, the continuous tie detection includes: when the average performance change of the candidate optimizer in 3-10 consecutive iterations is less than 1×10. -4 When this occurs, it is determined to be a performance stagnation; The structural fingerprint duplication detection includes: calculating the code structural fingerprint of the candidate optimizer after injecting external knowledge and comparing it with the historical structural fingerprint; when the similarity exceeds a preset threshold, a novelty retry mechanism is triggered, and the novelty retry mechanism retryes 2-4 times.
9. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S5, the exploration of diversity mechanisms includes: increasing the sampling temperature when generating the candidate optimizer to 1.2, weakening elite guidance and setting the number of iterations of the S2 to S5 loops to be executed 2-3 times as the cooling step number to maintain structural diversity, and restoring the baseline configuration after the cooling period.
10. The industrial black-box optimization method based on constraint decomposition and external knowledge gating as described in claim 1, characterized in that: In S6, a checkpoint is generated once every 10 iterations. The checkpoint includes the code path of the current best candidate optimizer, a snapshot of the industrial process control parameters, and a random seed record.