Accessory stockout early warning method and device, medium and program product

By acquiring source data of cigarette production and using Bayesian networks and risk prediction models to assess the risk of auxiliary material shortages, the problem of inventory caused by non-periodic events in existing technologies has been solved, enabling early warning of auxiliary material shortages and ensuring the stability of production plans.

CN121787902APending Publication Date: 2026-04-03CHINA TOBACCO ZHEJIANG IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing technologies, the demand for auxiliary materials is calculated in advance based on the cigarette production plan. However, this approach fails to effectively cope with non-cyclical events such as sudden logistics disruptions, increased sales during holidays, or defects in supplier batches. As a result, the inventory of auxiliary materials may be too high or too low, affecting the production plan.

Method used

By acquiring production source data of auxiliary materials, the prior stockout probability is calculated using a pre-set stockout Bayesian network model and input into the stockout risk prediction model. The stockout risk assessment result is determined by combining the prior probability and the predicted value, and a stockout warning for auxiliary materials is triggered.

Benefits of technology

It enables early warning of material shortages, avoids inventory problems caused by non-cyclical events, and ensures the stability of production plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787902A_ABST
    Figure CN121787902A_ABST
Patent Text Reader

Abstract

The invention discloses an auxiliary material out-of-stock early warning method and device, a medium and a program product. The method comprises the steps of obtaining production source data corresponding to an auxiliary material to be detected; according to the production source data and a preset stockout Bayesian network model, calculating to obtain a prior stockout probability of the to-be-detected auxiliary material; inputting the production source data into a pre-trained stockout risk prediction model to obtain a stockout risk prediction value of the to-be-detected auxiliary material output by the stockout risk prediction model; and according to the prior stockout probability and the stockout risk prediction value of the to-be-detected auxiliary material, determining an auxiliary material stockout risk assessment result of the to-be-detected auxiliary material, and when the auxiliary material stockout risk assessment result does not meet a preset assessment demand, triggering target auxiliary material stockout early warning. According to the scheme of the invention, the stock-out risk prediction value of the auxiliary material is determined according to the production source data, the stock-out risk assessment result of the auxiliary material is obtained in combination with the prior stock-out probability, and the early warning of the stock-out of the auxiliary material is triggered, i.e., the early warning of the stock-out of the auxiliary material is performed, so that the production plan is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cigarette production management technology, and in particular to a method, equipment, medium and program product for early warning of material shortage. Background Technology

[0002] Cigarette manufacturing is a high-frequency, high-volume discrete production model. The consumption frequency of auxiliary materials such as filter rod adhesive, inner lining paper, tipping paper, and aluminum-plastic film is much higher than that of raw tobacco leaves. Once the auxiliary materials are in short supply, even if the main materials are sufficient, it will lead to the shutdown of cigarette manufacturing, thereby affecting the efficiency of cigarette production.

[0003] Currently, the demand for auxiliary materials is mainly calculated in advance based on the cigarette production plan, and then the cigarette auxiliary materials are supplied accordingly based on the calculated demand.

[0004] However, calculating the demand for auxiliary materials in advance based solely on the cigarette production plan often overlooks the impact of non-cyclical events such as sudden logistics disruptions, holiday promotional sales, or supplier batch defects. This can lead to excessive or insufficient inventory of auxiliary materials when non-cyclical events occur, thereby affecting the production plan. Summary of the Invention

[0005] This application provides a method, equipment, medium, and program product for early warning of auxiliary material shortages, in order to solve the problem that the existing technology calculates the demand for auxiliary materials in advance based solely on the cigarette production plan, which often ignores the impact of non-periodic events such as sudden logistics disruptions, holiday promotional sales, or supplier batch defects. This leads to situations where auxiliary materials are overstocked or understocked when non-periodic events occur, thereby affecting the production plan.

[0006] In a first aspect, this application provides a method for early warning of material shortages, the method comprising:

[0007] Obtain the production source data corresponding to the auxiliary material to be tested; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information;

[0008] Based on the production source data and the preset shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated.

[0009] The production source data is input into a pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested, output by the stockout risk prediction model.

[0010] Based on the prior out-of-stock probability of the excipient to be tested and the predicted out-of-stock risk value, the out-of-stock risk assessment result of the excipient to be tested is determined, and when the out-of-stock risk assessment result does not meet the preset assessment requirements, a target excipient out-of-stock warning is triggered.

[0011] Secondly, this application provides an auxiliary material shortage early warning device, the device comprising:

[0012] The acquisition module is used to acquire the production source data corresponding to the auxiliary material to be tested; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information;

[0013] The probability calculation module is used to calculate the prior shortage probability of the auxiliary material to be tested based on the production source data and the preset shortage Bayesian network model.

[0014] The input module is used to input the production source data into a pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested output by the stockout risk prediction model.

[0015] The determination module is used to determine the excipient shortage risk assessment result of the excipient to be tested based on the prior shortage probability and the shortage risk prediction value, and to trigger a target excipient shortage warning when the excipient shortage risk assessment result does not meet the preset assessment requirements.

