Tobacco leaf raw material inventory management method, electronic equipment, storage medium and program product

By obtaining the basic data of tobacco leaf raw materials and planned production consumption, using preset alternative constraint strategies and search algorithms, we automatically determine the optimal balance plan, which solves the complex and time-consuming problem of tobacco leaf inventory management and improves management efficiency.

CN120258351APending Publication Date: 2025-07-04CHONGQING CHINA TOBACCO IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510165861.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the balanced management of tobacco leaf raw materials inventory depends on manual operations and time-consuming, requiring the in-depth knowledge and experience of professionals, making it difficult to efficiently achieve accurate matching of inventory and production consumption.

Method used

By obtaining the basic data of tobacco leaf raw materials and planned production consumption, preset alternative constraint strategies and search algorithms are used to estimate future inventory changes, and preset decision strategies are used to determine the optimal balance plan, reducing manual participation, and achieving automated management.

Benefits of technology

The tobacco leaf inventory balance management operation is simplified, the time to form an inventory balance plan is shortened, management efficiency is improved, and dependence on professionals is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258351A_ABST
    Figure CN120258351A_ABST
Patent Text Reader

Abstract

The invention provides a tobacco leaf raw material inventory management method, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring basic data and planned production consumption of tobacco leaf raw materials in a current stock; on the basis of the basic data, determining replaceable tobacco leaves of each tobacco leaf raw material by adopting a preset replacement constraint strategy; on the basis of the planned production consumption, the basic data and the replaceable tobacco leaves of each tobacco leaf raw material, estimating at least two change schemes of each tobacco leaf raw material in the current stock in a second specified duration in the future; and determining an optimal balance scheme of each tobacco leaf raw material from the at least two change schemes. Therefore, the optimal balance scheme can be automatically generated by the electronic equipment based on the basic data of the tobacco leaf raw materials in the current inventory and the planned production consumption without depending on professionals, the manual participation degree can be reduced, the tobacco leaf inventory balance management operation is simplified, the duration of forming the inventory balance scheme is shortened, and the production efficiency is improved. And the tobacco stock management efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tobacco leaf data management, and in particular, to a method for managing the inventory of tobacco leaf raw materials, an electronic device, a storage medium, and a program product. Background Art

[0002] The balanced management of tobacco leaf raw materials is an important measure to achieve the precise matching and dynamic balance of the inventory, use, and procurement of tobacco leaf raw material resources, which is related to the stability, sustainability, and health of brand development. In recent years, with the accelerating pace of market changes and the continuous improvement of cigarette product structures, how to better, more efficiently, and more precisely carry out the raw material balance work is a common problem faced by each tobacco company. Currently, the balance of tobacco leaf raw materials is usually carried out through traditional manual methods. That is, raw material administrators usually need to spend a long time (such as 15 working days) to sort out data to form a plan for balanced inventory, and they need to have a deep understanding and application ability of raw material knowledge, cigarette formula knowledge, and statistical knowledge. Moreover, due to the above complex rules, the huge inventory of raw materials, and the large number of cigarette formulas, even professional personnel can only meet the above requirements as much as possible. This method is complex in operation, time-consuming, and relies on professional personnel to implement. Summary of the Invention

[0003] In view of this, the purpose of the embodiments of the present application is to provide a method for managing the inventory of tobacco leaf raw materials, an electronic device, a storage medium, and a program product, which can improve the problems of complex operation and long time consumption in the balanced management of tobacco leaf inventory.

[0004] To achieve the above technical purpose, the technical solutions adopted by the present application are as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for managing the inventory of tobacco leaf raw materials, and the method includes:

[0006] Obtain the basic data of the tobacco leaf raw materials in the current inventory and the planned production consumption, where the basic data includes the remaining quantity of each tobacco leaf raw material and the tobacco leaf characteristics, and the tobacco leaf characteristics include the tobacco leaf style, tobacco leaf part, tobacco leaf grade, and storage duration, and the planned production consumption includes the input quantity and consumption quantity of each tobacco leaf raw material within a first specified duration in the future;

[0007] Based on the basic data, determine the substitutable tobacco leaves for each tobacco leaf raw material by using a preset substitution constraint strategy;

[0008] Based on the planned production consumption, the basic data, and the substitutable tobacco leaves for each tobacco leaf raw material, use a preset search algorithm to estimate at least two change scenarios for each tobacco leaf raw material in the current inventory within a second specified duration in the future, and the change scenarios include the remaining usage duration and substitution status of each tobacco leaf raw material, and the second specified duration is less than or equal to the first specified duration;

[0009] Using a preset decision-making strategy, determine the optimal balance plan for each tobacco leaf raw material from at least two of the said change plans.

[0010] Combined with the first aspect, in some alternative embodiments, based on the said basic data, use a preset substitution constraint strategy to determine the substitutable tobacco leaves for each tobacco leaf raw material, including:

[0011] Based on the tobacco leaf characteristics of each tobacco leaf raw material in the said basic data, determine the substitutable tobacco leaves for each tobacco leaf raw material, wherein the tobacco leaf style of the substitutable tobacco leaves is the same as or similar to that of the corresponding tobacco leaf raw material, and the tobacco leaf position and tobacco leaf grade of the substitutable tobacco leaves are the same as those of the corresponding tobacco leaf raw material, and the storage duration of the substitutable tobacco leaves indicates that it is within the specified time limit of aging and ripening. Similar tobacco leaf styles refer to two or more tobacco leaf styles with a specified correlation relationship.

[0012] Combined with the first aspect, in some alternative embodiments, based on the planned production consumption, the said basic data, and the substitutable tobacco leaves for each tobacco leaf raw material, use a preset search algorithm to estimate at least two change plans for each tobacco leaf raw material in the current inventory within a second specified time period in the future, including:

[0013] Step A1, for each tobacco leaf raw material in the inventory, based on the current said basic data, planned production consumption, and remaining quantity of substitutable tobacco leaves, create multiple nodes, and the multiple nodes are used to form a search tree, and the basic data is used as the root node of the search tree;

