A production planning and scheduling method and system based on natural language interaction
By adopting a production planning and scheduling method based on natural language interaction, the intelligent agent receives user input and calls a large language model for semantic parsing and quality assessment. Combined with a scheduling domain knowledge base, it solves the problems of cumbersome operation and poor adaptability in existing technologies, realizes efficient and transparent scheduling optimization and experience reuse, and improves the efficiency and quality of production planning and scheduling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AVICIT CO LTD
- Filing Date
- 2026-06-15
- Publication Date
- 2026-07-24
Smart Images

Figure CN122453083A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a production planning and scheduling method and system based on natural language interaction, as well as an electronic device. Background Technology
[0002] Advanced Planning and Scheduling (APS) is a core technology for manufacturing enterprises to optimize the allocation of production resources and ensure the orderly operation of production, and it is widely used in the field of intelligent manufacturing. Currently, traditional APS systems mainly rely on a graphical user interface (GUI) for human-computer interaction, requiring manual completion of the entire process, including view switching, data filtering, parameter entry, scheduling calculations, and scheme adjustments. This interaction paradigm has many significant technical shortcomings in complex production scenarios with multiple product types, small batches, and frequent dynamic disturbances.
[0003] First, the scheduling optimization process is a semantically opaque mathematical black box for users. Traditional APS optimization algorithms only operate in a mathematical space, relating numerical vectors, weight parameters, and objective functions. When users are not satisfied with the scheduling results, they can only rerun the algorithm by adjusting the abstract parameters. Users cannot express their scheduling intentions in natural language, and there is a lack of correlation between numerical parameters and scheduling semantics, which makes it impossible to achieve semantic guidance in the mathematical framework of traditional APS.
[0004] Secondly, the traditional GUI interaction mode is cumbersome to operate and has a high cognitive load. Production scheduling needs to take into account multiple factors such as materials, capacity, delivery priority, and process constraints. The existing one-way interaction solution relies heavily on the planner's manual operation and experience judgment. The system does not participate much in the analysis and decision-making process. A single scheduling optimization often requires dozens or even hundreds of interface interactions. The operation threshold is high and the fault tolerance is low. It is easy for human error to lead to unreasonable scheduling solutions, which seriously affects scheduling efficiency and production progress.
[0005] Finally, tacit scheduling experience is difficult to accumulate and reuse, and has poor inheritance. High-quality scheduling decisions rely on the personalized experience of senior personnel in anomaly identification, bottleneck judgment, and strategy adjustment accumulated over a long period of time. This kind of tacit knowledge has no standardized channels for accumulation and is easily lost with personnel turnover. The training cycle for new employees can be as long as several months to several years, resulting in high talent costs for enterprises and difficulty in ensuring the stability of scheduling work.
[0006] With the development of Large Language Model (LLM) and agent technologies, task orchestration solutions combining LLM with tool calls are gradually being implemented. However, existing technologies are all general task orchestration frameworks, lacking customized designs for the specific constraints and optimization needs of production scheduling. These technologies have significant shortcomings when applied to scheduling scenarios, easily generating results that violate the physical constraints of the scheduling domain. The specific deficiencies of existing technologies are reflected in four aspects: First, they lack a dedicated quantitative evaluation mechanism for scheduling quality, only able to determine whether a task was successfully executed, unable to quantitatively evaluate core indicators such as delivery achievement rate, resource utilization rate, and bottleneck elimination rate, and unable to determine the effectiveness of optimization; second, they lack precise convergence detection capabilities, only supporting fixed-number loops or single executions, unable to autonomously determine the timing of optimization termination based on quality indicators, easily leading to over-iteration or insufficient optimization; third, they lack a structured experience accumulation and reuse mechanism, simply recording interaction logs, unable to automatically extract, store, and update scheduling experience, and unable to solve the problem of experience loss; fourth, the human-machine collaboration mechanism is simplistic, only supporting basic operations such as confirmation and cancellation, lacking multi-level contextual collaboration protocols, and unable to adapt to the complex collaboration needs of scheduling scenarios.
[0007] In summary, existing production scheduling technologies suffer from problems such as cumbersome operation, lack of autonomous optimization and convergence capabilities, and poor adaptability. The industry urgently needs an intelligent production planning and scheduling method and system that is based on natural language interaction capabilities, supports users to provide semantic guidance through natural language during optimization iterations, and has the ability to autonomously evaluate scheduling quality and has strong adaptability. Summary of the Invention
[0008] To address the aforementioned technical problems in the prior art, namely, to achieve production planning and scheduling based on natural language interaction, possessing the ability to autonomously assess scheduling quality, and exhibiting strong adaptability, embodiments of this application provide a production planning and scheduling method and system based on natural language interaction, as well as an electronic device.
[0009] In a first aspect of this application, a production planning and scheduling method based on natural language interaction is provided, comprising:
[0010] Step S1: The intelligent agent receives user input through the user terminal. The user input includes natural language instructions and / or documents. When the user input includes documents, the document is formatted, parsed, sliced, and vectorized by text embedding and stored in the vector database. The unique identifier of the document in the vector database is associated with the natural language instructions.
[0011] Step S2: The agent invokes a large language model to perform semantic parsing and intent recognition on the user input, transforming the user input into a structured scheduling task description; obtains available tool information from the production planning and scheduling business system; retrieves relevant knowledge bases and / or historical scheduling experience bases in the scheduling domain to construct context information; invokes the large language model to generate a tool invocation sequence that conforms to preset data dependency constraints based on the scheduling task description, the available tool information, and the context information. The available tool information includes the functional description and parameter format of each tool, and the tool invocation sequence defines multiple tools to be executed sequentially to complete the scheduling task and the invocation order of the multiple tools.
[0012] Step S3: The intelligent agent sequentially calls the tools of the production planning and scheduling business system according to the tool call sequence, and obtains the execution results of each tool;
[0013] Step S4: The agent calls a large language model and other analysis methods to perform quality assessment and optimization convergence detection on the execution results of the tool, and obtains the quality assessment results and optimization convergence detection results.
[0014] Step S5: If the optimization convergence detection result is that the optimization has not converged, the agent adds the quality evaluation result to the context information and returns to step S2.
[0015] Step S6: If the optimization convergence detection result is that the optimization has converged, the agent calls the large language model to generate a comprehensive report based on the execution results of all tools, the quality assessment results of each round, and the optimization convergence detection result. The comprehensive report includes scheduling problem diagnosis, optimization suggestions, risk warning, and scheduling decision basis.
[0016] In a second aspect of this application, a production planning and scheduling system based on natural language interaction is provided, comprising:
[0017] The user terminal is used to receive natural language commands and uploaded documents input by the user through a dialogue interface, transmit the natural language commands and documents to the intelligent agent, receive the scheduled task execution process information and comprehensive report transmitted by the intelligent agent, and display the scheduled task execution process and comprehensive report to the user.
[0018] An intelligent agent that integrates a large language model and a workflow engine for executing the production planning and scheduling method based on natural language interaction as described in any one of claims 1 to 8;
[0019] The communication interface module is used to transmit tool information query requests, tool call requests, and tool execution results between the intelligent agent and the production planning and scheduling business system;
[0020] The production planning and scheduling business system is used to receive the tool query request and the tool call request, return available tool information according to the query request, execute the corresponding tool according to the tool call request, and return the tool execution result;
[0021] A scheduling domain-related knowledge base is used to store and manage scheduling domain knowledge in a multi-layered related structure, including a physical resource layer, a process capability layer, and a constraint rule layer. The historical scheduling experience base supports the retrieval of related knowledge based on scheduling entities.
[0022] The historical scheduling experience base is used to store and manage structured scheduling experience records. Each scheduling experience record includes a description of the triggering problem, user semantic guidance content, scheduling strategy adjustments and adjustment effects. Each scheduling experience record is anchored to the corresponding scheduling entity in the scheduling domain-related knowledge base. The historical scheduling experience base supports retrieval based on scheduling structure features.
[0023] A vector database for storing and managing vectorized scheduling document data, and supporting document retrieval based on semantic similarity.
[0024] In a third aspect of this application, an electronic device is provided, the electronic device comprising:
[0025] At least one processor; and,
[0026] A memory communicatively connected to at least one of the processors; wherein,
[0027] The memory stores instructions that can be executed by the processor to implement the above-described production planning and scheduling method based on natural language interaction.
[0028] The production planning and scheduling method and system based on natural language interaction provided in this application have the following beneficial effects:
[0029] (1) Make the scheduling optimization process transparent to users at the semantic level: This application can transform the scheduling optimization from the mathematical black box of traditional APS to an interactive process that users can understand and participate in through natural language evaluation feedback and semantic guidance loop. Users can see the system's analysis of the current plan and express their intention to modify directly at the semantic level in natural language, without having to indirectly affect the scheduling results by modifying abstract parameters. This solves the problem of the lack of correlation between scheduling semantic intent and mathematical parameters in traditional APS.
[0030] (2) Users can input scheduling requirements through natural language, and the intelligent agent can autonomously complete the entire process of multi-round tool calls, data queries and scheduling iteration adjustments. This simplifies the dozens or even hundreds of manual operations required for a single scheduling optimization into a single natural language command input, greatly reducing the intensity of manual operations and cognitive load, and significantly improving the efficiency of scheduling operations.
[0031] (3) By providing explicit constraint boundaries for LLM through the scheduling domain association knowledge base, the scheduling domain illusion is prevented. By extracting constraint information related to the current task from the scheduling domain association knowledge base, explicit physical constraint boundaries are provided for the LLM generation process, so that LLM cannot generate scheduling operations that violate physical constraints. This mechanism makes up for the security gap left by the loss of implicit guardrails in GUI in natural language interaction.
[0032] (4) The independent evaluation and optimization convergence detection of scheduling quality are realized through the LLM architecture. Steps S2 and S4 of this application use the same large language model to play the roles of plan generation and independent evaluation respectively, which ensures the independence and objectivity of the evaluation. The multi-dimensional quality evaluation and convergence detection mechanism enables the system to autonomously judge whether the scheduling optimization has reached a satisfactory level.
[0033] (5) Effective reuse of scheduling experience through retrieval based on scheduling structure features: The historical scheduling experience retrieval of this application uses scheduling entities as anchors to calculate the similarity of scheduling scenarios in resource association structure and constraint mode, rather than relying solely on text semantic similarity. This enables the identification of similar scenarios in the current domain from the root, improving the hit rate and effectiveness of experience reuse. Furthermore, it can automatically extract key information such as core scheduling decision-making experience and user preferences from daily scheduling dialogues and iterations, and complete structured organization and persistent storage according to preset categories. In the subsequent scheduling task execution process, the system can actively retrieve and match similar historical scheduling knowledge and inject it into the current scheduling reasoning process, transforming the implicit experience knowledge attached to senior planners into a systematic enterprise knowledge asset that can be inherited, reused, and iterated. This solves the defects of experience loss, long training cycle for new employees, and difficulty in reusing experience in the traditional scheduling field.
[0034] (6) Compared with the existing technology that only supports the flat human-computer interaction mode of "confirmation / cancellation", this application can automatically identify the situation of missing parameters and conflict of multiple scheduling targets according to the real-time scheduling context, and guide users to complete the strategy selection through human-computer collaborative decision-making. It fully adapts to the differentiated collaborative needs in complex production scheduling scenarios, and takes into account the intelligent autonomous execution and the professionalism of human decision-making. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 A schematic diagram of the structure of a production planning and scheduling system based on natural language interaction provided in an embodiment of this application;
[0037] Figure 2 A schematic diagram of a production planning and scheduling method based on natural language interaction provided in an embodiment of this application. Detailed Implementation
[0038] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0039] The following will describe in detail, with reference to the accompanying drawings, a production planning and scheduling method and system based on natural language interaction according to embodiments of this application. The production planning and scheduling system based on natural language interaction provided in this application embodiment is as follows: Figure 1 As shown, the system comprises three core layers: a user layer, an intelligent agent and communication layer, and a data and service layer. Specifically, the system includes:
[0040] The user terminal, belonging to the user layer, is used to receive natural language commands and uploaded documents input by the user through a dialogue interface, transmit the natural language commands and documents to the intelligent agent, receive the scheduling task execution process information and comprehensive report transmitted by the intelligent agent, and display the scheduling task execution process and comprehensive report to the user. The scheduling task execution process includes the scheduling results.
[0041] The intelligent agent, belonging to the intelligent agent and communication layer, is an interactive scheduling intelligent agent that integrates a large language model and a workflow engine, and is used to execute the production planning and scheduling method based on natural language interaction provided in the embodiments of this application.
[0042] The communication interface module, belonging to the intelligent agent and communication layer, is used to transmit tool information query requests, tool call requests, and tool execution results between the intelligent agent and the production planning and scheduling business system.
[0043] The production planning and scheduling business system, belonging to the data and business layer, is used to receive tool query requests and tool call requests, return available tool information according to the query requests, execute the corresponding tools according to the tool call requests, and return the tool execution results;
[0044] The scheduling domain-related knowledge base belongs to the data and business layer. It is used to store and manage scheduling domain knowledge in a multi-layered relational structure, including the physical resource layer, process capability layer, and constraint rule layer, as well as the entities and cross-layer relationships of each layer. It supports the retrieval of relational knowledge based on scheduling entities.
[0045] The historical scheduling experience base belongs to the data and business layer and is used to store and manage structured scheduling experience records. Each experience record includes a description of the triggering problem, user semantic guidance content, scheduling strategy adjustment and adjustment effect, and is anchored to the corresponding scheduling entity in the scheduling domain related knowledge base, supporting retrieval based on scheduling structure features.
[0046] The vector database, belonging to the data and business layer, is used to store and manage vectorized scheduling document data and supports document retrieval based on semantic similarity.
[0047] The specific functions of the user terminal may include: providing a dialogue interface (such as a web dialogue interface), supporting streaming text output, enabling real-time natural language dialogue with the intelligent agent, allowing users to issue scheduling instructions through conversational expressions, such as "Line 3's capacity decreased by 30% this afternoon, please analyze the affected orders and provide adjustment plans"; supporting the uploading of scheduling-related documents in various formats such as Excel scheduling tables and PDF process documents, with the system automatically completing document parsing and vectorized storage; supporting the rendering and interaction of rich media content such as scheduling Gantt charts, resource load charts, KPI cards, and version comparison views, allowing planners to intuitively view scheduling results and optimization effects; supporting interactive form filling, automatically generating context-aware interactive forms when the system detects missing key parameters, guiding users to complete the necessary information. The user terminal and the intelligent agent transmit user-input natural language instructions and feedback requests (from the user terminal to the intelligent agent) and comprehensive reports (from the intelligent agent to the user terminal) through the dialogue interface.
[0048] The intelligent agent is the core logical unit of the system, integrating a large language model and a workflow engine. For example, the workflow engine can be built using a directed graph-based state machine model (e.g., the LangGraph framework). The large language model can be the untuned open-source general-purpose model Qwen3-32B, guided to perform its professional capabilities in the scheduling domain through domain-specific system prompts, domain knowledge injection, output space constraints, and middleware correction. The agent's internal workflow is built on a directed graph structure, including seven state nodes: context preprocessing, intent recognition, plan generation, tool execution, quality assessment, human-machine collaborative decision-making, and report generation. Each node switches states according to preset transition conditions, and the pause and resumption of human-machine collaborative decision-making are achieved through mechanisms such as LangGraph's interrupt points.
[0049] The communication interface module adopts a client-server architecture. The client is deployed on the agent side, and the server is deployed on the production planning and scheduling business system side. The client and server communicate via a standardized tool invocation communication protocol (e.g., establishing a persistent one-way connection using Model Context Protocol (MCP) and HTTP Server-Sent Events (HTTPSSE)). This includes message encapsulation and parsing; the messages are standardized protocol messages. The core function of the communication interface module is to uniformly encapsulate the heterogeneous Application Programming Interfaces (APIs) of the production planning and scheduling business system into a standardized tool description format. Each tool corresponds to one or more APIs, allowing the agent to call any registered tool through the standardized protocol without being aware of the interface differences between sub-business systems. The description information for each tool includes the tool name, function description, input parameter name / type / required / default value, output format, and other metadata.
[0050] The production planning and scheduling business system includes at least one software system (which can be referred to as a sub-business system) that carries production scheduling functions, such as an APS system, ERP system, or MES system actually used by the enterprise. Each sub-business system exposes standardized tool interfaces (i.e., communication interface modules) to the intelligent agent. Figure 1The system uses a unified, standardized tool interface to perform specific scheduling queries, modifications, and submissions. A tool refers to a standardized encapsulation of the underlying functions of the production planning and scheduling business system (APS / ERP / MES). Each tool corresponds to the application programming interface (API) of one or more sub-business systems; that is, each tool encapsulates one or more APIs. The agent calls the tools of the production planning and scheduling business system through the communication interface module (i.e., RESTful API calls; RESTful refers to the Representational State Transfer architectural style), and the production planning and scheduling business system returns the tool execution results to the agent.
[0051] The scheduling domain-related knowledge base is used to store and manage scheduling domain knowledge in a multi-layered relational structure, including a physical resource layer, a process capability layer, and a constraint rule layer, as well as cross-layer relationships. Each layer includes corresponding entities and supports relational knowledge retrieval based on scheduling entities. The physical resource layer includes entities such as production lines, equipment, and materials, as well as substitution and sharing relationships among these entities. The process capability layer includes the process steps that each physical resource can execute and the sequential relationships of the processes corresponding to each physical resource. The constraint rule layer includes capacity constraints, material constraints, delivery date constraints, and process route constraints (e.g., physical and logical rules of entities). Different layers are connected by association edges (e.g., forming a graph relationship between equipment, processes, and constraints). Physical resource layer nodes are connected to process capability layer nodes through capability edges, and process capability layer nodes are connected to constraint rule layer nodes through constraint edges.
[0052] The historical scheduling experience database is used to store and manage structured scheduling experience records (such as historical decisions and strategies). Each record includes a description of the triggering problem (i.e., problem trigger), user semantic guidance content (i.e., user guidance), scheduling strategy adjustments and their effects, and is anchored to the corresponding scheduling entity or relationship in the scheduling domain-related knowledge base, supporting retrieval based on scheduling structure features. During the execution of scheduling tasks, the intelligent agent automatically retrieves historical scheduling experience matching the current scenario through the communication interface module and the retrieval method proposed in this application and injects it into the context. At the same time, the intelligent agent also records the experience generated during the process and stores it in the historical scheduling experience database.
[0053] The vector database can utilize the FAISS (Facebook AI Similarity Search) vector database to store and manage vectorized scheduling document data. When a user uploads a document, the system parses the document and segments it according to a preset granularity. It then uses a text embedding model (e.g., text-embedding-v3) to convert each segment into a document vector. These document vectors are then associated with the corresponding segment content and stored in batches in the vector database, achieving vectorized storage of document segments and generating unique identifiers within the database. The vector database supports document fragment retrieval based on semantic similarity (i.e., semantic similarity retrieval). When the agent needs to obtain scheduling-related knowledge, it performs a semantic search on the vector database using vector similarity matching to retrieve the most relevant document fragments and injects them into the context window of the large language model (i.e., adding contextual information) to enhance inference quality.
[0054] The production planning and scheduling system based on natural language interaction provided in this application embodiment may also include an external knowledge base. The external knowledge base belongs to the data and business layer and includes, but is not limited to, a material BOM (Bill of Materials) database, a process route database, a scheduling rule base, and a scheduling strategy template base. It provides basic domain knowledge support for the intelligent agent. The external knowledge base opens a query interface to the intelligent agent through a standardized API. The intelligent agent queries the external database for domain knowledge (such as BOM / process / rules) and can also store BOM / process / rule-related data generated during the execution of scheduling tasks in the external database.
[0055] On the other hand, embodiments of this application provide a production planning and scheduling method based on natural language interaction, applied to intelligent agents, such as... Figure 2 As shown, the production planning and scheduling method based on natural language interaction includes:
[0056] Step S1: The agent receives user input through the user terminal. The user input includes natural language instructions and / or documents. When the user input includes a document, the document is formatted, parsed, sliced, and embedded into vectors and then stored in a vector database. The unique identifier of the document in the vector database is associated with the natural language instructions. After association, it can be passed to subsequent steps so that subsequent steps can retrieve relevant segments in the document based on semantic similarity to enhance the scheduling context.
[0057] Step S2: The agent invokes a large language model to perform semantic parsing and intent recognition on the user input, transforming the user input into a structured scheduling task description; it obtains available tool information from the production planning and scheduling business system, retrieves relevant knowledge bases and / or historical scheduling experience bases in the scheduling domain, and constructs context information; it invokes the large language model to generate a tool invocation sequence that conforms to preset data dependency constraints based on the scheduling task description, the available tool information, and the context information. The tool invocation sequence defines multiple tools to be executed sequentially to complete the scheduling task and the invocation order of the multiple tools. The available tool information includes the functional description and parameter format of each tool.
[0058] Step S3: The intelligent agent sequentially calls the tools of the production planning and scheduling business system according to the tool call sequence, and obtains the execution results of each tool;
[0059] Step S4: The agent calls a large language model and other analysis methods to perform quality assessment and optimization convergence detection on the execution results of the tool, and obtains quality assessment results and optimization convergence detection results. The quality assessment results can be a fusion of multiple forms such as natural language and charts.
[0060] Step S5: If the optimization convergence detection result is that the optimization has not converged, the agent adds the quality evaluation result to the context information and returns to step S2.
[0061] Step S6: If the optimization convergence detection result is that the optimization has converged, the agent calls the large language model to generate a comprehensive report based on the execution results of all tools, the quality assessment results, and the optimization convergence detection result. The comprehensive report includes scheduling problem diagnosis, optimization suggestions, risk warnings, and scheduling decision basis.
[0062] Specifically, in step S1, the intelligent agent receives user input through the user terminal. The user input includes natural language instructions, such as "Line 3's production capacity will decrease by 30% from 2 pm to 6 pm today due to equipment failure. Please analyze the affected orders and provide adjustment plans, prioritizing the delivery of Category A orders," and / or scheduling-related documents, such as order schedule tables in Excel format, process documents in PDF format, bill of materials in JSON format, etc. When user input includes a document, the agent can first perform document preprocessing, including: identifying the document format (PDF, DOCX, XLSX, JSON, etc.), calling the corresponding document parser to extract the document content; slicing the parsed document content according to a preset granularity (e.g., by paragraph, by table row, or by a fixed number of characters N, where N ranges from 500 to 2000) to ensure that each slice contains complete semantic information; calling a pre-trained text embedding model (e.g., text-embedding-v3) to vectorize each slice into a document vector; associating the document vectors with the original slice content and storing them in batches in a vector database to generate a unique identifier (document_id) for each document; associating the document_id with the user's input natural language command as context for subsequent inference. The agent can also receive the user's input natural language command and the corresponding document's document_id through a dialogue interface. When user input does not contain a document, the agent directly receives the natural language command through the dialogue interface.
[0063] Specifically, in step S2, the agent invokes a large language model to perform semantic parsing and intent recognition on the user input. Then, the agent can use a multi-dimensional feature-weighted scheduling experience similarity retrieval function to search a scheduling domain-related knowledge base and / or a historical scheduling experience base to obtain historical scheduling experiences similar to the current scenario and associated with the current scheduling task description. These historical scheduling experiences include historical tool call sequences, historical scheduling parameter setting records, and historical scheduling decision records, and are then incorporated with contextual information. The multi-dimensional feature-weighted scheduling experience similarity retrieval function is... ,in, This describes the features of the current scheduling scenario. This refers to a scheduling knowledge entry in the scheduling domain-related knowledge base or an experience record in the historical scheduling experience base, wherein the scheduling knowledge entry and the experience record belong to the historical scheduling experience. This is the semantic embedding vector of the current scene extracted by the text embedding model. These are semantic embedding vectors of scheduling knowledge or experience records extracted by a text embedding model. , For the set of real numbers, For embedded dimensions, Represents cosine semantic similarity. and These are the current scenario constraint set and the historical scheduling experience constraint set, respectively. For the current scene 3D optimization objective vector, Based on historical scheduling experience 3D optimization objective vector, , To optimize the dimension of the target vector, This represents the calculation of Euclidean distance. This represents the preset semantic similarity fusion weight coefficient. This represents the preset constraint similarity fusion weight coefficient. This represents the preset target similarity fusion weight coefficient. This represents the Jaccard similarity between the current set of constraints and the historical set of scheduling experience constraints. , This represents the preset similarity weight coefficient of the process topology diagram. Indicates the edit distance of the process topology diagram. , The set of node mappings representing the process topology graph. The cost of replacing, deleting, or inserting a node. The cost of performing replacement, deletion, or insertion simultaneously. and These represent different process topology diagrams. Representing the process topology diagram The node, Representing the process topology diagram A set of nodes, used to represent entities participating in the scheduling tasks. Representing the process topology diagram The edge, Representing the process topology diagram The set of edges is used to represent the relationships between entities participating in the scheduling task. Indicates the process topology diagram To process topology diagram Node mappings (e.g., node replacement mappings, node deletion mappings, or node insertion mappings). Indicates in mapping Down Nodes in exist The corresponding node in Indicates in mapping Down The edge in exist The corresponding edge in, express The total number of nodes, express The total number of edges, min represents taking the minimum value, and max() represents taking the maximum value function. For example, suppose the semantic cosine similarity between the current scenario and a certain historical scheduling experience is 0.85, the Jaccard similarity between the constraint set of the current scenario and the constraint set of the historical scheduling experience is 0.60, the similarity between the optimization objective vector of the current scenario and the optimization objective vector of the historical scheduling experience is 0.90, and the similarity after normalization of the process topology graph edit distance (i.e. The value is 0.75. If the retrieval threshold is 0.7, then the value of the multidimensional feature-weighted scheduling empirical similarity retrieval function is... Therefore, this historical scheduling experience is infused with contextual information.
[0064] Specifically, in step S2, the agent sends a tool information query request to the production planning and scheduling business system through the communication interface module, and obtains metadata information (i.e., available tool information) of all available tools returned by the production planning and scheduling business system through the communication interface, including tool name, function description, input parameter format, output parameter format, etc. Subsequently, the agent calls the large language model, and based on the organized scheduling task description, available tool information, and context information (including user's original instructions, historical scheduling experience, etc.) (which can also be combined into context information), the large language model performs semantic parsing and intent recognition to generate a structured scheduling task description (including scheduling type, scheduling range, key constraints, and optimization objectives). Based on the scheduling task description and available tool information, the large language model generates an ordered tool call sequence that conforms to preset data dependency constraints through reasoning. The preset data dependency constraints include: the tool call sequence does not contain any manual interaction steps, and two adjacent consecutive tools satisfy a data transitive closure relationship. Furthermore, when regenerating the tool call sequence, the sequence begins with the tool that obtains the current scheduling status and ends with the tool that submits the scheduling result. The data transitive closure relationship is defined as follows: the output data structure of the tool preceding the tool in the tool call sequence contains all the required input parameters of the adjacent subsequent tool. The transitive closure constraint formula characterizing the data transitive closure relationship is: ,in, Indicates the sequence of tool calls. The number of tools in the tool call sequence. Indicates the first The tool that is invoked. Representation tools The set of required input parameters, Representation tools The set of output data fields, Represents the initial set of context information. Indicates the first part of the tool call sequence The union of data produced by each tool This represents the set of edges in the directed acyclic graph corresponding to the process route of the currently scheduled task. This represents a directed edge in the process route diagram and indicates a process. In the process Completed previously Indicates processing steps The execution order index of the tool in the tool call sequence. Indicates processing steps The tool is indexed in the execution order of the tool invocation sequence. The agent can integrate a sequence validator into the workflow engine. After each tool invocation generated by the LLM, the validator checks whether the current context satisfies all required inputs for the next tool according to the transitive closure constraint formula. If not, it rejects the generated result and prompts the LLM to adjust or supplement the tool invocation until a complete and valid tool invocation sequence is generated. In one possible implementation, when generating the tool invocation sequence, the large language model can also extract a subset of constraints associated with the key entities of the current scheduled task from the scheduling domain-related knowledge base. The key entities of the current scheduled task can be obtained from the scheduling task description. The constraint subset contains the capability upper limit and constraints of the key entities of the current scheduled task, so that the large language model is limited by the capability upper limit and constraints during the generation process to prevent the generation of operations that violate the physical constraints of the scheduling domain.
[0065] Specifically, in step S3, the agent invokes tools sequentially according to the tool invocation sequence. For each tool in the sequence, the agent collects current context information, invokes a large language model to generate structured parameters (such as JSON format) for the tool based on the current context information and the tool's parameter format information, and sends the tool invocation request containing the structured parameters to the production planning and scheduling business system via a communication interface, and receives the execution result returned by the production planning and scheduling business system. Before invoking the large language model to generate parameters, the agent can also use a pre-execution middleware pipeline to process each tool in the invocation sequence. The pre-execution middleware includes at least one of the following: parameter auto-filling middleware, toolchain interception middleware, security interception middleware, or loop detection middleware. For example, the parameter auto-filling middleware extracts fields such as order number from the context and automatically fills them in; the security interception middleware verifies the parameter value range (e.g., the capacity adjustment range must not exceed 100%); and the loop detection middleware monitors the number of repeated tool invocations, triggering an alarm and transferring the process to the human-machine collaboration node if the number exceeds 5. After receiving the tool execution result, the agent can also process each tool in the tool call sequence using the tool execution post-middleware pipeline. The tool execution post-middleware includes at least one of version management middleware or tool result middleware: when the version management middleware detects a scheduled modification operation, it automatically creates a version snapshot containing timestamps and data copies, supporting rollback; the tool result middleware persists results larger than 100KB and only passes the reference path to subsequent stages to prevent context window bloat.
[0066] Specifically, in step S4, the agent invokes the large language model to perform multi-dimensional scheduling quality evaluation and optimization convergence detection based on the execution results of all tools. The context input to the large language model by the agent may include: the original user scheduling instructions and optimization objectives, a summary of the execution results of all executed tools, key data indicators of the current scheduling scheme, and key data indicators of the previous scheduling scheme (if any). First, specifically, the agent invokes the large language model to calculate a multi-dimensional comprehensive scheduling quality score with hard constraint penalties based on the scheduling delivery achievement rate, key resource utilization rate, scheduling bottleneck elimination degree, and scheduling scheme feasibility score. The quality assessment result is based on the comprehensive score of the multi-dimensional scheduling quality, whereby... , Indicates the first A comprehensive score for multi-dimensional scheduling quality optimization. Indicates the current optimization round number. This represents the total number of evaluation dimensions. and This indicates the evaluation dimension number. The evaluation dimensions include schedule delivery achievement rate, key resource utilization rate, degree of schedule bottleneck elimination, and schedule solution feasibility score. Indicates the first Round of optimization Adaptive weights for each evaluation dimension , Indicates the first Scoring functions for each evaluation dimension Indicates the first The scoring function for each evaluation dimension can be a preset linear function, piecewise linear function, exponential decay function, or sigmoid function, etc. , , Indicates the first The scheduling state vector of round optimization, , Represents the set of real numbers. for vector dimension, This represents a predefined set of global constraints. The preset scheduling hard constraint penalty strength coefficient (e.g., 3.0). This indicates a hard constraint on scheduling. This represents the set of hard constraints for scheduling, which includes material inventory constraints, process route constraints, and capacity limits for critical equipment. Indicates the first A function quantifies the degree of violation of a hard constraint, defined according to the constraint type. The default penalty nonlinearity coefficient is set (e.g., 2.0). Indicates the first The ideal value for the preset dimension can be maximized. They represent the first The ideal value for the preset dimension can be maximized. and They represent the first Dimensions and the The adaptive sensitivity coefficient of the dimension. and They represent the first Dimensions and the Preset initial weights for dimensions, , They represent the first The correlation function between the evaluation dimension and the current scheduling bottleneck resources and the second evaluation dimension The correlation function between each evaluation dimension and the current scheduling bottleneck resources. , ,in , These represent the current sequence number (number) in the current schedule. The assessment dimensions and the first A set of bottleneck resources whose load rate exceeds a preset threshold across multiple evaluation dimensions. bottleneck resources The load, bottleneck resources Available capacity The preset bottleneck resource weight enhancement coefficient (e.g., 0.5) is used, and `max()` represents the maximum value function. By introducing a hard constraint penalty term, the large language model can avoid relying entirely on indicators during evaluation. When hard constraints are violated, the comprehensive score will decrease exponentially. It can also distinguish between soft objective optimization and hard constraint satisfaction in production planning and scheduling. By considering bottleneck resource weights, the system can automatically identify the bottleneck in the current schedule. By dynamically increasing the weights of bottleneck-related dimensions, the evaluation weights can be tilted towards bottleneck-related dimensions. For example, assuming in the first round of optimization ( ), Ranking and delivery achievement rate scoring function (That is, the evaluation dimension of the schedule delivery achievement rate is 1, therefore) that is (This represents the ranking delivery achievement rate scoring function), but there is a violation of the material shortage constraint. (that is, the first) The hard constraint is the material shortage constraint. by express, (abbreviated as) (This represents a function quantifying the degree of violation of the material shortage constraint, also known as a material shortage constraint violation), and a hard constraint penalty term. Therefore, despite the high weighted score for soft objectives (scheduled delivery achievement rate), the overall score... If the value is still close to 0, the system automatically rejects the proposal; if the material shortage constraint violation is eliminated in the second round, The hard constraint penalty term is restored to 1, and the bottleneck resource utilization rate increases, leading to... (Right now Increase weight Automatic improvement leads to an overall increase in the score. Furthermore, specifically, the agent invokes a large language model to calculate the optimal convergence composite decision function based on Pareto hypervolume and scheme structural stability. ,in, , , , This indicates the preset length of the observation sliding window. It is a positive integer. Indicates the optimization round sequence number. This represents the preset average improvement convergence threshold. This represents the preset convergence threshold for the variance of the scoring sequence. and It is a positive real number. Indicates the first A comprehensive score for the multi-dimensional scheduling quality of the wheel. Represents the variance function. Indicates the nearest observation within the sliding window The arithmetic mean of the comprehensive score for multi-dimensional scheduling quality. Indicates the first Pareto hypervolume of the round-robin scheduling scheme set in multidimensional objective space , Represents the scheduling state vector. Indicates the first The set of non-dominated solutions obtained by round optimization Indicates the first The non-dominated solution set obtained in turn Each scheduling state vector in Find the union of the hypercube regions. Indicates the first Optimize the scoring function on the objective vector in dimensionality. For the first The reference point for the dimensional optimization objective vector. To optimize the dimension of the target vector, For hypervolume calculation functions, Indicates the length of the Pareto hypervolume observation window. This represents the preset hypervolume improvement rate convergence threshold (e.g., 0.03). Indicates the first Rotational scheduling scheme Indicates the first -1 round scheduling scheme, Indicates the scheduling scheme for two consecutive rounds. and Structural similarity, , , Indicates the scheduling scheme and Inconsistent process quantities. This represents the total number of processes in a single scheduling scheme. This represents the preset structural stability threshold (e.g., 0.9); if If the optimization converges, it is determined that the optimization has converged; otherwise, it is determined that the optimization has not converged. According to the composite convergence criterion function, the optimization convergence occurs if and only if the average improvement margin, the variance of the scoring sequence, and the overvolume improvement rate are all below a threshold, and the structural similarity (e.g., process sequence similarity) between two adjacent rounds of solutions is higher than 0.90. If convergence is achieved, it is determined that the large language model has converged, thus preventing false convergence caused by repeated oscillations between multiple solutions during the multi-objective optimization process.
[0067] In one possible implementation, the agent invokes a large language model and other models to perform quality assessment and optimization convergence detection based on the tool's execution results. These other models may include, but are not limited to, rule-based feasibility verification models, statistical analysis models for identifying bottleneck resources, and deep learning-based scheduling scheme evaluation models. The quality assessment is based on at least multiple dimensions, such as scheduling delivery achievement rate, key resource utilization rate, and the degree of scheduling bottleneck elimination. The scores for each dimension can be calibrated with reference to a scheduling domain-related knowledge base. The optimization convergence detection may further include comparing the overall scheduling quality score of the current round with that of the previous round, and determining whether optimization has converged based on user input.
[0068] Specifically, in step S5, the agent performs closed-loop decision-making based on the evaluation results (quality evaluation results and optimization convergence detection results) generated in step S4: if the optimization convergence detection results determine that the optimization has not converged and there is room for improvement, the agent adds the quality evaluation results as feedback information to the context information, returns to step S2, regenerates a new tool call sequence, and enters the next round of optimization; if the optimization convergence detection results determine that the optimization has converged and there is no room for improvement, the agent directly proceeds to step S6. Specifically, before executing the closed-loop decision or before returning to step S2, step S5 may also include human-machine collaborative decision-making: The agent first determines whether the current scheduling state meets the preset feedback triggering conditions. If it does, the execution of the tool call sequence is paused, and a feedback request is sent to the user through the user terminal. The feedback request may include dynamic forms and / or information supplementation requirements. After receiving the user's feedback information (e.g., the user's natural language response, the content of which may include the user's semantic guidance on modifying the scheduling plan), the agent calls the large language model to perform semantic parsing on the feedback information, maps it to one of the following decisions, obtains the corresponding decision, and executes the decision: 1) Adjust the current tool parameters according to the user's feedback information and continue to execute according to the current tool call sequence; 2) Return to step S2 and regenerate the tool call sequence with the user's feedback information as an additional constraint; 3) Terminate the current scheduling task and retain the current scheduling plan as the final scheduling result; If the current scheduling state does not meet the preset feedback triggering conditions, return to step S2. The feedback triggering conditions may include: missing key parameters of the tool, the adjustment range of the scheduling scheme exceeding the preset threshold, and / or conflicts between scheduling objectives; the feedback request may include a decision-making request, or may also include a textual and graphical summary of the current scheduling status, a description of the specific problem requiring user decision, and historical scheduling experiences similar to the current scheduling status retrieved from the historical scheduling experience library. The historical scheduling experience may include records of historical user semantic guidance and its scheduling effects, which are presented to the user as reference suggestions.
[0069] Specifically, in step S6, if the optimization convergence detection result indicates that the optimization has converged, the agent invokes a large language model to integrate and analyze all tool execution results, quality assessment results of each round, and optimization convergence detection results, generating a structured comprehensive report. This comprehensive report may include the following: scheduling problem diagnosis, optimization suggestions, risk warnings, and scheduling decision-making basis. Simultaneously, the agent can also associate and store key nodes in the current optimization round of the current scheduling process, user feedback information (e.g., user semantic guidance), scheduling scheme information, corresponding quality assessment results, and optimization convergence detection results (which may also include scheduling strategy adjustments and comparisons of scheduling quality scores before and after adjustments) as scheduling experience records. These records are stored in a historical scheduling experience database and anchored to corresponding scheduling entities in the relevant knowledge base of the scheduling domain, such as affected production lines, equipment, and orders, for subsequent scheduling tasks to retrieve and reference based on scheduling structure features in step S2.
[0070] Specifically, after step S6, the production planning and scheduling method based on natural language interaction provided in this application embodiment may further include: the agent calling a large language model to automatically extract historical scheduling experience and user preference information from the current optimization round and the user's dialogue, and storing it in a historical scheduling experience database after structuring it according to preset categories (including context information, scheduling decision records, scheduling constraint rules, and user preference settings). The confidence decay of historical scheduling experience in the historical scheduling experience database is calculated, and the confidence decay formula is: ,in, Indicates historical scheduling experience At age And the number of times it can be reused is Current confidence level at that time , Indicates historical scheduling experience The initial confidence level is automatically estimated by the large language model during extraction. , Indicates the age of historical scheduling experience. It is a non-negative real number. This represents the time interval from the creation time to the current time, based on historical scheduling experience. This represents the cumulative number of times historical scheduling experience has been successfully retrieved and adopted by users. This indicates the preset aging rate. This indicates the preset enhancement factor. and The hyperparameters are preset and and It is a positive real number. This represents the preset minimum valid confidence threshold. This represents the dynamic disturbance factor of the scheduling environment, used to reflect the degree of change in the experience-anchored scheduling entity. , Based on historical scheduling experience The set of scheduling entities For entities Based on historical scheduling experience The extent of change from the creation time to the current time. The preset environmental sensitivity coefficient, Indicates historical scheduling experience Total number of reuses Indicates historical scheduling experience by Scene structure similarity during reuse This represents the preset scenario matching amplification factor; historical scheduling experiences with confidence levels below the preset minimum effective confidence threshold are marked as pending elimination to prevent the reuse of expired historical scheduling experiences, forming a non-linear experience confidence evolution model. For example, when anchoring entities... When process restructuring or major capacity changes occur, Taking values between 0.6 and 0.8 results in... A sudden drop, forcing the invalidation of experience; For the first Structural similarity of reused scenarios. The scenario matching amplification factor (e.g., set to 0.7) represents the initial confidence level of a historical scheduling experience. Age 30 days, reused 5 times, if the anchor entity (e.g., production line) has not changed ( ), and the average scene structure similarity after 5 reuses ( The confidence level is 0.82. Substituting this into the calculation, the confidence level of the current historical scheduling experience is 0.253. If the production line undergoes subsequent process refactoring ( If the confidence level drops sharply to 0.05, which is below the minimum effective confidence threshold of 0.2, the system will automatically mark the historical scheduling experience as to be discarded to prevent the reuse of expired historical scheduling experience.
[0071] In this embodiment, the agent's internal workflow can be implemented based on a directed graph structure and a state machine model (e.g., a Moore-type state machine built on the LangGraph framework). Unlike traditional linear script execution, this directed graph architecture abstracts the scheduling process into state nodes and transition edges, specifically including seven core state nodes: context preprocessing, intent recognition, plan generation, tool execution, quality assessment, human-machine collaborative decision-making, and report generation. The state machine has two key technical advantages in engineering implementation: (1) Support for abnormal recovery and retry of complex long processes: If the execution is interrupted due to the timeout of the business system interface or the failure of parameter verification at the tool execution node, the state machine can automatically fall back to the plan generation node for partial retry according to the preset transfer conditions (for example, the maximum number of retries is limited to 3 times), without having to restart the entire scheduling task from scratch, thus ensuring the high availability of industrial production scheduling; (2) Human-machine collaboration based on the interruption point mechanism: At the human-machine collaboration decision node, the workflow can be paused and wait for user feedback through the interruption point (Interrupt) mechanism of LangGraph. After the user feedback, the state machine dynamically determines the next transfer target (continue execution, re-plan or terminate) according to the parsing result, thus realizing the seamless integration of automated closed loop and manual intervention.
[0072] The large language model used in this embodiment can be a general-purpose open-source model that has not been fine-tuned (such as Qwen3-32B). To enable the general-purpose model to demonstrate its expertise in the scheduling domain, this application also designs four collaborative guidance mechanisms to address the technical shortcomings of general-purpose LLMs when directly applied to scheduling scenarios, such as the tendency to produce illusions, lack of domain knowledge, and uncontrollable output:
[0073] (1) Dynamic knowledge injection mechanism (to solve domain knowledge gaps): Basic domain knowledge such as process specifications and material BOMs are retrieved from the vector database, and structured scheduling experience is retrieved from the historical scheduling experience base. The retrieval results are dynamically injected into the context window to make up for the knowledge blind spots of the general model in the vertical domain of scheduling and improve the accuracy of reasoning;
[0074] (2) Output space constraint mechanism (preventing scheduling logic illusion): By setting preset constraints (such as the tool call sequence not containing manual interaction steps, must meet data transfer closure constraints, and start with obtaining status tools and end with submitting tools), the output space of the model is strictly limited, requiring the model to only generate tool call sequences that conform to preset formats and scheduling lifecycle management, thereby avoiding the generation of irrelevant or business rule violations from the root.
[0075] (3) Middleware correction and guardrail mechanism (to ensure operational safety): The middleware pipeline (automatic parameter filling, safety interception, loop detection, etc.) is executed by the tool to perform multi-level verification and correction on the structured parameters generated by the model, which makes up for the shortcomings of the general model in numerical calculation and detail control, and ensures the safety and correctness of scheduling operations.
[0076] It should be understood that the above selection of large language models is merely illustrative. The technical solutions of this application can use any large language model with sufficient reasoning capabilities without departing from the protection scope of this invention.
[0077] The production planning and scheduling method and system based on natural language interaction provided in this application abandons the cumbersome interaction methods of traditional APS systems based on high-frequency clicks, interface switching, and manual parameter input using a graphical user interface. It adopts a natural language dialogue interaction mode, where users only need to input natural language scheduling requirements, and the intelligent agent can autonomously complete the entire process of tool invocation, data query, and scheduling iteration adjustment. This significantly reduces manual operation steps, effectively lowers the cognitive load and operational intensity of planners, and significantly improves scheduling efficiency. By using a large language model to decouple the roles of scheduling generation and independent quality assessment, and in conjunction with a quantitative quality assessment function and convergence judgment mechanism, it can autonomously complete the quantitative assessment of scheduling quality and optimization convergence detection, automatically determining whether the scheduling scheme has reached the optimal stable state. This forms a fully automatic closed-loop optimization system of plan generation, tool execution, quality assessment, and iterative optimization, overcoming the technical shortcomings of traditional APS systems that cannot autonomously assess scheduling quality and can only mechanically execute fixed algorithms, and existing LLM agents that only verify execution results and lack quantitative optimization capabilities. Furthermore, it can update scheduling domain-related knowledge and historical scheduling experience by setting up an update mechanism. This system automatically extracts key information such as scheduling decision-making experience and user preferences from scheduling dialogues and iterations. After being structured and persistently stored, it can be intelligently retrieved and reused in subsequent scheduling tasks. This transforms individual implicit scheduling experience into standardized knowledge assets that can be inherited and reused by the enterprise, effectively solving the problems of easy loss of traditional scheduling experience, long training cycles for new employees, and difficulty in reusing experience. Compared with the simple confirmation and cancellation flat interaction of existing technologies, this application can identify scenarios such as missing parameters and multi-objective conflicts based on real-time scheduling context, and guide users to complete tasks through a multi-level human-machine collaboration mechanism. The strategy selects the best approach, balancing intelligent autonomous execution with the professionalism of human decision-making, and adapts to the differentiated collaborative needs of complex production scheduling. In addition, it can achieve full-process control of tool calls through tool execution middleware pipelines, and complete automatic parameter filling, security interception, loop detection, version snapshot retention, and result persistence processing before and after the call. This effectively avoids parameter errors, invalid calls, and illegal operations, and achieves full traceability of scheduling operations and rollback of anomalies. The mechanism ensures the security, stability, and rigor of the intelligent scheduling iteration process, and adapts to the high reliability application requirements of industrial production scheduling.
[0078] It should be noted that the production planning and scheduling system based on natural language interaction provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of this application can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of this application are only for distinguishing the various modules or steps and are not considered as an improper limitation of this application.
[0079] A third aspect of the embodiments of this application also provides an electronic device, the electronic device comprising:
[0080] At least one processor; and.
[0081] A memory communicatively connected to at least one of the processors; wherein,
[0082] The memory stores instructions that can be executed by the processor to implement the above-described production planning and scheduling method based on natural language interaction.
[0083] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The programs corresponding to the software modules and method steps can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0085] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.
[0086] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0087] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application, and should all be included within the protection scope of this application.
Claims
1. A production planning and scheduling method based on natural language interaction, characterized in that, Includes the following steps: Step S1: The intelligent agent receives user input through the user terminal. The user input includes natural language instructions and / or documents. When the user input includes documents, the document is formatted, parsed, sliced, and vectorized by text embedding and stored in the vector database. The unique identifier of the document in the vector database is associated with the natural language instructions. Step S2: The agent calls a large language model to perform semantic parsing and intent recognition on the user input, and transforms the user input into a structured scheduling task description. Obtain information on available tools in the production planning and scheduling business system; Retrieve relevant knowledge bases and / or historical scheduling experience bases in the scheduling domain to construct contextual information; The large language model is invoked to generate a tool call sequence that conforms to preset data dependency constraints based on the scheduled task description, the available tool information, and the context information. The available tool information includes the functional description and parameter format of each tool. The tool call sequence defines multiple tools that are executed sequentially to complete the scheduled task and the calling order of the multiple tools. Step S3: The intelligent agent sequentially calls the tools of the production planning and scheduling business system according to the tool call sequence, and obtains the execution results of each tool; Step S4: The agent calls the large language model to perform quality assessment and optimization convergence detection based on the execution results of the tool, and obtains the quality assessment results and optimization convergence detection results. Step S5: If the optimization convergence detection result is that the optimization has not converged, the agent adds the quality evaluation result to the context information and returns to step S2. Step S6: If the optimization convergence detection result is that the optimization has converged, the agent calls the large language model to generate a comprehensive report based on the execution results of all tools, the quality assessment results of each round, and the optimization convergence detection result. The comprehensive report includes scheduling problem diagnosis, optimization suggestions, risk warning, and scheduling decision basis.
2. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, In step S2, the scheduling domain association knowledge base organizes scheduling domain knowledge in a multi-layered association structure. The scheduling domain association knowledge base includes: a physical resource layer, which contains production lines, equipment, and material entities, as well as the substitution and sharing relationships of production lines, equipment, and material entities; a process capability layer, which contains the process steps executed by each physical resource and the sequential relationship of the processes corresponding to each physical resource; and a constraint rule layer, which contains capacity constraints, material constraints, delivery date constraints, and process route constraints. The physical resource layer, the process capability layer, and the constraint rule layer are connected by association edges. Physical resource layer nodes are connected to process capability layer nodes by capability edges, and process capability layer nodes are connected to constraint rule layer nodes by constraint edges.
3. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, In step S2, when generating the tool call sequence, the large language model also extracts a subset of constraints associated with the key entity of the current scheduling task from the scheduling domain-related knowledge base. The key entity of the current scheduling task is obtained from the scheduling task description. The subset of constraints includes the capability upper limit and constraint conditions of the key entity of the current scheduling task, so that the large language model is limited by the capability upper limit and constraint conditions during the generation process to prevent the generation of operations that violate the physical constraints of the scheduling domain.
4. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, The preset data dependency constraints include: the tool call sequence does not contain any manual interaction steps, and two adjacent consecutive tools satisfy a data transitive closure relationship. Furthermore, when regenerating the tool call sequence, the sequence begins with the tool that obtains the current scheduling status and ends with the tool that submits the scheduling result. The data transitive closure relationship is defined as follows: the output data structure of the tool preceding the tool in the tool call sequence contains all the required input parameters of the adjacent subsequent tool. The transitive closure constraint formula characterizing the data transitive closure relationship is: ,in, Indicates the sequence of tool calls. The number of tools in the tool call sequence. Indicates the first The tool that is invoked. Representation tools The set of required input parameters, Representation tools The set of output data fields, Represents the initial set of context information. Indicates the first part of the tool call sequence The union of data produced by each tool This represents the set of edges in the directed acyclic graph corresponding to the process route of the currently scheduled task. This represents a directed edge in the process route diagram and indicates a process. In the process Completed previously Indicates processing steps The execution order index of the tool in the tool call sequence. Indicates processing steps The execution order index of the tool in the tool call sequence; The intelligent agent acquires available tool information from the production planning and scheduling business system, including: sending a tool information query request to the production planning and scheduling business system through a communication interface; and receiving available tool information returned by the production planning and scheduling business system through the communication interface. The available tool information includes tool name, function description, and parameter format, and the parameter format includes input parameter format and output parameter format. Step S2, before generating a tool call sequence that conforms to preset data dependency constraints based on the scheduling task description, the available tool information, and the context information, further includes: the agent using a multi-dimensional feature-weighted scheduling experience similarity retrieval function to search a scheduling domain-related knowledge base and / or a historical scheduling experience base, obtaining historical scheduling experience whose multi-dimensional feature-weighted scheduling experience similarity retrieval function value is greater than or equal to a preset retrieval threshold. The historical scheduling experience includes historical tool call sequences, historical scheduling parameter setting records, and historical scheduling decision records. The historical scheduling experience is then added to the context information. The multi-dimensional feature-weighted scheduling experience similarity retrieval function is: ,in, This describes the features of the current scheduling scenario. This refers to a scheduling knowledge entry in the scheduling domain-related knowledge base or an experience record in the historical scheduling experience base, wherein the scheduling knowledge entry and the experience record belong to the historical scheduling experience. This is the semantic embedding vector of the current scene extracted by the text embedding model. These are semantic embedding vectors of scheduling knowledge or experience records extracted by a text embedding model. , For the set of real numbers, For embedded dimensions, Represents cosine semantic similarity. and These are the current scenario constraint set and the historical scheduling experience constraint set, respectively. For the current scene 3D optimization objective vector, Based on historical scheduling experience 3D optimization objective vector, , To optimize the dimension of the target vector, Represents Euclidean distance. This represents the similarity between the optimization objective vector of the current scenario and the optimization objective vector of historical scheduling experience. This represents the preset semantic similarity fusion weight coefficient. This represents the preset constraint similarity fusion weight coefficient. This represents the preset target similarity fusion weight coefficient. This represents the Jaccard similarity between the current set of constraints and the historical set of scheduling experience constraints. , This represents the preset similarity weight coefficient of the process topology diagram. Indicates the edit distance of the process topology diagram. , The set of node mappings representing the process topology graph. The cost of replacing, deleting, or inserting a node. The cost of performing replacement, deletion, or insertion simultaneously. and These represent different process topology diagrams. Representing the process topology diagram The node, Representing the process topology diagram A set of nodes, used to represent entities participating in the scheduling tasks. Representing the process topology diagram The edge, Representing the process topology diagram The set of edges is used to represent the relationships between entities participating in the scheduling task. Indicates from arrive Node mapping, Indicates in mapping Down Nodes in exist The corresponding node in Indicates in mapping Down The edge in exist The corresponding edge in, express The total number of nodes, express The total number of edges, min represents the minimum value, and max() represents the maximum value function.
5. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, The intelligent agent sequentially invokes the tools of the production planning and scheduling business system according to the tool invocation sequence, and obtains the execution results of each tool, including: For each tool in the tool call sequence, the agent calls the large language model, generates structured parameters for the tool based on the current context information and the parameter format information of the tool, and sends a tool call request containing the structured parameters to the production planning and scheduling business system through a communication interface, and receives the tool execution result returned by the production planning and scheduling business system. The current context information includes at least the original user input and the execution result of the executed tool. Step S3, before calling the large language model to generate the structured parameters, further includes: processing each tool in the tool call sequence using a tool execution pre-middleware pipeline, wherein the pre-middleware includes at least one of parameter auto-filling middleware, security interception middleware, or loop detection middleware; Step S3, after receiving the tool execution result, further includes: processing each tool in the tool call sequence using a tool execution post-middleware pipeline, wherein the tool execution post-middleware includes at least one of version management middleware or tool result middleware; Step S3 further includes: after obtaining the execution results of each tool, the agent adds the tool execution results to the context information.
6. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, The quality assessment and optimization convergence detection based on the execution results of the tool include: A comprehensive scheduling quality score is calculated based on the scheduling delivery achievement rate, key resource utilization rate, scheduling bottleneck elimination degree, and scheduling solution feasibility score. The comprehensive score of the multi-dimensional scheduling quality is used as the quality assessment result, whereby... , Indicates the first A comprehensive score for multi-dimensional scheduling quality optimization. Indicates the current optimization round number. This represents the total number of evaluation dimensions. and This indicates the evaluation dimension number. The evaluation dimensions include schedule delivery achievement rate, key resource utilization rate, degree of schedule bottleneck elimination, and schedule solution feasibility score. Indicates the first Round of optimization Adaptive weights for each evaluation dimension , , They represent the first The assessment dimensions and the first Scoring functions for each evaluation dimension , , Indicates the first The scheduling state vector of round optimization, , Represents the set of real numbers. for vector dimension, This represents a predefined set of global constraints. The preset scheduling hard constraint penalty strength coefficient, This indicates a hard constraint on scheduling. This represents the set of hard constraints for scheduling, which includes material inventory constraints, process route constraints, and capacity limits for critical equipment. Indicates the first A function quantifies the degree of violation of a hard constraint, defined according to the constraint type. The preset penalty nonlinearity coefficient, , They represent the first Dimensions and the The ideal value of the preset dimension can be achieved. and They represent the first Dimensions and the The adaptive sensitivity coefficient of the dimension. and They represent the first Dimensions and the Preset initial weights for dimensions, , They represent the first The assessment dimension and the first The correlation function between each evaluation dimension and the current scheduling bottleneck resources. , ,in , These represent the current sequence number (number) in the current schedule. The assessment dimensions and the first A set of bottleneck resources whose load rate exceeds a preset threshold across multiple evaluation dimensions. bottleneck resources The load, bottleneck resources Available capacity The preset bottleneck resource weight enhancement coefficient, and max() represents the maximum value function; Calculate the optimal convergence composite criterion function ,in, , , , This indicates the preset length of the observation sliding window. It is a positive integer. Indicates the optimization round sequence number. This represents the preset average improvement convergence threshold. This represents the preset convergence threshold for the variance of the scoring sequence. and It is a positive real number. Indicates the first A comprehensive score for the multi-dimensional scheduling quality of the wheel. Represents the variance function. Indicates the nearest observation within the sliding window The arithmetic mean of the comprehensive score for multi-dimensional scheduling quality. Indicates the first Pareto hypervolume of the round-robin scheduling scheme set in multidimensional objective space , Represents the scheduling state vector. Indicates the first The set of non-dominated solutions obtained by round optimization Indicates the first The non-dominated solution set obtained in turn Each scheduling state vector in Find the union of the hypercube regions. Indicates the first Optimize the scoring function on the objective vector in dimensionality. For the first The reference point for the dimensional optimization objective vector. To optimize the dimension of the target vector, For hypervolume calculation functions, Indicates the length of the Pareto hypervolume observation window. This represents the preset convergence threshold for the hypervolume improvement rate. Indicates the first Rotational scheduling scheme Indicates the first -1 round scheduling scheme, Indicates the scheduling scheme for two consecutive rounds. and Structural similarity, , , Indicates the scheduling scheme and Inconsistent process quantities. This represents the total number of processes in a single scheduling scheme. This represents the preset structural stability threshold of the scheme; like If the optimization has converged, then the optimization is considered to have converged; otherwise, the optimization is considered to have not converged.
7. The production planning and scheduling method based on natural language interaction according to claim 1, characterized in that, Before returning to step S2, step S5 further includes human-machine collaborative decision-making: Determine whether the current scheduling status meets the preset feedback triggering conditions. If it does, send a feedback request to the user through the user terminal. The feedback request includes dynamic forms and / or information supplementation requirements. Receive user feedback, parse the feedback to obtain the corresponding decision, and execute the decision; If the preset feedback triggering condition is not met, return to step S2; The feedback triggering conditions include: missing key parameters of the tool, the adjustment range of the scheduling scheme exceeding a preset threshold, and / or a conflict between scheduling objectives. The feedback request may include a decision selection request, or the feedback request may include a decision selection request and historical scheduling experience. Step S6 further includes: the agent associating key nodes, user feedback information, scheduling scheme information, corresponding quality assessment results and optimization convergence detection results in the current optimization round execution process into a scheduling experience record, and storing the scheduling experience record in the historical scheduling experience database.
8. The production planning and scheduling method based on natural language interaction according to any one of claims 1-7, characterized in that, Following step S6, the process further includes accumulating and updating scheduling experience, which includes: The intelligent agent invokes the large language model to automatically extract historical scheduling experience and user preference information from the current optimization round and the user's dialogue. This historical scheduling experience and user preference information are then structured according to preset categories and stored in a historical scheduling experience database. The preset categories include: context information, scheduling decision records, scheduling constraint rules, and user preference settings. The confidence decay formula for historical scheduling experience in the historical scheduling experience database is as follows: ,in, Indicates historical scheduling experience At age And the number of times it can be reused is Current confidence level at that time , Indicates historical scheduling experience The initial confidence level is automatically estimated by the large language model during extraction. , Indicates the age of historical scheduling experience. For non-negative real numbers, This represents the time interval from the creation time to the current time, based on historical scheduling experience. This represents the cumulative number of times historical scheduling experience has been successfully retrieved and adopted by users. This indicates the preset aging rate. This indicates the preset enhancement factor. and The hyperparameters are preset and and It is a positive real number. This represents the preset minimum valid confidence threshold. This represents the dynamic disturbance factor of the scheduling environment. , Based on historical scheduling experience The set of scheduling entities For entities Based on historical scheduling experience The extent of change from the creation time to the current time. The preset environmental sensitivity coefficient, Indicates historical scheduling experience Total number of reuses Indicates historical scheduling experience by Scene structure similarity during reuse This indicates the preset scene matching amplification factor; historical scheduling experiences with confidence levels lower than the preset minimum effective confidence threshold are marked as pending elimination.
9. A production planning and scheduling system based on natural language interaction, characterized in that, include: The user terminal is used to receive natural language commands and uploaded documents input by the user through a dialogue interface, transmit the natural language commands and documents to the intelligent agent, receive the scheduled task execution process information and comprehensive report transmitted by the intelligent agent, and display the scheduled task execution process and comprehensive report to the user. An intelligent agent that integrates a large language model and a workflow engine for executing the production planning and scheduling method based on natural language interaction as described in any one of claims 1 to 8; The communication interface module is used to transmit tool information query requests, tool call requests, and tool execution results between the intelligent agent and the production planning and scheduling business system; The production planning and scheduling business system is used to receive the tool query request and the tool call request, return available tool information according to the query request, execute the corresponding tool according to the tool call request, and return the tool execution result; A scheduling domain-related knowledge base is used to store and manage scheduling domain knowledge in a multi-layered related structure, including a physical resource layer, a process capability layer, and a constraint rule layer. The scheduling domain-related knowledge base supports the retrieval of related knowledge based on scheduling entities. The historical scheduling experience base is used to store and manage structured scheduling experience records. Each scheduling experience record includes a description of the triggering problem, user semantic guidance content, scheduling strategy adjustments and adjustment effects. Each scheduling experience record is anchored to the corresponding scheduling entity in the scheduling domain-related knowledge base. The historical scheduling experience base supports retrieval based on scheduling structure features. A vector database for storing and managing vectorized scheduling document data, and supporting document retrieval based on semantic similarity.
10. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions executable by the processor to implement the production planning and scheduling method based on natural language interaction as described in any one of claims 1-8.