[0016] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the auxiliary material shortage early warning method as described in any embodiment of this application.

[0017] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the auxiliary material shortage early warning method as described in any embodiment of this application.

[0018] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the auxiliary material shortage early warning method as described in any embodiment of this application.

[0019] The proposed solution involves acquiring production source data corresponding to the auxiliary material to be tested. This production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information. Based on the production source data and a pre-set shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated. The production source data is then input into a pre-trained shortage risk prediction model to obtain the predicted shortage risk value of the auxiliary material to be tested, output by the model. Based on the prior shortage probability and the predicted shortage risk value, the shortage risk assessment result of the auxiliary material to be tested is determined. Furthermore, if the shortage risk assessment result does not meet the pre-set assessment requirements, a target auxiliary material shortage warning is triggered. The proposed solution involves inputting production source data into a shortage risk prediction model to obtain a predicted shortage risk value for auxiliary materials based on the production source data. This prediction value is then combined with a priori shortage probability to obtain a shortage risk assessment result for the auxiliary materials. Based on the assessment result, a shortage warning for auxiliary materials is triggered, thereby avoiding situations where auxiliary materials are overstocked or understocked due to non-periodic events. This provides early warning of auxiliary material shortages and ensures production planning. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating the auxiliary material shortage early warning method provided in this application;

[0022] Figure 2 This is a schematic diagram of the training process of the shortage risk prediction model of the auxiliary material shortage early warning method provided in this application;

[0023] Figure 3 This is a schematic diagram of the auxiliary material shortage early warning device provided in this application;

[0024] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] Figure 1 This is a flowchart illustrating a method for early warning of material shortages provided in this application. This method can be executed by a material shortage early warning device, which can be implemented using software and / or hardware. In a specific embodiment, the device can be applied in an electronic device, which can be a computer. The following embodiments will illustrate this using the application of the device in an electronic device as an example. Figure 1 The method may specifically include the following steps:

[0027] Step 101: Obtain the production source data corresponding to the auxiliary material to be tested.

[0028] The production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information.

[0029] Specifically, production source data refers to data related to auxiliary materials that can affect cigarette production. Production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information. Auxiliary material demand data can be obtained from the cigarette production manufacturing execution system (MES) or enterprise resource planning (ERP) system. Auxiliary material demand data provides information on auxiliary material requirements and can include production plans, auxiliary material demand lists, and auxiliary material demand forecasts. Production plans include production orders, production tasks, planned output, and production schedules. Auxiliary material demand lists include the demand for each auxiliary material in different production tasks. Demand forecasts are data based on historical data and market trends to predict future demand. Auxiliary material demand data can be obtained by exporting production plans and auxiliary material demand lists from the ERP system. The real-time production data interface in the MES system can be used to obtain current production tasks and auxiliary material requirements. Auxiliary material inventory data can be sourced from the warehouse management system (WMS). Auxiliary material inventory data can include current inventory levels, inventory turnover rate, and minimum inventory levels. The auxiliary material inventory data can be obtained by exporting existing inventory data from the WMS system. Production equipment operating status can include equipment status, production cycle time, equipment utilization rate, and equipment failure records. Equipment status indicates whether the equipment is operating normally and whether there are any malfunctions. Production cycle time is the equipment's production speed, such as hourly output. Equipment utilization rate is the ratio of actual usage time to planned usage time. Equipment failure records include the time, cause, and repair time of equipment failures. This can be obtained by using the equipment monitoring module in the MES system to acquire equipment operating status and production cycle time. Supply chain event information indicates the stability of the supply chain and can include supplier on-time delivery rate, supplier reliability rating, weather conditions, traffic conditions, supplier shutdowns, and other events that may affect the supply chain. Supply chain event information can be obtained by exporting purchase orders and delivery records from the Supplier Relationship Management (SRM) system and using a third-party data platform to obtain information on events that may affect the supply chain.

[0030] Production source data can be obtained through periodic exports, such as setting fixed cycles like daily or weekly, exporting relevant data from ERP, WMS, and SRM systems. Alternatively, data can be acquired in real-time from production management systems and equipment monitoring systems via application programming interfaces (APIs). After obtaining the initial data, data cleaning can be performed, such as removing duplicate data, filling in missing values, and correcting erroneous data. Then, data integration is performed, including operations such as standardizing formats and time alignment, to convert data from different sources into a unified format and ensure that all data timestamps are consistent for easier subsequent processing.

[0031] Step 102: Based on the production source data and the preset shortage Bayesian network model, calculate the prior shortage probability of the auxiliary material to be tested.