[0014] Step A2, for each tobacco leaf raw material in the inventory, starting from the root node, use a heuristic strategy to select the optimal node from the multiple nodes;

[0015] Step A3, when the optimal node is a first type of node indicating that it has not been fully expanded, then based on the multiple nodes, expand one or more unexplored nodes at the first type of node to be expansion nodes;

[0016] Step A4, based on the selected optimal node or the expansion node, simulate and calculate the change plan of the optimal node or the expansion node within a second specified time period in the future to obtain a simulation result, wherein the simulation result includes the cumulative reward of each change plan calculated using a preset reward and punishment function, and the cumulative reward is positively correlated with the inventory balance of the tobacco leaf raw material;

[0017] Step A5, backpropagate the cumulative reward to all nodes in the selected path to update the statistical information of the corresponding nodes in Step A1, and the statistical information includes the access times and average rewards of the corresponding nodes;

[0018] Step A6: Based on the updated nodes, repeat Steps A2 to A5 until the simulation results converge or the number of repetitions reaches the specified number, and obtain at least two of the aforementioned change scenarios for each tobacco leaf raw material within the second specified time period in the future.

[0019] In combination with the first aspect, in some alternative embodiments, in Step A2, for each tobacco leaf raw material in the inventory, starting from the root node, a heuristic strategy is used to select the optimal node from the multiple nodes, including:

[0020] For each tobacco leaf raw material in the inventory, starting from the root node, a first preset formula is used to select the optimal node from the multiple nodes. The first preset formula is:

[0021]

[0022] where a * denotes the optimal node; A(s) is the available action in state s, and the available actions include one of the incoming storage, consumption of the current tobacco leaf raw material, and substitution with alternative tobacco leaves; state s refers to the root node or the current node, representing the remaining quantity of the current tobacco leaf raw material; Q(s,a) represents the average return when taking action a in state s; N(s) represents the number of times state s has been visited and the simulation calculation has been completed; N(s,a) represents the number of times action a has been taken in state s and the simulation calculation has been completed; O(s) represents the number of times state s has been visited and the simulation calculation has not been completed; O(s,a) represents the number of times action a has been taken in state s and the simulation calculation has not been completed; C is a hyperparameter for controlling the balance.

[0023] In combination with the first aspect, in some alternative embodiments, a preset decision-making strategy is used to determine the optimal balance plan for each tobacco leaf raw material from at least two of the aforementioned change scenarios, including:

[0024] Convert the data of at least two of the aforementioned change scenarios into a five-tuple, denoted as (S,A,P,R,γ), where S is the state space, representing the set of possible states of the tobacco leaf raw material; A is the action space, representing the set of actions that can be taken in each state; P(s t+1 ∣s t ,a t ) is the state transition probability function, representing the probability of transitioning to the next state s t after taking action a in state s t+1 ; R(s t ,a t ) is the reward function, representing the immediate reward obtained when taking action a in state s; γ∈[0,1] is the discount factor;

[0025] At time t, state st When it ∈ S, take action a according to the policy π(a|s). t ∈ A, such that the state s t with probability P(s t+1 |s t , a t ) transfers to the next state s t+1 , and returns the reward R(s t , a t ), to obtain the rewards of each of the said change scenarios;

[0026] Use a preset function to determine the change scenario that maximizes the long-term cumulative reward corresponding to be used as the optimal balance scenario, and the preset function is:

[0027]

[0028] where s0 refers to the state at t = 0, and s ′ refers to the initial state.

[0029] Combined with the first aspect, in some alternative embodiments, the preset reward and punishment function includes: a first type of function related to the degree of conformity between the current tobacco raw material and the tobacco characteristics between the alternative tobaccos, a second type of function that is positively correlated with the available duration of the alternative tobacco, and the priority corresponding to the brand of the produced cigarettes;

[0030] The first type of function includes: a first function that is inversely correlated with the style span between the current tobacco raw material and the alternative tobacco, a second function that is inversely correlated with the tobacco distance, a second function that is inversely correlated with the tobacco grade difference, and a fourth function that is inversely correlated with the aging degree span.

[0031] Combined with the first aspect, in some alternative embodiments, the optimal balance scenario includes the remaining quantity, available duration, replacement time, and the type of alternative tobacco used at the time of replacement of each tobacco raw material over time within a second specified duration in the future;

[0032] The method further includes:

[0033] Classify each piece of data in the optimal balance scenario and visually display it using a chart;

[0034] When the available duration is less than or equal to a preset duration indicating usage warning, issue a warning prompt.

[0035] In a second aspect, an embodiment of the present application further provides an electronic device, which includes a processor and a memory coupled to each other. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device executes the above method.

[0036] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when running on a computer, causes the computer to execute the above method.

[0037] In a fourth aspect, an embodiment of the present application further provides a computer program product including a computer program, which, when executed by a processor, implements the above method.

[0038] The invention adopting the above technical solution has the following advantages:

[0039] In the technical solution provided by the present application, based on the remaining quantity of each tobacco leaf raw material and basic data such as tobacco leaf characteristics in the current inventory, the replaceable tobacco leaves of each tobacco leaf raw material are determined; then, based on the planned production consumption, basic data, and the replaceable tobacco leaves of each tobacco leaf raw material, at least two change plans of each tobacco leaf raw material in the current inventory within a second specified time period in the future are estimated, and finally, from the at least two change plans, the optimal balance plan of each tobacco leaf raw material is selected. In this way, without relying on professionals, an electronic device can automatically generate an optimal balance plan based on the basic data of the tobacco leaf raw materials in the current inventory and the planned production consumption, which can reduce the manual participation, simplify the operation of tobacco leaf inventory balance management, shorten the time for forming an inventory balance plan, and is beneficial to improving the efficiency of tobacco leaf inventory management. Description of the Drawings

