Supply chain intelligent task optimization method and device based on language model
Through a language model-based approach, the GPT algorithm is used to extract key information from task data and construct a feature matrix for demand forecasting and inventory optimization. This solves the flexibility and adaptability problems of data processing in traditional supply chain management, achieves efficient demand forecasting and inventory adjustment, and improves the overall performance and user interaction of supply chain management.
Patent Information
- Application Number
- CN202410812387.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-17
- Filing Date
- 2024-06-21
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-06-21
AI Technical Summary
Traditional supply chain management methods lack flexibility and adaptability when processing unstructured data, resulting in information lag and slow response in the decision-making process. It is difficult to quickly obtain an accurate picture of the supply chain status, affecting the quality of decision-making and the speed of execution.
A language model-based approach is adopted, and the GPT algorithm is used to identify and extract key information from task data, construct a feature matrix for demand forecasting, combine optimization goals and priority sorting, automatically adjust product inventory distribution, and provide a user-friendly interactive interface for confirmation or modification.
It improves the overall efficiency and responsiveness of supply chain management, provides efficient and accurate demand forecasting and inventory optimization, and enhances user interaction and decision support.
Smart Images

Figure CN118840047B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular to a method and device for optimizing supply chain intelligent tasks based on a language model. Background Art
[0002] In modern supply chain management, companies face an increasingly complex and dynamic market environment. With globalization and rapidly changing market demands, traditional supply chain management methods often fail to effectively address demand fluctuations, inventory optimization, and data processing requirements. This is especially true when dealing with large amounts of unstructured data from diverse sources. The integration and analysis of this data becomes both crucial and challenging.
[0003] Traditional supply chain solutions rely primarily on periodic demand forecasting and inventory reviews. These approaches are often based on historical sales data and simple statistical models, often ignoring real-time market dynamics and complex data relationships. Furthermore, traditional models often lack flexibility and adaptability in data processing and interpretation, leading to information lags and slow responses in decision-making.
[0004] User interactions related to supply chain management decisions are often non-automated, relying on manual analysis and interpretation, which is both time-consuming and inefficient. In many cases, decision makers struggle to quickly obtain an accurate picture of the supply chain's status or understand the logic behind complex data analysis, impacting both the quality of decisions and the speed of execution.
[0005] Therefore, there is an urgent need for a new supply chain management method that provides a user-friendly interactive interface to provide decision support to improve the overall efficiency and responsiveness of the supply chain. Summary of the Invention
[0006] In response to the above-mentioned defects in the prior art, the present invention provides a supply chain intelligent task optimization method based on a language model, comprising:
[0007] Obtain supply chain task data and identify and extract key information;
[0008] Analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information;
[0009] Based on product demand forecast data, provide product inventory distribution adjustment plans that include all task addresses;
[0010] Confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan to achieve intelligent task optimization of the supply chain.
[0011] Among them, recognition and extraction processing includes: using the GPT algorithm of natural language processing (NLP) technology to identify and extract key information from task data.
[0012] The task data includes unstructured data and structured data; identification and extraction processing include:
[0013] The GPT model structures unstructured data;
[0014] The GPT model predicts the category of the task data based on all structured data;
[0015] Based on the category of the task data, the GPT model identifies and extracts key information from all structured data.
[0016] The key information includes at least product name, quantity, task address, and time.
[0017] Among them, the product demand forecast data for different task addresses is analyzed and generated, including:
[0018] Obtain key features from the recognition and extraction processing results, including product name, quantity unit, task address, time and status tags;
[0019] Constructing a corresponding feature matrix based on key features includes:
[0020] Let t be the original time data, convert t into the number of days d starting from the reference time point; for product name p and task address l, use one-hot encoding to convert them into binary vectors and ; Determine the quantity of product demand as y s ;
[0021] Combine feature matrix, combine all features into a feature matrix X, where
[0022] After constructing the feature matrix, the feature matrix is processed, including: first, Sort by task address within each product category. Sort and sort out the historical sales data for each product name p and each task address l.
[0023] The process of analyzing and generating product demand forecast data for different task addresses includes determining a global forecast sales volume and a forecast sales volume for the task address, and providing product demand forecast data for the different task addresses based on an objective function and combining the global forecast sales volume and the forecast sales volume for the task address;
[0024] Determine the global forecast sales volume G, which is defined as the sum of the forecast sales of all task addresses and products: G = ∑ l L(p, l, t), where L(p, l, t) represents the predicted sales volume of product name p at task address l at time t;
[0025] Determine the predicted sales volume of the task address. For each task address l, the predicted sales volume L(p,l,t) should reflect the recent sales volume.
[0026] The objective function is defined as:
[0027] minimize∑ l [L(p,l,t)·α·local_recent(p,l,t)·D(p,l,t) / (1-α)·local_avg(p,l)] 2 ;
[0028] in,
[0029] α is a weight parameter between 0 and 1 that controls the weight of recent sales and historical sales average in the forecast;
[0030] p: product name identification;
[0031] l: ID of the task address or region;
[0032] t: time identifier, usually indicating the current time or a specific predicted time point;
[0033] local_recent(p, l, t): sales volume of product name p at task address l at time t-1, i.e. the most recent sales data;
[0034] local_avg(p, l): the average demand of product name p at task address l within the considered historical record days;
[0035] D(p, l, t): decay factor, reflecting the purchase saturation and trend of task address l at time t.
[0036] Among them, based on the product demand forecast data, a product inventory distribution adjustment plan including all task addresses is given, including obtaining the product inventory distribution adjustment plan based on the optimization process, or obtaining the product inventory distribution adjustment plan for all task addresses based on priority sorting.
[0037] The product inventory distribution adjustment plan is obtained based on the optimization process, including:
[0038] Adopting the optimization objective to minimize the sum of product inventory gaps and transportation costs at each task address, the product inventory distribution adjustment plan is determined, including:
[0039] minimize∑ l [gap(p, l, t)+K·dist(w, l)·transfer(w, p, l, t)]
[0040] gap(p,l,t)=L(p,l,t)-stock(w,p)
[0041] Where K is a weight parameter that controls the importance of transportation cost in the optimization objective, dist(w, l) is the distance between product warehouse w and task address l, gap(p, l, t) is the inventory gap of product name p at task address l at time t, transfer(w, p, l, t) is the quantity of product name p transferred from product warehouse w to task address l at time t, and stock(w, p) is the current inventory quantity of product name p at product warehouse w.
[0042] Obtain product inventory distribution adjustment plans for all task addresses based on priority sorting, including:
[0043] Calculate the priorities of all task addresses; sort all task addresses in descending order of priority; and adjust product inventory using allocation rules based on the sorting results until the product warehouse inventory is exhausted or the demand for all task addresses is met. The allocation rules satisfy the following relationship:
[0044] transfer(w,p,l,t)=min(stock(w,p),gap(p,l,t))
[0045]
[0046] Where gap(p, l, t) is the inventory gap of product name p at task address l at time t, dist(w, l) is the distance from warehouse w to task address l, and priority(p, l, t) is the priority.
[0047] The product inventory distribution adjustment plan is confirmed or modified, and the final product inventory distribution adjustment plan is given, including:
[0048] After confirming that the user has management user permissions, the product demand forecast data and product inventory distribution adjustment plan are displayed and explained in natural language;
[0049] Also, the user accepts the given product inventory distribution adjustment plan, or the user modifies the product inventory distribution adjustment plan after inputting feedback information.
[0050] The present invention also discloses a supply chain intelligent task optimization device based on a language model, comprising:
[0051] The data processing module is used to obtain the task data of the supply chain and identify and extract key information;
[0052] An analysis and generation module, which is used to analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information;
[0053] An initial plan generation module, which is used to provide a product inventory distribution adjustment plan that includes all task addresses based on product demand forecast data;
[0054] The final plan determination module is used to confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan.
[0055] Among them, the data processing module includes: using the GPT algorithm of natural language processing (NLP) technology to identify and extract key information from task data.
[0056] The data processing module includes:
[0057] The GPT model structures unstructured data;
[0058] The GPT model predicts the category of the task data based on all structured data;
[0059] Based on the category of the task data, the GPT model identifies and extracts key information from all structured data.
[0060] The analysis and generation module includes:
[0061] Analyze and generate product demand forecast data for different task addresses, including:
[0062] Obtain key features from the recognition and extraction processing results, including product name, quantity unit, task address, time and status tags;
[0063] Constructing a corresponding feature matrix based on key features includes:
[0064] Let t be the original time data, convert t into the number of days d starting from the reference time point; for product name p and task address l, use one-hot encoding to convert them into binary vectors and ; Determine the quantity of product demand as y s ;
[0065] Combine feature matrix, combine all features into a feature matrix X, where
[0066] The analysis generation module includes: first, Sort by task address within each product category. Sort and sort out the historical sales data for each product name p and each task address l.
[0067] The analysis and generation module further includes: determining the global predicted sales volume and the predicted sales volume of the task address, and providing product demand forecast data for different task addresses based on the objective function and in combination with the global predicted sales volume and the predicted sales volume of the task address;
[0068] The global predicted sales volume G is defined as the sum of the predicted sales of all task addresses and products: G = ∑ l L(p,l,t), where L(p,l,t) represents the predicted sales volume of product name p at task address l at time t;
[0069] Determine the predicted sales volume of the task address. For each task address l, the predicted sales volume L(p, l, t) reflects the recent sales volume.
[0070] The objective function is defined as:
[0071] minimize∑ l [L(p,l,t)·α·local_recent(p,l,t)·D(p,l,t) / (1-α)·local_avg(p,l)] 2 ;
[0072] Where,
[0073] α is a weight parameter between 0 and 1 that controls the weight of recent sales and historical sales average in the forecast;
[0074] p: product name identification;
[0075] l: ID of the task address or region;
[0076] t: time identifier, indicating the current time or a specific predicted time point;
[0077] local_recent(p, l, t): sales volume of product name p at task address l at time t-1;
[0078] local_avg(p,l): the average demand of product name p at task address l within the considered historical record days;
[0079] D(p,l,t): decay factor, reflecting the purchase saturation and trend of task address l at time t.
[0080] The initial plan generation module includes: obtaining a product inventory distribution adjustment plan based on an optimization process, or obtaining a product inventory distribution adjustment plan for all task addresses based on priority sorting.
[0081] The final solution determination module includes:
[0082] After confirming that the user has management user permissions, the product demand forecast data and product inventory distribution adjustment plan are displayed and explained in natural language;
[0083] Also, the user accepts the given product inventory distribution adjustment plan, or the user modifies the product inventory distribution adjustment plan after inputting feedback information.
[0084] The method of the present invention provides efficient and accurate demand forecasting and inventory optimization by integrating and intelligently processing multi-source data, while enhancing user interaction and decision support, greatly improving the overall performance and efficiency of supply chain management. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0086] Figure 1 The flowchart shows a supply chain intelligent task optimization method based on a language model according to an embodiment of the present invention.
[0087] Figure 2 2 is a schematic diagram illustrating a supply chain intelligent task optimization device based on a language model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0088] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only some, not all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.
[0089] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a," "an," "the," and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, and unless the context clearly indicates otherwise, "a plurality" generally includes at least two.
[0090] It should be understood that although the terms "first," "second," "third," etc. may be used to describe "...," these "..." should not be limited to these terms. These terms are merely used to distinguish "...." For example, "first..." could also be referred to as "second...", and similarly, "second..." could also be referred to as "first..." without departing from the scope of the present invention.
[0091] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0092] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0093] It should also be noted that the terms "include," "comprises," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a product or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such product or device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the product or device comprising the element.
[0094] Supply chain management typically involves processing large amounts of data, including but not limited to emails, orders, and accounting documents. Traditional methods rely on manual processing of this data, which is time-consuming and prone to errors. To address this problem, this paper proposes an automated solution that can efficiently process and analyze supply chain data and support real-time decision-making.
[0095] Traditional demand forecasting methods often rely on historical sales data and lack a quick response to emergencies or market changes. This method leverages extracted data through a demand forecasting and inventory reset module to improve forecast accuracy and response speed. In scenarios with multi-task address distribution, the complexity of inventory management increases, making it difficult for traditional methods to achieve efficient inventory optimization. This method's multi-task address inventory optimization module can automatically adjust product inventory distribution, solving the problem of excess or shortage inventory and improving resource utilization. In complex supply chain management, decision makers need to understand complex data analysis results and the output of forecasting models.
[0096] like Figure 1 As shown in FIG, the supply chain intelligent task optimization method based on the language model includes:
[0097] Acquire task data from multiple sources in the supply chain and identify and extract key information;
[0098] Analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information;
[0099] Based on product demand forecast data, provide product inventory distribution adjustment plans that include all task addresses;
[0100] Confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan to achieve intelligent task optimization of the supply chain.
[0101] Specifically, the Data Integration and Information Extraction module processes task data from multiple sources. The extracted data is then transmitted to the Demand Forecasting and Inventory Repositioning module for analysis and generation of demand forecast data. The Multi-task Address Inventory Optimization module receives the forecast data and automatically generates a product inventory distribution adjustment plan encompassing all task addresses. Users interact with the interactive module to obtain recommendations and explanations for the product inventory distribution adjustment plan. By integrating and intelligently processing multi-source data, the method provides efficient and accurate product demand forecast data and inventory optimization, while enhancing user interaction and decision support, significantly improving the overall performance and efficiency of supply chain management.
[0102] Task data includes both unstructured and structured data. The data integration and information extraction module uses the GPT algorithm, a natural language processing (NLP) technology, to automatically identify and extract key information from unstructured data sources (emails, reports) within the task data (text data). This includes text classification and named entity recognition techniques to extract data points such as date, task address, and quantity. The task address can be the location where the product is received.
[0103] The Data Integration and Information Extraction module uses a GPT-based natural language processing algorithm. During the preprocessing (structuring) phase, the GPT model converts unstructured data from multiple sources into structured data that the GPT model can understand, for example by segmenting text into tokens. The module collects data from various unstructured data sources (such as emails, PDF reports, and electronic vouchers) through API calls or by directly exporting data from internal enterprise systems. It then removes extraneous characters such as HTML tags, special symbols, and extraneous spaces.
[0104] You need to select a suitable pre-trained GPT model. OpenAI provides multiple versions of GPT models, such as GPT-3, which has been pre-trained on large-scale text data. Select a pre-trained GPT model and fine-tune it on a specific dataset to adapt to specific text classification and named entity recognition tasks. The GPT model structures unstructured data; based on all structured data, the GPT model predicts the category to which the task data belongs (such as order information, accounting documents, etc.); based on the category to which the task data belongs, a specially adjusted and adapted GPT model is used to identify all structured data and extract key information.
[0105] Fine-tune the GPT model using a labeled classification dataset, including setting an appropriate learning rate, batch size, and number of iterations. During fine-tuning, the final layer of the model needs to be customized to output specific category predictions. During fine-tuning, continuously validate the model's performance on an independent validation dataset to monitor for overfitting and adjust training parameters.
[0106] The GPT algorithm is used to classify the input task data and identify the subject or category of the task data. Classification helps the system understand the main purpose and content of the document, thereby more accurately targeting information extraction.
[0107] After identifying the topic or category, the task data is sent to the corresponding GPT model for key information extraction, and the GPT model outputs structured data containing key information, wherein the GPT model is fine-tuned corresponding to the text category.
[0108] Use the fine-tuned GPT model, combined with named entity recognition (NER) technology, to extract specific information from the text, including:
[0109] Label entities (key information) in the training data, including product name, quantity, task address, time, and status labels.
[0110] The GPT model is further trained and fine-tuned using the labeled dataset to enable it to identify and extract specific information from documents. The classified text is fed into the fine-tuned model, which then identifies and extracts key information.
[0111] Convert the identified key information into a structured format, such as JSON or XML, for further processing and analysis.
[0112] For example, after analyzing an order document, the NER-based GPT model outputs the following: [
[0114] {
[0115] "Product Name": "Example Product",
[0116] "Quantity":"1000",
[0117] "Task Address":"Shanghai",
[0118] "Time":"2024-01-15",
[0119] "Status Label": "Shipped"
[0120] },
[0121] {
[0122] "Product Name": "Another Product",
[0123] "Quantity":"500",
[0124] "Task Address":"Beijing",
[0125] "Time":"2024-01-15",
[0126] "Status Label": "Pending Shipment"
[0127] } ]
[0129] Use Keras or another deep learning framework to build an LSTM model. Train the model using historical data, which refers to previous supply chain data organized in chronological order. Continuously track product sales records and use this data as input for model training.
[0130] The data processed by the Data Integration and Information Extraction module undergoes a cleansing and standardization process to ensure data quality and consistency. For example, the date format, the naming of task addresses, and the representation of numbers are standardized.
[0131] The cleaned and standardized data is integrated into downstream modules and fed into the demand forecasting and inventory replacement modules for further analysis and decision support. Furthermore, by developing corresponding APIs or service interfaces, other systems or modules can send requests to the model to obtain text classification or entity recognition results.
[0132] The data integration and information extraction module analyzes and generates product demand forecast data for different task addresses. This involves extracting key features from the identification and extraction results (each JSON or XML record), including product name, quantity unit, task address, time, and status tags, and building a feature matrix corresponding to each record. The feature matrix construction specifically includes:
[0133] 1. Time feature processing:
[0134] -Let t be the original time data, for example "2024-01-15".
[0135] - Convert t to the number of days d from some reference time point.
[0136] 2. Category feature encoding:
[0137] -For product name p and task address l, use one-hot encoding to convert them into binary vectors and .
[0138] 3. Quantity:
[0139] - Determine the quantity of product required as y s .
[0140] 4. Combined feature matrix:
[0141] - Combine all features into a feature matrix X, where
[0142] Process the feature matrix, first by product name Sort by task address within each product category Sorting is performed, and for each product p and each task address l, historical purchase data is sorted out, where the cycle time is days or weeks.
[0143] The purpose of the decay factor is to adjust the forecast to account for historical trends and fluctuations in product demand. This is based on overall historical average sales volume, recent sales volume, and the purchase history of the specific task address. The decay factor calculation process includes:
[0144] The global historical average sales volume global_avg is calculated as follows, where Y(p,i) represents the total demand for product p across all task addresses, and n is the number of days of historical records considered:
[0145]
[0146] Historical average sales volume for a specific task address:
[0147] The historical average sales volume localavg(p, l) for a specific task address l is calculated as follows, where Y(p, l, i) is the most recent demand for product p at task address l at time i;
[0148] Average demand:
[0149] Recent sales volume of task address l:
[0150] The recent sales volume of task address l, local recent(p, l, t), is defined as the sales volume of product p at task address l in the most recent period (i.e., time t-1): loca_recent(p, l, t) = Y(p, l, t-1).
[0151] The decay factor D(p, l, t) reflects the purchase saturation and trend of the task address l at time t and is defined as follows:
[0152]
[0153] Among them, β and γ are adjustable weight parameters, which are used to control the influence of different factors on the attenuation factor.
[0154] The process of analyzing and generating product demand forecast data for different task addresses includes determining a global forecast sales volume and a forecast sales volume for the task address, and providing product demand forecast data for the different task addresses based on an objective function and combining the global forecast sales volume and the forecast sales volume for the task address;
[0155] The global predicted sales volume G is defined as the sum of the predicted sales of all task addresses and products: G = ∑ l L(p, l, t), where L(p, l, t) represents the predicted sales volume of product p at task address l at time t.
[0156] Determine the predicted sales volume for the task address. For each task address l, the predicted sales volume L(p, l, t) should reflect the impact of the recent sales volume local_recent(p, l, t) and the decay factor D(p, l, t), as well as the impact of the historical sales average local_avg(p, l). Optionally, the objective function is defined as:
[0157] minimize∑ l [L(p,l,t)·α·local_recent(p,l,t)·D(p,l,t) / (1-α)·local_avg(p,l)] 2 ;
[0158] Here, α is a weight parameter between 0 and 1, which controls the weight of recent sales and historical sales average in the forecast.
[0159] Optionally, in order to make the global predicted sales volume G approach the global average sales volume global_avg, the objective function can be: minimize∑ l [L(p,l,t)·α·local_recent(p,l,t)·D(p,l,t) / (1-α)·local_avg(p,l)] 2+λ·(G-globa_avg) 2 .
[0160] The parameters in the above process are defined as follows:
[0161] -p: Product ID.
[0162] -l: The identifier of the task address or region.
[0163] -t: time identifier, usually indicating the current time or a specific predicted time point.
[0164] -n: Number of days of history, that is, the number of days considered when calculating the average sales.
[0165] -Y(p,i): The total demand for product p at all task locations at time i.
[0166] -Y(p, l, t): the demand for product p at a specific task location l at time i.
[0167] -local_recent(p,l,t): The sales volume of product p at task address l at time t-1, that is, the most recent sales data.
[0168] -global_avg: The average total demand for all task locations and products within the considered historical days.
[0169] -localavg(p,l): the average demand of product p at task address l during the considered historical record days.
[0170] -β: Weight parameter, used to adjust the impact of recent sales volume on the attenuation factor.
[0171] -γ: Weight parameter, used to adjust the impact of historical average sales volume on the attenuation factor.
[0172] -D(p, l, t): decay factor, reflecting the purchase saturation and trend of task address l at time t.
[0173] -L(p, l, t): The predicted sales volume of product p at task location l at time t.
[0174] -α: A weight parameter, between 0 and 1, that controls the relative importance of recent sales versus the historical sales average in the forecast.
[0175] -λ: Weight parameter used to adjust the impact of the deviation between the global predicted sales volume and the global average sales volume.
[0176] -G: The total predicted sales of all task addresses and products, i.e. the global predicted sales volume.
[0177] The product inventory distribution adjustment plan is obtained based on the optimization process, including:
[0178] The data obtained include the predicted demand for each product at each task address in the future period of time, and the estimated demand L(p, l, t) for the product at each task address l at the future time t is determined.
[0179] Determine the distance between the warehouse and each task address, and define dist(w, l) as the distance between warehouse w and task address l.
[0180] Determine the existing inventory of the warehouse and define stock(w,p) as the inventory of product p in warehouse w.
[0181] Calculate the inventory gap of each task address and define gap(p, l, t) as the inventory gap of product p at task address l at time t: gap(p, l, t) = L(p, l, t) - stock(w, p).
[0182] Determine inventory allocation strategy:
[0183] Define transfer(w,p,l,t) as the quantity of product p transferred from warehouse w to task location l at time t. This quantity is determined based on the inventory gap gap(p,l,t) and transportation costs. The optimization objective is to minimize the sum of the inventory gap and transportation costs for each task location:
[0184] minimize∑ l [gap(p, l, t)+K·dist(w, l)·transfer(w, p, l, t)],
[0185] Among them, K is a weight parameter that controls the importance of transportation cost in the optimization objective.
[0186] The product inventory distribution adjustment plan for all task addresses is obtained based on priority sorting, including:
[0187] Define the priority. For each task address l and product p, the inventory allocation priority priority(p, l, t) at time t is calculated as follows:
[0188]
[0189] in,
[0190] -gap(p, l, t) is the inventory gap of product p at task address l at time t.
[0191] -dist(w, l) is the distance from warehouse w to task address l.
[0192] Inventory allocation is determined by firstly following the rules from high to low priority:
[0193] transfer(w,p,l,t)=min(stock(w,p),gap(p,l,t)),
[0194] For the task address l with the highest priority, inventory is allocated according to the above rules, indicating that task addresses with large inventory gaps and close distances are given priority.
[0195] The specific steps include: 1. Calculate the priority (p, l, t) of all task addresses. 2. Sort all task addresses in descending order by priority (p, l, t). 3. Based on the sorting results, use the transfer formula above to adjust inventory until the warehouse inventory is exhausted or the demand of all task addresses is met.
[0196] Optimization problems can generally be solved using various algorithms, such as gradient descent, simulated annealing, genetic algorithms, linear programming, or mixed integer linear programming. For example, since the present invention involves continuous variables and the objective function is nonlinear, a nonlinear optimization algorithm, such as a gradient descent algorithm, is used.
[0197] The following are the steps to solve the problem using gradient descent: First, all variables need to be initialized, which can be set to 0 or random values. For each variable, the gradient of the optimization objective function with respect to it is calculated, that is, the partial derivative of the optimization objective function is calculated.
[0198] Update the variables based on the gradient and the learning rate (a parameter that needs to be set in advance).
[0199] Checking convergence involves repeating the gradient calculation and update steps until a pre-set number of iterations is reached or the change in the optimization objective function is less than a set threshold.
[0200] Confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan, including: after confirming that the user has management user authority, display the product demand forecast data and product inventory distribution adjustment plan, and provide natural language explanation; and, after the user accepts the given product inventory distribution adjustment plan or the user enters feedback information, modify the product inventory distribution adjustment plan.
[0201] Specifically, users interact with the system through an interactive module to obtain suggestions and explanatory information from the system. The module is part of the supply chain intelligent task optimization system, and its main function is to enable users to interact with the system, obtain suggestions and explanatory information from the system, and provide feedback.
[0202] The user interaction interface is the medium for users to interact with the system and can be implemented through a web page, mobile application, or desktop application. On this interface, once the system confirms that the user has administrative user permissions, the system will display product demand forecast data and product inventory distribution adjustment plans, and provide a natural language explanation of the results. Users can interact on the interface regarding the meaning of a specific parameter and the reason for the adjustment. In addition, the interaction interface also provides an input box that can include optional options for the final inventory adjustment results for users to enter feedback information. Users can accept the product inventory distribution adjustment plan provided by the system or manually modify the product inventory distribution adjustment plan. This can be achieved through front-end development technology.
[0203] This method provides an interactive module that enables decision makers to better understand and utilize the output product inventory distribution adjustment plan through intelligent interpretation and suggestions.
[0204] After obtaining product demand forecast data and a product inventory distribution adjustment plan, the GPT model generates easily understandable text explaining the rationale for the adjustment. This can be accomplished by applying a pre-trained language model, such as GPT. Using the forecast and adjustment results as input, the language model generates a text explaining the rationale for the adjustment.
[0205] When generating explanatory text, we take the product demand forecast data and the product inventory distribution adjustment plan as input, and apply the pre-trained GPT model to generate a text explaining why such adjustments are made. The specific steps to achieve this are as follows:
[0206] First, the product demand forecast data and product inventory distribution adjustment plan need to be converted into a form that the GPT model can understand. For example, they can be input into the GPT model in a tabular form. Then, the preprocessed input data is fed to the GPT model. Based on the input data, the model will generate a text explaining why inventory adjustments are required. In specific implementations, the generation mode (also called decoding mode) of the GPT model can be used, such as greedy decoding, beam search decoding, or sampling decoding. The GPT model can be a specially fine-tuned model, including fine-tuning the GPT model using annotated tables and corresponding explanatory data sets, including setting an appropriate learning rate, selecting an appropriate batch size, and number of iterations.
[0207] Finally, the generated text needs to be post-processed. For example, it may be necessary to check whether the generated text contains any inappropriate content, or whether it meets certain length restrictions.
[0208] After the user enters feedback information, including when the user does not accept such modification, the user can modify the product inventory distribution adjustment plan in the feedback information. The system receives and processes the user's feedback information. After receiving the feedback information at the system backend, the management user ID and its feedback content are stored in the database for subsequent review and review.
[0209] The interactive system needs to interact with the database, including writing or reading forecast results, inventory adjustment results and user feedback. The interactive system includes a dedicated GPT module for users to interpret forecast results and inventory adjustment results.
[0210] Therefore, the method of the present invention provides efficient and accurate product demand forecasting and inventory optimization by integrating and intelligently processing multi-source data, while enhancing user interaction and decision support, greatly improving the overall performance and efficiency of supply chain management.
[0211] like Figure 2 As shown, the present invention also provides a supply chain intelligent task optimization device based on a language model, comprising:
[0212] The data processing module is used to obtain the task data of the supply chain and identify and extract key information;
[0213] An analysis and generation module, which is used to analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information;
[0214] An initial plan generation module, which is used to provide a product inventory distribution adjustment plan that includes all task addresses based on product demand forecast data;
[0215] The final plan determination module is used to confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan.
[0216] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0217] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0218] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0219] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0220] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0221] The above introduces the preferred embodiments of the present invention, which is intended to make the spirit of the present invention clearer and easier to understand, and is not intended to limit the present invention. Any modifications, replacements, and improvements made within the spirit and principles of the present invention should be included in the scope of protection outlined by the claims attached to the present invention.
Claims
1. A supply chain intelligent task optimization method based on language model, characterized by: include: Obtaining supply chain task data and performing identification and extraction processing to obtain key information; wherein the key information includes at least product name, quantity, task address, and time; Analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information; Based on the product demand forecast data, a product inventory distribution adjustment plan covering all task addresses is proposed, including adopting an optimization objective to minimize the sum of the product inventory gap and transportation cost of each task address to determine the product inventory distribution adjustment plan, or calculating the priority of all task addresses; sorting all task addresses in descending order of priority; and adjusting product inventory using allocation rules based on the sorting results until the product warehouse inventory is exhausted or the demand of all task addresses is met; Confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan to achieve intelligent task optimization of the supply chain; Among them, the product demand forecast data for different task addresses is analyzed and generated, including: Obtain key features from the recognition and extraction processing results, including product name, quantity unit, task address, time and status tags; Constructing a corresponding feature matrix based on key features includes: Let t be the original time data, convert t into the number of days d starting from the reference time point; for product name p and task address l, use one-hot encoding to convert them into binary vectors and Determine the quantity of product demanded as y s ; Combine feature matrix, combine all features into a feature matrix X, where 2. A supply chain intelligent task optimization method based on a language model as claimed in claim 1, characterized in that: Perform identification and extraction processing to provide key information, including: using the GPT algorithm of natural language processing (NLP) technology to identify and extract key information from task data.
3. The supply chain intelligent task optimization method based on language model according to claim 2, characterized in that: Task data includes unstructured data and structured data; Perform identification and extraction processing, including: The GPT model structures unstructured data; The GPT model predicts the category of the task data based on all structured data; Based on the category to which the task data belongs, the GPT model identifies and extracts key information from all structured data.
4. The supply chain intelligent task optimization method based on language model according to claim 1, characterized in that: After constructing the feature matrix, the feature matrix is processed, including: first, Sort by task address within each product category. Sort and sort out the historical sales data for each product name p and each task address l.
5. The supply chain intelligent task optimization method based on language model according to claim 1, characterized in that: The process of analyzing and generating product demand forecast data for different task addresses includes determining a global forecast sales volume and a forecast sales volume for the task address, and providing product demand forecast data for the different task addresses based on an objective function and combining the global forecast sales volume and the forecast sales volume for the task address; The global predicted sales volume G is defined as the sum of the predicted sales of all task addresses and products: G = ∑ l L(p, l, t), where L(p, l, t) represents the predicted sales volume of product name p at task address l at time t; Determine the predicted sales volume of the task address. For each task address l, the predicted sales volume L(p, l, t) reflects the recent sales volume. The objective function is defined as: minimize∑l[L(p,l,t)·α·local_recent(p,l,t)·D(p,l,t) / (1-α)·local_avg(p,l)] 2 ; Where, α is a weight parameter between 0 and 1 that controls the weight of recent sales and historical sales average in the forecast; p: product name identification; l: ID of the task address or region; t: time identifier, indicating the current time or a specific predicted time point; local_recent(p, l, t): sales volume of product name p at task address l at time t-1; local_avg(p, l): the average demand of product name p at task address l within the considered historical record days; D(p, l, t): decay factor, reflecting the purchase saturation and trend of task address l at time t.
6. A supply chain intelligent task optimization method based on a language model as claimed in claim 5, characterized in that: Average demand: Where n is the number of days of historical records considered, and Y(p, l, i) is the most recent demand for product p at task address l at time i.
7. The supply chain intelligent task optimization method based on language model according to claim 1, characterized in that: Confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan, including: After confirming that the user has management user permissions, the product demand forecast data and product inventory distribution adjustment plan are displayed and explained in natural language; Also, the user accepts the given product inventory distribution adjustment plan, or the user modifies the product inventory distribution adjustment plan after inputting feedback information.
8. A supply chain intelligent task optimization device based on language model, characterized in that: The method for optimizing intelligent supply chain tasks based on a language model according to any one of claims 1 to 7 comprises: The data processing module is used to obtain the task data of the supply chain and identify and extract key information; An analysis and generation module, which is used to analyze and generate product demand forecast data for different task addresses based on the identified and extracted key information; An initial plan generation module, which is used to provide a product inventory distribution adjustment plan that includes all task addresses based on product demand forecast data; The final plan determination module is used to confirm or modify the product inventory distribution adjustment plan and provide the final product inventory distribution adjustment plan.
Citation Information
Patent Citations
System for short-distance pharmaceutical logistics service
CN102915491A
System and method of cyclic boosting for explainable supervised machine learning
US11544724B1