[0032] Specifically, the pre-defined shortage Bayesian network model consists of nodes and directed edges, where nodes represent variables and edges represent dependencies between variables. In this embodiment, the pre-defined Bayesian network model may include auxiliary material nodes to represent the types of auxiliary materials; production cycle time nodes to represent the operating speed of production equipment, such as high, medium, and low; inventory level nodes to represent the inventory level of auxiliary materials; supplier nodes to represent the suppliers of auxiliary materials and their reliability; and shortage status nodes to indicate whether auxiliary materials are in short supply, such as out of stock or not. The pre-defined shortage Bayesian network model also includes a conditional probability table, which stores the probability distribution of each node under the conditions of its parent node. Production source data is mapped to the nodes of the Bayesian network. Based on the mapped node values, the shortage probability corresponding to each node is queried from the conditional probability table, thereby determining the probability of the auxiliary material to be detected being out of stock under the current production conditions.

[0033] Optionally, the preset shortage Bayesian network model is constructed through steps 1021 to 1023.

[0034] Step 1021: The types of various auxiliary materials, the consumption information of each auxiliary material, the source information of each auxiliary material, the inventory data of each auxiliary material, and the out-of-stock status of each auxiliary material are all used as nodes of the initial Bayesian network.

[0035] Specifically, the auxiliary material type node represents the type or code of the auxiliary material, identifying different auxiliary materials. The auxiliary material consumption information node represents the consumption rate or amount of each auxiliary material, which can be a continuous or discrete value, reflecting the usage of auxiliary materials in the production process and directly affecting inventory levels. The auxiliary material source information node represents the source of each auxiliary material, including supplier information such as supplier codes and their reliability levels, reflecting the stability and potential risks of auxiliary material supply. The auxiliary material inventory data node represents the current inventory level of each auxiliary material, reflecting the availability of auxiliary materials. The auxiliary material shortage status node is used to represent the final shortage risk status.

[0036] Step 1022: Determine the edges of the initial Bayesian network based on the correlation between the types of various auxiliary materials and the consumption information, source information, inventory data, and stockout status of each auxiliary material.

[0037] Specifically, edges are established based on causal or dependency relationships between nodes. The initial Bayesian network edges are determined based on the relationships between various auxiliary materials and their consumption, source, inventory, and stockout status. For example, the type of auxiliary material affects its consumption, source, and inventory levels; the consumption rate directly affects its inventory level; and the supply source affects its inventory level.

[0038] Step 1023: Construct a preset shortage Bayesian network model based on the nodes of the initial Bayesian network, the edges of the initial Bayesian network, and the preset structural constraints.

[0039] Specifically, structural constraints are used to ensure the rationality and interpretability of the Bayesian network. For example, structural constraints can include a maximum in-degree limit, such as a maximum in-degree of no more than 3 for each node, to avoid overly complex nodes. Root node constraints, such as allowing edges pointing to auxiliary material type nodes as root nodes, are also possible. Leaf node constraints, such as allowing edges to emanate from out-of-stock status nodes as leaf nodes, are also possible. Acyclic constraints, such as prohibiting cycles in the network, ensure that it is a directed acyclic graph. Based on the nodes, edges, and constraints, an initial Bayesian network structure is designed, and a conditional probability table is defined for each node, storing the probability distribution of that node under different parent node conditions. Historical data is used for structure learning to optimize the network structure. Greedy equivalence search or other structure learning algorithms can be used to ensure that the network structure conforms to the data pattern. The probability values ​​in the conditional probability table are calculated based on the historical data, using maximum likelihood estimation or Bayesian estimation methods. After obtaining the conditional probability table for each node, a preset out-of-stock Bayesian network model is constructed based on the nodes of the initial Bayesian network, the edges of the initial Bayesian network, the preset structural constraints, and the conditional probability table for each node. Constructing a pre-defined Bayesian network model for stockouts can not only reflect the relationship between auxiliary material types, consumption information, source information, inventory data, and stockout status, but also continuously adjust and optimize it through data-driven optimization methods to ensure its long-term effectiveness and accuracy.

[0040] Optionally, after performing step 102, steps 21 to 22 may also be performed.

[0041] Step 21: Obtain information on historical stockout events.

[0042] The historical stockout information includes historical stockout information for the excipients to be tested, as well as historical interference event information.

[0043] Specifically, historical stockout information can be sourced from production management systems, inventory management systems, and enterprise resource planning systems, recording data on auxiliary material usage, stockout events, changes in auxiliary material inventory levels, and procurement status during historical production processes. Historical stockout information may include auxiliary material codes, stockout times, stockout durations, causes, impact scope, and solutions. Historical disruption event information refers to disruption events that caused auxiliary material stockouts during historical production, and may include event type, event time, event impact, associated auxiliary materials, and event description. Historical stockout event information can be obtained by exporting historical disruption event records from multiple production systems.

[0044] Step 22: Use a preset mining algorithm to extract target high-confidence association rules from historical out-of-stock information and historical interference event information, and generate rule confidence weights based on the target high-confidence association rules.