[0040] The present application can be further illustrated by the non-limiting embodiments given in the drawings. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0041] Figure 1 It is a schematic flowchart of the tobacco leaf raw material inventory management method provided by an embodiment of the present application.

[0042] Figure 2 It is a heat map of the tobacco leaf inventory changing with time obtained by simulation.

[0043] Figure 3 It is a statistical chart of the remaining usage months of tobacco leaves divided by style obtained based on the simulation results. Detailed Embodiments

[0044] The present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that in the accompanying drawings or the description of the specification, similar or identical parts are all denoted by the same reference numerals. The implementation manners not illustrated or described in the accompanying drawings are in the forms known to those of ordinary skill in the art. In the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.

[0045] Please refer to Figure 1 , the present application provides a method for managing the inventory of tobacco leaf raw materials, which can be used for balancing the management of tobacco leaves in the inventory. Among them, this method can be applied to an electronic device, and each step of the method can be executed or implemented by the electronic device. The electronic device can be, but is not limited to, devices such as personal computers and servers.

[0046] In this embodiment, the method for managing the inventory of tobacco leaf raw materials may include the following steps:

[0047] Step 110, obtaining the basic data and planned production consumption of the tobacco leaf raw materials in the current inventory. Among them, the basic data includes the remaining quantity and tobacco leaf characteristics of each tobacco leaf raw material. The tobacco leaf characteristics include tobacco leaf style, tobacco leaf position, tobacco leaf grade, and storage duration. The planned production consumption includes the input quantity and consumption quantity of each tobacco leaf raw material within the first specified duration in the future;

[0048] Step 120, based on the basic data, determining the substitutable tobacco leaves for each tobacco leaf raw material by using a preset substitution constraint strategy;

[0049] Step 130, based on the planned production consumption, the basic data, and the substitutable tobacco leaves for each tobacco leaf raw material, using a preset search algorithm to estimate at least two change scenarios for each tobacco leaf raw material in the current inventory within the second specified duration in the future. The change scenarios include the remaining usage duration and substitution status of each tobacco leaf raw material, and the second specified duration is less than or equal to the first specified duration;

[0050] Step 140, using a preset decision-making strategy to determine the optimal balance plan for each tobacco leaf raw material from at least two of the change scenarios.

[0051] The following will elaborate on each step of the method for managing the inventory of tobacco leaf raw materials in detail, as follows:

[0052] In step 110, the basic data and the planned production consumption are pre-prepared data, and the way of obtaining the data can be flexibly set according to the actual situation. For example, the basic data and the planned production consumption can be the relevant data of various tobacco leaf raw materials in the current inventory recorded in the enterprise's ERP (Enterprise Resource Planning) system, and the electronic device can obtain the basic data of the current inventory from the enterprise's ERP system.

[0053] For another example, the basic data and the planned production consumption are the data recorded in an electronic document / spreadsheet, and the electronic device can obtain the basic data and the planned production consumption by reading the corresponding electronic document / spreadsheet.

[0054] In this embodiment, the basic data may include, but is not limited to, the remaining amount, available duration, and tobacco leaf characteristics of each tobacco leaf raw material.

[0055] The tobacco leaf characteristics may include four elements, namely, tobacco leaf style, tobacco leaf position, tobacco leaf grade, and storage duration. Among them, the tobacco leaf style refers to the sensory style of the tobacco leaf raw material, which is determined by the ecological environment of the origin. The stored tobacco leaf raw materials can be divided into different styles according to different origins. Within the same origin, it is considered that the styles are the same and the style intensities are similar. For example, the tobacco leaf raw materials in the same style group can be substituted, while those in different style groups cannot be substituted. For different styles in the same group, substitution is carried out according to the principle of proximity in terms of style closeness. Tobacco leaves in the same style group indicate similar tobacco leaf styles, and the tobacco leaves of each style group can be obtained through pre-evaluation.

[0056] As an example, assuming that the style groups are divided into 4 groups and the corresponding types of tobacco leaf styles are 20, the style substitution order can be as shown in Table 1 below:

[0057]

[0058]

[0059] The tobacco leaf position of the tobacco leaf raw material can be divided into upper tobacco leaves (B), middle tobacco leaves (C), and lower tobacco leaves (X), and the division method is the conventional method, which will not be elaborated here. Tobacco leaf raw materials with the same tobacco leaf position can be substituted, while those with different positions cannot be substituted.

[0060] The tobacco leaf grade of the tobacco leaf raw material can be divided into high-grade tobacco (High), medium-grade tobacco (Medium), and low-grade tobacco (Low), and substitution can be carried out between the same grades, while substitution is not allowed between different grades.

[0061] The storage duration of tobacco leaf raw materials can reflect the aging degree of tobacco leaves. Unaged and immature tobacco leaves are unavailable raw materials and cannot be used as substitute tobacco leaves. After aging and maturation, and within the corresponding time limit, the tobacco leaves are usually available raw materials and can be used as substitute tobacco leaves. After aging and maturation, and outside the corresponding time limit, it is necessary to decide whether to use them normally or downgrade them after sensory evaluation. This time limit can be 5 years or other time periods.

[0062] The future first specified duration can be flexibly set according to the actual situation. For example, it can be a duration of 1 - 3 years in the future, etc. The planned production consumption is obtained by the enterprise based on the annual plan for the next year issued each year. As an example, the planned production consumption can include: the input and consumption of each type of tobacco leaf raw material per month / quarter within 1 - 3 years in the future.

[0063] When selecting tobacco leaves for product specifications, there are minimum requirements for the duration of formula production for different price categories of cigarettes. For first - class cigarettes: the quantity of tobacco leaves should meet the requirement for at least 2 months' usage of this brand. For second - class, third - class, and fourth - class cigarettes: the quantity of tobacco leaves should meet the requirement for at least 1 month's usage of this brand. For sporadic tobacco leaves that cannot meet the production time principle, they are strongly restricted to be used for specified brands.

