Method and system for managing replenishment personnel based on Coxian model, and storage medium
By estimating the store owner's retention time based on the Coxian model, the problem of inaccurate inventory monitoring in unmanned retail cabinet technology is solved, and lower operating costs and higher management quality are achieved.
Patent Information
- Application Number
- CN202411654204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-04-29
AI Technical Summary
The existing unmanned retail cabinet technology is difficult to accurately monitor inventory status, resulting in low management quality of store owners, high risk of out-of-stock, and high operating costs.
Using a Coxian model-based method, by constructing and training the Coxian model, the probability distribution of store owner retention time is estimated and the budget plan for replenishment personnel is optimized.
It achieves a more accurate assessment of store owner retention time, reduces the risk of out-of-stock and operating costs, and improves the quality of shelf management.
Smart Images

Figure CN119904021A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned vending machines, and in particular to a method, system and storage medium for managing replenishment personnel of a Coxian model. Background Art
[0002] An unmanned retail cabinet is a vending machine where customers complete transactions by opening the door, picking up goods, closing the door, and paying automatically. Companies need to hire replenishment personnel (hereinafter referred to as store owners) to replenish goods regularly to ensure the diversity and quantity of goods to meet customer needs. Since unmanned retail cabinets cannot accurately monitor inventory status in real time, the common method in the industry is to avoid out-of-stock situations by replenishing safety stocks.
[0003] Generally speaking, a store owner will manage multiple shelves at the same time. Since the store owner has limited working hours, the more shelves a store owner manages, the lower the management quality of each shelf (because the management time per shelf becomes lower), and the higher the risk of out-of-stock. On the other hand, the more store owners are hired, the better the shelf management quality is, and the higher the operating cost of the shelf is (the cost of the store owner's salary per shelf becomes higher). The total number of store owners hired needs to balance the management quality and operating costs.
[0004] Ideally, in order to minimize operating costs, it is only necessary to hire enough store owners to meet the current shelf management needs. However, in reality, store owners may suddenly leave their jobs, and a certain number of reserve personnel are needed to replace the resigned store owners in a short-term emergency. At the same time, as the shelf locations expand, the total number of shelves increases, and the total number of store owners required also needs to increase accordingly. For this reason, the budget for staffing needs to take into account the future store owner and shelf conditions. Among them, predicting the retention time of the current store owner can more accurately estimate the minimum number of store owners required in the future. For example, if the current store owner retention time is short, the business needs to increase the recruitment efforts to mitigate the impact of a large number of short-term staff departures on normal business; if the current store owner retention time is long, the recruitment progress can be slowed down and the reserve personnel can be reduced to save costs.
[0005] In order to more accurately evaluate the store owner retention time, the present invention proposes a method for estimating the store owner retention time based on the Coxian model to optimize the replenishment staff budgeting plan, that is, using the Coxian model to approximate the store owner retention time probability distribution. The trained Coxian model can infer the store owner's retention probability, resignation risk coefficient, retention years expectation, and state probability distribution. Summary of the invention
[0006] To solve the above problems, the present invention provides the following technical solutions:
[0007] A method for managing replenishment personnel based on the Coxian model includes the following steps:
[0008] S1: Construct Coxian model;
[0009] S2: Initialize all parameters of the Coxian model;
[0010] S3: Calculate the likelihood function of the Coxian model with given parameters based on historical data;
[0011] S4: Update Coxian model parameters using optimization algorithm;
[0012] S5: Repeat the above steps S3 and S4 to obtain the trained Coxian model;
[0013] S6: Import the data into the trained Coxian model to obtain the probability distribution of the store owner’s retention time.
[0014] Based on the above technical solution, the present invention can also be improved as follows.
[0015] Furthermore, the step S1 includes the following steps:
[0016] S1-1. When constructing the Coxian model, fix the total length of the Markov chain based on historical experience, try different integers, and take the minimum integer m that fits the empirical distribution of historical data;
[0017] S1-2, according to the Coxian model, the transition rate λ from state i to state i+1 i , we get the transfer rate column vector λ, which is in the following form:
[0018] λ=(λ1,λ2,…,λ m-1 )
[0019] According to the Coxian model, the absorption rate μ from state i to the absorbing state i , the absorption rate column vector μ of the Coxian model is obtained in the following form:
[0020] μ=(μ1,μ2,…,μ m )
[0021] S1-3. Define the degradation transfer matrix of the Coxian model. The degradation transfer matrix is as follows:
[0022]
[0023] S1-4. Determine the optimization target. The optimization target is to maximize the log-likelihood function. The formula is as follows:
[0024]
[0025] The retention time is t i, f(t i ) and S(t i ) are the probability density function and the survival function respectively.
[0026] Furthermore, in step S1-3, the indicator function δ i =1 means the store owner has resigned, the indicator function δ i =0 means the owner is still employed.
[0027] Furthermore, in step S2, the method for initializing the parameters is to randomly generate 2m-1 decimals greater than 0 and assign them to the transfer rate column vector λ and the absorption rate column vector μ.
[0028] Furthermore, in step S3, for any set of Coxian model parameters, its log-likelihood function is numerically solved by (*).
[0029] Furthermore, the optimization algorithm used in step S4 is a gradient descent method or / and an EM algorithm, and the specific steps are as follows:
[0030] S4-1. Given any set of Coxian model parameters, numerically solve its log-likelihood function and its gradient by (*) Gradient Descent Update
[0031] Among them, α represents the learning rate of algorithm update;
[0032] S4-2-1, E step update 1 of them i =(0,…,0,1,0,…) i.e., a column vector whose i-th element is 1 and other elements are 0;
[0033] Among them, 1′ i is the corresponding row vector, Z i With N i,i+1 The numerator part is solved by numerical integration;
[0034] S4-2-2, M step update
[0035] S4-2-3, repeat S4-2-1 and S4-2-2 until the maximum number of iterations (i.e. λ i , μ i The difference before and after the update is less than the convergence threshold).
[0036] Furthermore, in step S5, by setting the maximum number of iterations and the convergence threshold, Substitute MLE into (2), (3), and (4) to calculate the retention probability, risk coefficient, and remaining retention time expectation, respectively.
[0037] Furthermore, step S6 includes the following steps:
[0038] S6-1. Construct data pair (x i,t ,y i,t ), where x i,t is a vector consisting of the store owner’s working hours at time t, the number of managed shelves, shelf damage, and shelf sales. i,t is the shopkeeper’s maximum probability state at time t, i.e., y i,t = argmax i π(t), π(t) is an m-dimensional vector (the i-th dimension is the probability of being in state i), y of π(t) i,t dimension is the maximum probability, then y i,t The value range of is 1,…,m;
[0039] S6-2, use data to compare (x i,t ,y i,t ) Train an m-classification model, and train the m-classification model through the gradient descent method. The trained model can evaluate the current status of the store owner by inputting working hours, number of managed shelves, shelf damage, and shelf sales.
[0040] S6-3. Obtain the current status of the store owner according to S62 And using the second property of the Coxian model, update the probability distribution of the store owner's retention time,
[0041] If the store owner has just joined the company and has not entered any information, then
[0042] The transfer rate column vector is:
[0043] Absorption column vector:
[0044]
[0045] A processor and a storage device, wherein the storage device stores computer instructions, and the processor executes the computer instructions to implement the steps of any of the above methods.
[0046] A storage medium storing computer instructions, wherein the computer instructions, when executed by a processor, implement the steps of any one of the above methods
[0047] Beneficial Effects
[0048] Compared with the prior art, the present invention can find out the store owner retention probability distribution according to historical data, which is convenient for business monitoring of replenishment personnel and planning of reserve personnel. At the same time, it can evaluate the store owner retention probability distribution in a differentiated manner and more accurately evaluate the store owner's retention status. The Coxian model used has an intuitive and easy-to-understand structure, conforms to business intuition, is easy to accept and has rich statistical properties. It can estimate the store owner's retention time and has stronger foresight for replenishment personnel establishment. The Coxian model has low data requirements and high versatility. The model training method does not rely on specific packages and can be implemented on various development platforms. It has strong versatility, and the model training and reasoning processes can be automated with low maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below. 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.
[0050] Figure 1 It is a schematic diagram of the invention process. DETAILED DESCRIPTION
[0051] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0052] In order to better describe the process of the present invention, the following definitions need to be stated:
[0053] State i: Assume that a Markov chain has a total of m+1 states. States 1 to m are different transient states, and state m+1 is an absorbing state. Each transient state jumps to the absorbing state at a different rate, and once it enters the absorbing state, it stays in the absorbing state.
[0054] Transfer rate λ i (transition rate): The rate at which state i transitions to state i+1.
[0055] Absorption rate μ i (absorbing rate): The rate from state i to the absorbing state.
[0056] The probability transition matrix P(t) is an m×m matrix whose (i, j) element P i,j (t) is the probability of going from state i to state j after time t.
[0057] Degenerate transition matrix Q (degenerated transition matrix): is an m×m matrix, where (i, j), i≠j, the element is the transition rate from state i to state j, and the diagonal element (i, i) is equal to the negative sum of the total transition rate and absorption rate of state i.
[0058] Initial probability α: It is an m-dimensional row vector representing the initial probability of each state. In particular, when it is determined to start from state 1, α = (1, 0, ..., 0).
[0059] Probability density function f(t) (probability density function pdf): describes the probability distribution of store owner retention time.
[0060] Risk function h(t) (hazard function): describes the risk of store owners leaving. The larger the value, the higher the probability of store owners leaving.
[0061] Survival function S(t): describes the probability of store owners staying. The larger the value, the higher the probability that the store owner is willing to stay and the lower the risk of sudden resignation.
[0062] Conditional Tail Expectation CTE(t): The expectation of the retention time when it is known that the store owner has been working in the company for more than t. That is, if it is observed that the store owner has worked in the company for t, the estimated time he will continue to serve the company.
[0063] One property of the Coxian model (property one) is that this type of model has been shown to approximate any life distribution function, that is, for any random variable T, its domain is [0,∞)
[0064] , then the Coxian model can approximate its true distribution under any given error limit (tolerance). Therefore, it is theoretically guaranteed that the Coxian model can approximate the true distribution of store owner retention time.
[0065] Another property of the Coxian model (property 2) is that if it is known that the current state is in state x, the corresponding conditional probability distribution still obeys a Coxian model, and the transition rate of this Coxian model is consistent with that of the original Coxian model, except that the initial probability starts at state x. Assuming that a store owner's retention time obeys the Coxian model, and it is known that the current state is 2, then the corresponding store owner's retention time conditional probability distribution obeys the Coxian model, and the transfer matrix Q'= (Q'i=2 above). Using this property, as long as the current state of the store owner can be estimated, it is easy to update the conditional probability distribution.
[0066] See also Figure 1 , a method for managing replenishment personnel based on the Coxian model, comprising the following steps:
[0067] S1: Construct Coxian model;
[0068] S1-1. When constructing the Coxian model, fix the total length of the Markov chain based on historical experience, try different integers, and take the minimum integer m that fits the empirical distribution of historical data;
[0069] S1-2, according to the Coxian model, the transition rate λ from state i to state i+1 i , we get the transfer rate column vector λ, which is in the following form:
[0070] λ=(λ1,λ2,…,λ m-1 )
[0071] According to the Coxian model, the absorption rate μ from state i to the absorbing state i , the absorption rate column vector μ of the Coxian model is obtained in the following form:
[0072] μ=(μ1,μ2,…,μ m )
[0073] S1-3. Define the degradation transfer matrix of the Coxian model. The degradation transfer matrix is as follows:
[0074]
[0075] Index function δ i =1 means the store owner has resigned, the indicator function δ i =0 means the owner is still employed.
[0076] S1-4. Determine the optimization target. The optimization target is to maximize the log-likelihood function. The formula is as follows:
[0077]
[0078] The retention time is ti , f(t i ) and S(t i ) are the probability density function and the survival function respectively.
[0079] S2: Randomly generate 2m-1 decimals greater than 0 and assign them to the transfer rate column vector λ and the absorption rate column vector μ to initialize all parameters of the Coxian model.
[0080] S3: Calculate the likelihood function of the Coxian model with given parameters based on historical data. For any set of Coxian model parameters, numerically solve its log-likelihood function by (*);
[0081] S4: Update the Coxian model parameters using the optimization algorithm.
[0082] S4-1. Given any set of Coxian model parameters, numerically solve its log-likelihood function and its gradient by (*) Gradient Descent Update
[0083] Among them, α represents the learning rate of algorithm update;
[0084] S4-2-1, E step update 1 of them i =(0,…,0,1,0,…) i.e., a column vector whose i-th element is 1 and other elements are 0;
[0085] Among them, 1′ i is the corresponding row vector, Z i With N i,i+1 The numerator part is solved by numerical integration;
[0086] S4-2-2, M step update
[0087] S4-2-3, repeat S4-2-1 and S4-2-2 until the maximum number of iterations (i.e. λ i , μ i The difference before and after the update is less than the convergence threshold).
[0088] S5: Repeat the above steps S3 and S4 to obtain the trained Coxian model. Specifically, set the maximum number of iterations and the convergence threshold to solve Substitute MLE into (2), (3), and (4) to calculate the retention probability, risk coefficient, and remaining retention time expectation, respectively.
[0089] S6: Import the data into the trained Coxian model to obtain the probability distribution of the store owner’s retention time.
[0090] S6-1. Construct data pair (x i,t ,y i,t ), where x i,t is a vector consisting of the store owner’s working hours at time t, the number of managed shelves, shelf damage, and shelf sales. i,t is the shopkeeper’s maximum probability state at time t, i.e., y i,t = argmax i π(t), π(t) is an m-dimensional vector (the i-th dimension is the probability of being in state i), y of π(t) i,t dimension is the maximum probability, then y i,t The value range of is 1,…,m;
[0091] S6-2, use data to compare (x i,t ,y i,t ) Train an m-classification model, and train the m-classification model through the gradient descent method. The trained model can evaluate the current status of the store owner by inputting working hours, number of managed shelves, shelf damage, and shelf sales.
[0092] S6-3. Obtain the current status of the store owner according to S62 And using the second property of the Coxian model, update the probability distribution of the store owner's retention time,
[0093] If the store owner has just joined the company and has not entered any information, then
[0094] The transfer rate column vector is:
[0095] Absorption column vector:
[0096] Degenerate transfer matrix:
[0097]
[0098] To explain the above steps in more detail, the Coxian model is now introduced:
[0099] The probability density function f(t), survival function S(t), risk function h(t), conditional tail expectation CTE(t), and state probability distribution π(t) corresponding to the Coxian model are
[0100] f(t)=αe Qt μ (1)
[0101] S(t)=αe Qt 1 (2)
[0102]
[0103] π(t)=αe Qt (5)
[0104] P=e Qt (6)
[0105] Among them, α = (1, 0, ..., 0) is the initial probability row vector; Q is the degradation transfer matrix, whose diagonal elements are equal to -(μ i +λ i ), the upper diagonal element is λ i , the remaining elements are all 0; e Qt is the Q matrix index; μ=(μ1,…,μ m ) is the absorbance column vector; 1 = (1,…,1) is the column vector of all 1s; Q -1 is the inverse matrix of Q, that is, Q -1 Q=QQ -1 =I, I is the identity matrix with 1 on the diagonal and 0 on the other elements.
[0106] When training the Coxian model, a Coxian model with a total of m+1 states has 2m-1 parameters (m-1 lambda i and m μ i ).
[0107] Model training is to find the optimal parameter estimation based on historical data and the objective function. For the Coxian model, the commonly used parameter estimation method is the maximum likelihood method MLE (Maximum Likelihood Estimation), which maximizes the objective function - the likelihood function (likelihood). Since the MLE of this model has no analytical solution, it can only be solved by numerical methods. There are two commonly used numerical solutions: 1) calculate the likelihood function and solve it with a numerical solver; 2) use the EM (Expectation-Maximization Algorithm) algorithm to iteratively solve.
[0108] When solving the problem with the numerical solver, it is defined that there are n historical store owners in total, and their retention time is t i , indicator function δ i =1When the store owner has resigned,δ i = 0 when the store owner is still employed, the corresponding likelihood function and log-likelihood function are
[0109]
[0110] Here, log is the natural logarithm.
[0111] At this point, given any set of parameter values, Q and the likelihood function l(t1,…,t n ). Through the numerical solver, l(t1,…,t n ) can be used to find the MLE by solving for the extreme value.
[0112] The pseudo code steps of the EM algorithm are as follows:
[0113] Step 1: Randomly generate a set of parameter values as the algorithm starting value, set the maximum number of iterations and convergence threshold
[0114] Step 2: (Step E) Calculate the following values
[0115]
[0116] 1 of them i =(0,…,0,1,0,…) i.e., a column vector whose i-th element is 1 and other elements are 0, 1′ i is the corresponding row vector. i With N i,i+1 The numerator can be solved by numerical integration.
[0117] Step 3: (M step) Replace
[0118]
[0119] Step 4: Determine whether the maximum number of iterations or the convergence threshold (i.e., λ i , μ i The difference before and after the update is less than the convergence threshold). If one of the conditions is met, the loop ends, otherwise jump to step 2, use numerical solution or EM algorithm to find the MLE, and then substitute the MLE into the model for model reasoning.
[0120] When using the method described in this application, the MLE can be used in step 2 above to calculate the store owner retention probability, such as S(100) is the probability that the store owner will work for at least 100 days;
[0121] Substituting MLE into the above step 3 can calculate the risk coefficient of store owner resignation. For example, h(100) is the risk coefficient of store owner resignation after 100 days of work. For store owners with higher risk coefficients, they need to plan and prepare replacement personnel in advance.
[0122] By substituting MLE into step 4 above, we can calculate the remaining retention expectation of the store owner. For example, CTE(100) is the remaining retention time expectation for store owners who have worked for more than 100 days. This indicator can be used to evaluate the resignation of store owners and prepare replacement personnel in advance for store owners with shorter remaining time.
[0123] For each store owner, additional dimensional data (such as daily working hours, number of managed shelves, shelf damage, and shelf sales) can be used to estimate the state of the store owner's Markov chain. Store owners with reasonable working hours, appropriate number of managed shelves, less shelf damage, and higher shelf sales will be in a relatively forward state, while store owners with a bad working environment or poor management will be in a relatively backward state. By building an m-classification model to analyze the relationship between working hours, number of managed shelves, shelf damage, shelf sales, and state, the current state of the store owner can be estimated. Then, using the second property of the Coxian model, the probability distribution of the store owner's retention time is personalized and updated.
[0124] A replenishment personnel management system for estimating store owner retention time based on the Coxian model includes a processor and a storage, wherein the storage stores computer instructions, and the processor executes the computer instructions to implement the steps of any of the above methods.
[0125] A storage medium stores computer instructions, which, when executed by a processor, implement the steps of any one of the methods described above.
[0126] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for managing replenishment personnel based on the Coxian model, characterized in that: The steps include: S1: Construct Coxian model; S2: Initialize all parameters of the Coxian model; S3: Calculate the likelihood function of the Coxian model with given parameters based on historical data; S4: Update Coxian model parameters using optimization algorithm; S5: Repeat the above steps S3 and S4 to obtain the trained Coxian model; S6: Import the data into the trained Coxian model to obtain the probability distribution of the store owner’s retention time.
2. A method for managing replenishment personnel based on the Coxian model according to claim 2, characterized in that: The step S1 includes the following steps S1-1. When constructing the Coxian model, fix the total length of the Markov chain based on historical experience, try different integers, and take the minimum integer m that fits the empirical distribution of historical data; S1-2, according to the Coxian model, the transition rate λ from state i to state i+1 i , we get the transfer rate column vector λ, which is in the following form: λ=(λ1,λ2,…,λ m-1 ) According to the Coxian model, the absorption rate μ from state i to the absorbing state i , the absorption rate column vector μ of the Coxian model is obtained in the following form: μ=(μ1,μ2,…,μ m ) S1-3. Define the degradation transfer matrix of the Coxian model. The degradation transfer matrix is as follows: S1-4. Determine the optimization target. The optimization target is to maximize the log-likelihood function. The formula is as follows: The retention time is t i , f(t i ) and S(t i ) are the probability density function and the survival function respectively.
3. A method for managing replenishment personnel based on the Coxian model according to claim 2, characterized in that: In step S1-3, the indicator function δ i =1 means the store owner has resigned, the indicator function δ i =0 means the owner is still employed.
4. A method for managing replenishment personnel based on the Coxian model according to claim 3, characterized in that: In the step S2, the method for initializing the parameters is to randomly generate 2m-1 decimals greater than 0 and assign them to the transfer rate column vector λ and the absorption rate column vector μ.
5. A method for managing replenishment personnel based on the Coxian model according to claim 4, characterized in that: In step S3, for any set of Coxian model parameters, its log-likelihood function is numerically solved by (*).
6. A method for managing replenishment personnel based on the Coxian model according to claim 5, characterized in that: The optimization algorithm used in step S4 is the gradient descent method or / and the EM algorithm, and the specific steps are as follows: S4-1. Given any set of Coxian model parameters, numerically solve its log-likelihood function and its gradient by (*) Gradient descent updates μ←μ- Among them, α represents the learning rate of algorithm update; S4-2-1, Step E Update 1 of them i =(0,…,0,1,0,…) i.e., a column vector whose i-th element is 1 and other elements are 0; Among them, 1′ i is the corresponding row vector, Z i With N i,i+1 The numerator part is solved by numerical integration; S4-2-2, M step update S4-2-3, repeat S4-2-1 and S4-2-2 until the maximum number of iterations (i.e. λ i , μ i The difference before and after the update is less than the convergence threshold).
7. A method for managing replenishment personnel based on the Coxian model according to claim 6, characterized in that: In step S5, by setting the maximum number of iterations and the convergence threshold, Substitute MLE into (2), (3), and (4) to calculate the retention probability, risk coefficient, and remaining retention time expectation, respectively.
8. A method for managing replenishment personnel based on the Coxian model according to claim 7, characterized in that: The step S6 comprises the following steps: S6-1. Construct data pair (x i,t ,y i,t ), where x i,t is a vector consisting of the store owner’s working hours at time t, the number of managed shelves, shelf damage, and shelf sales. i,t is the shopkeeper’s maximum probability state at time t, i.e., y i,t = argmax i π(t), π(t) is an m-dimensional vector (the i-th dimension is the probability of being in state i), y of π(t) i,t dimension is the maximum probability, then y i,t The value range of is 1,…,m; S6-2, use data to compare (x i,t ,y i,t ) Train an m-classification model, and train the m-classification model through the gradient descent method. The trained model can evaluate the current status of the store owner by inputting working hours, number of managed shelves, shelf damage, and shelf sales. S6-3. Obtain the current status of the store owner according to S62 And using the second property of the Coxian model, update the probability distribution of the store owner's retention time, If the store owner has just joined the company and has not entered any information, then The transfer rate column vector is: Absorption column vector: Degenerate transfer matrix:
9. A system for managing replenishment personnel based on the Coxian model to estimate the store owner's retention time, characterized by: The method comprises a processor and a storage, wherein the storage stores computer instructions, and the processor executes the computer instructions to implement the steps of the method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium stores computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.