[0045] Specifically, the preset mining algorithm is an association rule mining algorithm. For example, the preset mining algorithm can be the Apriori algorithm or the FP-growth algorithm, etc. First, the data is converted into a transaction format suitable for association rule mining. Each transaction can be represented as a combination of auxiliary materials, out-of-stock status, and interference events within a time window. For example, transaction 1: {MAT_ID1, out of stock, supplier delay}, transaction 2: {MAT_ID2, not out of stock, abnormal weather}. Frequent itemsets are mined using the selected algorithm. Frequent itemsets are itemsets that appear frequently in the dataset, and their support is greater than or equal to a preset minimum support threshold, such as a preset minimum support threshold of 0.01. Association rules are generated from the frequent itemsets. The form of the association rule is X→Y, where X and Y are mutually exclusive itemsets. For example, {supplier delay}→{out of stock}, {abnormal weather}→{not out of stock}. Confidence represents the reliability of the rule, and the calculation formula is shown in Formula 1.

[0046] Formula 1

[0047] Here, X and Y are mutually exclusive itemsets. High-confidence association rules are selected based on a preset minimum confidence threshold. For example: {supplier delay} → {out of stock} has a confidence level of 0.7, and {abnormal weather} → {no out of stock} has a confidence level of 0.8.

[0048] Rule confidence weights are generated based on the rule confidence levels. The weight formula can be designed as Formula 2.

[0049] Formula 2

[0050] Where γ1 and γ2 are weight coefficients, and Lift(R) is the interest degree of the rule, representing the association strength of the rule. The interest degree is calculated using the formula shown in Formula 3.

[0051] Formula 3

[0052] The weight of each high-confidence rule is calculated according to Formula 2 above, and the rule confidence weight is generated.

[0053] Step 103: Input the production source data into the pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested output by the stockout risk prediction model.

[0054] Specifically, the pre-trained stockout risk prediction model can be a machine learning model, such as gradient boosting decision trees, long short-term memory networks, and extreme random forests. These models can be used individually or integrated to improve prediction performance. Historical data can be used to train the model, ensuring that it can learn patterns and relationships within the data. During training, the data can be divided into training and test sets, and model parameters can be optimized using methods such as cross-validation. Model performance can be evaluated using metrics such as accuracy, recall, and F1 score. Preprocessed production source data is then input into the pre-trained stockout risk prediction model. Data input can be batch-processed or real-time, depending on the application scenario. The model calculates and outputs a predicted stockout risk value for the auxiliary material to be detected based on the input data. The predicted value is typically a probability value between 0 and 1, representing the likelihood of the auxiliary material being out of stock in the future.

[0055] Step 104: Based on the prior shortage probability and shortage risk prediction value of the excipient to be tested, determine the excipient shortage risk assessment result of the excipient to be tested, and trigger the target excipient shortage warning when the excipient shortage risk assessment result does not meet the preset assessment requirements.

[0056] Specifically, the stockout probability of auxiliary materials under current production conditions, calculated based on a Bayesian network model, is used to obtain a predicted stockout risk value through a pre-trained stockout risk prediction model. The prior stockout probability and the predicted stockout risk value can then be combined to calculate a comprehensive risk score, which serves as the auxiliary material stockout risk assessment result. Alternatively, based on the prior stockout probability and the predicted stockout risk value, as well as a pre-defined correspondence between the prior stockout probability and the predicted stockout risk value and the stockout risk rating, a corresponding stockout risk rating can be determined, which also serves as the auxiliary material stockout risk assessment result. The preset assessment requirement is a pre-set condition that the auxiliary material stockout risk is low and no warning is needed. Therefore, when the auxiliary material stockout risk assessment result does not meet the preset assessment requirement, a target auxiliary material stockout warning needs to be triggered. For the comprehensive risk score, the preset assessment requirement can be that the comprehensive risk score is below a risk score threshold; therefore, when the comprehensive risk score is higher than or equal to the risk score threshold, a warning is required. The early warning method can be determined based on a comprehensive risk score. For example, a red alert is triggered when the comprehensive risk score is higher than 0.7, indicating a high risk that requires immediate action from staff. The alert content can include information on the expected shortage of auxiliary materials, the risk score, the alert level, the cause of the risk, the forecast time, and recommended actions.

[0057] Optionally, after performing steps 21 to 22, the result of the excipient shortage risk assessment of the excipient to be tested can be determined through step 1041 based on the prior shortage probability and the predicted shortage risk value of the excipient to be tested.

[0058] Step 1041: Determine the excipient shortage risk assessment result of the excipient to be tested based on the prior shortage probability, the predicted shortage risk value, and the rule confidence weight.

[0059] Specifically, the prior stockout probability, predicted stockout risk value, and rule confidence weights are combined to calculate a comprehensive risk score, which serves as the stockout risk assessment result for the excipient to be tested. Alternatively, the comprehensive stockout risk rating of the excipient to be tested is determined based on the stockout risk ratings corresponding to the prior stockout probability, predicted stockout risk value, and rule confidence weights.

[0060] Optionally, the excipient shortage risk assessment results include an excipient shortage risk comprehensive score. Based on a pre-defined evidence theory, the excipient shortage risk comprehensive score is determined according to the prior shortage probability of the excipient to be tested, the predicted value of the shortage risk, and the rule confidence weight.