[0064] In step 120, based on the basic data, determining the substitute tobacco leaves for each type of tobacco leaf raw material by using a preset substitution constraint strategy may include:

[0065] Based on the tobacco leaf characteristics of each type of tobacco leaf raw material in the basic data, determining the substitute tobacco leaves for each type of tobacco leaf raw material, where the tobacco leaf style of the substitute tobacco leaves is the same as or similar to that of the corresponding tobacco leaf raw material, and the tobacco leaf position and tobacco leaf grade of the substitute tobacco leaves are the same as those of the corresponding tobacco leaf raw material, and the storage duration of the substitute tobacco leaves indicates that it is within the specified time limit of aging and maturation. Similar tobacco leaf styles refer to two or more tobacco leaf styles with a specified correlation relationship.

[0066] In this embodiment, the preset substitution constraint strategy includes constraints on four elements in the tobacco leaf characteristics, and the constraints on the four elements need to be satisfied simultaneously. Among them, constraint one: the tobacco leaf styles are the same or similar; constraint two: the tobacco leaf grades are the same; constraint three: the tobacco leaf positions are the same; constraint four: the storage duration indicates that it is within the specified time limit of aging and maturation. In this way, it is beneficial to reduce the difference between the substitute tobacco leaves and the original tobacco leaves and avoid a large difference between the substitute tobacco leaves and the original tobacco leaves, which may affect the consistency of the quality of the produced cigarettes.

[0067] It should be noted that the same tobacco leaf position can mean: all are upper tobacco leaves, or all are middle tobacco leaves, or all are lower tobacco leaves. In addition, the same tobacco leaf position can be tobacco leaves at different leaf positions in the same position (such as middle tobacco leaves).

[0068] The specified time limit range can be flexibly set according to the actual situation, such as 5 years. That is, the storage duration can reflect whether the tobacco leaves have completed aging, and the completion of aging means that the aging degree of the tobacco leaves has reached the mature state. After the tobacco leaves have completed aging, it is also necessary to consider whether the aging time is too long to avoid the decline in the quality of the tobacco leaves or even render them unusable due to excessive aging time.

[0069] As an example, the aging and maturation time of the stored tobacco leaves can be as shown in Table 2 below:

[0070]

[0071] The tobacco leaf raw materials can be used only after aging and maturation, and cannot be used when the raw material aging time is insufficient. Among them, the start time of the aging time can be January 1 of the year following the year of tobacco leaf picking.

[0072] In this embodiment, the tobacco leaf inventory balance simulation can be represented as an integer programming problem through mathematical modeling (representing the tobacco leaves with integers and representing the tobacco leaves used in each recipe / change plan at each time point with corresponding integers). However, on the one hand, the integer constraints make the problem highly discrete, making it difficult to use optimization methods based on derivative information. On the other hand, the size of the solution space expands rapidly with the increase in data volume. Commonly used evolutionary algorithms, such as genetic algorithms, simulated annealing, and some other methods, require a large amount of search time to find the optimal solution. To better solve this problem, this application adopts Step 130 and Step 140 to achieve tobacco leaf inventory balance.

[0073] In Step 130, based on the planned production consumption, the basic data, and the substitutable tobacco leaves of each tobacco leaf raw material, a preset search algorithm is used to estimate at least two change plans for each tobacco leaf raw material in the current inventory within the next second specified duration, including:

[0074] Step A1, for each tobacco leaf raw material in the inventory, based on the current basic data, planned production consumption, and the remaining amount of substitutable tobacco leaves, create multiple nodes, and the multiple nodes are used to form a search tree, with the basic data as the root node of the search tree;

[0075] Step A2, for each tobacco leaf raw material in the inventory, starting from the root node, adopt a heuristic strategy to select the optimal node from the multiple nodes;

[0076] Step A3, when the optimal node is a first type of node indicating that it has not been fully expanded, then based on the multiple nodes, expand one or more unexplored nodes at the first type of node as expansion nodes;

[0077] Step A4: Based on the selected optimal node or the extended node, simulate and calculate the change scenarios of the optimal node or the extended node within the next second specified time period to obtain simulation results, where the simulation results include the cumulative rewards of each change scenario calculated using a preset reward and punishment function, and the cumulative rewards are positively correlated with the inventory balance of tobacco raw materials;

[0078] Step A5: Transmit the cumulative rewards back to all nodes in the selected path to update the statistical information of the corresponding nodes in Step A1, where the statistical information includes the access times and average rewards of the corresponding nodes;

[0079] Step A6: Based on the updated nodes, repeat Steps A2 to A5 until the simulation results converge or the number of repetitions reaches the specified number, and obtain at least two such change scenarios of each tobacco raw material within the next second specified time period.

[0080] In this embodiment, the inventory balance problem is transformed into a search problem of a search tree: each node represents the inventory status of a type of tobacco, including the remaining quantity of each current type of tobacco and the corresponding tobacco characteristics (the tobacco characteristics may include tobacco style, tobacco part, tobacco grade, and storage duration). By selecting a certain type of tobacco or alternative tobacco for production and consuming a certain amount, and by simulating future production consumption, an optimal inventory allocation strategy is found to ensure inventory balance (i.e., avoid shortages or surpluses).

[0081] In the selection of nodes, the goal of the selection strategy is to maintain an appropriate balance between exploration (trying actions that have not been fully tested) and exploitation (using the known best actions).

[0082] Understandably, in Step A1, the electronic device can determine an initial state as the root node of the search tree according to the remaining quantity of the current inventory tobacco raw materials. Then, key information such as the planned incoming quantity, planned consumption quantity, and the quantity of alternative tobacco is used as the branch nodes for the expansion of the search tree.

[0083] In Step A2, one or several key factors that are most conducive to maintaining tobacco balance and use can be selected from the branch nodes as the optimal node. The optimal node can be, but is not limited to, a node representing the change in consumption rate, a node representing the fluctuation in incoming quantity, a node representing tobacco substitution, etc.

