Task processing method, system and device for large model and operation solution collaborative optimization
Patent Information
- Application Number
- CN202611137315.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-20
AI Technical Summary
[0008]为了解决上述问题,本发明提供一种大模型与运筹求解协同优化的任务处理方法、系统及设备,克服了现有技术中语义理解与精确求解割裂、建模门槛高、结果可靠性不足,以及可解释性弱的缺陷
本发明提出一种大模型与运筹求解协同优化的任务处理方法、系统及设备,通过大语言模型的语义理解能力,将自然语言形式的优化任务输入信息自动转换为符合预设优化任务描述规范的结构化优化任务信息,配合完整性校验、合法性校验与自动修正机制,保障结构化信息的可解析性与合法性,无需专业运筹人员手工建模,缩短业务需求到优化方案的转化周期。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and operations research optimization technology, and specifically discloses a task processing method, system and device for collaborative optimization of large models and operations research solutions. Background Technology
[0002] Operations research optimization technology is a core technology for improving resource utilization efficiency and reducing operating costs in business scenarios such as network scheduling, resource allocation, production scheduling, and route planning. The implementation process of a traditional operations research optimization system is usually as follows: Modelers with professional operations research knowledge work with business personnel to manually abstract the natural language requirements from the business side into a mathematical model containing decision variables, objective functions, and constraints. Then, a professional solver is used to complete numerical calculations, and finally, the solution is converted into a business-executable solution.
[0003] Existing operations research optimization implementation solutions mainly include manual modeling and customized development, rule-based template modeling, and automatic generation based on large language models. These solutions transform business requirements into optimization models through preset templates, semantic parsing, or large model generation, and then call solvers to complete the calculations, thereby reducing the modeling threshold and improving implementation efficiency.
[0004] However, existing technologies face a fundamental technical dilemma: a disconnect between semantic understanding capabilities and accurate solution-solving capabilities. Either they rely on manual conversion of business semantics into mathematical models, resulting in high modeling barriers and poor scenario reusability; or they directly rely on large language models to complete the solution output, leading to unreliable results and frequent misinterpretations, failing to simultaneously achieve both ease of use and reliability.
[0005] Specifically, in traditional manual modeling methods, business personnel can typically only describe optimization objectives and business rules using natural language, which cannot be directly converted into mathematical expressions that meet the requirements of solvers. Meanwhile, professional operations research modelers need a deep understanding of the business scenario to complete model construction, resulting in long modeling cycles, high labor costs, and difficulty in responding to rapidly changing business needs. Furthermore, different optimization scenarios such as network scheduling, resource scheduling, personnel scheduling, and route planning differ significantly in business terminology, data structures, and constraint expressions. Traditional optimization systems are often custom-developed for single scenarios, resulting in non-universal model architecture, interface specifications, and solution logic. Each new scenario requires repeated development, leading to insufficient platform reusability.
[0006] With the development of large language model technology, attempts have emerged to directly generate optimization results from large language models. However, large language models suffer from inherent illusion problems; directly outputting numerical solutions is prone to calculation errors, constraint violations, or infeasible results, and the results are unstable, failing to guarantee the business scenarios' stringent requirements for the feasibility, optimality, and stability of the solutions. Furthermore, traditional solvers can only output numerical solution results and constraint violations, unable to interpret the reasons for the results in conjunction with business semantics, identify key bottlenecks affecting the results, or quickly respond to user queries regarding changes in results after parameter adjustments. This makes it difficult for business personnel to trust and implement optimization solutions.
[0007] Some existing improvement schemes attempt to generate model code from large language models and then call the solver, but they still lack a complete verification and repair, path selection and fallback mechanism. The models generated by large models are prone to syntax errors and logical defects, resulting in a high failure rate. Furthermore, they cannot adapt to the optimal solution strategy for problems of different scales, making it difficult to balance solution efficiency and solution quality. Summary of the Invention
[0008] To address the aforementioned issues, this invention provides a task processing method, system, and device for collaborative optimization of large models and operations research solutions, overcoming the shortcomings of existing technologies such as the separation of semantic understanding and accurate solution, high modeling threshold, insufficient reliability of results, and weak interpretability.
[0009] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0010] In a first aspect, the present invention provides a task processing method for collaborative optimization of large models and operations research solutions, the method comprising: Receive optimization task input information from the user; The large language model is used to parse the input information of the optimization task to generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed. The structured optimization task information is verified; if the verification result indicates that the verification failed, a correction prompt is generated based on the verification result, and the structured optimization task information is corrected according to the correction prompt using the large language model. An optimization model is generated based on the validated structured optimization task information, and the optimization model is solved. If the solution result indicates that the optimization model solution is abnormal, model adjustment information is generated based on the solution result, and the optimization model is corrected according to the model adjustment information. The corrected optimization model is then solved again, and the optimization result is output.
[0011] Optionally, the step of parsing the optimization task input information using a large language model to generate structured optimization task information that conforms to a preset optimization task description specification includes: Based on the preset optimization task description specifications, scenario classification list, business field dictionary and variable naming rules, and combined with the optimization task input information, structured prompt words are defined; The structured prompt words are input into the large language model, and the output is structured content that conforms to the preset optimized task description specification; The structured content output by the large language model is parsed, the optimization task description elements corresponding to the optimization task to be processed are extracted, and structured optimization task information is generated. The optimization task description elements include: scenario type, business entity, data reference relationship, decision variable, parameter, objective function and constraints.
[0012] Optionally, the step of verifying the structured optimization task information; and generating correction prompt information based on the verification result when the verification result indicates that the verification failed, and using the large language model to correct the structured optimization task information according to the correction prompt information, includes: The structured optimization task information is sequentially subjected to integrity verification and legality verification to obtain verification results. The integrity verification is used to check whether there are any missing fields in the structured optimization task information, and the legality verification is used to check whether the field content conforms to the preset specifications, whether the data reference is valid, whether the expression syntax is correct, and whether the scenario type belongs to the predefined range. When the validation result is unsuccessful, locate the erroneous fields, missing fields, illegal values, and expression errors, and generate a correction prompt message containing error location information; The correction prompts and the original structured optimization task information are input into the large language model, and the corresponding content is corrected through the large language model until the preset maximum number of corrections is reached.
[0013] Optionally, before generating an optimization model based on the validated structured optimization task information and solving the optimization model, the method further includes: Extract variable size, constraint size, constraint density, data integrity, and real-time requirements from the validated structured optimization task information, and combine them into a problem feature vector; Based on the problem feature vector and historical solution quality records, the fit scores of heuristic solution path, mathematical programming solution path and hybrid solution path are calculated respectively. The solution path with the highest adaptation score and that meets the time constraint will be selected as the execution path for this solution.
[0014] Optionally, the step of generating model adjustment information based on the solution results when the solution results indicate that the optimization model is abnormal, and then correcting the optimization model according to the model adjustment information and solving the corrected optimization model again includes: Acquire the running status information of the solution process and the quality attribute information of the solution results; when there is a hard constraint violation, solution timeout, no solution anomaly, or the difference between the target value obtained and the preset target value or the historical best target value exceeds the preset threshold, it is judged as a solution anomaly, and model adjustment information including adjustment direction is generated according to the anomaly type; Based on the adjustment direction in the model adjustment information, perform at least one of the following correction operations: Switch to another candidate solution path and solve again; Correct the constraint parameters, variable boundaries, or solution configuration in the structured optimization task information; Adjust the local search neighborhood of the optimization model; The optimization model is regenerated and solved based on the structured optimization task information obtained after performing the correction operation, or the corrected optimization model is solved again.
[0015] Optionally, when the selected solution path is a hybrid solution path, solving the optimization model includes any of the following processes: Parallel hybrid process: Simultaneously start the heuristic algorithm and the operations research optimization solver to perform the solution, compare the multiple sets of candidate solutions, and select the candidate solution that meets the feasibility criteria and has a better objective value as the solution result; Serial hybrid process: First, an initial feasible solution is generated through a heuristic algorithm. The initial feasible solution and the local neighborhood range generated based on the initial feasible solution are passed to the operations research optimization solver. After performing local re-optimization, the solution result is output. Layered hybrid process: The optimization task is broken down into a main problem and sub-problems using a large language model or based on preset business rules. The main problem is solved to obtain the overall decision result, and then the sub-problems are processed through heuristic algorithms to optimize the details before outputting the solution result.
[0016] Optionally, the output of the optimized result after solving the problem may further include: Based on the constraint state information output by the solution process, identify bottleneck constraint information; For the business object corresponding to the bottleneck constraint information, receive the parameter perturbation request input by the user and update the structured optimization. The corresponding parameters of the task information are re-solved to obtain comparative data before and after parameter perturbation; Based on the bottleneck constraint information and the comparison data, natural language explanation content is generated according to a preset explanation template.
[0017] Optionally, after outputting the optimized result, the following is also included: Extract the processing records corresponding to this optimization task; the processing records include task characteristics, execution parameters, and quality indicators. Receive user feedback on optimization results, and associate the processing record with the feedback information and store it in the historical solution quality record; The solution path adaptation score parameters for similar problems are updated based on the newly added historical data, and used for solution path decision-making in subsequent optimization tasks.
[0018] Secondly, this invention provides a task processing system for collaborative optimization of large models and operations research solutions, comprising: The input module is used to receive optimization task input information from the user; The structured modeling module is used to parse the input information of the optimization task using a large language model, and generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed. The verification and correction module is used to verify the structured optimization task information; if the verification result indicates that the verification has failed, it generates correction prompt information based on the verification result, and uses the large language model to correct the structured optimization task information according to the correction prompt information. The solution module is used to generate an optimization model based on the validated structured optimization task information and solve the optimization model. If the solution result indicates that the optimization model is abnormal, model adjustment information is generated based on the solution result, and the optimization model is corrected according to the model adjustment information. The corrected optimization model is then solved again, and the optimization result is output.
[0019] Thirdly, the present invention provides an electronic device, the electronic device comprising: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method described in any one of the first aspects.
[0020] Compared with the closest existing technology, the present invention has the following advantages: This invention proposes a task processing method, system, and device for collaborative optimization of large models and operations research solutions. By leveraging the semantic understanding capabilities of large language models, it automatically converts natural language-based optimization task input information into structured optimization task information that conforms to preset optimization task description specifications. Combined with integrity verification, legality verification, and automatic correction mechanisms, it ensures the parsability and legality of structured information. This eliminates the need for manual modeling by professional operations researchers, shortening the transformation cycle from business requirements to optimization solutions.
[0021] This invention uses a unified preset optimization task description specification to map the optimization requirements of different scenarios into a standardized structure of decision variables, objective functions, and constraints. Different scenarios only need to adjust the entity mapping and field binding rules to reuse the entire chain processing logic, without the need to customize and develop an entire system for a single scenario, thus reducing the development cost of multi-scenario deployment.
[0022] This invention adopts a collaborative architecture of a large language model and an operations research solver. The large language model is only responsible for semantic understanding and structure transformation, while the core solution operations are undertaken by the operations research optimization solver or heuristic algorithms. At the same time, through adaptive solution path selection, multi-dimensional anomaly detection, and multi-mode fallback correction mechanisms, the illusion problem of the large language model is effectively avoided, ensuring the feasibility, stability, and solution quality of the output optimization results, and meeting the hard requirements of serious business scenarios.
[0023] This invention identifies bottleneck constraints based on constraint state information during the solution process, combines parameter perturbation comparison analysis, and generates natural language explanations through controlled preset explanation templates. All explanation data comes from the actual solution process, avoiding subjective fabrication, helping business personnel understand the logic of the results and business bottlenecks, and improving the efficiency of implementing optimization solutions.
[0024] This invention continuously accumulates solution process data and user feedback through historical solution quality records, dynamically adjusts solution path adaptation scoring parameters, and continuously improves the accuracy of solution path decisions with data accumulation, forming a self-optimizing closed loop to adapt to ever-changing business needs and problem scenarios. Attached Figure Description
[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0026] Figure 1 This is a flowchart of a task processing method for collaborative optimization of large models and operations research solutions provided by the present invention; Figure 2 This is a flowchart of the structured optimization task information generation process provided by the present invention; Figure 3 This is a flowchart of the structured optimization task information verification and correction process provided by the present invention; Figure 4 This is the solution path decision flowchart provided by the present invention; Figure 5 This is a flowchart of the modified optimization model provided by the present invention; Figure 6 This is a flowchart of the natural language interpretation of the optimization results provided by the present invention; Figure 7 This is a schematic diagram of a task processing system structure for collaborative optimization of large models and operations research solutions provided by the present invention; Figure 8 This is a diagram of the internal structure of the electronic device provided by the present invention. Detailed Implementation
[0027] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of the present invention and are therefore merely examples, and should not be construed as limiting the scope of protection of the present invention.
[0028] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0029] This invention provides a method, system, and device for co-optimizing large models and operations research solutions. Embodiments of this invention are described below with reference to the accompanying drawings.
[0030] Example 1: As Figure 1 As shown, Embodiment 1 of this application provides a task processing method for co-optimization of large models and operations research solutions. This method specifically includes the following steps: S101, Receive the optimization task input information from the user.
[0031] In this step, the optimization task input information includes the user's optimization requirements described in natural language, the business dataset, constraint parameters, and runtime configuration. The natural language optimization requirements include the optimization objective, business scope, time range, resource range, and priority rules; the business dataset includes task data, resource data, cost-benefit data, and scenario-related data; and the runtime configuration includes parameters such as solution time limit and solution accuracy requirements. The optimization task input information is received from the user. S102. The large language model is used to parse the input information of the optimization task to generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed.
[0032] In this step, the preset optimization task description specification is a unified structured data format across scenarios. It serves as an intermediate representation connecting natural language requirements and the solver, and its core is used to describe the decision variables, objective function, and constraints of the optimization task to be processed. Optimization problems in all business scenarios can be mapped to this unified structure. The structured optimization task information is structured data that can be directly parsed by the program, rather than unstructured text.
[0033] S103. Verify the structured optimization task information; if the verification result indicates that the verification failed, generate correction prompt information based on the verification result, and use the large language model to correct the structured optimization task information according to the correction prompt information.
[0034] This step uses a two-layer verification mechanism to ensure the legality and solvability of the structured optimization task information. If the verification fails, a structured correction prompt is automatically generated and fed back to the large language model, which then makes targeted corrections until the verification passes or the preset maximum number of corrections is reached.
[0035] S104. Generate an optimization model based on the verified structured optimization task information, and solve the optimization model. If the solution result indicates that the optimization model solution is abnormal, generate model adjustment information based on the solution result, correct the optimization model according to the model adjustment information, solve the corrected optimization model again, and output the optimization result after solving.
[0036] In this step, the optimized model is a model format that can be directly solved by the operations research solver or heuristic algorithm, and is obtained by converting structured optimization task information. When a solution anomaly occurs, the corresponding correction direction is matched according to the anomaly type. The correction is completed by switching paths, adjusting parameters, or modifying the model, and the solution is solved again to ensure the feasibility and quality of the output results.
[0037] like Figure 2 As shown, in one embodiment, the process of generating structured optimization task information in step S102 specifically includes: S11. Define structured prompt words based on the preset optimization task description specifications, scenario classification list, business field dictionary and variable naming rules, combined with the optimization task input information.
[0038] In this step, the scenario classification list is used to limit the scope of identifiable optimization scenarios, the business field dictionary is used to define the mapping relationship between business data and model parameters, and the variable naming rules are used to unify the naming conventions of decision variables; the structured prompt words clearly limit the output format of the large language model, requiring it to output only structured content that conforms to the preset optimization task description specifications, and prohibiting the output of irrelevant explanatory text.
[0039] S12. Input the structured prompt words into the large language model and output structured content that conforms to the preset optimized task description specification.
[0040] In this step, the large language model uses its semantic understanding capabilities to parse the business requirements in the input information of the optimization task, extract the optimization objectives, constraint rules, decision objects and data relationships, fill in the corresponding fields according to the specifications, and output structured results.
[0041] S13. Parse the structured content output by the large language model, extract the optimization task description elements corresponding to the optimization task to be processed, and generate structured optimization task information.
[0042] In this step, the optimization task description elements include seven categories: scenario type, business entity, data reference relationship, decision variable, parameter, objective function, and constraints. The scenario type is used to identify the business scenario to which the optimization task belongs; the business entity is used to define the business objects and index sets involved in the optimization; the data reference relationship is used to define the binding relationship between the business dataset and the model parameters; the decision variable is an adjustable and controllable variable during the optimization process; the parameter is a fixed input value during the optimization process; the objective function is used to define the optimization direction and optimization objective; and the constraints are used to define the restrictive rules that must be met or weighed during the optimization process.
[0043] like Figure 3 As shown, in one embodiment, the verification and correction process in step S103 specifically includes: S21. Perform integrity and legality checks on the structured optimization task information in sequence to obtain the check results.
[0044] In this step, the integrity check is used to check whether there are any missing fields in the structured optimization task information. The scope of the check includes core fields such as decision variables, objective functions, and constraints, as well as required fields such as scenario type and data references. If all required fields are not empty, the integrity check passes.
[0045] The legality verification includes four aspects: First, field content compliance verification, checking whether the values of enumerated fields belong to the predefined range, such as variable types and optimization directions; second, data reference validity verification, checking whether the data fields bound to parameters and variables exist in the business dataset of the optimization task input information, and whether the field types match; third, expression syntax correctness verification, checking whether the expression syntax of the objective function and constraint conditions is standardized, and whether the variable and parameter references are legal; and fourth, scenario type adaptability verification, checking whether the current scenario type belongs to the predefined scenario classification list.
[0046] S22. When the verification result is unsuccessful, locate the erroneous fields, missing fields, illegal values, and expression errors, and generate correction prompts containing error location information.
[0047] In this step, the correction prompts are in a structured format, clearly indicating the error type, error location, and correction requirements. This facilitates targeted correction by the large language model and avoids correction deviations caused by vague descriptions.
[0048] S23. Input the correction prompt information and the original structured optimization task information into the large language model, and complete the correction of the corresponding content through the large language model until the preset maximum number of corrections is reached.
[0049] In this step, the preset maximum number of corrections is a configurable threshold to avoid infinite loop corrections; if the verification still fails after reaching the maximum number of corrections, a list of fields awaiting manual confirmation will be output for manual intervention and correction.
[0050] like Figure 4 As shown, in one embodiment, before performing the solution in step S104, a solution path decision process is further included, specifically including: S31. Extract variable size, constraint size, constraint density, data integrity and real-time requirements features from the validated structured optimization task information, and combine them into a problem feature vector.
[0051] In this step, the calculation rules for each feature are as follows: Variable size: The sum of the sizes of the index sets corresponding to all decision variables, used to measure the overall size of the optimization problem; Constraint size: The total number of entries after the constraint set is expanded, used to measure the complexity of the constraint; Constraint density: The ratio of the number of non-zero coefficients in a constraint expression to the product of the variable size and the constraint size, used to measure the degree of coupling of a problem; nonlinear constraints can be approximated by the sum of the number of variables involved in a single constraint; Data completeness: The ratio of the number of bound and validated data fields to the total number of data fields required in the current scenario, used to measure the completeness of input data; Real-time requirement: The maximum solution time limit configured by the user is mapped to a score in the range of 0 to 1. The shorter the time limit, the higher the score.
[0052] S32. Based on the problem feature vector and historical solution quality records, calculate the fit scores for heuristic solution path, mathematical programming solution path and hybrid solution path respectively.
[0053] In this step, the historical solution quality record stores the problem characteristics, solution path, running results and quality indicators of the historical solution tasks; the adaptation scores of the three types of solution paths are calculated through a unified scoring function. The scoring dimensions include time limit adaptation, solution quality adaptation, historical success rate, data adaptation and running risk. Each dimension is weighted by preset weights to obtain the final adaptation score.
[0054] S33. Select the solution path with the highest adaptation score and that meets the time constraint as the execution path for this solution.
[0055] In this step, candidate paths that meet the user-configured maximum solution time limit are first selected, and then the path with the highest adaptation score is chosen for execution. Among them, the heuristic solution path is fast and suitable for large-scale problems, but has limited solution accuracy; the mathematical programming solution path has high solution accuracy and can obtain the global optimal solution, but takes a long time to solve; the hybrid solution path combines the advantages of both types of algorithms, balancing speed and accuracy.
[0056] like Figure 5 As shown, in one embodiment, the step S104 above, which generates model adjustment information to correct and optimize the model when a solution error occurs, specifically includes: S41. Obtain the running status information of the solution process and the quality attribute information of the solution results; when there is a hard constraint violation, solution timeout, no solution anomaly, or the difference between the target value obtained and the preset target value or the historical best target value exceeds the preset threshold, it is judged as a solution anomaly, and model adjustment information including adjustment direction is generated according to the anomaly type.
[0057] In this step, the runtime status information includes process data such as solution duration and runtime status; the quality attribute information includes result data such as feasibility status, constraint violations, and target values. The four types of solution anomalies are defined as follows: Hard constraint violation: The solution result contains a situation where a mandatory constraint that must be satisfied is violated; Solution timeout: The actual solution time exceeds the maximum solution time limit configured by the user; No solution exception: The solver returns a result indicating that the problem has no feasible solution; Target value difference exceeds the limit: The relative difference between the solved target value and the preset target value or the historical best target value exceeds the preset threshold; where the preset target value is the target baseline configured by the user, and the historical best target value is the best solution result of the same historical problem.
[0058] For different anomaly types, the corresponding adjustment direction is matched. For example, for infeasible anomalies, the constraint parameters and variable boundaries are adjusted first; for timeout anomalies, the solution path is switched first; and for substandard quality, the search neighborhood is expanded first.
[0059] S42. Perform at least one correction operation based on the adjustment direction in the model adjustment information.
[0060] This step includes three types of optional correction operations: The first type involves switching to other candidate solution paths for re-solving. For example, if the original mathematical programming path times out, it is switched to a heuristic or hybrid path. The second category involves correcting the constraint parameters, variable boundaries, or solution configuration in the structured optimization task information. For example, adjusting the soft constraint penalty function, relaxing the boundaries of non-core variables, or adjusting the solution accuracy parameters. Regenerating the optimization model after correcting the structured optimization task information is one of the ways to correct the optimization model. The third category involves adjusting the local search neighborhood of the optimization model, such as expanding the search range of the heuristic algorithm or adjusting the neighborhood search parameters of the solver.
[0061] S43. Regenerate and solve the optimization model based on the structured optimization task information obtained after performing the correction operation, or solve the corrected optimization model again.
[0062] In this step, if the correction operation involves adjusting the structured optimization task information, the optimization model is regenerated and then solved; if only the parameters of the optimization model itself are adjusted, the solution is directly recalculated based on the corrected model.
[0063] In one embodiment, when the selected solution path is a hybrid solution path, the solution process includes any of the following modes: Parallel hybrid process: The heuristic algorithm and the operations research optimization solver are started simultaneously to perform the solution. The multiple sets of candidate solutions are compared in a unified manner, and the candidate solution with the feasibility and the better objective value is selected as the solution result. This mode is suitable for scenarios with moderate solution time limit and the need to balance speed and solution quality.
[0064] Serial hybrid process: First, an initial feasible solution is generated through a heuristic algorithm. The initial feasible solution and the local neighborhood range generated based on the initial feasible solution are passed to the operations research optimization solver. After local re-optimization is performed, the solution result is output. This mode is suitable for large-scale optimization scenarios. It reduces the solver search space by using the initial solution, and takes into account both solution efficiency and solution quality.
[0065] Layered Hybrid Process: The optimization task is broken down into a main problem and sub-problems using a large language model or based on preset business rules. The main problem is solved to obtain the overall decision result, and then the sub-problems are processed through heuristic algorithms to optimize the details before outputting the solution result. This mode is suitable for complex optimization scenarios with clear hierarchy and decomposition.
[0066] like Figure 6 As shown, in one embodiment, after outputting the optimization result, a natural language interpretation generation process is also included, specifically including: S51. Identify bottleneck constraint information based on the constraint state information output by the solution process.
[0067] In this step, the constraint status information includes data such as constraint slack, dual variable values, resource utilization, and constraint violation degree. For mathematical programming solutions, constraints with high shadow prices or zero slack are identified as bottleneck constraints. For heuristic solutions, constraints with the highest resource utilization, the highest violation degree, or the greatest loss of objective value are identified as bottleneck constraints.
[0068] S52. For the business object corresponding to the bottleneck constraint information, receive the parameter disturbance request input by the user, update the corresponding parameters of the structured optimization task information and solve it again to obtain the comparison data before and after the parameter disturbance.
[0069] In this step, parameter disturbance requests include user-submitted parameter adjustment needs such as adjusting resource quantities, modifying constraint thresholds, and changing priorities; the comparison data includes changes in target values, business metrics, and bottleneck constraints before and after the disturbance.
[0070] S53. Based on the bottleneck constraint information and the comparison data, generate natural language explanation content according to the preset explanation template.
[0071] This step employs a controlled template generation mechanism. The input to the preset explanation template only includes structured optimization task information, optimization results, bottleneck constraint information, and parameter perturbation comparison data, prohibiting large language models from freely fabricating content. Fixed prompts are output when template fields are missing to avoid illusion problems and ensure the authenticity of the explanation content.
[0072] In one embodiment, after outputting the optimization results, a historical feedback update process is also included, specifically including: First, extract the processing records corresponding to this optimization task. The processing records include three categories: task features, execution parameters, and quality indicators. The task features include the problem feature vector and scenario type. The execution parameters include the solution path and algorithm configuration. The quality indicators include the feasibility results, target values, and stability scores.
[0073] Secondly, the system receives user feedback on the optimization results and associates the processing records with the feedback information, storing them in the historical solution quality record.
[0074] Finally, the solution path adaptation scoring parameters for similar problems are updated based on the newly added historical data, which are used for solution path decision-making in subsequent optimization tasks. Similar problems refer to optimization tasks whose problem feature vectors are in the same feature interval. By updating the scoring function weights and historical success rates, the accuracy of solution path decision-making is continuously improved.
[0075] Example 2: Based on the same technical concept, Example 2 of this application also provides a task processing system for collaborative optimization of large models and operations research solutions, such as... Figure 7 As shown, it includes: an input module 210, a structured modeling module 220, a verification and correction module 230, and a solution module 240. These modules are connected sequentially according to the data flow direction and work together to complete the optimization task. The functions of each module correspond completely to those in the claims. Input module 210 is used to receive optimization task input information from the user; The structured modeling module 220 is used to parse the input information of the optimization task using a large language model, and generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed. The verification and correction module 230 is used to verify the structured optimization task information; if the verification result indicates that the verification has failed, it generates correction prompt information based on the verification result, and uses the large language model to correct the structured optimization task information according to the correction prompt information. The solution module 240 is used to generate an optimization model based on the verified structured optimization task information and solve the optimization model; if the solution result indicates that the optimization model solution is abnormal, it generates model adjustment information based on the solution result, corrects the optimization model according to the model adjustment information, solves the corrected optimization model again, and outputs the optimization result after solving.
[0076] The functions and implementation methods of each module of the system in this embodiment correspond to the method steps in Embodiment 1. For specific implementation details, please refer to the description in Embodiment 1, which will not be repeated here.
[0077] Example 3: In one embodiment, Example 3 of the present invention also provides an electronic device; the electronic device may be a terminal, and its internal structure diagram may be as follows. Figure 8As shown. The electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the task processing method for co-optimization of large model and operations research solution as described in any one of steps S101 to S104. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0078] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0079] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0080] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0083] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of the claims of the present invention pending approval.
Claims
1. A task processing method for co-optimization of large models and operations research solutions, characterized in that, The method includes: Receive optimization task input information from the user; The large language model is used to parse the input information of the optimization task to generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed. The structured optimization task information is verified; if the verification result indicates that the verification failed, a correction prompt is generated based on the verification result, and the structured optimization task information is corrected according to the correction prompt using the large language model. An optimization model is generated based on the validated structured optimization task information, and the optimization model is solved. If the solution result indicates that the optimization model solution is abnormal, model adjustment information is generated based on the solution result, and the optimization model is corrected according to the model adjustment information. The corrected optimization model is then solved again, and the optimization result is output.
2. The method according to claim 1, characterized in that, The step of parsing the optimization task input information using a large language model to generate structured optimization task information that conforms to a preset optimization task description specification includes: Based on the preset optimization task description specifications, scenario classification list, business field dictionary and variable naming rules, and combined with the optimization task input information, structured prompt words are defined; The structured prompt words are input into the large language model, and the output is structured content that conforms to the preset optimized task description specification; The structured content output by the large language model is parsed, the optimization task description elements corresponding to the optimization task to be processed are extracted, and structured optimization task information is generated. The optimization task description elements include: scenario type, business entity, data reference relationship, decision variable, parameter, objective function and constraints.
3. The method according to claim 1, characterized in that, The step of verifying the structured optimization task information; and generating correction prompt information based on the verification result when the verification result indicates that the verification failed, and using the large language model to correct the structured optimization task information according to the correction prompt information, includes: The structured optimization task information is sequentially subjected to integrity verification and legality verification to obtain verification results. The integrity verification is used to check whether there are any missing fields in the structured optimization task information, and the legality verification is used to check whether the field content conforms to the preset specifications, whether the data reference is valid, whether the expression syntax is correct, and whether the scenario type belongs to the predefined range. When the validation result is unsuccessful, locate the erroneous fields, missing fields, illegal values, and expression errors, and generate a correction prompt message containing error location information; The correction prompts and the original structured optimization task information are input into the large language model, and the corresponding content is corrected through the large language model until the preset maximum number of corrections is reached.
4. The method according to claim 1, characterized in that, Before generating an optimization model based on the validated structured optimization task information and solving the optimization model, the process further includes: Extract variable size, constraint size, constraint density, data integrity, and real-time requirements from the validated structured optimization task information, and combine them into a problem feature vector; Based on the problem feature vector and historical solution quality records, the fit scores of heuristic solution path, mathematical programming solution path and hybrid solution path are calculated respectively. The solution path with the highest adaptation score and that meets the time constraint will be selected as the execution path for this solution.
5. The method according to claim 1, characterized in that, The step of generating model adjustment information based on the solution results when the solution result indicates that the optimization model is abnormal, and then correcting the optimization model according to the model adjustment information, and then solving the corrected optimization model again includes: Acquire the running status information of the solution process and the quality attribute information of the solution results; when there is a hard constraint violation, solution timeout, no solution anomaly, or the difference between the target value obtained and the preset target value or the historical best target value exceeds the preset threshold, it is judged as a solution anomaly, and model adjustment information including adjustment direction is generated according to the anomaly type; Based on the adjustment direction in the model adjustment information, perform at least one of the following correction operations: Switch to another candidate solution path and solve again; Correct the constraint parameters, variable boundaries, or solution configuration in the structured optimization task information; Adjust the local search neighborhood of the optimization model; The optimization model is regenerated and solved based on the structured optimization task information obtained after performing the correction operation, or the corrected optimization model is solved again.
6. The method according to claim 4, characterized in that, When the selected solution path is a hybrid solution path, solving the optimization model includes any of the following processes: Parallel hybrid process: Simultaneously start the heuristic algorithm and the operations research optimization solver to perform the solution, compare the multiple sets of candidate solutions, and select the candidate solution that meets the feasibility criteria and has a better objective value as the solution result; Serial hybrid process: First, an initial feasible solution is generated through a heuristic algorithm. The initial feasible solution and the local neighborhood range generated based on the initial feasible solution are passed to the operations research optimization solver. After performing local re-optimization, the solution result is output. Layered hybrid process: The optimization task is broken down into a main problem and sub-problems using a large language model or based on preset business rules. The main problem is solved to obtain the overall decision result, and then the sub-problems are processed through heuristic algorithms to optimize the details before outputting the solution result.
7. The method according to claim 1, characterized in that, The output of the optimized result after solving also includes: Based on the constraint state information output by the solution process, identify bottleneck constraint information; For the business object corresponding to the bottleneck constraint information, receive the parameter perturbation request input by the user and update the structured optimization. The corresponding parameters of the task information are re-solved to obtain comparative data before and after parameter perturbation; Based on the bottleneck constraint information and the comparison data, natural language explanation content is generated according to a preset explanation template.
8. The method according to claim 1, characterized in that, After outputting the optimized results, the solution also includes: Extract the processing records corresponding to this optimization task; the processing records include task characteristics, execution parameters, and quality indicators. Receive user feedback on optimization results, and associate the processing record with the feedback information and store it in the historical solution quality record; The solution path adaptation score parameters for similar problems are updated based on the newly added historical data, and used for solution path decision-making in subsequent optimization tasks.
9. A task processing system for collaborative optimization of large models and operations research solutions, characterized in that, include: The input module is used to receive optimization task input information from the user; The structured modeling module is used to parse the input information of the optimization task using a large language model, and generate structured optimization task information that conforms to the preset optimization task description specification. The structured optimization task information is used to describe the decision variables, objective function and constraints of the optimization task to be processed. The verification and correction module is used to verify the structured optimization task information; if the verification result indicates that the verification has failed, it generates correction prompt information based on the verification result, and uses the large language model to correct the structured optimization task information according to the correction prompt information. The solution module is used to generate an optimization model based on the validated structured optimization task information, and to solve the optimization model. If the solution result indicates that the optimization model is abnormal, model adjustment information is generated based on the solution result, and the optimization model is corrected according to the model adjustment information. The corrected optimization model is then solved again, and the optimization result is output.
10. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-8.