[0061] Specifically, presupposed evidence theory is a method for handling uncertain information, suitable for fusing evidence from different sources. For example, presupposed evidence theory can be the Dempster-Shafer theory. In stockout risk assessment, evidence theory can effectively combine prior knowledge, model predictions, and rule confidence to generate a comprehensive stockout risk score for excipients. The evidence sources are the stockout probability of excipients under current production conditions calculated based on a Bayesian network model, the stockout risk prediction value output by a pre-trained machine learning model, and the weights generated by high-confidence association rules mined from historical stockout information and interfering event information. The prior stockout probability, stockout risk prediction value, and rule confidence weights are transformed into basic confidence assignments. Multiple basic confidence assignments are fused using Dempster's combination rule, and a comprehensive stockout risk score is extracted from the fused basic confidence assignments. Based on evidence theory, combining prior stockout probability, stockout risk prediction value, and rule confidence weights, the stockout risk of the excipient under test can be assessed more accurately.

[0062] Optionally, after performing step 104, steps 41 to 42 can also be performed.

[0063] Step 41: Receive the actual stockout risk value corresponding to the production source data sent by the target staff's user device.

[0064] Specifically, the target staff are those responsible for monitoring and managing auxiliary material inventory, production planning, and the supply chain. The user equipment refers to the equipment used by the target staff, such as mobile devices. The actual stockout risk value corresponding to the production source data is the actual stockout risk value assessed by the staff based on their experience and the actual stockout situation corresponding to the production source data. The staff sends the actual stockout risk value corresponding to the production source data to the electronic device executing this embodiment via the user device, and the electronic device receives the actual stockout risk value corresponding to the production source data.

[0065] Step 42: Adjust the target model parameters of the stockout risk prediction model based on the production source data, the predicted stockout risk value, and the actual stockout risk value, so that the stockout risk prediction model can output the actual stockout risk value based on the production source data.

[0066] Specifically, the target model parameters of the stockout risk prediction model are adjusted based on the production source data, the predicted stockout risk value, and the actual stockout risk value. For example, the model's learning rate is adjusted to improve the accuracy of the model's output, enabling the model to output the actual stockout risk value based on the production source data. By adjusting the model parameters based on the predicted and actual stockout risk values ​​when the target worker's user device sends the corresponding production source data, the adjusted model can output the actual stockout risk value based on the production source data, further improving the accuracy of the model's output.

[0067] The proposed solution involves acquiring production source data corresponding to the auxiliary material to be tested. This production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information. Based on the production source data and a pre-set shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated. The production source data is then input into a pre-trained shortage risk prediction model to obtain the predicted shortage risk value of the auxiliary material to be tested, output by the model. Based on the prior shortage probability and the predicted shortage risk value, the shortage risk assessment result of the auxiliary material to be tested is determined. Furthermore, if the shortage risk assessment result does not meet the pre-set assessment requirements, a target auxiliary material shortage warning is triggered. The proposed solution involves inputting production source data into a shortage risk prediction model to obtain a predicted shortage risk value for auxiliary materials based on the production source data. This prediction value is then combined with a priori shortage probability to obtain a shortage risk assessment result for the auxiliary materials. Based on the assessment result, a shortage warning for auxiliary materials is triggered, thereby avoiding situations where auxiliary materials are overstocked or understocked due to non-periodic events. This provides early warning of auxiliary material shortages and ensures production planning.

[0068] Figure 2 This is a schematic diagram of the training process of the shortage risk prediction model of the auxiliary material shortage early warning method provided in this application. This embodiment is in Figure 1 Based on the illustrated embodiments and various optional implementation schemes, the training steps of the stockout risk prediction model are described in detail. For example... Figure 2 As shown, the method may include the following steps:

[0069] Step 201: Obtain the training production source data and the corresponding training shortage risk value.

[0070] Among them, the training production source data and the training out-of-stock risk value are a set of training data groups in the preset training database. The preset training database includes multiple sets of training data groups, and each set of training data groups includes a training production source data and a corresponding training out-of-stock risk value.

[0071] Specifically, the pre-set training database stores multiple sets of training data. Each set includes a production source data set to be trained and its corresponding out-of-stock risk value. That is, the out-of-stock risk value is the most accurate out-of-stock risk value corresponding to the production source data. Therefore, after training the model based on multiple production source data sets and their corresponding out-of-stock risk values, the model can obtain an accurate out-of-stock risk value based on the input, thereby improving the accuracy of the out-of-stock risk predictions obtained by the model.

[0072] Step 202: Input the training production source data into the model to be trained to obtain the training risk value output by the model to be trained.

[0073] Specifically, the model to be trained can be any open-source large language model, any machine learning model, or any deep learning model, etc. By inputting the training production source data into the model to be trained, the training risk value output by the model can be obtained.

[0074] Optionally, the model to be trained is a model built based on the gradient boosting decision tree algorithm, the long short-term memory network algorithm, and the extreme random forest algorithm.