[0084] Step A2: For each type of tobacco raw material in the inventory, starting from the root node, using a heuristic strategy, select the optimal node from the multiple nodes, which may include:

[0085] For each type of tobacco raw material in the inventory, starting from the root node, use a first preset formula to select the optimal node from the multiple nodes, and the first preset formula is:

[0086]

[0087] In the formula, a * refers to the optimal node; A(s) is the actionable action in state s, and the actionable action includes one of the warehousing, consumption of the current tobacco leaf raw material, and substitution of alternative tobacco leaves; state s refers to the root node or the current node, representing the remaining amount of the current tobacco leaf raw material; Q(s,a) represents the average return when taking action a in state s, generally equal to the sum of all recorded returns divided by the number of times the node is visited; N(s) represents the number of times state s has been visited and the simulation calculation has been completed; N(s,a) represents the number of times action a has been taken in state s and the simulation calculation has been completed; O(s) represents the number of times state s has been visited and the simulation calculation has not been completed; O(s,a) represents the number of times action a has been taken in state s and the simulation calculation has not been completed; C is a hyperparameter for controlling the balance, that is, for controlling the balance between exploration (trying less visited actions to discover potentially better strategies) and exploitation (selecting actions with better historical performance). A larger value of C is more inclined to exploration, while a smaller value of C makes the algorithm more inclined to exploitation.

[0088] In formula (1), each node separately counts the calculations for completed simulation and uncompleted simulation, which is beneficial to improving the calculation speed. The control of the hyperparameter C for exploration and exploitation is related to the range of variation of Q(s,a). As an example, the standard deviation of the current past 100 Q values of the node is used as the value of C.

[0089] In this embodiment, for the tobacco leaf inventory balance simulation, the remaining amount of the inventory tobacco leaf is used as state s, and the substitution choice of tobacco leaves in case of tobacco leaf shortage is used as the action, and the reward function is given by comparing the gap between alternative tobacco leaves and the production time of continuously maintaining the formula unchanged.

[0090] It can be understood that in step A2, for each selected node (or key factor), multiple possible future scenarios are generated, and a new node is constructed for each scenario. For example, for the change in the tobacco leaf consumption rate, different increase and decrease ratios can be set to simulate various possible consumption situations. At the same time, the uncertainty of the warehousing quantity is also considered, such as delayed warehousing, increased or decreased warehousing quantity, etc., to generate a more comprehensive set of scenarios. Finally, the scenario that is most beneficial to the balance of the inventory tobacco leaf is selected from the multiple scenarios as the optimal node. That is, the optimal node can be used as the scenario that the current tobacco leaf raw material expects to obtain next, and this scenario can be the newly added warehousing quantity, tobacco leaf consumption, alternative tobacco leaves, etc.

[0091] In step A2, a recursive method can be used to select child nodes until an uncompletely expanded node is reached. At this time, step A3 is entered.

[0092] In step A3, the first type of node is a node that has not been fully expanded. This means that in the search tree, this node may have multiple child nodes, and not all possible child nodes have been generated yet. These ungenerated child nodes indicate that the node has not been fully expanded. For the first type of node, if it still has unexplored child nodes, a new child node will be generated and added to the search tree as an expanded node. If all child nodes of the first type of node have been generated, then this first type of node is considered to be fully expanded.

[0093] In the process of tobacco leaf raw material inventory management, assume that the current node indicates that the current type of tobacco leaf raw material is about to be consumed, and there is no incoming tobacco leaf of the same variety, and there are alternative types of tobacco leaves available. At this time, the current type of tobacco leaf raw material serves as the first type of node, and the alternative type of tobacco leaf serves as the expanded node.

[0094] In other embodiments, the expanded node can also represent the production consumption of tobacco leaves or other situations, so as to update the inventory status of tobacco leaves.

[0095] In step A4, based on the expanded node, a consumption action can be randomly simulated or based on the planned production consumption amount (which can be based on priority rules) to simulate the inventory status within a certain future production cycle (such as 30 days), and a change plan within the second specified duration in the future is formed as the simulation result.

[0096] The priority rules can be comprehensively obtained based on four factors in the tobacco leaf characteristics, namely, the tobacco leaf style, tobacco leaf position, tobacco leaf grade, and storage duration after warehousing. During the simulation process, a corresponding preset reward and punishment function is set. It can be understood that the preset reward and punishment function can add points to actions that are beneficial to the balance of tobacco leaves (such as tobacco leaf substitution), and subtract points from actions that are not conducive to the balance of tobacco leaves (such as tobacco leaf consumption).

[0097] In step A4, the preset reward and punishment function includes: a first type of function related to the degree of conformity of the tobacco leaf characteristics between the current tobacco leaf raw material and the alternative tobacco leaf, a second type of function that is positively correlated with the available duration of the alternative tobacco leaf, and a priority corresponding to the brand of the produced cigarette;

[0098] The first type of function includes: a first function that is inversely correlated with the style crossover between the current tobacco leaf raw material and the alternative tobacco leaf, a second function that is inversely correlated with the tobacco leaf distance, a second function that is inversely correlated with the tobacco leaf grade difference, and a fourth function that is inversely correlated with the aging degree crossover.

[0099] Understandably, the preset reward and punishment function can be divided into two parts. One part is the degree of conformity of the four tobacco leaf characteristics of the replaced tobacco leaf and the replacement tobacco leaf during substitution, namely style, tobacco leaf position / distance, grade, and storage year / aging degree; the other part is the preference for continuous production, that is, the longer a cigarette formula can be continuously produced, the better, because frequent formula changes will damage the production and product stability.

