Operation plan control method and device based on data analysis, equipment and medium
By acquiring user intent information and converting it into model parameters, and using a large language model to generate executable code and adjust the parameters, the problem of insufficient universality of existing operations research optimization methods is solved. This enables efficient and flexible generation of operations research optimization strategies, improving modeling accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MERCHANTS FINANCE HLDG CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-08
AI Technical Summary
Existing operations research optimization methods based on large language models lack universality and are difficult to adapt flexibly to the diverse business scenarios, varied constraints, and complex and ever-changing optimization objectives across various industries. This results in high costs for migrating and reusing solutions and fails to meet the common needs of users in diverse and personalized scenarios.
By acquiring user intent information, transforming it into model parameters, and using a large language model to generate executable code, the parameters are adjusted if execution fails, forming a closed-loop iterative process to ensure the solvability and accuracy of the model, and finally generating an operations research optimization strategy that can be directly implemented.
It improves the universality and efficiency of operations research control methods, avoids logical omissions and format inconsistencies in traditional manual modeling, ensures the solvability and execution reliability of the model, provides a complete data foundation, and supports subsequent verification and performance analysis.
Smart Images

Figure CN121998041A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning technology, and in particular to a data analysis-based operations research control method, apparatus, equipment, and medium. Background Technology
[0002] Operations research is an important branch of applied mathematics and systems science, widely used in resource allocation, production planning, and logistics scheduling. Its core objective is to model and solve complex systems under a set of constraints to achieve optimal decisions such as maximizing profits and minimizing costs. Traditionally, solving an operations research problem heavily relies on domain experts and programmers: first, operations research experts manually analyze the real-world problem described in natural language, abstracting and constructing a formal mathematical model (including decision variables, objective functions, and constraints); then, programmers manually write code to call a specific solver based on the model. This manually driven process has inherent drawbacks such as long development cycles, high labor costs, and high technical barriers, severely limiting operations research techniques, especially the rapid construction and application of complex models. This makes it difficult for many small and medium-sized enterprises to effectively utilize advanced optimization techniques to improve operational efficiency.
[0003] In recent years, large language models have demonstrated powerful natural language understanding and code generation capabilities, bringing new opportunities for the automated solution of operations research optimization problems. Existing technologies have attempted to utilize large language models to directly transform users' natural language problem descriptions into mathematical models and even executable code. These methods have, to some extent, achieved automated integration from natural language to the solution process. However, the core limitation of existing automated solutions based on large language models lies in their lack of universality: they typically rely on specific templates, pre-defined structures, or limited problem paradigms, making it difficult to flexibly adapt to the diverse business scenarios, varied constraints, and complex and ever-changing optimization objectives across various industries. When faced with real-world industrial problems that are poorly described, logically intertwined, or require deep domain knowledge, the generated models often lack the necessary business relevance and scalability, resulting in high costs for migrating and reusing solutions, and failing to truly meet the common needs of users in diverse and personalized scenarios. Summary of the Invention
[0004] This invention provides a data analysis-based operations research scheme control method, device, computer equipment, and medium to solve the problem of low universality of existing operations research optimization methods on the market.
[0005] Firstly, a data analysis-based operations research control method is provided, including: Obtain a pre-defined task plan from the user, and obtain the corresponding operations research and optimization consultation text. Extract user intention information from the operations research and optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan, the constraints of the task plan optimization, and the decision variables of the task plan. The target optimization direction, the constraints, and the decision variables are transformed into model parameters. The model parameters are then used to assign parameter values to the preset large language model framework to obtain the large language model. The large language model is converted into executable code, and the executable code is executed. If the executable code fails to execute, obtain the error information of the execution process, adjust the parameters of the large language model according to the error information and the target optimization direction, and return to the step of converting the large language model into executable code; If the executable code executes successfully, the constraints and decision variables corresponding to the current large language model are output, and the operation optimization strategy of the task plan is generated based on the output constraints and decision variables. The task plan is adjusted and optimized according to the described operations research optimization strategy to obtain an optimized task plan.
[0006] Secondly, a data analysis-based operations research control device is provided, comprising: The data acquisition module is used to acquire the task plan scheme pre-defined by the user, and to acquire the operation research optimization consultation text corresponding to the task plan scheme, and to extract the user intention information in the operation research optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan scheme, the constraints of the task plan scheme during optimization, and the decision variables of the task plan scheme. The model building module is used to convert the target optimization direction, the constraints and the decision variables into model parameters, and to assign parameter values to the preset large language model framework using the model parameters to obtain the large language model. The execution feedback module is used to convert the large language model into executable code and execute the executable code. If the executable code fails to execute, the module obtains the error information of the execution process, adjusts the parameters of the large language model according to the error information and the target optimization direction, and returns to the step of converting the large language model into executable code. The strategy generation module is used to output the current constraints and decision variables of the large language model, and generate the operation and optimization strategy of the task plan based on the output constraints and decision variables. The operations research and optimization module is used to perform operations research and optimization adjustments on the task plan according to the operations research and optimization strategy to obtain an optimized task plan.
[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data analysis-based operations research control method.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described data analysis-based operations research control method.
[0009] In the aforementioned data analysis-based operations research scheme control method, device, computer equipment, and storage medium, user intention information can be extracted from the operations research optimization consultation text. Based on this user intention information, a pre-defined model framework is populated to obtain a large language model of the operations research optimization consultation text. Through the pre-defined model framework and conversion rules, logical omissions and format inconsistencies that are prone to occur in traditional manual modeling are avoided, significantly improving the accuracy and efficiency of modeling. The large language model is converted into executable code, solving the technical compatibility problem between the model and the solver, ensuring the model's solvability. The executable code is then executed, and the results are obtained... The execution results and feedback of the executable code provide a complete data foundation for subsequent verification and performance analysis. Based on the execution feedback, it is determined whether the executable code has been executed successfully. If it has been executed successfully, the parameters of the large language model are corrected according to the execution results, and the process of converting the large language model into executable code is returned, which improves the reliability of solving the operations research problem. If the executable code has been executed successfully, the constraints and decision variables corresponding to the large language model are output. Based on the output constraints and decision variables, the operations research optimization strategy of the task plan is generated, which improves the universality of the data analysis-based operations research control method. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of an application environment for the data analysis-based operations research scheme control method in one embodiment of the present invention; Figure 2This is a flowchart illustrating a data analysis-based operations research control method according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a data analysis-based operations planning control device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The data analysis-based operations research control method provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can obtain the user's pre-defined task plan and its corresponding natural language operations research (NLP) optimization consultation text from the client. First, the system uses word segmentation, entity annotation, and preset formatting templates to accurately extract structured user intent information from the consultation text, including decision variables, target optimization direction, and constraints. Then, the system transforms this intent information into mathematical form: defining variable types, constructing objective functions, converting constraints into mathematical conditions, and assigning these model parameters to a preset framework to generate a formalized large language model. Next, the system uses lexical analysis to identify model symbols, intelligently matches the optimal solver, and automatically generates executable code that calls the solver. After code execution, the system performs dual feasibility verification of the results based on mathematical constraints and business rules. If verification fails or an error occurs, the system automatically adjusts the model parameters based on the error message and the original target, and re-enters the "transformation-solution" loop, forming a self-correcting closed-loop iterative process. Once the solution is successfully solved and verified, the system outputs the constraints and variables determined by the model. Through business terminology mapping, business meaning interpretation, and rule base reasoning, it elevates these into a structured and readable operations research optimization strategy. Finally, based on this strategy, the system automatically adjusts and optimizes the user's original task plan, outputting an optimized task plan that can be directly implemented. This improves the universality of data analysis-based operations research control methods. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0014] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a data analysis-based operations research control method provided in an embodiment of the present invention includes the following steps: S1. Obtain the user's pre-defined task plan and the corresponding operations research and optimization consultation text. Extract the user intention information from the operations research and optimization consultation text. The user intention information includes the target optimization direction of the task plan, the constraints of the task plan optimization, and the decision variables of the task plan.
[0015] In this embodiment of the invention, the operations research optimization consultation text is a real-world optimization problem described in natural language. Its content typically includes: an overall description of the decision-making scenario (e.g., in a factory production plan), a clear optimization objective (e.g., "to minimize total cost" or "to maximize capacity utilization"), decision variables to be determined (e.g., "output of various products," "selection of transportation routes"), specific numerical constraints on various resources and business limitations (e.g., "raw material inventory does not exceed 1000 tons," "daily working hours are capped at 8 hours"), and contextual parameters and assumptions that may affect the model (e.g., "demand for product A is 200 units per day," "failure rate of machine B is 2%)." This information collectively constitutes a complete operations research problem instance, providing the necessary semantic foundation for subsequent automated modeling and solving.
[0016] In this embodiment of the invention, the user intent information refers to the core structured data extracted from the user's input operations research and optimization consultation text, used to construct a formal mathematical model. Specifically, it includes controllable and optimizable decision variables in the problem, an objective function that clarifies which parameters need to be maximized or minimized, and constraints describing all limitations and rules that must be satisfied in the problem.
[0017] In this embodiment of the invention, extracting user intent information from the operations research and optimization consultation text includes: The operations research and optimization consultation text is segmented into words to obtain a set of segmented texts; The quantifiers, units, and entity nouns in the segmented text set are labeled to obtain a standardized text fragment set; The decision variables are obtained by identifying phrases representing the variables to be decided in the standardized text fragment set using a preset format template; The formatted template is used to identify phrases in the standardized text fragment set that represent the intention to maximize and minimize, thereby obtaining the target optimization direction; The formatted template is used to identify phrases representing constraints in the standardized text fragment set, thereby obtaining the constraints. By summarizing the decision variables, the target optimization direction, and the constraints, user intention information is obtained.
[0018] In detail, the step of segmenting the operations optimization consultation text to obtain a segmented text set involves removing irrelevant characters and performing sentence segmentation on the operations optimization consultation text, inputting it into a preset segmentation model, and outputting a structured word sequence.
[0019] In detail, the step of identifying phrases representing variables to be decided within the standardized text fragment set using a preset formatted template to obtain decision variables involves pre-defining a set of formatted templates related to operations research optimization, such as "<verb> + <quantity> + <entity>" or "<verb> + <entity> + of + <attribute>". The system matches the standardized text fragments, identifies phrases describing "controllable and undecidable" content, such as "production quantity," "transportation route," and "investment ratio," and lists them as decision variables.
[0020] In detail, the step of using the formatted template to identify phrases in the standardized text fragment set that express the intention to maximize and minimize, and to obtain the target optimization direction, involves scanning the standardized text fragment set using a formatted template containing keywords such as "maximize," "minimize," "reduce as much as possible," "improve," and "shorten," and extracting the optimization target. For example, if "desire to have the lowest cost" is matched, it is extracted as "minimize cost" and associated with the corresponding indicator entity.
[0021] In detail, the step of using the formatted template to identify phrases representing limiting conditions in the standardized text fragment set to obtain constraints involves using templates containing structures such as "cannot exceed," "at least," "between," and "must satisfy" to extract limiting statements related to decision variables and quantities. For example, from "daily production capacity not exceeding 200 units," the constraint "production capacity ≤ 200" can be extracted.
[0022] S2. The target optimization direction, the constraints, and the decision variables are transformed into model parameters. The model parameters are then used to assign parameter values to the preset large language model framework to obtain the large language model.
[0023] In this embodiment of the invention, the step of converting the target optimization direction, the constraints, and the decision variables into model parameters, and then using the model parameters to assign parameter values to a preset large language model framework to obtain a large language model, includes: Extract the decision variables contained in the user intention information, define the variable types based on the keywords contained in the decision variables and the context content associated with the keywords, and obtain the defined set of decision variables; The target optimization direction contained in the user intention information and the metric associated with the target optimization direction are combined into a complete mathematical expression to obtain the objective function; The constraints contained in the user intention information are transformed into mathematical conditional expressions to obtain a set of constraints in mathematical form. The set of decision variables, the objective function, and the set of constraints in mathematical form are converted into a preset model parameter data format to obtain model parameters. The converted model parameters are then assigned to a preset model framework to obtain a large language model.
[0024] In detail, the step of extracting decision variables contained in the user intention information, defining variable types based on the keywords contained in the decision variables and the context associated with the keywords, and obtaining a set of defined decision variables is achieved by maintaining a variable symbol mapping table and a type judgment rule base. When a description of a decision variable (such as "daily output of product A") is received from the user intention information, the variable type is automatically determined by parsing the keywords in the description (such as "quantity" often corresponds to continuous variables, "whether" corresponds to 0-1 variables, and "integer units" corresponds to integer variables) and the context, and finally a structured set of variable definitions is output.
[0025] In detail, the step of combining the target optimization direction contained in the user intention information and the metrics associated with the target optimization direction into a complete mathematical expression to obtain the objective function is achieved by identifying the explicit target optimization direction (such as "minimizing total cost") and associated metrics in the user intention information. Based on a defined set of decision variables, the target direction and metrics are combined into a complete mathematical expression by searching for pre-defined metric-variable association rules. For example, if the objective is "minimizing total cost", and it is identified that the cost consists of material cost (related to variable x1) and labor cost (related to variable x2), then the objective function is automatically generated: min(c1) x1 + c2 x2).
[0026] In detail, the process of converting the constraints contained in the user intent information into mathematical conditional expressions to obtain a set of mathematically formed constraints involves using a constraint transformation rule engine to process constraints described in natural language. This engine identifies the core elements of the constraints: the decision variables involved, the comparison relationships (≤, ≥, =), and the boundary values. For example, "daily output not exceeding 100 pieces" is parsed as "output ≤ 100," and associated with a specific variable x_A, ultimately generating a constraint that x_A <= 100.
[0027] In detail, the process of converting the set of decision variables, the objective function, and the set of constraints in mathematical form into a preset model parameter data format to obtain model parameters, and then assigning the converted model parameters to a preset model framework to obtain a large language model, is achieved by providing a standardized model framework template (such as a three-part structure of "objective function-decision variables-constraints"). The defined set of decision variables, the objective function, and the set of constraints in mathematical form are automatically filled into the corresponding parts of this template.
[0028] S3. Convert the large language model into executable code and execute the executable code.
[0029] In this embodiment of the invention, converting the large language model into executable code includes: Identify the variables, coefficients, operators, and function call symbols in the large language model to obtain a symbol set; The symbol set is matched with the preset structure contained in the preset solver. Based on the matching result, the fixed parameters, variable parameters, and decision variable type parameters in the large language model are identified and labeled to obtain a structured model description object. The model type of the large language model is identified based on the structured model description object. Based on the model type, the solver with the highest matching score between the solver features and the model type in the preset solver library is selected as the target solver. The structured model description object is filled into a preset code template using the target solver to obtain executable code.
[0030] In detail, the solver is a software tool or algorithm library specifically designed for mathematical optimization problem calculation. It accepts a formalized mathematical model (including decision variables, objective function, and constraints) as input, and automatically finds the variable values that satisfy all constraints to make the objective function optimal (maximize or minimize) through built-in mathematical algorithms (such as the simplex method, branch and bound method, interior point method, etc.). It then outputs the optimal solution, objective value, and solution status, thereby transforming complex mathematical modeling problems into an executable and verifiable computer solution process. It is a core component connecting the model and computational implementation in the field of operations research optimization.
[0031] In detail, the process of identifying variables, coefficients, operators, and function call symbols in the large language model to obtain a symbol set is achieved through lexical scanning using lexical and syntactic analysis techniques to identify basic symbol units: variables (such as x, y_i), coefficients (such as 3.5, 100), and operators (such as +, -, ...). , / , ≤, ≥) and function call operators (such as log, exp, sum).
[0032] In detail, the process of matching the symbol set with the preset structures contained in the preset solvers, and identifying and labeling the fixed parameters, variable parameters, and decision variable type parameters in the large language model based on the matching results to obtain a structured model description object, is achieved by maintaining a solver capability knowledge base to record the symbols and syntax supported by each solver. The symbol set is matched with the preset solvers to identify which symbols correspond to specific structures in the solvers. Then, the symbols are labeled according to the following rules: symbols that appear only as constants in expressions and are not modified by any variables are labeled as fixed parameters; values that are coefficients on the right side of constraints or in the objective function but may change are labeled as variable parameters; symbols that appear on the left side of the objective function or constraints and are not assigned values are labeled as decision variables, and further labeled as continuous, integer, or binary types based on the context.
[0033] Specifically, the model types may include linear programming, integer programming, mixed integer programming, nonlinear programming, etc.
[0034] In detail, the process of identifying the model type of the large language model based on the structured model description object, and matching a target solver in a preset solver library based on the model type, involves analyzing the characteristics of the structured model description object: checking whether the objective function and constraints are linear (linear programming), contain integer variables (integer programming or mixed-integer programming), or contain nonlinear terms (nonlinear programming). Then, the model is categorized into a specific type based on these characteristics. The most suitable solver is then matched from the solver library based on the identified model type.
[0035] In detail, the structured model description object is populated into a preset code template using the target solver to obtain executable code. Each solver has a pre-designed code template, which reserves placeholders for variable definitions, parameter settings, objective function construction, constraint addition, and solver calls. Based on the selected target solver, the corresponding template is loaded, and then the various components of the structured model description object are populated according to the template syntax.
[0036] S4. Determine whether the executable code was executed successfully.
[0037] If the executable code fails to execute, then execute S5, obtain the error information of the execution process, adjust the parameters of the large language model according to the error information and the target optimization direction, and return to S3 to convert the large language model into executable code.
[0038] In this embodiment of the invention, before adjusting the parameters of the large language model based on the error information and the target optimization direction, the method further includes: Obtain the execution result of the executable code; Extract key information from the execution results and output it in a structured format to obtain structured information; The constraint feasibility of the structured information is verified based on the set of mathematical constraints in the large language model, and the constraint verification results are obtained. The structured information is validated for business logic rationality using preset business rules to obtain business logic validation results; If, based on the constraint verification result and the business logic verification result, it is determined that the structured information passes the constraint feasibility verification and the business logic rationality verification, then the execution result is determined to have passed the feasibility verification. Execution feedback of the executable code is then obtained, and the success of the executable code is determined based on the execution feedback.
[0039] If, based on the constraint verification results and the business logic verification results, it is determined that the structured information has failed the constraint feasibility verification and the business logic rationality verification, then the execution result has failed the feasibility verification.
[0040] In this embodiment of the invention, the execution result may include the following multi-dimensional content: First, the solution status and basic information, including the status code returned by the solver (such as "optimal solution found", "infeasible", "unbounded"), solution time, number of iterations and other process indicators; Second, the core optimization numerical results, that is, the optimal value of the objective function and the specific optimal values of all decision variables; Third, the solver's native output information, such as algorithm logs, warning information, convergence curve data, etc.
[0041] In detail, the step of extracting key information from the execution result and outputting it in a structured format to obtain structured information involves using regular expressions to locate and extract the objective function value, the optimal values of all decision variables, and the solution state from the execution result. Then, the extracted data is encapsulated in a preset key-value pair format (such as variable name-variable value pairs) to obtain structured information.
[0042] In detail, the constraint feasibility verification of the structured information based on the set of constraints in the mathematical form of the large language model, to obtain the constraint verification result, is achieved by traversing each constraint in the large language model, extracting the value of the corresponding variable from the structured information, and substituting it into the expression on the left side of the constraint for numerical calculation. Then, the calculation result is compared with the constraint's right-hand limit value to determine whether the constraint is satisfied.
[0043] In detail, the process of using preset business rules to verify the business logic rationality of the structured information and obtaining the business logic verification result involves encoding the business rules into executable conditional judgment logic (such as if output['inventory quantity']<0: return False). The structured information is then input into these conditional judgment logics for transmission and evaluation. Each rule verifies the relevant data and outputs a pass or fail status and the reason.
[0044] In detail, the statement that the execution result passes the feasibility verification when the structured information passes the constraint feasibility verification and the business logic rationality verification based on the constraint verification result and the business logic rationality verification result means that the execution result passes the feasibility verification when both the constraint verification result and the business logic verification result indicate that the execution result passes the corresponding verification.
[0045] In this embodiment of the invention, determining whether the executable code has been executed successfully based on the execution feedback includes: Extract the parameter fields from the execution feedback to obtain a set of parameter fields; Identify the boolean type fields in the parameter field set; The Boolean type field is the same as the preset execution success feedback field; If they are the same, then the executable code is determined to have executed successfully; If they are not the same, the executable code is deemed to have failed to execute.
[0046] In detail, the extraction of parameter fields from the execution feedback to obtain a set of parameter fields is achieved by calling the corresponding data parser to scan and split the original feedback according to the preset feedback format definition (such as a set of key-value pairs or text with a specific delimiter), and to identify and separate the independent parameter fields.
[0047] In detail, the identification of Boolean type fields in the parameter field set is achieved by traversing the parameter field set and performing type judgment on the value of each field: first, checking whether its value is an explicit Boolean value (such as true / false or 0 / 1), and second, inferring that it should be interpreted as Boolean semantics by using predefined patterns (such as whether the field name contains keywords such as "success", "solved", "feasible").
[0048] In this embodiment of the invention, the parameter adjustment of the large language model based on the error information and the target optimization direction is based on identifying the root cause of infeasibility or unreasonable results from the error information, such as overly stringent specific constraints, parameter values exceeding a reasonable range, or incorrect variable type definitions. Then, a preset correction strategy is applied, such as expanding the violated constraint boundaries and the target optimization direction according to preset priorities, adjusting abnormal parameters based on historical data or business rules, or reconstructing part of the model logic. Finally, an internal consistency check is performed on the corrected model to ensure that the correction has not introduced new contradictions, ultimately achieving the adjustment of the parameters of the large language model.
[0049] S7. If the executable code executes successfully, the constraints and decision variables corresponding to the current large language model are output, and the operation optimization strategy of the task plan is generated based on the output constraints and decision variables.
[0050] In this embodiment of the invention, the operation research optimization strategy for generating the task plan scheme based on the output constraints and decision variables includes: Transform the constraints and decision variables into structured data; The structured data is mapped to business terms according to a preset parameter mapping table; Map the numerical results in the structured data to business meaning; Based on a preset business rule base, the execution result is subjected to business semantic analysis according to the business terms and the business meaning analysis to obtain a business-oriented interpretation result; The system invokes a preset business template to generate a structured optimization strategy based on the business interpretation results.
[0051] In detail, the steps of converting the constraints and decision variables into structured data and extracting key information from the execution results and outputting it in a structured format are the same, and will not be repeated here. In detail, the structured data is mapped to business terms according to a preset parameter mapping table. This parameter mapping is generated during the large language model construction phase and records the correspondence between mathematical model elements (such as variable name x_1, constraint name constr_1) and business domain terms (such as "daily output of product A" and "warehouse capacity limit"). By traversing each key (such as variable name) in the structured data obtained in the previous step, querying the mapping table, finding the corresponding business term, and replacing or labeling the original technical key name with this term, business terms corresponding to the structured data are generated.
[0052] In detail, mapping the numerical results in the structured data to business meaning involves calculating and packaging the extracted values based on knowledge of the business domain. For example, the original result "cost = 15,000" is transformed into "total production cost is 15,000 yuan" by combining its unit "yuan" and the calculation benchmark. The variable value sequence is aggregated (such as summation or averaging) or compared (such as comparing with the planned value) to generate statements with clear business meanings such as "total output achievement rate 105%" and "8% increase compared with the previous period".
[0053] In detail, the business semantic analysis of the execution result based on the business terms and their meanings, derived from a pre-defined business rule base, is performed by introducing a rule engine for semantic reasoning. A pre-defined "business rule base" contains a series of "condition-conclusion" rules, such as "IF 'Inventory Level' < 'Safety Stock Threshold' THEN 'Conclusion' is 'Replenishment Warning Required'". The business terms and their meanings are used as input to the pre-defined rule engine for matching and reasoning. The rule engine iterates through all rules, triggering all rules that meet the conditions, thereby generating a series of business insights, suggestions, and risk warnings.
[0054] In detail, the step of generating a structured optimization strategy based on the business-oriented explanation results by invoking a preset business template is achieved by pre-setting business templates for different business objectives (such as "cost minimization solutions" and "production scheduling optimization solutions"). These templates define the chapter structure, narrative logic, and chart placement of the optimization solutions. The appropriate template is selected based on the type of optimization problem in the operations optimization consulting text, and then the various contents (business indicators, insights, suggestions, etc.) from the "business-oriented explanation results" are automatically filled into the corresponding parts of the template.
[0055] S8. The task plan is adjusted according to the operation optimization strategy to obtain an optimized task plan.
[0056] As can be seen, the above solution involves obtaining the user's pre-defined task plan and its corresponding natural language operations research (NLP) optimization consultation text. First, the system uses word segmentation, entity annotation, and pre-defined formatted templates to accurately extract structured user intent information from the consultation text, including decision variables, target optimization direction, and constraints. Then, the system transforms this intent information into mathematical form: defining variable types, constructing objective functions, converting constraints into mathematical conditions, and assigning these model parameters to a pre-defined framework to generate a formalized large language model. Next, the system uses lexical analysis to identify model symbols, intelligently matches the optimal solver, and automatically generates executable code that calls the solver. After code execution, the system performs dual feasibility verification of the results based on mathematical constraints and business rules. If verification fails or an error occurs, the system automatically adjusts the model parameters based on the error message and the original target, and re-enters the "transformation-solution" loop, forming a self-correcting closed-loop iterative process. Once the solution is successfully solved and verified, the system outputs the constraints and variables determined by the model. Through business terminology mapping, business meaning interpretation, and rule-based reasoning, it elevates these into a structured and readable operations research optimization strategy. Finally, based on this strategy, the system automatically adjusts and optimizes the user's original task plan, outputting an optimized task solution that can be directly implemented. This improves the universality of data-driven operations research control methods.
[0057] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0058] In one embodiment, a data analysis-based operations research scheme control device is provided, which corresponds one-to-one with the data analysis-based operations research scheme control method described in the above embodiments. For example... Figure 3 As shown, the data analysis-based operations research control device includes a data acquisition module 101, a model building module 102, an execution feedback module 103, a strategy generation module 104, and an operations research optimization module 105. Detailed descriptions of each functional module are as follows: The data acquisition module 101 is used to acquire a task plan scheme pre-defined by the user, and to acquire the operation research optimization consultation text corresponding to the task plan scheme, and to extract user intention information from the operation research optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan scheme, the constraints when optimizing the task plan scheme, and the decision variables of the task plan scheme. Model building module 102 is used to convert the target optimization direction, the constraints and the decision variables into model parameters, and use the model parameters to assign parameter values to the preset large language model framework to obtain the large language model; The execution feedback module 103 is used to convert the large language model into executable code and execute the executable code. If the executable code fails to execute, it obtains the error information of the execution process, adjusts the parameters of the large language model according to the error information and the target optimization direction, and returns to the step of converting the large language model into executable code. The strategy generation module 104 is used to output the current constraints and decision variables of the large language model, and generate the operation optimization strategy of the task plan based on the output constraints and decision variables. The operations research and optimization module 105 is used to perform operations research and optimization adjustments on the task plan scheme according to the operations research and optimization strategy to obtain an optimized task scheme.
[0059] In one embodiment, the data acquisition module 101, when performing the extraction of user intention information from the operations research and optimization consultation text, is specifically used for: The operations research and optimization consultation text is segmented into words to obtain a set of segmented texts; The quantifiers, units, and entity nouns in the segmented text set are labeled to obtain a standardized text fragment set; The decision variables are obtained by identifying phrases representing the variables to be decided in the standardized text fragment set using a preset format template; The formatted template is used to identify phrases in the standardized text fragment set that represent the intention to maximize and minimize, thereby obtaining the target optimization direction; The formatted template is used to identify phrases representing constraints in the standardized text fragment set, thereby obtaining the constraints. By summarizing the decision variables, the target optimization direction, and the constraints, user intention information is obtained.
[0060] In one embodiment, the model building module 102, when performing the conversion of the target optimization direction, the constraints, and the decision variables into model parameters, and using the model parameters to assign parameter values to a preset large language model framework to obtain a large language model, specifically performs the following: Extract the decision variables contained in the user intention information, define the variable types based on the keywords contained in the decision variables and the context content associated with the keywords, and obtain the defined set of decision variables; The target optimization direction contained in the user intention information and the metric associated with the target optimization direction are combined into a complete mathematical expression to obtain the objective function; The constraints contained in the user intention information are transformed into mathematical conditional expressions to obtain a set of constraints in mathematical form. The set of decision variables, the objective function, and the set of constraints in mathematical form are converted into a preset model parameter data format to obtain model parameters. The converted model parameters are then assigned to a preset model framework to obtain a large language model.
[0061] In one embodiment, the execution feedback module 103, when performing the conversion of the large language model into executable code, is specifically used for: Identify the variables, coefficients, operators, and function call symbols in the large language model to obtain a symbol set; The symbol set is matched with the preset structure contained in the preset solver. Based on the matching result, the fixed parameters, variable parameters, and decision variable type parameters in the large language model are identified and labeled to obtain a structured model description object. The model type of the large language model is identified based on the structured model description object. Based on the model type, the solver with the highest matching score between the solver features and the model type in the preset solver library is selected as the target solver. The structured model description object is filled into a preset code template using the target solver to obtain executable code.
[0062] In one embodiment, the execution feedback module 103, before performing parameter adjustment on the large language model based on the error message and the target optimization direction, is further configured to: Obtain the execution result of the executable code; Extract key information from the execution results and output it in a structured format to obtain structured information; The constraint feasibility of the structured information is verified based on the set of mathematical constraints in the large language model, and the constraint verification results are obtained. The structured information is validated for business logic rationality using preset business rules to obtain business logic validation results; If, based on the constraint verification result and the business logic verification result, it is determined that the structured information passes the constraint feasibility verification and the business logic rationality verification, then the execution result is determined to have passed the feasibility verification. Execution feedback of the executable code is then obtained, and the success of the executable code is determined based on the execution feedback.
[0063] If, based on the constraint verification results and the business logic verification results, it is determined that the structured information has failed the constraint feasibility verification and the business logic rationality verification, then the execution result has failed the feasibility verification.
[0064] In one embodiment, the execution feedback module 103, when performing the step of determining whether the executable code has been executed successfully based on the execution feedback, is specifically used for: Extract the parameter fields from the execution feedback to obtain a set of parameter fields; Identify the boolean type fields in the parameter field set; The Boolean type field is the same as the preset execution success feedback field; If they are the same, then the executable code is determined to have executed successfully; If they are not the same, the executable code is deemed to have failed to execute.
[0065] In one embodiment, the operations research optimization module 105, when executing the operations research optimization strategy for generating the task plan scheme based on the output constraints and decision variables, is specifically used for: Transform the constraints and decision variables into structured data; The structured data is mapped to business terms according to a preset parameter mapping table; Map the numerical results in the structured data to business meaning; Based on a preset business rule base, the execution result is subjected to business semantic analysis according to the business terms and the business meaning analysis to obtain a business-oriented interpretation result; The system invokes a preset business template to generate a structured optimization strategy based on the business interpretation results.
[0066] This invention provides a data analysis-based operations research control device that acquires a user-defined task plan and its corresponding natural language operations research optimization consultation text. First, the system uses word segmentation, entity annotation, and a preset format template to accurately extract structured user intent information from the consultation text, including decision variables, target optimization direction, and constraints. Then, the system transforms this intent information into mathematical form: defining variable types, constructing an objective function, converting constraints into mathematical conditional expressions, and assigning these model parameters to a preset framework to generate a formalized large language model. Next, the system identifies model symbols through lexical analysis, intelligently matches the optimal solver, and automatically generates executable code that calls the solver. After code execution, the system performs dual feasibility verification of the results based on mathematical constraints and business rules. If verification fails or an execution error occurs, the system automatically adjusts the model parameters based on the error message and the original target, and re-enters the "transformation-solution" loop, forming a self-correcting closed-loop iterative process. Once the solution is successfully solved and verified, the system outputs the constraints and variables determined by the model. Through business terminology mapping, business meaning interpretation, and rule-based reasoning, it elevates these into a structured and readable operations research optimization strategy. Finally, based on this strategy, the system automatically adjusts and optimizes the user's original task plan, outputting an optimized task solution that can be directly implemented. This improves the universality of operations research optimization.
[0067] Specific limitations regarding the data analysis-based operations research scheme control device can be found in the limitations of operations research optimization methods described above, and will not be repeated here. Each module in the aforementioned data analysis-based operations research scheme control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0068] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a data analysis-based operations research control method on the server side.
[0069] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps of a data analysis-based operations research control method.
[0070] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Obtain a pre-defined task plan from the user, and obtain the corresponding operations research and optimization consultation text. Extract user intention information from the operations research and optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan, the constraints of the task plan optimization, and the decision variables of the task plan. The target optimization direction, the constraints, and the decision variables are transformed into model parameters. The model parameters are then used to assign parameter values to the preset large language model framework to obtain the large language model. The large language model is converted into executable code, and the executable code is executed. If the executable code fails to execute, obtain the error information of the execution process, adjust the parameters of the large language model according to the error information and the target optimization direction, and return to the step of converting the large language model into executable code; If the executable code executes successfully, the constraints and decision variables corresponding to the current large language model are output, and the operation optimization strategy of the task plan is generated based on the output constraints and decision variables. The task plan is adjusted and optimized according to the described operations research optimization strategy to obtain an optimized task plan.
[0071] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain a pre-defined task plan from the user, and obtain the corresponding operations research and optimization consultation text. Extract user intention information from the operations research and optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan, the constraints of the task plan optimization, and the decision variables of the task plan. The target optimization direction, the constraints, and the decision variables are transformed into model parameters. The model parameters are then used to assign parameter values to the preset large language model framework to obtain the large language model. The large language model is converted into executable code, and the executable code is executed. If the executable code fails to execute, obtain the error information of the execution process, adjust the parameters of the large language model according to the error information and the target optimization direction, and return to the step of converting the large language model into executable code; If the executable code executes successfully, the constraints and decision variables corresponding to the current large language model are output, and the operation optimization strategy of the task plan is generated based on the output constraints and decision variables. The task plan is adjusted and optimized according to the described operations research optimization strategy to obtain an optimized task plan.
[0072] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0073] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0074] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0075] Finally, it should be noted that if any software tools or components not belonging to this company appear in the embodiments of the application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A data analysis-based operations research scheme control method, characterized in that, include: Obtain a pre-defined task plan from the user, and obtain the corresponding operations research and optimization consultation text. Extract user intention information from the operations research and optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan, the constraints of the task plan optimization, and the decision variables of the task plan. The target optimization direction, the constraints, and the decision variables are transformed into model parameters. The model parameters are then used to assign parameter values to the preset large language model framework to obtain the large language model. The large language model is converted into executable code, and the executable code is executed. If the executable code fails to execute, obtain the error information of the execution process, adjust the parameters of the large language model according to the error information and the target optimization direction, and return to the step of converting the large language model into executable code; If the executable code executes successfully, the constraints and decision variables corresponding to the current large language model are output, and the operation optimization strategy of the task plan is generated based on the output constraints and decision variables. The task plan is adjusted and optimized according to the described operations research optimization strategy to obtain an optimized task plan.
2. The data analysis-based operations research scheme control method as described in claim 1, characterized in that, The extraction of user intent information from the operations research and optimization consultation text includes: The operations research and optimization consultation text is segmented into words to obtain a set of segmented texts; The quantifiers, units, and entity nouns in the segmented text set are labeled to obtain a standardized text fragment set; The decision variables are obtained by identifying phrases representing the variables to be decided in the standardized text fragment set using a preset format template; The formatted template is used to identify phrases in the standardized text fragment set that represent the intention to maximize and minimize, thereby obtaining the target optimization direction; The formatted template is used to identify phrases representing constraints in the standardized text fragment set, thereby obtaining the constraints. By summarizing the decision variables, the target optimization direction, and the constraints, user intention information is obtained.
3. The data analysis-based operations research scheme control method as described in claim 1, characterized in that, The process of converting the target optimization direction, the constraints, and the decision variables into model parameters, and then using these model parameters to assign parameter values to a preset large language model framework to obtain a large language model includes: Extract the decision variables contained in the user intention information, define the variable types based on the keywords contained in the decision variables and the context content associated with the keywords, and obtain the defined set of decision variables; The target optimization direction contained in the user intention information and the metric associated with the target optimization direction are combined into a complete mathematical expression to obtain the objective function; The constraints contained in the user intention information are transformed into mathematical conditional expressions to obtain a set of constraints in mathematical form. The set of decision variables, the objective function, and the set of constraints in mathematical form are converted into a preset model parameter data format to obtain model parameters. The converted model parameters are then assigned to a preset model framework to obtain a large language model.
4. The data analysis-based operations research scheme control method as described in claim 1, characterized in that, The process of converting the large language model into executable code includes: Identify the variables, coefficients, operators, and function call symbols in the large language model to obtain a symbol set; The symbol set is matched with the preset structure contained in the preset solver. Based on the matching result, the fixed parameters, variable parameters, and decision variable type parameters in the large language model are identified and labeled to obtain a structured model description object. The model type of the large language model is identified based on the structured model description object. Based on the model type, the solver with the highest matching score between the solver features and the model type in the preset solver library is selected as the target solver. The structured model description object is filled into a preset code template using the target solver to obtain executable code.
5. The data analysis-based operations research scheme control method as described in claim 1, characterized in that, Before adjusting the parameters of the large language model based on the error message and the target optimization direction, the method further includes: Obtain the execution result of the executable code; Extract key information from the execution results and output it in a structured format to obtain structured information; The constraint feasibility of the structured information is verified based on the set of mathematical constraints in the large language model, and the constraint verification results are obtained. The structured information is validated for business logic rationality using preset business rules to obtain business logic validation results; If, based on the constraint verification result and the business logic verification result, it is determined that the structured information passes the constraint feasibility verification and the business logic rationality verification, then the execution result is determined to have passed the feasibility verification. Execution feedback of the executable code is then obtained, and the success of the executable code is determined based on the execution feedback. If, based on the constraint verification results and the business logic verification results, it is determined that the structured information has failed the constraint feasibility verification and the business logic rationality verification, then the execution result has failed the feasibility verification.
6. The data analysis-based operations research scheme control method as described in claim 5, characterized in that, The step of determining whether the executable code has been executed successfully based on the execution feedback includes: Extract the parameter fields from the execution feedback to obtain a set of parameter fields; Identify the boolean type fields in the parameter field set; The Boolean type field is the same as the preset execution success feedback field; If they are the same, then the executable code is determined to have executed successfully; If they are not the same, the executable code is deemed to have failed to execute.
7. The data analysis-based operations research scheme control method as described in claim 1, characterized in that, The operations research optimization strategy for generating the task plan scheme based on the output constraints and decision variables includes: Transform the constraints and decision variables into structured data; The structured data is mapped to business terms according to a preset parameter mapping table; Map the numerical results in the structured data to business meaning; Based on a preset business rule base, the execution result is subjected to business semantic analysis according to the business terms and the business meaning analysis to obtain a business-oriented interpretation result; The system invokes a preset business template to generate a structured optimization strategy based on the business interpretation results.
8. A data analysis-based operations research control device, characterized in that, include: The data acquisition module is used to acquire the task plan scheme pre-defined by the user, and to acquire the operation research optimization consultation text corresponding to the task plan scheme, and to extract the user intention information in the operation research optimization consultation text, wherein the user intention information includes the target optimization direction of the task plan scheme, the constraints of the task plan scheme during optimization, and the decision variables of the task plan scheme. The model building module is used to convert the target optimization direction, the constraints and the decision variables into model parameters, and to assign parameter values to the preset large language model framework using the model parameters to obtain the large language model. The execution feedback module is used to convert the large language model into executable code and execute the executable code. If the executable code fails to execute, the module obtains the error information of the execution process, adjusts the parameters of the large language model according to the error information and the target optimization direction, and returns to the step of converting the large language model into executable code. The strategy generation module is used to output the current constraints and decision variables of the large language model, and generate the operation and optimization strategy of the task plan based on the output constraints and decision variables. The operations research and optimization module is used to perform operations research and optimization adjustments on the task plan according to the operations research and optimization strategy to obtain an optimized task plan.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the data analysis-based operations research control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the data analysis-based operations research control method as described in any one of claims 1 to 7.