[0075] Specifically, the gradient boosting decision tree algorithm gradually approximates the objective function by constructing decision trees one by one, making it suitable for handling nonlinear relationships. The main model parameters are tree depth, number of trees, and learning rate. The training process can involve training the model using historical data and optimizing parameters through cross-validation. The Long Short-Term Memory (LSTM) network algorithm is suitable for processing time-series data, capturing time dependencies and long-term memory. The Extreme Random Forest (ERF) algorithm constructs multiple decision trees by randomly selecting features and samples, making it suitable for high-dimensional data and exhibiting low variance. The main model parameters are the number of trees and the feature subset ratio. Weighted averaging or voting mechanisms can be used to fuse the outputs of these three models to construct the model to be trained.

[0076] Step 203: Based on the training risk value and the training shortage risk value, adjust the target model parameters of the model to be trained to obtain the model to be trained after parameter adjustment.

[0077] Specifically, based on the training risk value and the training shortage risk value, the target model parameters of the model to be trained are adjusted, such as adjusting the model's learning rate, to obtain the model to be trained with adjusted parameters.

[0078] Step 204: Use the parameter-adjusted model to be trained as the new model to be trained, use a production source data from a preset training database that is not input into the model to be trained as the new training production source data, use the production source data to be trained as the new training stockout risk value, return to step 202, until the preset iteration end condition is reached, and use the parameter-adjusted model to be trained as the stockout risk prediction model.

[0079] Specifically, the process involves taking the parameter-adjusted model as the new model to be trained, using a source data point from a pre-defined training database that was not previously input into the model as the new source data for training, and using the corresponding stockout risk value from that source data as the new stockout risk value for training. The process then returns to the step of inputting the source data into the model to obtain the training risk value output by the model, until a pre-defined iteration termination condition is met. For example, the pre-defined iteration termination condition could be stopping training when a certain cutoff condition is reached, i.e., stopping the return steps. The cutoff condition could be reaching a pre-defined number of training rounds, or the training loss falling below a certain value, etc. The resulting parameter-adjusted model is then the stockout risk prediction model.

[0080] The proposed solution adjusts the model parameters of the training model based on the training risk value and the training out-of-stock risk value, thereby improving the model's output accuracy. After training the model using multiple production source data and corresponding out-of-stock risk values, the model can obtain accurate out-of-stock risk values ​​based on the input, thus improving the accuracy of the out-of-stock risk predictions obtained by the model. Choosing gradient boosting decision tree, long short-term memory network, and extreme random forest algorithms to build the model fully utilizes the advantages of each algorithm, thereby improving the overall performance and robustness of the model.

[0081] Figure 3 This is a schematic diagram of a material shortage early warning device provided in this application. This device is suitable for implementing the material shortage early warning method provided in this application. Figure 3 As shown, the device may specifically include:

[0082] The acquisition module 301 is used to acquire the production source data corresponding to the auxiliary material to be tested; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status and supply chain event information;

[0083] The probability calculation module 302 is used to calculate the prior shortage probability of the auxiliary material to be tested based on the production source data and the preset shortage Bayesian network model.

[0084] The input module 303 is used to input the production source data into a pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested output by the stockout risk prediction model.

[0085] The determination module 304 is used to determine the excipient shortage risk assessment result of the excipient to be tested based on the prior shortage probability and the shortage risk prediction value, and to trigger a target excipient shortage warning when the excipient shortage risk assessment result does not meet the preset assessment requirements.

[0086] In one embodiment, the apparatus further includes: a generation module, configured to acquire historical shortage event information after the probability calculation module 302 calculates the prior shortage probability of the auxiliary material to be tested based on the production source data and a preset shortage Bayesian network model; wherein the historical shortage event information includes historical shortage information and historical interference event information corresponding to the auxiliary material to be tested; extracting target high-confidence association rules from the historical shortage information and the historical interference event information using a preset mining algorithm, and generating rule confidence weights based on the target high-confidence association rules; the determination module 304, in determining the auxiliary material shortage risk assessment result of the auxiliary material to be tested based on the prior shortage probability of the auxiliary material to be tested and the predicted shortage risk value, is specifically configured to: determine the auxiliary material shortage risk assessment result of the auxiliary material to be tested based on the prior shortage probability of the auxiliary material to be tested, the predicted shortage risk value, and the rule confidence weights.

[0087] In one embodiment, the device further includes: a construction module, configured to use the types of various auxiliary materials, consumption information of each auxiliary material, source information of each auxiliary material, inventory data of each auxiliary material, and out-of-stock status of each auxiliary material as nodes of an initial Bayesian network; determine the edges of the initial Bayesian network based on the association between the types of various auxiliary materials and the consumption information, source information, inventory data, and out-of-stock status of each auxiliary material; and construct the preset out-of-stock Bayesian network model based on the nodes of the initial Bayesian network, the edges of the initial Bayesian network, and preset structural constraints.

[0088] In one embodiment, the device further includes: an adjustment module, configured to receive, after the input module 303 inputs the production source data into a pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested output by the stockout risk prediction model, the actual stockout risk value corresponding to the production source data sent by the user device of the target worker; and adjust the target model parameters of the stockout risk prediction model according to the production source data, the stockout risk prediction value, and the actual stockout risk value, so that the stockout risk prediction model can output the actual stockout risk value according to the production source data.