[0100] For the tobacco leaf substitution part, the experience of professionals can be used to rank the substitutability between various styles. Simply put, on the basis of dividing multiple styles, strong, medium, light, and other special styles are introduced, and a large negative reward will be given for the crossing of these main styles. For the tobacco leaf position and grade, a smaller negative reward will be given according to the distance between the two tobacco leaves (i.e., upper, middle, and lower). Regarding the storage duration, it affects the aging degree of the tobacco leaf. Generally, the tobacco leaf can be used only after aging (for example, Fujian and cinnabar tobacco need to be aged for at least 1 year, while the rest of the producing areas need 2 years). However, in the case of tobacco leaf shortage and no better choice, it can be used in advance as appropriate. Therefore, a medium-sized negative reward can be given to the tobacco leaf that violates the aging time.

[0101] For the reward in the cigarette production part, when the formula can be continuously produced for more than 2 months, a reward proportional to the time will be given. Among them, the small, large, and medium-sized positive and negative rewards can all be flexibly set according to the actual situation, and no specific limitations are made here.

[0102] In addition, for cigarettes of different brands, the total reward can be multiplied by a priority coefficient to emphasize that high-price cigarettes have a higher priority to select similar tobacco leaves and a longer production time when choosing substitution. For example, by assigning priorities from 1 to 4 to cigarettes of different brands (the higher the priority, the smaller the value), and then dividing the calculated reward by the assigned priority number, the purpose of higher priority and greater reward weight can be achieved.

[0103] In step A5, the simulated reward value is propagated backward along the search path to update the cumulative reward and access times of all nodes on the path.

[0104] In step A6, by continuously repeating the aforementioned steps A2 to A5 until the simulation result converges or the number of repetitions reaches the specified number, in this way, at least two of the aforementioned change plans for each tobacco leaf raw material within the second specified duration in the future can be obtained.

[0105] By iterating the above process multiple times, the quality estimation of nodes in the search tree can be gradually improved, thus providing guidance for selecting the optimal action in the current state. This method combines the advantages of stochastic simulation and deterministic tree search, can effectively handle high-dimensional and complex state spaces with limited computing resources, and can stop the calculation at any time to obtain the best result of the current calculation. Among them, the specified number of times can be flexibly set according to the actual situation.

[0106] During the process of creating nodes, discrete features such as tobacco leaf style, position, and grade in the tobacco leaf features can be encoded as numerical vectors to accelerate the state matching speed. In the search tree, a hash table can be used to store the accessed node states to avoid repeated calculations.

[0107] If selected from all the inventory tobacco leaves, it will result in an overly large action space. In fact, when making a selection, it will not deviate too much from the original tobacco leaves. Therefore, the action range can be limited to the top five tobacco leaves that are most similar to the tobacco leaves to be replaced as candidate actions for replacement. In addition, a simple default policy is required during the simulation phase. For example, the default policy used can be the tobacco leaf with the highest reward (most similar) among the currently selectable replacement tobacco leaves.

[0108] In step 140, using a preset decision-making strategy, from at least two of the said variation schemes, determine the optimal balance scheme for each tobacco leaf raw material, including:

[0109] Convert the data of at least two of the said variation schemes into a five-tuple, denoted as (S, A, P, R, γ), where S is the state space, representing the set of possible states where the tobacco leaf raw material is located; A is the action space, representing the set of actions that can be taken in each state; P(s t+1 ∣s t ,a t ) is the state transition probability function, representing the probability of transitioning to the next state s t after taking action a in state s t+1 ; R(s t ,a t ) is the reward function, representing the immediate reward obtained by taking action a in state s; γ ∈ [0, 1] is the discount factor, used to weigh the importance of the current reward and future rewards;

[0110] At time t, when state s t ∈ S, take action a t ∈ A according to the policy π(a∣s), so that state s t transitions to the next state s t+1 ∣s t ,a t ) with probability P(s t+1 , and return the reward R(st , a t ), obtain the return of each of the said change scenarios;

[0111] Use a preset function to determine the change scenario corresponding to maximizing the long-term cumulative return as the said optimal balance scenario, and the preset function is:

[0112]

[0113] where s0 refers to the state at t = 0, and s ′ refers to the initial state; s0 = s ′ That is, it means that at time t = 0, it is in the initial state.

[0114] In the decision-making process of step 140, the agent interacts with the environment to maximize the long-term cumulative return. Specifically, the agent (electronic device) at time t, state s t ∈ S, takes action a t ∈ A, such that the state transfers to the next state s t+1 ∣ s t , a t ) with probability P(s t+1 ), and returns the return R(s t , a t ). The core task of decision-making is to find a policy π(a∣s) that maximizes the long-term cumulative return, which is the above formula (2).

[0115] In this way, combined with the reward, the optimal balance scenario can be selected. The enterprise can efficiently manage the tobacco leaf inventory, while ensuring continuous production and the consistency of the quality of the cigarette products produced, and minimizing resource waste and substitution costs.

[0116] In this embodiment, by simulating and modeling the tobacco leaf inventory balance as the decision-making process of step 140, the problem of high discreteness and explosive growth of the solution space brought about by integer constraints can be effectively addressed. Through this modeling method, the agent can make flexible decisions in a complex environment and maximize the long-term cumulative return. Specifically, this method can not only accurately reflect the changes in the tobacco leaf inventory and the requirements for formula adjustment, but also the design of the reward function is more intuitive compared to constructing an optimization problem.

[0117] In this embodiment, the method may further include:

[0118] Classify each item of data in the said optimal balance scenario, and use a chart for visual display;

[0119] When the available usage duration is less than or equal to a preset duration indicating usage warning, a warning prompt is issued.

[0120] In this embodiment, the icon can be, but is not limited to, a bar chart, a pie chart, a line chart, etc. The preset duration for the warning prompt can be flexibly set according to the actual situation, and the prompt method can be on-site lighting and sound prompts, or remote prompts can be achieved through text messages, voice calls, emails, etc.

