Cigarette inventory management method and device, electronic equipment and storage medium
Through genetic algorithms, the cigarette inventory management solution is optimized, and the problems of inefficient inventory management and error-prone in the existing technology are solved, and fast and accurate inventory management is achieved, which meets the requirements of accuracy and real-time.
Patent Information
- Application Number
- CN202510178287.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-06
AI Technical Summary
The existing cigarette inventory management methods are inefficient and error-prone, making it difficult to achieve accuracy and real-time requirements.
By obtaining the initial individuals in the initial population, each individual represents a cigarette inventory management plan, using genetic algorithms to perform cross-and-mutation operations, generating target offspring individuals, and gradually optimizing the inventory management plan.
It realizes relatively fast and accurate cigarette inventory management, improves the efficiency and accuracy of inventory management, and meets the requirements of accuracy and real-time.
Smart Images

Figure CN120106736A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer processing technology, and in particular to a cigarette inventory management method, device, electronic equipment and storage medium. Background Art
[0002] Cigarette inventory management is an important part of the production and operation management of cigarette enterprises. It is directly related to the production efficiency, cost control and market response speed of enterprises. Accurate inventory management can not only avoid the waste of resources caused by product backlogs, but also ensure market supply and maintain brand image. It is the key to the stable operation and sustainable development of enterprises.
[0003] In the related art, cigarette inventory management methods often rely on manual operation management mode. However, due to the changing market demand for cigarettes, the wide variety of products, and the large differences in demand patterns and product shelf life of different varieties, this traditional management method is not only inefficient, but also prone to errors, making it difficult to achieve the accuracy and real-time requirements of cigarette inventory management. Summary of the invention
[0004] The present invention provides a cigarette inventory management method, device, electronic equipment and storage medium to achieve relatively fast and accurate management of cigarette inventory, thereby achieving the technical effect of the accuracy and real-time requirements of cigarette inventory management.
[0005] According to one aspect of the present invention, there is provided a cigarette inventory management method, the method comprising:
[0006] Acquire an initial population including a plurality of initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to a plurality of groups of decision variable values, and each group of decision variables includes a cigarette production plan, a cigarette safety inventory, and a cigarette minimum inventory;
[0007] The initial population is used as the current population, a first preset number of initial individuals are selected from the current population as parent individuals to enter the mating pool, crossover and mutation operations are performed on the parent individuals in the mating pool to generate target offspring individuals, the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population;
[0008] When the new population reaches the preset population update end condition, the new population is used as the target population, the target individual in the target population is determined, and the cigarette inventory management plan corresponding to the target individual is used as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
[0009] According to another aspect of the present invention, a cigarette inventory management device is provided. The device comprises:
[0010] An initial population obtaining module is used to obtain an initial population including a plurality of initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to a plurality of groups of decision variable values, and each group of decision variables includes a cigarette production plan, a cigarette safety inventory, and a cigarette minimum inventory;
[0011] A population individual generation module, used to take the initial population as the current population, select a first preset number of initial individuals from the current population as parent individuals to enter a mating pool, perform crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merge the current population and the generated target offspring individuals to obtain a merged population, and select a second preset number of individuals from the merged population to obtain a new population;
[0012] The cigarette inventory management module is used to take the new population as the target population, determine the target individual in the target population, and take the cigarette inventory management plan corresponding to the target individual as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan when the new population reaches the preset population update end condition.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cigarette inventory management method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cigarette inventory management method described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention is to obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, and each cigarette inventory management plan corresponds to the values of multiple groups of decision variables. In the embodiment of the present invention, each group of decision variables includes the planned production quantity of cigarettes, the safety inventory quantity of cigarettes, and the minimum inventory quantity of cigarettes, so that the cigarette inventory management plan can achieve a good balance in decision variables such as the planned production quantity of cigarettes, the safety inventory quantity, and the minimum inventory quantity, thereby improving the efficiency and accuracy of inventory management. Afterwards, the initial population is used as the current population, and a first preset number of initial individuals are selected from the current population as parent individuals to enter the mating pool, and the parent individuals in the mating pool are crossover and mutation operations are performed to generate target offspring individuals, and the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population. In the embodiment of the present invention, the diversity of the population can be increased through the crossover and mutation operations of individuals.
[0019] When the new population reaches the preset population update end condition, the new population is used as the target population, the target individual in the target population is determined, and the cigarette inventory management plan corresponding to the target individual is used as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan. The technical solution of the embodiment of the present invention solves the technical problems of low efficiency and easy errors in the related art of cigarette inventory management, and realizes relatively fast and accurate management of cigarette inventory, thereby achieving the technical effect of the accuracy and real-time requirements of cigarette inventory management.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a flow chart of a cigarette inventory management method provided by an embodiment of the present invention;
[0023] Figure 2 A schematic diagram of a flow chart of a cigarette inventory management method provided by an embodiment of the present invention;
[0024] Figure 3A schematic diagram of a flow chart of a cigarette inventory management method provided by an embodiment of the present invention;
[0025] Figure 4 A schematic diagram of the structure of a cigarette inventory management device provided by an embodiment of the present invention;
[0026] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0030] Figure 1 The present invention provides a flowchart of a cigarette inventory management method. This embodiment is applicable to the management of cigarette inventory. The method can be executed by a cigarette inventory management device. The cigarette inventory management device can be implemented in the form of hardware and / or software. The cigarette inventory management device can be configured in an electronic device such as a computer or a server. Figure 1 As shown, the method of this embodiment includes:
[0031] S110. Obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to multiple groups of decision variable values, and each group of decision variables includes a planned cigarette production quantity, a cigarette safety inventory quantity, and a minimum cigarette inventory quantity.
[0032] Among them, the initial population can be understood as a set composed of multiple initial individuals. Each initial individual represents a potential cigarette inventory management plan. The cigarette inventory management plan can be understood as a plan for managing cigarette inventory. Each cigarette inventory management plan corresponds to the values of multiple groups of decision variables, and each group of decision variables includes the planned production quantity of cigarettes, the safety inventory quantity of cigarettes, and the minimum inventory quantity of cigarettes. In other words, the initial individuals in the initial population correspond to the decision variables of cigarette variety i. Exemplarily, if there are N cigarette varieties, each initial individual contains 3N values, and the initial individual can be represented by an array or vector, such as [A1, A2, A3, B1, B2, B3, ...], where A and B represent cigarette varieties respectively. A1, A2 and A3 can represent the three decision variables of the production plan quantity, safety inventory quantity and minimum inventory level of cigarette variety A respectively. Similarly, B1, B2 and B3 can represent the three decision variables of the production plan quantity, safety inventory quantity and minimum inventory level of cigarette variety B respectively.
[0033] In an embodiment of the present invention, each cigarette inventory management scheme is encoded into a chromosome, each chromosome includes multiple sets of decision variable values, and the value of each decision variable corresponds to a single gene in the chromosome. Exemplarily, when a set of decision variables for cigarette inventory management includes the planned cigarette production quantity, the cigarette safety inventory quantity, and the minimum cigarette inventory quantity, the structure of the chromosome of the initial individual in the initial population may include 3N genes, i.e., 3 decision variables for N cigarette varieties. Optionally, a real number encoding method may be used to encode each chromosome. It should be noted that the number of genes included in the chromosome obtained by encoding each cigarette inventory management scheme may be the same or different. In short, the number of values of decision variables corresponding to different cigarette inventory management schemes may be the same or different.
[0034] In an embodiment of the present invention, each group of decision variables may include a planned production quantity of cigarettes, a safety stock of cigarettes, and a minimum stock of cigarettes. Among them, the planned production quantity of cigarettes can be expressed as the planned production quantity of a certain cigarette variety (such as cigarette variety i) within a certain production cycle, which determines the production quantity of each cigarette variety in each production cycle. The safety stock of cigarettes can be expressed as the safety stock of a certain cigarette variety, which determines the duration for which the safety stock can meet demand when the actual inventory level drops to the minimum inventory level. The minimum inventory of cigarettes can be expressed as the minimum inventory level of a certain cigarette variety, or the reproduction point. Exemplarily, when the actual inventory level of cigarette variety i drops to the minimum inventory level, cigarette variety i is included in the production plan of the next production cycle.
[0035] In an embodiment of the present invention, the acquisition of an initial population including a plurality of initial individuals may include: determining the variable interval of each decision variable for cigarette inventory management; using an improved genetic algorithm to generate multiple sets of decision variable values according to the variable interval of each decision variable, and obtaining an initial population including a plurality of initial individuals. The variable interval of the decision variable may be obtained based on the upper and lower limits of the decision variable. The upper and lower limits of the decision variable may be preset. It should be noted that the variable intervals of different decision variables may be the same or different.
[0036] In an embodiment of the present invention, generating multiple groups of decision variable values according to the variable interval of each decision variable may include: randomly generating multiple groups of decision variable values according to the variable interval of each decision variable. Specifically, a method combining random initialization and heuristic initialization may be used to generate multiple groups of decision variable values to obtain an initial population. Based on this, multiple groups of decision variable values may also be generated according to preset constraints of cigarette inventory management. In other words, multiple groups of decision variable values may be generated based on the preset constraints of cigarette inventory management and the variable interval of each decision variable of cigarette inventory management. In an embodiment of the present invention, the preset constraints may include that the cigarette inventory is not higher than the upper limit of the inventory capacity, and / or that the cigarette inventory demand satisfaction rate is not lower than the lower limit of the cigarette demand satisfaction rate.
[0037] S120, taking the initial population as the current population, selecting a first preset number of initial individuals from the current population as parent individuals to enter a mating pool, performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merging the current population and the generated target offspring individuals to obtain a merged population, and selecting a second preset number of individuals from the merged population to obtain a new population.
[0038] Among them, the first preset number can be pre-set according to actual needs, and its value is not specifically limited here, for example, 10, 20 or 25, etc. The parent individual can be understood as the initial individual selected from the current population. In an embodiment of the present invention, the role of the mating pool is to screen out individuals with higher fitness or certain specific excellent characteristics from the current population for subsequent crossover operations. Through the crossover of individuals in the mating pool, new offspring individuals can be generated, and these offspring individuals may inherit the excellent characteristics of their parents, and even surpass their parents in some aspects, thereby promoting the evolution of the entire population. The target offspring individual can be understood as a new individual generated after the crossover and mutation operations are performed based on the parent individuals in the mating pool. The second preset number can be set according to actual needs, and its value is not specifically limited here, for example, 5, 10, 20, etc. It should be noted that the first preset number and the second preset number can be the same or different, and they are not specifically limited here.
[0039] Specifically, after obtaining the initial population, the initial population can first be used as the current population. Afterwards, the individual fitness value of each initial individual in the current population can be calculated; thus, a first preset number of initial individuals can be selected from the current population to enter the mating pool as parent individuals. Then, crossover and mutation operations can be performed on the parent individuals in the mating pool, so that new individuals can be obtained, that is, target offspring individuals are generated. Then, the current population and the generated target offspring individuals can be merged to obtain a merged population. After obtaining the merged population, a second preset number of individuals can be selected from the merged population according to the individual fitness value of each individual in the merged population to obtain a new population.
[0040] In an embodiment of the present invention, crossover and mutation operations are performed on the parent individuals in the mating pool to obtain new individuals, including: first, a crossover operation can be performed on the parent individuals in the mating pool to obtain a crossover individual. After obtaining the crossover individual, it can be determined whether the crossover individual needs to be mutated. If so, a mutation operation can be performed on the crossover individual to obtain a mutated individual. Then, a target offspring individual can be obtained based on the mutated individual. Specifically, the mutated or obtained individual can be used as the target offspring individual. It is understandable that when the crossover individual does not need to be mutated, the crossover individual can be used as the target offspring individual.
[0041] In an embodiment of the present invention, selecting a second preset number of individuals from the merged population to obtain a new population may include: constructing a new population based on the second preset number of individuals selected from the merged population; or deleting individuals from the merged population except the second preset number of individuals selected, so that the deleted population can be used as a new population.
[0042] In an embodiment of the present invention, after performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, it also includes: detecting the target offspring individuals based on the preset constraints of cigarette inventory management to obtain the detection results of the target offspring individuals. Among them, the preset constraints may include that the cigarette inventory is not higher than the upper limit of the inventory capacity, and / or that the cigarette inventory demand satisfaction rate is not lower than the lower limit of the cigarette demand satisfaction rate; when the detection result is that the target offspring individual does not meet the preset constraints, the target offspring individual can be repaired to obtain an individual that meets the preset constraints. Thus, the individual that meets the preset constraints can be used as the target offspring individual. It can be understood that the detection result of the target offspring individual can be that the target offspring individual meets the preset constraints, or it can be that the target offspring individual does not meet the preset constraints. The advantage of such processing is that the new individual obtained after performing crossover and mutation operations on the parent individuals can better meet the needs of cigarette inventory management.
[0043] S130. When the new population reaches a preset population update termination condition, the new population is used as a target population, a target individual in the target population is determined, and a cigarette inventory management plan corresponding to the target individual is used as a target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
[0044] In an embodiment of the present invention, the preset population update condition may be whether the preset population iteration number is reached, or whether the fitness value of the population reaches the preset population fitness threshold, or whether the change of the fitness value of the population tends to be stable. The target population can be understood as a population that has reached the preset population update end condition. Optionally, the target population can be a Pareto optimal solution set for a multi-objective optimization problem with cigarette inventory management; wherein the multi-objective optimization problem of cigarette inventory management can be based on the planned production quantity of cigarettes, the safe inventory quantity of cigarettes, and the minimum inventory quantity of cigarettes as decision variables; with the cigarette inventory quantity not higher than the upper limit of the inventory capacity, and / or the cigarette inventory demand satisfaction rate not lower than the lower limit of the cigarette demand satisfaction rate as constraints, and the cigarette inventory cost is minimized, the cigarette inventory risk is minimized, and the cigarette product validity period utilization rate is maximized as the objective function. In an embodiment of the present invention, the number of individuals in the target population can be one, two, or more than two. In practical applications, the number of individuals in the target population is usually multiple.
[0045] In the embodiment of the present invention, the target individual can be understood as an individual in the target population that meets specific requirements. In the embodiment of the present invention, the determination of the target individual in the target population includes: determining the individual fitness value of each individual in the target population, performing non-dominated sorting on the individuals in the target population based on the individual fitness value, and determining the target individual in the target population based on the result of the non-dominated sorting. Wherein, determining the individual fitness of each individual in the target population includes: using a pre-constructed fitness function to calculate the individual fitness value of each individual in the target population.
[0046] Based on the above embodiment, the method may further include: when the new population does not meet the preset population update end condition, the new population can be determined as the current population, and the parent individuals in the mating pool are repeatedly subjected to crossover and mutation operations to generate target offspring individuals, the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population, so as to obtain the target population.
[0047] The technical solution of the embodiment of the present invention is to obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, and each cigarette inventory management plan corresponds to the values of multiple groups of decision variables. In the embodiment of the present invention, each group of decision variables includes the planned production quantity of cigarettes, the safety inventory quantity of cigarettes, and the minimum inventory quantity of cigarettes, so that the cigarette inventory management plan can achieve a good balance in decision variables such as the planned production quantity of cigarettes, the safety inventory quantity, and the minimum inventory quantity, thereby improving the efficiency and accuracy of inventory management. Afterwards, the initial population is used as the current population, and a first preset number of initial individuals are selected from the current population as parent individuals to enter the mating pool, and the parent individuals in the mating pool are crossover and mutation operations are performed to generate target offspring individuals, and the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population. In the embodiment of the present invention, the diversity of the population can be increased through the crossover and mutation operations of individuals.
[0048] When the new population reaches the preset population update end condition, the new population is used as the target population, the target individual in the target population is determined, and the cigarette inventory management plan corresponding to the target individual is used as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan. The technical solution of the embodiment of the present invention solves the technical problems of low efficiency and easy errors in the related art of cigarette inventory management, and realizes relatively fast and accurate management of cigarette inventory, thereby achieving the technical effect of the accuracy and real-time requirements of cigarette inventory management.
[0049] Figure 2 A flow chart of a cigarette inventory management method provided in an embodiment of the present invention, based on the aforementioned embodiment, optionally, the selecting of a first preset number of initial individuals from the current population as parent individuals to enter the mating pool includes: determining the individual fitness value of each initial individual in the current population based on a preset fitness function, wherein the preset fitness function is obtained based on an objective function constructed based on cigarette inventory management, wherein the objective function is constructed with the goals of minimizing cigarette inventory costs, minimizing cigarette inventory out-of-stock risks, and maximizing cigarette product validity period utilization; determining the Pareto rank and crowding distance of each initial individual according to the individual fitness value of each initial individual, and selecting a first preset number of initial individuals from the current population according to the Pareto rank and crowding distance of each initial individual, and allowing the selected initial individuals to enter the mating pool as parent individuals. Among them, the technical features identical or similar to those in the aforementioned embodiments are not repeated here. Figure 2 As shown, the method of this embodiment specifically includes:
[0050] S210. Obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to multiple groups of decision variable values, and each group of decision variables includes a planned cigarette production quantity, a cigarette safety inventory quantity, and a minimum cigarette inventory quantity.
[0051] S220, taking the initial population as the current population, determining the individual fitness value of each initial individual in the current population based on a preset fitness function, determining the Pareto level and crowding distance of each initial individual according to the individual fitness value of each initial individual, and selecting a first preset number of initial individuals from the current population according to the Pareto level and crowding distance of each initial individual, and entering the mating pool with the selected initial individuals as parent individuals.
[0052] In an embodiment of the present invention, the preset fitness function can be obtained based on the objective function constructed based on cigarette inventory management; wherein, the objective function can be constructed with the goals of minimizing cigarette inventory costs, minimizing cigarette inventory out-of-stock risks, and maximizing cigarette product validity period utilization.
[0053] In the embodiment of the present invention, the preset fitness function can be constructed by weighted summing the objective functions of minimizing cigarette inventory cost, minimizing cigarette inventory out-of-stock risk, and maximizing cigarette product validity period utilization rate. In other words, the preset fitness function can be constructed by weighted summing the objective functions of minimizing inventory cost, minimizing out-of-stock risk, and maximizing product validity period utilization rate.
[0054] Optionally, the preset fitness function may be expressed according to the following formula:
[0055] Fitness=w 1 ×f 1 ′ +w 2 ×f 2 ′ +w 3 ×f 3 ′
[0056] Among them, w 1 、w 2 and w 3 It can represent the weights of the three objective functions respectively. 1 ′ It can be expressed as the normalized minimum inventory cost target value. 2 ′ It can be expressed as the normalized minimum out-of-stock risk target value. 3 ′ It can be expressed as the normalized target value for maximizing product shelf life utilization.
[0057] Optionally, the normalized minimum inventory cost target value may be calculated according to the following formula:
[0058]
[0059] in, It can be expressed as the minimum value of the objective of minimizing inventory cost. It can be expressed as the maximum value of the objective of minimizing inventory cost.
[0060] In the embodiment of the present invention, the objective function of minimizing inventory cost can be expressed by the following formula:
[0061]
[0062] Among them, h i It can be expressed as the unit inventory cost of cigarette variety i, I it It can be expressed as the inventory of cigarette variety i at the end of the tth production cycle.
[0063] Optionally, the normalized minimized out-of-stock risk target value may be calculated according to the following formula:
[0064]
[0065] in, It can be expressed as the minimum value of the objective of minimizing the out-of-stock risk. It can be expressed as the maximum value of minimizing the out-of-stock risk objective.
[0066] In the embodiment of the present invention, the objective function of minimizing the risk of out-of-stock can be expressed by the following formula:
[0067]
[0068] Among them, p i It can be expressed as the unit out-of-stock penalty cost of cigarette variety i, D it It can be expressed as the demand for cigarette variety i in the tth production cycle.
[0069] Optionally, the normalized maximum product shelf life utilization target value may be calculated according to the following formula:
[0070]
[0071] in, It can be expressed as the minimum value of the objective of maximizing product shelf life utilization. It can be expressed as the maximum value of the objective of maximizing product shelf life utilization.
[0072] In the embodiment of the present invention, the objective function of maximizing the product shelf life utilization rate can be expressed by the following formula:
[0073]
[0074] Among them, S it It can be expressed as the remaining shelf life of cigarette variety i at the end of the tth production cycle. i It can be expressed as the total shelf life of cigarette variety i.
[0075] In an embodiment of the present invention, a first preset number of initial individuals are selected from the current population based on the Pareto level and the crowding distance of each of the initial individuals, and the selected initial individuals enter the mating pool as parent individuals. Specifically, a binary tournament selection method can be used to select a first preset number of initial individuals from the current population based on the Pareto level and the crowding distance of each of the initial individuals, and the selected initial individuals enter the mating pool as parent individuals.
[0076] In the embodiment of the present invention, after obtaining the Pareto rank and crowding distance of each initial individual in the current population, the variety relevance reward value of the initial individual can be calculated for each initial individual, wherein the variety relevance reward value can be used to evaluate the overall relevance level of the variety combination selected by the initial individual.
[0077] In an embodiment of the present invention, the method of calculating the variety correlation reward value of the initial individual can be specifically, for each initial individual in the current population, the cigarette variety number selected in the chromosome of the initial individual can be extracted to obtain a set including multiple variety combinations. After that, the correlation coefficient between each pair of cigarette varieties in the set can be calculated, so that a correlation coefficient matrix can be obtained. Then, the average value of all elements in the correlation coefficient matrix can be calculated, and the average value is used as the variety correlation reward value of the initial individual.
[0078] Based on this, the variety relevance bonus value can be calculated for each initial individual in the current population, and all individuals can be normalized to obtain the variety relevance bonus score for each individual. Furthermore, when calculating the fitness value of each individual in the population, the individual's variety relevance bonus score can be used as a bonus item and weightedly combined with other items in the fitness function. In an embodiment of the present invention, on the basis of Pareto rank order and crowding distance, an individual evaluation index based on variety relevance is introduced, and appropriate rewards are given to individuals who choose a variety combination with high relevance, which can guide the algorithm to search for high-quality solutions that take into account variety relevance.
[0079] Optionally, the correlation coefficient between each pair of cigarette varieties in the set can be calculated by the following formula:
[0080]
[0081] Among them, r ij It can be expressed as the correlation coefficient between cigarette variety i and cigarette variety j. K can be expressed as the total number of cigarette varieties. α, β, γ and δ can be expressed as weight parameters, and α+β+γ+δ=1 is satisfied.
[0082] in, It can be expressed as the correlation between the raw material usage of cigarette varieties i and j. The larger the value of this item, the higher the correlation between the raw material usage of the two cigarette varieties i and j. ij It can be expressed as the number of raw material types shared by two cigarette varieties i and j. i It can be expressed as the number of types of raw materials used in cigarette variety i. j It can be expressed as the number of types of raw materials used in cigarette variety j.
[0083] in, It can be expressed as the difference in sales price between cigarette variety i and cigarette variety j. The smaller the value, the closer the pricing strategies of the two cigarette varieties i and j are. i It can be expressed as the unit price of cigarette variety i. j It can be expressed as the unit price of cigarette variety j, pmax It can be expressed as the highest selling price among all cigarette varieties, p min It can be expressed as the lowest selling price among all cigarette varieties.
[0084] in, It can be expressed as the difference in demand patterns between cigarette varieties i and j. The smaller the value, the closer the demand patterns of the two cigarette varieties i and j are. i It can be expressed as the demand fluctuation coefficient of cigarette variety i in historical sales data, d j It can be expressed as the demand fluctuation coefficient of cigarette variety j in historical sales data, d max It can be expressed as the maximum demand fluctuation coefficient among all cigarette varieties, d min It is the minimum demand fluctuation coefficient among all cigarette varieties.
[0085] in, It can be expressed as the difference in the shelf life between cigarette varieties i and j. The smaller the value, the closer the shelf life of the two cigarette varieties i and j is. i It can be expressed as the shelf life of cigarette variety i. j It can be expressed as the shelf life of cigarette variety j, l max It can be expressed as the longest shelf life among all cigarette varieties, l min It can be expressed as the shortest shelf life among all cigarette varieties.
[0086] It should be noted that in the calculation formula of the above correlation coefficient, the cosine similarity form is used for the raw material correlation, and the value range is [0,1]. In addition, the normalized absolute difference is used for the differences in sales price, demand pattern, and shelf life, and the value range is also [0,1]. By taking a weighted average of the four items of sales price, demand pattern, and shelf life, the correlation between the two cigarette varieties can be more comprehensively evaluated.
[0087] S230, performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merging the current population and the generated target offspring individuals to obtain a merged population, and selecting a second preset number of individuals from the merged population to obtain a new population.
[0088] S240. When the new population reaches a preset population update termination condition, the new population is used as a target population, a target individual in the target population is determined, and a cigarette inventory management plan corresponding to the target individual is used as a target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
[0089] The technical solution of the embodiment of the present invention is to determine the individual fitness value of each initial individual in the current population based on a preset fitness function; wherein the preset fitness function is obtained based on the objective function constructed based on cigarette inventory management, and the objective function is constructed with the goals of minimizing cigarette inventory costs, minimizing cigarette inventory out-of-stock risks, and maximizing cigarette product validity period utilization; according to the individual fitness value of each initial individual, the Pareto level and crowding distance of each initial individual are determined, and according to the Pareto level and crowding distance of each initial individual, a first preset number of initial individuals are selected from the current population, and the selected initial individuals are used as parent individuals to enter the mating pool, thereby realizing the function of selecting a first preset number of initial individuals that relatively meet the requirements from the current population as parent individuals to enter the mating pool.
[0090] Figure 3 A flowchart of a cigarette inventory management method provided in an embodiment of the present invention, based on the above-mentioned embodiment, optionally, the crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals include: pairing the parent individuals in the mating pool in pairs to obtain parent individual pairs in the mating pool; for each parent individual in the parent individual pair, determining the adaptive crossover probability of the parent individual according to the fitness value of the parent individual, and determining whether the two parent individuals in the parent individual pair are subjected to crossover processing based on the adaptive crossover probability, and if so, crossover processing the two parent individuals to obtain a first offspring individual; for each first offspring individual, determining the individual fitness value of the first offspring individual, determining the adaptive mutation probability of the first offspring individual based on the individual fitness, and determining whether the first offspring individual is subjected to mutation processing based on the adaptive mutation probability, and if so, performing mutation processing on the crossed individual to obtain a second offspring individual, and using the second offspring individual as the target offspring individual. Among them, the technical features that are the same or similar to those in the above-mentioned embodiments are not repeated here. Figure 3 As shown, the method of this embodiment specifically includes:
[0091] S310. Obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to multiple groups of decision variable values, and each group of decision variables includes a planned cigarette production quantity, a cigarette safety inventory quantity, and a minimum cigarette inventory quantity.
[0092] S320, taking the initial population as the current population, selecting a first preset number of initial individuals from the current population as parent individuals to enter a mating pool, and pairing the parent individuals in the mating pool in pairs to obtain parent individual pairs in the mating pool.
[0093] The parent individual pairs can be obtained by pairing the parent individuals in the mating pool. It is understandable that a parent individual pair includes two parent individuals.
[0094] S330, for each parent individual in the parent individual pair, determine the adaptive crossover probability of the parent individual according to the fitness value of the parent individual, and determine whether to perform crossover processing on the two parent individuals in the parent individual pair based on the adaptive crossover probability, and if so, perform crossover processing on the two parent individuals to obtain a first offspring individual.
[0095] In an embodiment of the present invention, when it is determined that two parent individuals in the parent individual pair are to be crossover processed, an improved fragment-based crossover method can be used to crossover the two parent individuals in the parent individual pair to generate a new individual after the crossover. Specifically, the correlation coefficient between the two parent individuals in the parent individual pair can be calculated, that is, the correlation coefficient between each pair of cigarette varieties in the current population can be calculated. Afterwards, based on the correlation coefficient, a roulette wheel selection or tournament selection method can be used to select a pair of cigarette varieties with a correlation higher than a preset threshold as a crossover fragment. Then, each decision variable in the selected crossover fragment can be crossovered simultaneously to generate a new individual.
[0096] For example, there are two cigarette varieties, namely, parent generation 1 and parent generation 2. Parent generation 1: [1000, 200, 100, 1500, 300, 150]; parent generation 2: [1200, 250, 120, 1400, 280, 140]. After crossover between parent generation 1 and parent generation 2, the new offspring obtained is: [1000, 200, 100, 1400, 280, 140].
[0097] It should be noted that, compared with the traditional fragment-based crossover method, a variety is usually randomly selected as a crossover fragment, and the technical solution of this embodiment improves the traditional fragment-based crossover method in the individual crossover operation, taking into account the certain correlation between different cigarette varieties, such as shared raw materials and production equipment. Specifically, by selecting crossover fragments based on the correlation between cigarette varieties, individuals can better retain high-quality variety combination patterns during the crossover process, thereby improving the search efficiency of the algorithm.
[0098] In the embodiment of the present invention, the adaptive crossover probability can be used to determine whether the parent individuals need to be crossover processed. It is understandable that when the adaptive crossover probabilities of the two parent individuals both reach the preset crossover probability threshold, it indicates that the two parent individuals meet the individual crossover condition.
[0099] Optionally, determining the adaptive crossover probability of the parent individual according to the fitness value of the parent individual comprises: determining the adaptive crossover probability of the parent individual according to the fitness value of the parent individual according to the following formula:
[0100]
[0101] Among them, P c Represents the adaptive crossover probability of the parent individual, P c,max represents the upper limit of the crossover probability, P c,min represents the lower limit of the crossover probability, f ′ represents the individual fitness value of the parent individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
[0102] S340. For each first-generation individual, determine the individual fitness value of the first-generation individual, determine the adaptive mutation probability of the first-generation individual based on the individual fitness, determine whether to perform mutation processing on the first-generation individual according to the adaptive mutation probability, and if so, perform mutation processing on the individual after the crossover to obtain a second-generation individual, and use the second-generation individual as the target offspring individual.
[0103] In an embodiment of the present invention, when it is determined that the individuals after the crossover need to be mutated, an improved subject-based mutation method can be used to mutate the individuals after the crossover to obtain new individuals after mutation. Specifically, each decision variable of each cigarette variety can be mutated separately. During the mutation process, the amplitude of the mutation can be adaptively adjusted according to the mutation stage and the importance of the cigarette variety. For example, in the initial mutation stage, a relatively small amplitude of mutation is used for important varieties, and a relatively large amplitude of mutation is used for minor varieties; in the late mutation stage, a relatively small amplitude of mutation is used for each variety. Among them, the mutation stage can be defined according to the number of iterations or the degree of population convergence.
[0104] In the embodiment of the present invention, the importance of the cigarette variety can be determined according to the cigarette variety importance score. Optionally, the variety importance score can be determined according to the following formula:
[0105]
[0106] Among them, D i It can be expressed as the average demand for cigarette variety i. min and D max can be expressed as the minimum average demand and maximum average demand of all cigarette varieties. i It can be expressed as the unit profit of cigarette variety i. min and p max They can be expressed as the minimum unit profit and maximum unit profit of all cigarette varieties. i It can be expressed as the unit inventory cost of cigarette variety i. min and h max They can be expressed as the minimum unit inventory cost and maximum unit inventory cost of all cigarette varieties. i It can be expressed as the shelf life of cigarette variety i, L min and L max can be expressed as the minimum and maximum shelf life of all cigarette varieties, respectively, w D 、w p 、w h and w L is the weight parameter and satisfies w D +w p +w h +w L =1.
[0107] In the embodiment of the present invention, determining the adaptive mutation probability of the first offspring individual based on the individual fitness includes: determining the adaptive mutation probability of the first offspring individual based on the individual fitness according to the following formula:
[0108]
[0109] Among them, P m represents the adaptive mutation probability of the first offspring individual, P m,max represents the upper limit of the mutation probability, P m,min represents the lower limit of the mutation probability, f ′ represents the individual fitness value of the first generation individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
[0110] S350: Merge the current population and the generated target offspring individuals to obtain a merged population, and select a second preset number of individuals from the merged population to obtain a new population.
[0111] S360. When the new population reaches a preset population update termination condition, the new population is used as a target population, a target individual in the target population is determined, and a cigarette inventory management plan corresponding to the target individual is used as a target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
[0112] The technical solution of the embodiment of the present invention is to obtain the parent individual pair of the mating pool by pairing the parent individuals in the mating pool in pairs; for each parent individual in the parent individual pair, determine the adaptive crossover probability of the parent individual according to the fitness value of the parent individual, and determine whether the two parent individuals in the parent individual pair are to be crossovered based on the adaptive crossover probability; if so, crossover the two parent individuals to obtain the first offspring individual; for each first offspring individual, determine the individual fitness value of the first offspring individual, determine the adaptive mutation probability of the first offspring individual based on the individual fitness, and determine whether the first offspring individual is to be mutated according to the adaptive mutation probability; if so, mutate the individual after the crossover to obtain the second offspring individual, and use the second offspring individual as the target offspring individual, thereby realizing further refinement of performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals.
[0113] Figure 4 A schematic diagram of the structure of a cigarette inventory management device provided by an embodiment of the present invention. Figure 4 As shown, the device includes: an initial population obtaining module 410 , a population individual generating module 420 and a cigarette inventory management module 430 .
[0114] Among them, the initial population acquisition module 410 is used to obtain an initial population including multiple initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to the values of multiple groups of decision variables, and each group of decision variables includes the planned cigarette production quantity, the cigarette safety inventory quantity and the cigarette minimum inventory quantity; the population individual generation module 420 is used to use the initial population as the current population, select a first preset number of initial individuals from the current population as parent individuals to enter the mating pool, perform crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merge the current population and the generated target offspring individuals to obtain a merged population, and select a second preset number of individuals from the merged population to obtain a new population; the cigarette inventory management module 430 is used to use the new population as the target population when the new population reaches the preset population update end condition, determine the target individuals in the target population, and use the cigarette inventory management plan corresponding to the target individuals as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
[0115] The technical solution of the embodiment of the present invention is to obtain an initial population including multiple initial individuals through an initial population acquisition module, wherein each initial individual in the initial population represents a cigarette inventory management plan, and each cigarette inventory management plan corresponds to the values of multiple groups of decision variables. In the embodiment of the present invention, each group of decision variables includes the planned production quantity of cigarettes, the safety inventory quantity of cigarettes, and the minimum inventory quantity of cigarettes, so that the cigarette inventory management plan can achieve a good balance in decision variables such as the planned production quantity of cigarettes, the safety inventory quantity, and the minimum inventory quantity, thereby improving the efficiency and accuracy of inventory management. The initial population is used as the current population through the population individual generation module, and a first preset number of initial individuals are selected from the current population as parent individuals to enter the mating pool, and the parent individuals in the mating pool are crossover and mutation operations are performed to generate target offspring individuals, and the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population. In the embodiment of the present invention, the diversity of the population can be increased through the crossover and mutation operations of individuals. When the new population reaches the preset population update end condition, the cigarette inventory management module uses the new population as the target population, determines the target individual in the target population, and uses the cigarette inventory management plan corresponding to the target individual as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan. The technical solution of the embodiment of the present invention solves the technical problems of low efficiency and easy errors in the related art of cigarette inventory management, realizes relatively fast and accurate management of cigarette inventory, and thus achieves the technical effect of meeting the accuracy and real-time requirements of cigarette inventory management.
[0116] Optionally, the device also includes a population update module; wherein the population update module is used to determine the new population as the current population when the new population does not meet the preset population update termination conditions, and repeatedly perform crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merge the current population and the generated target offspring individuals to obtain a merged population, and select a second preset number of individuals from the merged population to obtain a new population, so as to obtain the target population.
[0117] Optionally, the population individual generation module 420 includes an initial individual selection unit; wherein the initial individual selection unit is used to determine the individual fitness value of each initial individual in the current population based on a preset fitness function; wherein the preset fitness function is obtained based on an objective function constructed based on cigarette inventory management, and the objective function is constructed with the goals of minimizing cigarette inventory costs, minimizing cigarette inventory out-of-stock risks, and maximizing cigarette product validity period utilization; the Pareto rank and crowding distance of each initial individual are determined according to the individual fitness value of each initial individual, and according to the Pareto rank and crowding distance of each initial individual, a first preset number of initial individuals are selected from the current population, and the selected initial individuals are entered into the mating pool as parent individuals.
[0118] Optionally, the population individual generation module 420 includes an individual generation unit; wherein the individual generation unit is used to pair the parent individuals in the mating pool in pairs to obtain the parent individual pairs in the mating pool; for each parent individual in the parent individual pair, determine the adaptive crossover probability of the parent individual according to the fitness value of the parent individual, and determine whether the two parent individuals in the parent individual pair are to be crossovered based on the adaptive crossover probability; if so, crossover the two parent individuals to obtain the first offspring individual; for each first offspring individual, determine the individual fitness value of the first offspring individual, determine the adaptive mutation probability of the first offspring individual based on the individual fitness, and determine whether the first offspring individual is to be mutated according to the adaptive mutation probability; if so, mutate the individual after the crossover to obtain the second offspring individual, and use the second offspring individual as the target offspring individual.
[0119] Optionally, the individual generation unit includes an adaptive crossover probability determination subunit; wherein the adaptive crossover probability determination subunit is used to:
[0120] The adaptive crossover probability of the parent individual is determined according to the fitness value of the parent individual according to the following formula:
[0121]
[0122] Among them, P c Represents the adaptive crossover probability of the parent individual, P c,max represents the upper limit of the crossover probability, P c,min represents the lower limit of the crossover probability, f ′ represents the individual fitness value of the parent individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
[0123] Optionally, the individual generation unit includes an adaptive mutation probability determination subunit; wherein the adaptive mutation probability determination subunit is used to:
[0124] The adaptive mutation probability of the first offspring individual is determined based on the individual fitness according to the following formula:
[0125]
[0126] Among them, P m represents the adaptive mutation probability of the first offspring individual, P m,max represents the upper limit of the mutation probability, P m,min represents the lower limit of the mutation probability, f ′ represents the individual fitness value of the first generation individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
[0127] Optionally, the device also includes an individual detection module; wherein the individual detection module is used to detect the target offspring individual based on preset constraints of cigarette inventory management after the parent individuals in the mating pool are subjected to crossover and mutation operations to generate the target offspring individual, so as to obtain the detection result of the target offspring individual; wherein the preset constraints include that the cigarette inventory amount is not higher than the upper limit of the inventory capacity, and / or that the cigarette inventory demand satisfaction rate is not lower than the lower limit of the cigarette demand satisfaction rate; when the detection result is that the target offspring individual does not meet the preset constraints, the target offspring individual is repaired to obtain an individual that meets the preset constraints.
[0128] The cigarette inventory management device provided in the embodiment of the present invention can execute the cigarette inventory management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] It is worth noting that the various units and modules included in the above-mentioned cigarette inventory management device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0130] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0131] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0132] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0133] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the cigarette inventory management method.
[0134] In some embodiments, the cigarette inventory management method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the cigarette inventory management method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the cigarette inventory management method in any other appropriate manner (e.g., by means of firmware).
[0135] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0136] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0137] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0139] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0140] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0141] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0142] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cigarette inventory management method, characterized in that: include: Acquire an initial population including a plurality of initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to a plurality of groups of decision variable values, and each group of decision variables includes a cigarette production plan, a cigarette safety inventory, and a cigarette minimum inventory; The initial population is used as the current population, a first preset number of initial individuals are selected from the current population as parent individuals to enter the mating pool, crossover and mutation operations are performed on the parent individuals in the mating pool to generate target offspring individuals, the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population; When the new population reaches the preset population update end condition, the new population is used as the target population, the target individual in the target population is determined, and the cigarette inventory management plan corresponding to the target individual is used as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan.
2. The method according to claim 1, characterized in that The method further comprises: In the case that the new population does not meet the preset population update termination condition, the new population is determined as the current population, and the parent individuals in the mating pool are repeatedly subjected to crossover and mutation operations to generate target offspring individuals, the current population and the generated target offspring individuals are merged to obtain a merged population, and a second preset number of individuals are selected from the merged population to obtain a new population, so as to obtain the target population.
3. The method according to claim 1, characterized in that The step of selecting a first preset number of initial individuals from the current population as parent individuals to enter the mating pool comprises: Determining the individual fitness value of each initial individual in the current population based on a preset fitness function; wherein the preset fitness function is obtained based on an objective function constructed based on cigarette inventory management, and the objective function is constructed with the goals of minimizing cigarette inventory costs, minimizing cigarette inventory out-of-stock risks, and maximizing cigarette product validity period utilization; The Pareto level and crowding distance of each of the initial individuals are determined according to the individual fitness value of each of the initial individuals, and a first preset number of initial individuals are selected from the current population according to the Pareto level and crowding distance of each of the initial individuals, and the selected initial individuals enter the mating pool as parent individuals.
4. The method according to claim 1, characterized in that The step of performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals includes: Pairing the parent individuals in the mating pool in pairs to obtain pairs of parent individuals in the mating pool; For each parent individual in the parent individual pair, determine the adaptive crossover probability of the parent individual according to the fitness value of the parent individual, determine whether the two parent individuals in the parent individual pair are to be crossover processed based on the adaptive crossover probability, and if so, crossover the two parent individuals to obtain a first offspring individual; For each first-generation individual, determine the individual fitness value of the first-generation individual, determine the adaptive mutation probability of the first-generation individual based on the individual fitness, determine whether to perform mutation processing on the first-generation individual according to the adaptive mutation probability, and if so, perform mutation processing on the individual after the crossover to obtain a second-generation individual, and use the second-generation individual as the target offspring individual.
5. The method according to claim 4, characterized in that The step of determining the adaptive crossover probability of the parent individual according to the fitness value of the parent individual comprises: The adaptive crossover probability of the parent individual is determined according to the fitness value of the parent individual according to the following formula: Among them, P c Represents the adaptive crossover probability of the parent individual, P c,max represents the upper limit of the crossover probability, P c,min represents the lower limit of the crossover probability, f ′ represents the individual fitness value of the parent individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
6. The method according to claim 4, characterized in that The step of determining the adaptive mutation probability of the first offspring individual based on the individual fitness comprises: The adaptive mutation probability of the first offspring individual is determined based on the individual fitness according to the following formula: Among them, P m represents the adaptive mutation probability of the first offspring individual, P m,max represents the upper limit of the mutation probability, P m,min represents the lower limit of the mutation probability, f ′ represents the individual fitness value of the first generation individual, f max represents the maximum fitness value of the population, f avg Represents the average fitness value of the population.
7. The method according to claim 1, characterized in that After performing crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, the method further includes: The target offspring individual is tested based on preset constraints of cigarette inventory management to obtain a test result of the target offspring individual; wherein the preset constraints include that the cigarette inventory is not higher than the upper limit of the inventory capacity, and / or that the cigarette inventory demand satisfaction rate is not lower than the lower limit of the cigarette demand satisfaction rate; When the detection result shows that the target offspring individual does not meet the preset constraint condition, the target offspring individual is repaired to obtain an individual that meets the preset constraint condition.
8. A cigarette inventory management device, characterized in that: include: An initial population obtaining module is used to obtain an initial population including a plurality of initial individuals, wherein each initial individual in the initial population represents a cigarette inventory management plan, each cigarette inventory management plan corresponds to a plurality of groups of decision variable values, and each group of decision variables includes a cigarette production plan, a cigarette safety inventory, and a cigarette minimum inventory; A population individual generation module, used to take the initial population as the current population, select a first preset number of initial individuals from the current population as parent individuals to enter a mating pool, perform crossover and mutation operations on the parent individuals in the mating pool to generate target offspring individuals, merge the current population and the generated target offspring individuals to obtain a merged population, and select a second preset number of individuals from the merged population to obtain a new population; The cigarette inventory management module is used to take the new population as the target population, determine the target individual in the target population, and take the cigarette inventory management plan corresponding to the target individual as the target inventory management plan, so as to perform cigarette inventory management based on the target inventory management plan when the new population reaches the preset population update end condition.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the cigarette inventory management method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the cigarette inventory management method according to any one of claims 1 to 7 when executed.