[0089] In one embodiment, the excipient shortage risk assessment result includes an excipient shortage risk comprehensive score. The determining module 304, in determining the excipient shortage risk assessment result of the excipient to be tested based on the prior shortage probability of the excipient to be tested, the predicted shortage risk value, and the rule confidence weight, is specifically used to: determine the excipient shortage risk comprehensive score of the excipient to be tested based on a preset evidence theory, according to the prior shortage probability of the excipient to be tested, the predicted shortage risk value, and the rule confidence weight.

[0090] In one embodiment, the apparatus further includes: a shortage risk prediction model training module, configured to acquire training production source data and training shortage risk values ​​corresponding to the training production source data; wherein the training production source data and the training shortage risk values ​​are a set of training data groups in a preset training database, the preset training database including multiple sets of training data groups, each set of training data groups including a training production source data and a corresponding training shortage risk value; inputting the training production source data into the training model to obtain the training risk value output by the training model; and, based on the training risk value and the training shortage risk value, adjusting the training production source data for the training model. The target model parameters of the model to be trained are adjusted to obtain the model to be trained with adjusted parameters. The model to be trained with adjusted parameters is used as the new model to be trained. A production source data from the preset training database that has not been input into the model to be trained is used as the new training production source data. The out-of-stock risk value corresponding to the production source data is used as the new training out-of-stock risk value. The process of "inputting the training production source data into the model to be trained to obtain the training risk value output by the model to be trained" is repeated until the preset iteration end condition is met. The model to be trained with adjusted parameters is then used as the out-of-stock risk prediction model.

[0091] In one embodiment, the model to be trained in the stockout risk prediction model training module is a model established based on the gradient boosting decision tree algorithm, the long short-term memory network algorithm, and the extreme random forest algorithm.

[0092] The apparatus of this application acquires production source data corresponding to the auxiliary material to be tested; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information; based on the production source data and a preset shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated; the production source data is input into a pre-trained shortage risk prediction model to obtain the shortage risk prediction value of the auxiliary material to be tested output by the shortage risk prediction model; based on the prior shortage probability and the shortage risk prediction value of the auxiliary material to be tested, the shortage risk assessment result of the auxiliary material to be tested is determined, and when the shortage risk assessment result does not meet the preset assessment requirements, a target auxiliary material shortage warning is triggered. The proposed solution involves inputting production source data into a shortage risk prediction model to obtain a predicted shortage risk value for auxiliary materials based on the production source data. This prediction value is then combined with a priori shortage probability to obtain a shortage risk assessment result for the auxiliary materials. Based on the assessment result, a shortage warning for auxiliary materials is triggered, thereby avoiding situations where auxiliary materials are overstocked or understocked due to non-periodic events. This provides early warning of auxiliary material shortages and ensures production planning.

[0093] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the auxiliary material shortage warning method provided in any of the above embodiments.

[0094] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the auxiliary material shortage early warning method provided in any of the above embodiments.

[0095] The following is for reference. Figure 4 It shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the present application. Figure 4 The electronic device shown is merely an example and should not impose any limitations on the functionality and scope of this application.

[0096] like Figure 4 As shown, the electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage section 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device 400. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0097] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. Drive 410 is also connected to I / O interface 405 as needed. Removable media 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 410 as needed so that computer programs read from them can be installed into storage section 408 as needed.

[0098] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the functions defined above in the system of this application.

[0099] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, 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 a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may 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.

[0101] The modules and / or units described in this application can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor may be described as including an acquisition module, a probability calculation module, an input module, and a determination module. The names of these modules do not necessarily limit the module itself.

[0102] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the following operations:

[0103] Obtain the production source data corresponding to the auxiliary material to be tested; the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information; based on the production source data and a preset shortage Bayesian network model, calculate the prior shortage probability of the auxiliary material to be tested; input the production source data into a pre-trained shortage risk prediction model to obtain the shortage risk prediction value of the auxiliary material to be tested output by the shortage risk prediction model; based on the prior shortage probability and the shortage risk prediction value of the auxiliary material to be tested, determine the auxiliary material shortage risk assessment result, and trigger a target auxiliary material shortage warning when the auxiliary material shortage risk assessment result does not meet the preset assessment requirements.

[0104] According to the technical solution of this application, production source data corresponding to the auxiliary material to be tested is obtained; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information; based on the production source data and a preset shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated; the production source data is input into a pre-trained shortage risk prediction model to obtain the shortage risk prediction value of the auxiliary material to be tested output by the shortage risk prediction model; based on the prior shortage probability and the shortage risk prediction value of the auxiliary material to be tested, the auxiliary material shortage risk assessment result is determined, and when the auxiliary material shortage risk assessment result does not meet the preset assessment requirements, a target auxiliary material shortage warning is triggered. The proposed solution involves inputting production source data into a shortage risk prediction model to obtain a predicted shortage risk value for auxiliary materials based on the production source data. This prediction value is then combined with a priori shortage probability to obtain a shortage risk assessment result for the auxiliary materials. Based on the assessment result, a shortage warning for auxiliary materials is triggered, thereby avoiding situations where auxiliary materials are overstocked or understocked due to non-periodic events. This provides early warning of auxiliary material shortages and ensures production planning.