[0121] As an example, the inventor takes the corresponding formula for producing cigarette sticks as the research object. Each formula contains corresponding tobacco leaf characteristics (tobacco leaf style / flavor type, tobacco leaf grade / quality, tobacco leaf part, storage duration / warehousing year), the set time endpoint (the second specified duration) is two years, and 5000 iterations are carried out to obtain stable and reliable simulation results. The alternative results can be shown in Table 3 below.

[0122] Table 3:

[0123]

[0124] From the content of Table 3 above, it can be clearly seen that the simulation results generated by this method contain rich information. It not only shows the time of simulation substitution but also clearly points out the types of tobacco leaves involved, even down to specific tobacco leaf varieties. This detailed simulation result enables the tobacco leaf allocation suggestion to be accurate to specific production areas and grades, providing a more scientific basis for the enterprise in tobacco leaf resource management and production decision-making. In contrast, traditional manual calculation methods usually classify tobacco leaves into large categories and analyze based on the data of these large categories. This way limits the accurate prediction and positioning of the changes in specific tobacco leaf inventory and usage, resulting in insufficient scientific nature of the decision-making.

[0125] Based on the simulation results, it is also possible to effectively track the changes in tobacco leaf inventory, master the usage cycle, consumption speed, and possible depletion time of tobacco leaves. As an example, the heat map of the change in tobacco leaf inventory obtained by simulation can be as Figure 2 shown (since the quantity of raw tobacco leaves is huge, only about 100 tobacco leaves with frequent changes in the first 12 months are shown in the figure). The abscissa is time (month), and the ordinate is the number of tobacco leaves. The heat map of tobacco leaf inventory data is the percentage data of the current inventory of the corresponding tobacco leaf accounting for the initial inventory. The heat map intuitively reflects the shortage situation and consumption status of tobacco leaves. Through this information, managers can quickly confirm which tobacco leaf varieties are facing shortages and take corresponding measures in a timely manner to adjust, thus ensuring the smooth progress of production. This warning mechanism is of great significance for maintaining the stability of the formula and improving production efficiency.

[0126] In this embodiment, the calculated granularity is significantly lower over time. Therefore, analysis can be carried out within a more detailed time frame. This advantage enables managers to obtain more information in a shorter time, thereby providing more accurate support for decision-making. Through in-depth analysis of the simulation results, it is beneficial for managers to understand the final inventory changes and provide a practical guidance plan for the allocation of tobacco leaves. This precise analysis and prediction ability not only improves the utilization efficiency of resources but also provides an important basis for formulating the future production strategy of the enterprise.

[0127] Meanwhile, in the cigarette formula, style is one of the most crucial factors affecting cigarette quality. Therefore, it is necessary to monitor the number of months of use of the raw material inventory for each style. As an example, operators can group all raw materials by style and perform the same operation on the formula to obtain the raw material inventory for each style and the consumption of various styles of raw materials used in each formula, thereby calculating the available number of months for each style, as Figure 3 shown.

[0128] For the calculated results of the available number of months of raw materials used above, according to factors such as the difficulty of procurement for different styles of raw materials, the warning lines for inventory use are divided respectively according to the principles of tight, normal, and loose. For tight raw materials, balance is achieved through substitution, and for loose raw materials, balance is achieved by accelerating usage. As an example, the warning levels for the available number of months of raw materials in inventory are shown in Table 4.

[0129] Table 4: Warning for the available number of months of raw materials in inventory (months)

[0130]

[0131] Based on the simulation results of the simulation, the number of months of use of each raw material in the simulation can be obtained, and according to the previous warning division for each style of raw material, the corresponding bar chart can be obtained, as Figure 3 shown, where the value on the vertical axis refers to the number of months of use. Figure 3 In [figure], the number of months of use of the tobacco leaves of style C18 reaches 1400 because when calculating consumption, two formulas are taken as examples. Therefore, for some tobacco leaves with low consumption and high inventory, the number of months of use is relatively high. Operators can also use the corresponding time points as the vertical coordinate to plot a graph to obtain the time points when each tobacco leaf raw material participates in consumption.

[0132] The embodiment of the present application also provides an electronic device, which may include a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device can execute the corresponding steps in the following tobacco leaf raw material inventory management method.

[0133] In this embodiment, the processor may be, but is not limited to, a Central Processing Unit (CPU), a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.

[0134] The memory may be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the memory may be used to store the basic data of the tobacco leaf raw materials in the current inventory and the planned production consumption, etc. Of course, the memory may also be used to store a program, and after receiving an execution instruction, the processor executes the program.

[0135] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described electronic device can refer to the corresponding processes of the various steps in the foregoing method, and will not be elaborated herein too much.

[0136] The embodiments of the present application further provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium, and when the computer program runs on a computer, the computer is enabled to execute the tobacco leaf raw material inventory management method as described in the above embodiments.

[0137] The embodiments of the present application further provide a computer program product, including a computer program, and when the computer program is executed by a processor, the various steps in the above-described tobacco leaf raw material inventory management method are implemented.

[0138] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware, or can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for enabling a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute the methods described in the various implementation scenarios of the present application.

[0139] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions. Additionally, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0140] The above are only the embodiments of the present application and are not intended to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for inventory management of tobacco leaf raw materials, characterized in that, The method includes: Obtaining the basic data and planned production consumption of the tobacco leaf raw materials in the current inventory, where the basic data includes the remaining quantity and tobacco leaf characteristics of each tobacco leaf raw material, and the tobacco leaf characteristics include tobacco leaf style, tobacco leaf position, tobacco leaf grade, and storage duration, and the planned production consumption includes the input quantity and consumption quantity of each tobacco leaf raw material within the first specified duration in the future; Based on the basic data, determining the substitutable tobacco leaves for each tobacco leaf raw material by using a preset substitution constraint strategy; Based on the planned production consumption, the basic data, and the substitutable tobacco leaves for each tobacco leaf raw material, using a preset search algorithm to estimate at least two change scenarios for each tobacco leaf raw material in the current inventory within the second specified duration in the future, where the change scenarios include the remaining usage duration and substitution status of each tobacco leaf raw material, and the second specified duration is less than or equal to the first specified duration; Using a preset decision-making strategy to determine the optimal balance scenario for each tobacco leaf raw material from at least two of the change scenarios.

2. The method according to claim 1, characterized in that, Based on the basic data, determining the substitutable tobacco leaves for each tobacco leaf raw material by using a preset substitution constraint strategy, including: Based on the tobacco leaf characteristics of each tobacco leaf raw material in the basic data, determining the substitutable tobacco leaves for each tobacco leaf raw material, where the tobacco leaf style of the substitutable tobacco leaves is the same as or similar to that of the corresponding tobacco leaf raw material, and the tobacco leaf position and tobacco leaf grade of the substitutable tobacco leaves are the same as those of the corresponding tobacco leaf raw material, and the storage duration of the substitutable tobacco leaves indicates being within the specified aging and maturity period range, and similar tobacco leaf styles refer to two or more tobacco leaf styles having a specified association relationship.

3. The method according to claim 1, wherein Based on the planned production consumption, the basic data, and the substitutable tobacco leaves for each tobacco leaf raw material, using a preset search algorithm to estimate at least two change scenarios for each tobacco leaf raw material in the current inventory within the second specified duration in the future, including: Step A1, for each tobacco leaf raw material in the inventory, based on the current basic data, planned production consumption, and remaining quantity of the substitutable tobacco leaves, creating a plurality of nodes, where the plurality of nodes are used to form a search tree, and the basic data serves as the root node of the search tree; Step A2, for each tobacco leaf raw material in the inventory, starting from the root node, using a heuristic strategy to select the optimal node from the plurality of nodes; Step A3, when the optimal node is a first type of node indicating not fully expanded, then based on the plurality of nodes, expanding one or more unexplored nodes at the first type of node to serve as expansion nodes; Step A4, based on the selected optimal node or the expansion node, simulating and calculating the change scenario of the optimal node or the expansion node within the second specified duration in the future to obtain a simulation result, where the simulation result includes the cumulative reward of each change scenario calculated by using a preset reward and punishment function, and the cumulative reward is positively correlated with the inventory balance of the tobacco leaf raw material; Step A5, backpropagating the cumulative reward to all nodes in the selected path to update the statistical information of the corresponding nodes in Step A1, where the statistical information includes the access times and average rewards of the corresponding nodes. Step A6: Based on the updated nodes, repeat Steps A2 to A5 until the simulation result converges or the number of repetitions reaches the specified number, and obtain at least two of the said change scenarios for each tobacco leaf raw material within the second specified future duration.

4. The method according to claim 3, wherein Step A2: For each tobacco leaf raw material in the inventory, starting from the root node, use a heuristic strategy to select the optimal node from the multiple nodes, including: For each tobacco leaf raw material in the inventory, starting from the root node, use a first preset formula to select the optimal node from the multiple nodes, and the first preset formula is: Where a * denotes the optimal node; A(s) is the available action in state s, and the available action includes one of the storage, consumption of the current tobacco leaf raw material, and substitution of alternative tobacco leaves; state s refers to the root node or the current node, indicating the remaining amount of the current tobacco leaf raw material; Q(s,a) represents the average return when taking action a in state s; N(s) represents the number of times state s has been visited and the simulation calculation has been completed; N(s,a) represents the number of times action a has been taken in state s and the simulation calculation has been completed; O(s) represents the number of times state s has been visited and the simulation calculation has not been completed; O(s,a) represents the number of times action a has been taken in state s and the simulation calculation has not been completed; C is a hyperparameter used to control the balance.

5. The method according to claim 4, wherein Use a preset decision-making strategy to determine the optimal balance scenario for each tobacco leaf raw material from at least two of the said change scenarios, including: Convert the data of at least two of the said variation scenarios into a five-tuple, denoted as (S, A, P, R, γ), where S is the state space, representing the set of possible states of the tobacco leaf raw material; A is the action space, representing the set of actions that can be taken in each state; P(s t+1 ∣s t ,a t ) is the state transition probability function, representing the probability of transitioning to the next state s t after taking the action a in the state s t+1 ; R(s t ,a t ) is the reward function, representing the immediate reward obtained by taking the action a in the state s; γ ∈ [0, 1] is the discount factor; At time t, state s t When ∈ S, take action a according to policy π(a∣s) t ∈ A, such that state s t With probability P(s t+1 ∣s t ,a t ) transitions to the next state s t+1 , and returns the reward R(s t ,a t ), obtaining the rewards for each of the said change scenarios; Determine the maximization of the long-term cumulative return using a preset function The corresponding change plan is used as the optimal balance plan, and the preset function is as follows: Among them, s0 refers to the state at t = 0, and s ′ refers to the initial state.

6. The method according to claim 4, wherein The preset reward and punishment function includes: a first type of function related to the degree of compliance of the tobacco leaf characteristics between the current tobacco leaf raw material and the alternative tobacco leaf, a second type of function positively correlated with the available duration of the alternative tobacco leaf, and the priority corresponding to the brand of the produced cigarette; The first type of function includes: a first function inversely correlated with the style crossover between the current tobacco leaf raw material and the alternative tobacco leaf, a second function inversely correlated with the tobacco leaf distance, a second function inversely correlated with the tobacco leaf grade difference, and a fourth function inversely correlated with the aging degree crossover.

7. The method according to claim 1, wherein The optimal balance scenario includes the remaining quantity, available duration, replacement time, and the type of alternative tobacco leaf used at the time of replacement of each tobacco leaf raw material changing over time within the second specified future duration; The method further includes: Classify each piece of data in the optimal balance scenario and visually display it using a chart; When the available duration is less than or equal to a preset duration indicating usage warning, issue a warning prompt.

8. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled to each other. The memory stores a computer program. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. When the computer program runs on a computer, the computer executes the method according to any one of claims 1-7.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-7.