[0105] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the auxiliary material shortage warning method provided in any embodiment of this application.

[0106] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0107] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for early warning of material shortages, characterized in that, The method includes: Obtain the production source data corresponding to the auxiliary material to be tested; wherein, the production source data includes auxiliary material demand data, auxiliary material inventory data, production equipment operating status, and supply chain event information; Based on the production source data and the preset shortage Bayesian network model, the prior shortage probability of the auxiliary material to be tested is calculated. The production source data is input into a pre-trained stockout risk prediction model to obtain the stockout risk prediction value of the auxiliary material to be tested, output by the stockout risk prediction model. Based on the prior out-of-stock probability of the excipient to be tested and the predicted out-of-stock risk value, the out-of-stock risk assessment result of the excipient to be tested is determined, and when the out-of-stock risk assessment result does not meet the preset assessment requirements, a target excipient out-of-stock warning is triggered.

2. The method according to claim 1, characterized in that, After calculating the prior shortage probability of the auxiliary material to be detected based on the production source data and a preset shortage Bayesian network model, the method further includes: Obtain historical stockout event information; wherein, the historical stockout event information includes historical stockout information and historical interference event information corresponding to the excipient to be tested; A preset mining algorithm is used to extract target high-confidence association rules from the historical out-of-stock information and the historical interference event information, and rule confidence weights are generated based on the target high-confidence association rules; The step of determining the excipient shortage risk assessment result of the excipient to be tested based on the prior shortage probability and the shortage risk prediction value includes: The out-of-stock risk assessment result of the excipient to be tested is determined based on the prior out-of-stock probability, the out-of-stock risk prediction value, and the rule confidence weight.

3. The method according to claim 2, characterized in that, The pre-defined shortage Bayesian network model is constructed through the following steps: The types of various auxiliary materials, the consumption information of each auxiliary material, the source information of each auxiliary material, the inventory data of each auxiliary material, and the out-of-stock status of each auxiliary material are all used as nodes in the initial Bayesian network. The edges of the initial Bayesian network are determined based on the correlation between the types of various auxiliary materials and the consumption information, source information, inventory data, and stockout status of each auxiliary material. Based on the nodes of the initial Bayesian network, the edges of the initial Bayesian network, and the preset structural constraints, construct the preset shortage Bayesian network model.

4. The method according to claim 2, characterized in that, After inputting the production source data into a pre-trained shortage risk prediction model to obtain the shortage risk prediction value of the auxiliary material to be tested output by the shortage risk prediction model, the method further includes: The actual stockout risk value corresponding to the production source data sent by the target staff's user device; Based on the production source data, the predicted stockout risk value, and the actual stockout risk value, the target model parameters of the stockout risk prediction model are adjusted so that the stockout risk prediction model can output the actual stockout risk value based on the production source data.

5. The method according to claim 2, characterized in that, The excipient shortage risk assessment result includes a comprehensive excipient shortage risk score. The determination of the excipient shortage risk assessment result based on the prior shortage probability of the excipient to be tested, the predicted shortage risk value, and the rule confidence weight includes: Based on the pre-defined evidence theory, the comprehensive score of the excipient shortage risk of the excipient to be tested is determined according to the prior shortage probability of the excipient to be tested, the predicted value of the shortage risk, and the confidence weight of the rule.

6. The method according to claim 1, characterized in that, The stockout risk prediction model was trained using the following steps: Acquire training production source data and the corresponding training shortage risk value; wherein, the training production source data and the training shortage risk value are a set of training data in a preset training database, the preset training database includes multiple sets of training data, each set of training data includes a training production source data and a corresponding training shortage risk value. The training production source data is input into the model to be trained to obtain the training risk value output by the model to be trained. Based on the training risk value and the training shortage risk value, the target model parameters of the model to be trained are adjusted to obtain the model to be trained after parameter adjustment. The model to be trained with the adjusted parameters is used as the new model to be trained. A production source data from the preset training database that has not been input into the model to be trained is used as the new training production source data. The out-of-stock risk value corresponding to the production source data to be trained is used as the new training out-of-stock risk value. The process of "inputting the training production source data into the model to be trained to obtain the training risk value output by the model to be trained" is repeated until the preset iteration end condition is met. The model to be trained with the adjusted parameters is then used as the out-of-stock risk prediction model.

7. The method according to claim 6, characterized in that, The model to be trained is a model built based on the gradient boosting decision tree algorithm, the long short-term memory network algorithm, and the extreme random forest algorithm.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the auxiliary material shortage early warning method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the auxiliary material shortage early warning method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the auxiliary material shortage early warning method as described in any one of claims 1 to 7.