Inventory management method and device, storage medium and program product
By predicting the consumption of music members in different time periods and determining the inventory threshold, the problem of difficulty in accurately matching consumption in the existing technology is solved, and the accuracy and efficiency of inventory management are improved.
Patent Information
- Application Number
- CN202411992268.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, it is difficult for music members to accurately grasp the consumption pattern of inventory management, resulting in the inventories that cannot accurately match the consumption amount.
By predicting the consumption of the target object in different time periods, the prediction results for multiple time periods are obtained, and the inventory threshold is determined based on these prediction results, and the inventory amount is adjusted to match the consumption.
It improves the accuracy and efficiency of inventory management, ensures that inventory can accurately match consumption, and reduces the uncertainty of inventory management.
Smart Images

Figure CN119850092A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet, and in particular to an inventory management method, device, storage medium and program product. Background Art
[0002] With the development of the music industry and the Internet industry, various electronic products such as music memberships have emerged in the industry. Among them, the core link of music membership sales is inventory management.
[0003] In the related art, the inventory of music members is set based on intuition or experience after manually collecting historical data. When the inventory of music members decreases, the inventory of music members is manually adjusted based on previous inventory management experience. However, it is difficult to accurately grasp the inventory consumption pattern when manually adjusting the inventory, and the inventory replenishment cannot accurately match the consumption. Summary of the invention
[0004] The present application provides an inventory management method, device, storage medium and program product, which can accurately manage inventory. The technical solution is as follows:
[0005] According to one aspect of the present application, there is provided an inventory management method, the method comprising:
[0006] Predicting the consumption of the target object within the target time period, and obtaining prediction results corresponding to at least two types of time periods respectively; the at least two prediction results are respectively predicted based on the consumption rules of the target object in the at least two types of time periods;
[0007] determining an inventory threshold according to the at least two prediction results;
[0008] In a target time period, the inventory quantity of the target object is adjusted according to the inventory threshold.
[0009] According to another aspect of the present application, there is provided an inventory management device, the device comprising:
[0010] A prediction module, used to predict the consumption of a target object within a target time period, and obtain prediction results corresponding to at least two types of time periods; the at least two prediction results are respectively predicted based on the consumption rules of the target object in the at least two types of time periods;
[0011] A calculation module, configured to determine an inventory threshold value according to the at least two prediction results;
[0012] The inventory module is used to adjust the inventory quantity of the target object according to the inventory threshold in a target time period.
[0013] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the inventory management method as described above.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the inventory management method as described above.
[0015] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the inventory management method provided in various optional implementations of the above aspects.
[0016] The beneficial effects brought about by the technical solution provided by this application include at least the following.
[0017] Consumption forecasting is performed based on the consumption patterns of the target object in at least two time periods, the consumption patterns of the target object are captured from multiple dimensions, and consumption forecasting is performed based on the regular characteristics of multiple dimensions to improve forecasting accuracy. For example, the consumption of the target object can be forecasted from the dimensions of hours and days respectively. Based on the hourly consumption patterns of the target object in a period of time and the daily consumption patterns of the target object in a period of time, the consumption of the target object in the target time period is forecasted respectively to obtain two consumption forecast results. Then, based on the forecast results of the two consumption patterns, the inventory threshold of the target object in the target time period is determined, and the inventory of the target object in the target time period is managed based on the inventory threshold so that the inventory can accurately match the consumption, thereby improving the efficiency and accuracy of inventory management. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 is a schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present application;
[0020] Figure 2 is a flow chart of an inventory management method provided by an exemplary embodiment of the present application;
[0021] Figure 3 is a flow chart of an inventory management method provided by an exemplary embodiment of the present application;
[0022] Figure 4 is a flow chart of an inventory management method provided by an exemplary embodiment of the present application;
[0023] Figure 5 is a flow chart of an inventory management method provided by an exemplary embodiment of the present application;
[0024] Figure 6 is a flow chart of an inventory management method provided by an exemplary embodiment of the present application;
[0025] Figure 7 is a schematic diagram of an inventory management system provided by an exemplary embodiment of the present application;
[0026] Figure 8 is a structural schematic diagram of an inventory management device provided by an exemplary embodiment of the present application;
[0027] Fig. 9 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application.
[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0030] Figure 1 A schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown, and the computer system may include a terminal 101 and a server 103 .
[0031] Exemplarily, the inventory management method shown in the embodiment of the present application can be applied in a terminal, and the terminal 101 runs an application 102 that supports the inventory management function. The terminal may include a mobile phone, a tablet computer, a notebook computer, a laptop computer, a desktop computer, an all-in-one computer, an Internet of Things device, an intelligent robot workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player, an MP5 player, a learning machine, a point-reading machine, an electronic paper book, an electronic dictionary, a vehicle-mounted device, a virtual reality (VR) player or an augmented reality (AR) player, etc.
[0032] Exemplarily, the inventory management method provided in the present application can be executed by a client in the terminal. The client is a client of an application that supports inventory management functions. For example, the application may include at least one of the following: an audio application, an audio player, a video application, a short video application, a social application, a shopping application, a local service application, a live broadcast application, an information application, a browser, a game application, and a production management program.
[0033] The terminal 101 includes a first memory and a first processor. An inventory management program is stored in the first memory; the above inventory management program is called and executed by the first processor to implement the inventory management method provided in the present application. The first memory may include but is not limited to the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electric Erasable Programmable Read-Only Memory (EEPROM).
[0034] The first processor may be composed of one or more integrated circuit chips. Optionally, the first processor may be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor may implement the inventory management method provided by the present application by running a program or code.
[0035] In an optional embodiment, the terminal 101 and the server 103 may be connected to each other via a wired or wireless network.
[0036] Exemplarily, the inventory management method shown in the embodiment of the present application can also be applied in a server. The inventory management method provided in the present application can be executed by a server in the server. The server 103 is used to provide background services for the application of the terminal 101. Optionally, the server 103 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the server 103 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, a distributed computing architecture is used between the server 103 and the terminal 101 for collaborative computing.
[0037] The server 103 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing service center.
[0038] Optionally, the server 103 includes a second memory and a second processor. The second memory stores an inventory management program; the inventory management program is called by the second processor to implement the inventory management method provided in the present application. Optionally, the second memory may include but is not limited to the following: RAM, ROM, PROM, EPROM, EEPROM. Optionally, the second processor may be a general-purpose processor, such as a CPU or NP.
[0039] Figure 2 is a flowchart of an inventory management method provided by an exemplary embodiment of the present application. The method can be used in a computer device, which can be such as Figure 1 The terminal or server shown in the figure. The method comprises the following steps.
[0040] Step 210: predict the consumption of the target object within the target time period, and obtain prediction results corresponding to at least two types of time periods; at least two prediction results are respectively predicted based on the consumption rules of the target object in at least two types of time periods.
[0041] Optionally, the method is executed by a client on the terminal, and the client is a client of an application that supports inventory management functions. For example, the application may include at least one of the following: an audio application, an audio player, a video application, a short video application, a social application, a shopping application, a local service application, a live broadcast application, an information application, a browser, a game application, and a production management program.
[0042] Alternatively, the method can also be performed by a mini-program. A mini-program is a lightweight application based on a specific application platform, which has independent application functions, but does not require users to download and install, and can be directly opened and used on the application platform. Mini-programs are usually implemented using technologies such as HTML5, JavaScript, and CSS, and have the characteristics of being lightweight, fast, and easy to use. Mini-programs are miniature applications designed to perform a single function or a set of simple functions within a closed framework, and are usually embedded in a browser's web page or in a specific application platform.
[0043] Alternatively, the method is executed by a server on the server, where the server is a server of an application supporting an inventory management function, and the server is used to provide background services for the client.
[0044] In an optional embodiment, the application may be an audio application, and the method provided in the embodiment of the present application may be used in the audio application to manage the inventory of virtual goods such as music memberships. In another optional embodiment, the application may be a production management program, and the method provided in the embodiment of the present application may be used for inventory management of production materials. Of course, the method provided in the embodiment of the present application may also be applied to inventory management in other scenarios, for example, for commodity inventory management in shopping applications, or for inventory item management in warehouse management programs, or for inventory management of virtual props in virtual games. The following only takes the inventory management of virtual goods and the inventory management of production materials as examples for explanation.
[0045] The target object is the object that needs to be managed in inventory. For example, the target object can be virtual goods, production materials, physical goods, inventory items, virtual props, etc. Among them, virtual goods can be membership goods (such as music membership, video membership and other application memberships), rights goods (used to sell the right to use some functions in the application, such as high-definition quality, high-speed download, exclusive customer service, etc.), copyright goods (used to sell virtual goods with copyright, such as music copyright, video copyright, book copyright, etc.).
[0046] The target object refers to an object. When it is necessary to use the inventory management method provided by the present application to manage multiple objects, it is necessary to use the method provided by the embodiment of the present application for each object. For example, when the method provided by the embodiment of the present application is used to manage the inventory of music members, the music members include: weekly card members, monthly card members, quarterly card members and annual members, then it is necessary to use the method provided by the embodiment of the present application for inventory management for each member's goods. For weekly card members, the consumption law of weekly card members in at least two time periods is used to predict the consumption. For monthly card members, the trumpet law of monthly card members in at least two time periods is used to predict the consumption, and so on.
[0047] The target time period is the expected time period during which inventory management is required. For example, if the inventory of the target object from the first time to the second time needs to be adjusted, the target time period may be the time period from the first time to the second time. For another example, if the inventory threshold of the target object needs to be adjusted periodically, the target time period may be the time period of the next cycle. For example, the inventory threshold of music members is adjusted every week so that the inventory of music members is automatically adjusted based on the inventory threshold of this week. The method provided in the embodiment of the present application may be used on Sunday to predict the consumption of next week and determine the inventory threshold of next week. The target time period may be next week.
[0048] The consumption refers to the total consumption of the target object in the target time period. The consumption refers to the inventory reduction / sales / outbound / usage of the target object in the target time period. When the target object is a virtual commodity, step 210 may be: predicting the sales volume of the virtual commodity in the target time period. When the target object is a production material, step 210 may be: predicting the consumption / outbound volume of the production material in the target time period.
[0049] At least two types of time periods can be obtained by determining any two different durations as periods. For example, at least two types of time periods can include a first type of time period with a first duration as a period, and a second type of time period with a second duration as a period; the first duration and the second duration are different. For example, the first duration can be one hour, and the second duration can be two hours; or, the first duration can be one second, and the second duration can be three days, etc. Of course, at least two types of time periods can also include a third type of time period, a fourth type of time period, or a greater number of different types of time periods, so as to extract the consumption patterns of the target object from multiple period dimensions.
[0050] Exemplarily, at least two types of time periods include at least two of the following: seconds, minutes, hours, days, weeks, months, and years. That is, one second, one minute, one hour, one day, one week, one month, or one year is taken as a time period to obtain a type of time period. For example, at least two types of time periods may include: one second as a time period, one minute as a time period, one hour as a time period, one day as a time period, one week as a time period, one month as a time period, and one year as a time period. Of course, one type of time period may also be obtained by taking 2 seconds, 3 minutes, 4 hours, 5 days, 6 weeks, 7 months, 8 years, etc. as time periods.
[0051] The duration of a single period of a time period may be preset or determined based on time information related to the target object. For example, the time information related to the target object may include at least one of the following: validity period, shelf life, sales cycle, storage cycle, production cycle, use cycle, iteration cycle, etc. of the target object. At least two types of time periods may be determined based on the time information related to the target object, and consumption prediction may be performed based on the consumption patterns of the target object in at least two types of time periods.
[0052] For example, when at least two types of time periods include a day and a week, and the target time period includes next month; the daily consumption of the target object next month can be predicted based on the daily consumption pattern of the target object, and then the total consumption of next month can be obtained; or, the weekly consumption of the target object next month can be predicted based on the weekly consumption pattern of the target object, and then the total consumption of next month can be obtained.
[0053] Among them, the consumption pattern can be obtained by using a neural network model to learn the historical consumption data of the target object. The neural network model can adopt a time series model. For example, the neural network model can adopt ARMA (Auto-Regressive Moving Average Model), LSTM (Long Short-Term Memory), Prophet, VAR (Vector autoregression) and other time series models to extract the consumption patterns of different time periods in the historical consumption data.
[0054] Of course, consumption patterns can also be obtained by using statistical algorithms based on historical consumption data analysis.
[0055] The prediction result corresponding to a type of time period is the total consumption of the target object in the target time period, which is predicted based on the consumption pattern of the target object in the time period. For example, if the single cycle duration of this type of time period is less than the target time period, the consumption of each cycle in the target time period is predicted, and the sum of the consumption of all cycles in the target time period is calculated to obtain the prediction result. For another example, if the single cycle duration of this type of time period is greater than the target time period, the consumption of the cycle in the target time period is predicted, and the consumption in the target time period is calculated based on the ratio of the single cycle duration to the target time period duration to obtain the prediction result.
[0056] Step 220: Determine an inventory threshold according to at least two prediction results.
[0057] Exemplarily, the average value of at least two prediction results can be determined as the inventory threshold; or, the larger value of at least two prediction results can be determined as the inventory threshold; or, the weighted average of at least two prediction results can be determined as the inventory threshold; or, based on the historical prediction accuracy of at least two types of time periods, the prediction result corresponding to the time period with the highest accuracy can be determined as the inventory threshold.
[0058] Inventory thresholds are used to manage the inventory of target objects. Inventory thresholds can be used to trigger replenishment of target objects, and inventory thresholds can also be used as target values for replenishment of target objects.
[0059] Step 230: During the target time period, adjust the inventory quantity of the target object according to the inventory threshold.
[0060] In an optional embodiment, the inventory threshold can be used to trigger the adjustment of the inventory quantity. When the inventory quantity of the target object is lower than the inventory threshold, the replenishment of the target object is triggered to replenish the inventory quantity of the target object to the target value. The target value can be a preset value, and the target value is not lower than the inventory threshold.
[0061] In another optional embodiment, the inventory threshold can be set as a target value for replenishing the target object, and after the replenishment operation of the target object is triggered, the inventory of the target object is replenished to the inventory threshold. The triggering of the replenishment operation of the target object can be periodic, or it can be triggered after the consumption of the target object reaches a preset value (for example, a replenishment operation is triggered every time 100 target objects are consumed; or a replenishment operation is triggered every time 100 target objects are consumed).
[0062] In another optional embodiment, the inventory threshold can be used to trigger the adjustment of the inventory quantity and as a target value for replenishing the target object. For example, within the target time period, the current inventory quantity of the target object is obtained; when the current inventory quantity is lower than the inventory threshold, the target object is replenished until the inventory quantity of the target object reaches the inventory threshold.
[0063] Exemplarily, the computer device may periodically calculate the inventory threshold, and apply the inventory threshold to perform inventory management of the target object in the next cycle (target time period). For example, the computer device may predict the inventory threshold for the next week every week, and apply the inventory threshold to perform inventory management of the target object in the next week; or the computer device may predict the inventory threshold for the next month every month, and apply the inventory threshold to perform inventory management of the target object in the next month.
[0064] Alternatively, when the inventory manager deems it necessary to adjust the inventory threshold, the inventory threshold can be calculated according to the target time period set by the inventory manager, and the inventory threshold is applied to manage the inventory of the target object before the next inventory threshold adjustment.
[0065] In summary, the method provided in this embodiment predicts consumption according to the consumption patterns of the target object in at least two types of time periods, captures the consumption patterns of the target object from multiple dimensions, and predicts consumption based on the regular characteristics of multiple dimensions, thereby improving prediction accuracy. For example, the consumption of the target object can be predicted from the dimensions of hours and days, respectively. Based on the hourly consumption patterns of the target object within a period of time, and the daily consumption patterns of the target object within a period of time, the consumption of the target object within the target time period is predicted, respectively, to obtain two consumption prediction results. Then, based on the prediction results of the two consumptions, the inventory threshold of the target object within the target time period is determined, and the inventory of the target object is managed in the target time period based on the inventory threshold, so that the inventory can accurately match the consumption, thereby improving the efficiency and accuracy of inventory management.
[0066] Exemplarily, with respect to the relationship between the duration of the target time period and the duration of a single period of a type of time period, two embodiments are given to illustrate how to calculate the prediction results.
[0067] 1. The duration of a single cycle is shorter than the target period.
[0068] Exemplarily, the at least two types of time periods include a first type of time period, and the single cycle duration of the first type of time period is less than the duration of the target time period. For example, when the duration of the target time period is one week, the first type of time period may include: seconds, minutes, hours, days. When the duration of the target time period is one year, the first type of time period may include: seconds, minutes, hours, days, weeks, months.
[0069] Figure 3 is a flowchart of an inventory management method provided by an exemplary embodiment of the present application. The method can be used for Figure 1 The terminal or server shown. Figure 2 In the illustrated embodiment, step 210 includes steps 211 to 213 , and / or step 220 includes step 221 .
[0070] Step 211: according to the single cycle duration of the first type of time cycle, determine at least one time point to be predicted in the target time period to obtain a time group to be predicted; the duration of two adjacent time points to be predicted in the time group to be predicted is equal to the single cycle duration of the first type of time cycle.
[0071] Exemplarily, the target time period is divided into at least one time period according to the single cycle duration of the first type of time period, and the time point corresponding to each time period is taken as the time point to be predicted. For example, if the target time period is one week and the single cycle duration of the first type of time period is one day, then every day of the target time period is taken as the time point to be predicted. Alternatively, if the target time period is one month and the first type of time period is one minute, then every minute of the time period is taken as the time point to be predicted.
[0072] When the target time period cannot be divided by the length of a single cycle, the consumption must also be predicted for the last cycle that cannot be divided. After the consumption of the cycle is predicted, the consumption of this period is calculated according to the length of time that the cycle is within the target time period. That is, the consumption of this part of time is calculated according to the calculation method of the second type of time period. For example, if the target time period is 7 hours and the length of a single cycle of the first type of time period is 2 hours, then for the 7th hour of the target time period, the consumption of the 7th and 8th hours can be predicted first, and then the consumption can be divided by 2 to get the consumption of the 7th hour.
[0073] The time group to be predicted includes at least one time point to be predicted. The number of time points to be predicted is the same as the number of periods of the first type of time period included in the target time period (an incomplete period is counted as one period, that is, the quotient of the target time period divided by the length of a single period is rounded up).
[0074] Step 212: calling the first prediction model corresponding to the first type of time period to predict the consumption corresponding to each time point to be predicted in the time group to be predicted.
[0075] Exemplarily, the first prediction model is called to sequentially predict the consumption at each time point to be predicted in the time group to be predicted, and the consumption is the consumption within the period corresponding to the time point to be predicted.
[0076] The first prediction model is used to predict the consumption in a single period corresponding to the first type of time period according to the consumption pattern of the target object in the first type of time period. The first prediction model is a neural network model trained using the first type of training samples, and the first type of training samples are training samples obtained by dividing the historical consumption data of the target object according to the first type of time period. For example, the historical consumption data includes the consumption of the target object last month, and the first type of time period is a day. Then, the consumption of the target object last month is divided into daily consumption, and the first prediction model is obtained by training according to the daily consumption.
[0077] For example, the time group to be predicted includes a first time point; the first time information of the first time point is input into the first prediction model to obtain the consumption corresponding to the first time point; the first time information includes a time text that describes the first time point according to a first type of time period; wherein the first time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark, price of the target object at the first time point, and consumption activity at the first time point.
[0078] The consumption activity may refer to a promotion activity for selling virtual goods or a production plan for consuming production materials. For example, one input data may be: 2023, December, 30th, 6 hours, 3 minutes, 5 seconds, the 53rd week of 2023, Saturday, holiday, 10 yuan, and a promotion activity of 30 yuan minus 30 yuan.
[0079] In an optional embodiment, the input data and output data of the first prediction model are shown in Table 1, where the input data is the year, month, day, day of the week, and whether it is a rest day at each time point to be tested, and the output data is the consumption at the time point to be tested.
[0080] Table 1
[0081]
[0082] Step 213: Accumulate the consumption corresponding to each time point to be predicted in the time group to be predicted, and obtain the first prediction result corresponding to the first type of time period; the first prediction result is the total consumption of the target time period predicted based on the consumption rule of the target object in the first type of time period.
[0083] Exemplarily, after obtaining the consumption corresponding to each time point to be measured, the consumption corresponding to each time point to be predicted contained in the time group to be predicted is summed to obtain the total consumption of the target time period, that is, the first prediction result corresponding to the first type of time period.
[0084] Step 221: Calculate the weighted average of at least two prediction results according to the weight values corresponding to at least two types of time periods to obtain the inventory threshold.
[0085] Exemplarily, each type of time period may correspond to a weight coefficient, and according to the weight coefficient corresponding to each type of time period, a weighted average of at least two prediction results corresponding to at least two types of time periods is calculated.
[0086] For example, at least two types of time periods include a first time period and a second time period, the first time period corresponds to a first prediction result, and the second time period corresponds to a second prediction result; the first time period corresponds to a first weight, and the second time period corresponds to a second weight; then the first prediction result is multiplied by the first weight to obtain a first weighted result; the second prediction result is multiplied by the second weight to obtain a second weighted result; the first weighted result and the second weighted result are summed to obtain a weighted sum; the first weight and the second weight are summed to obtain a weighted sum; the weighted sum is divided by the weighted sum to obtain a weighted average, that is, the inventory threshold.
[0087] In an optional embodiment, the weight coefficients corresponding to the prediction models corresponding to at least two types of time periods can be determined according to their historical accuracy rates, and the higher the accuracy rate, the higher the weight coefficient. Alternatively, the weight coefficient can be determined according to the time information related to the target object. For example, when the target object is a weekly membership card, the weight coefficient for the weekly time period can be set to 2, and the weight coefficients for other time periods can be set to 1. Alternatively, the weight coefficients corresponding to each time period can also be set by manual experience.
[0088] Step 230: During the target time period, adjust the inventory quantity of the target object according to the inventory threshold.
[0089] It should be noted that, during the application process, the consumption data of the target object recorded during the application process can be used to update the first prediction model in real time. For example, when the developer wants to update the first prediction model, the historical consumption data of the target object in the past period can be obtained in real time, and training samples can be generated from the historical consumption data based on the first type of time period, and the model parameters of the first prediction model can be updated in real time using the training samples, so that the first prediction model can continuously learn and update during use, ensuring that the first prediction model can grasp the consumption pattern of the target object in real time.
[0090] For example, historical consumption data of the target object in the historical time period is obtained; the historical time period is divided into at least one sample time period according to the first type of time period, and the sample time corresponding to each sample time period is determined, and the sample time is the sample input data; the consumption of the target object in each sample time period is counted as the consumption label; the consumption label is the sample output data. Subsequently, the sample input data is input into the first prediction model to obtain the first prediction result, the loss between the first prediction result and the sample output data is calculated, and the first prediction model is trained according to the loss.
[0091] In summary, the method provided in this embodiment can calculate the total consumption in the target time period according to the consumption of each period included in the target time period when the length of a single time period is less than the length of the target time period. Then, the inventory threshold is calculated according to the total consumption predicted for each time period, and the inventory of the target object is managed in the target time period based on the inventory threshold, so that the inventory can accurately match the consumption, thereby improving the efficiency and accuracy of inventory management.
[0092] 2. The duration of a single cycle is greater than the target period.
[0093] Exemplarily, the at least two types of time periods include a second type of time period, and the single cycle duration of the second type of time period is not less than the duration of the second time period. For example, when the duration of the target time period is one week, the second type of time period may include: month, year. When the duration of the target time period is one day, the second type of time period may include: week, month, year.
[0094] Figure 4 is a flowchart of an inventory management method provided by an exemplary embodiment of the present application. The method can be used for Figure 1 The terminal or server shown. Figure 2 In the illustrated embodiment, step 210 includes steps 214 to 216 , and / or step 220 includes step 221 .
[0095] Step 214: Determine a second time point corresponding to the target time period; the second time point includes at least one of the following: the starting time point of the target time period, the ending time point of the target time period, the middle time point of the target time period, and the time value corresponding to the target time period in the second time period.
[0096] Exemplarily, when the duration of the target time period is greater than or equal to the duration of a single time period, the period in which the target time period is located is determined, the consumption of the period is predicted, and the consumption within the target time period is calculated based on the ratio of the duration of the target time period within the period.
[0097] For example, if the target time period is the next week and the second time period is a month, the consumption of the next week in the month is predicted, and the time ratio of the next week in the month is calculated. For example, if the month includes 28 days, the next week accounts for 0.25 of the month, and the consumption of the month is multiplied by 0.25 to get the consumption of the next week.
[0098] Exemplarily, the second time point can be determined from the target time period according to the format of the input data of the second prediction model. For example, if the second time period is a week, the target time period is tomorrow, and the input data of the second prediction model is the year, month, week, and day of the week of the time point to be predicted, the input data is determined according to tomorrow's date, and tomorrow's year, month, week, and day of the week are input into the second prediction model to predict the consumption of the week in which tomorrow is located, and tomorrow's consumption is calculated based on the consumption of that week.
[0099] For example, the target time period includes a time period from a first time to a second time, then the second time point can be the first time or the second time, or it can be the middle time of the target time period, or it can be a time value describing the target time period according to the time dimension of the second type of time period (for example, the year, month, week, or day of the week of the target time period in the above example).
[0100] Step 215: Call the second prediction model corresponding to the second type of time period to predict the consumption corresponding to the second time point.
[0101] Exemplarily, the second prediction model is called to predict the consumption at a second time point, where the consumption is the consumption within a period corresponding to the second time point.
[0102] The second prediction model is used to predict the consumption in a single period corresponding to the second time period according to the consumption pattern of the target object in the second time period. The second prediction model is a neural network model trained using the second training samples, and the second training samples are training samples obtained by dividing the historical consumption data of the target object according to the second time period. For example, the historical consumption data includes the consumption of the target object last month, and the second time period is a week. Then, the consumption of the target object last month is divided into weekly consumption, and the second prediction model is obtained by training according to the weekly consumption.
[0103] For example, the second time information of the second time point is input into the second prediction model to obtain the consumption corresponding to the second time point; the second time information includes a time text that describes the second time point according to the second type of time period; wherein the second time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark, price of the target object at the second time point, and consumption activity at the second time point.
[0104] The consumption activity may refer to a promotion activity for selling virtual goods or a production plan for consuming production materials. For example, one input data may be: 2023, December, 30th, 6 hours, 3 minutes, 5 seconds, the 53rd week of 2023, Saturday, holiday, 10 yuan, and a promotion activity of 30 yuan minus 30 yuan.
[0105] Step 216: Determine the second prediction result corresponding to the second type of time period as the product of the consumption corresponding to the second time point and the first proportion; the first proportion is the ratio of the duration of the second time period to the single cycle duration of the second type of time period; the second prediction result is the average consumption in the target time period predicted based on the consumption pattern of the target object in the second type of time period.
[0106] Exemplarily, a first proportion is calculated based on the duration of the target time period in a cycle, and the consumption of the cycle at the second time point is multiplied by the first proportion to obtain the consumption of the target time period, that is, the second prediction result.
[0107] For example, if the single cycle duration of the second time period is one year and the target time period is three months, the first proportion is 3 / 12, which is equal to 0.25. If the consumption at the second time point is 100, the consumption in the target time period is 100*0.25, which is equal to 25.
[0108] Step 221: Calculate the weighted average of at least two prediction results according to the weight values corresponding to at least two types of time periods to obtain the inventory threshold.
[0109] Exemplarily, each type of time period may correspond to a weight coefficient, and according to the weight coefficient corresponding to each type of time period, a weighted average of at least two prediction results corresponding to at least two types of time periods is calculated.
[0110] For example, at least two types of time periods include a first time period and a second time period, the first time period corresponds to a first prediction result, and the second time period corresponds to a second prediction result; the first time period corresponds to a first weight, and the second time period corresponds to a second weight; then the first prediction result is multiplied by the first weight to obtain a first weighted result; the second prediction result is multiplied by the second weight to obtain a second weighted result; the first weighted result and the second weighted result are summed to obtain a weighted sum; the first weight and the second weight are summed to obtain a weighted sum; the weighted sum is divided by the weighted sum to obtain a weighted average, that is, the inventory threshold.
[0111] In an optional embodiment, the weight coefficients corresponding to the prediction models corresponding to at least two types of time periods can be determined according to their historical accuracy rates, and the higher the accuracy rate, the higher the weight coefficient. Alternatively, the weight coefficient can be determined according to the time information related to the target object. For example, when the target object is a weekly membership card, the weight coefficient for the weekly time period can be set to 2, and the weight coefficients for other time periods can be set to 1. Alternatively, the weight coefficients corresponding to each time period can also be set by manual experience.
[0112] It should be noted that this application only takes the first type of time period (single cycle duration is less than the target time period) and the second type of time period (single cycle duration is greater than the target time period) as examples, and uses a separate embodiment to explain them respectively, and the at least two types of time periods in step 210 are not necessarily all first type of time periods, or all second type of time periods, and there is a possibility that at least two types of time periods include both first type of time periods and second type of time periods. For example, when the target time period is one week, at least two types of time periods may include: hours, days, months, and years; among them, hours and days are first type of time periods, and the prediction results are calculated according to the calculation method given for the first type of time periods; months and years are second type of time periods, and the prediction results are calculated according to the calculation method given for the second type of time periods.
[0113] Step 230: During the target time period, adjust the inventory quantity of the target object according to the inventory threshold.
[0114] It should be noted that, during the application process, the consumption data of the target object recorded during the application process can be used to update the second prediction model in real time. For example, when the developer wants to update the second prediction model, the historical consumption data of the target object in the past period can be obtained in real time, and training samples can be generated from the historical consumption data based on the second time period, and the model parameters of the second prediction model can be updated in real time using the training samples, so that the second prediction model can continuously learn and update during use, ensuring that the second prediction model can grasp the consumption pattern of the target object in real time.
[0115] For example, the historical consumption data of the target object in the historical time period is obtained; the historical time period is divided into at least one sample time period according to the second type of time period, and the sample time corresponding to each sample time period is determined, and the sample time is the sample input data; the consumption of the target object in each sample time period is counted as the consumption label; the consumption label is the sample output data. Subsequently, the sample input data is input into the second prediction model to obtain the second prediction result, the loss between the second prediction result and the sample output data is calculated, and the second prediction model is trained according to the loss.
[0116] In summary, the method provided in this embodiment can predict the consumption of the target time period according to the period in which the target time period is located, and calculate the consumption of the target time period according to the proportion of the duration occupied by the target time period in the period when the duration of a single time period is longer than the duration of the target time period. Then, the inventory threshold is calculated based on the total consumption predicted for each time period, and the inventory of the target object is managed in the target time period based on the inventory threshold, so that the inventory can accurately match the consumption, thereby improving the efficiency and accuracy of inventory management.
[0117] An exemplary embodiment is given by taking as an example that at least two types of time periods include: minutes, hours, and days, and the target time period includes the first week.
[0118] Figure 5 is a flowchart of an inventory management method provided by an exemplary embodiment of the present application. The method can be used for Figure 1 The terminal or server shown. Figure 2 In the illustrated embodiment, step 210 includes steps 217 to 219 , and step 220 includes steps 222 to 225 .
[0119] Step 217: Call the minute prediction model to predict the target object's consumption per minute in the first week; accumulate the consumption per minute in the first week to obtain the minute prediction result; the minute prediction result is the total consumption of the first week predicted based on the minute consumption pattern of the target object.
[0120] Step 218: Call the hourly prediction model to predict the hourly consumption of the target object in the first week; accumulate the hourly consumption in the first week to obtain the hourly prediction result; the hourly prediction result is the total consumption of the first week predicted based on the hourly consumption pattern of the target object.
[0121] Step 219: Call the daily prediction model to predict the daily consumption of the target object in the first week; accumulate the daily consumption in the first week to obtain a daily prediction result; the daily prediction result is the total consumption of the first week predicted based on the daily consumption pattern of the target object.
[0122] Among them, the minute prediction model, hour prediction model, and day prediction model can all be a type of LSTM model. For example, the minute prediction model is obtained by training the LSTM model initialized by minute training data; the time length of each training sample in the minute training data is one minute. The hour prediction model is obtained by training the LSTM model initialized by hour training data; the time length of each training sample in the hour training data is one hour. The day prediction model is obtained by training the LSTM model initialized by day training data; the time length of each training sample in the day training data is one day.
[0123] Step 222: The product of the minute prediction result and the minute weight is determined as the minute weighted result.
[0124] Step 223: Multiply the hourly prediction result by the hourly weight to determine the hourly weighted result.
[0125] Step 224: The product of the daily prediction result and the daily weight is determined as the daily weighted result.
[0126] Step 225: Divide the weighted sum by the weighted sum to obtain the inventory threshold.
[0127] Among them, the weighted sum is the sum of the minute weighted results, hour weighted results, and day weighted results; the weighted sum is the sum of the minute weight, hour weight, and day weight.
[0128] Exemplarily, the historical accuracy of the minute prediction model can be determined as the minute weight; the historical accuracy of the hour prediction model can be determined as the hour weight; and the historical accuracy of the day prediction model can be determined as the day weight.
[0129] Step 230: During the target time period, adjust the inventory quantity of the target object according to the inventory threshold.
[0130] To summarize, the method provided in this embodiment uses a deep learning LSTM model to establish a periodic inventory consumption forecast based on the same-month and month-on-month consumption data of inventory in multiple dimensions such as minutes, hours, and days, and expands automatic labeling and automatic model regression on this basis to enhance the model's fitting ability for short-term inventory consumption data forecasts.
[0131] Taking at least two types of time periods including days and months, and the target time period including a target week as an example, an exemplary embodiment is given.
[0132] Figure 6 is a flowchart of an inventory management method provided by an exemplary embodiment of the present application. The method can be used for Figure 1 The terminal or server shown in the figure. The method comprises the following steps.
[0133] Step 301: call the daily prediction model to predict the daily consumption of the target object in the target week; accumulate the daily consumption in the target week to obtain the daily prediction result; the daily prediction result is the total consumption of the target week predicted based on the daily consumption pattern of the target object.
[0134] Step 302: Call the monthly prediction model to predict the consumption of the target object in the target month where the target week is located; calculate the duration ratio of the target week in the target month, multiply the consumption of the target month by the duration ratio to obtain the monthly prediction result; the monthly prediction result is the average consumption of the target week predicted based on the monthly consumption pattern of the target object.
[0135] Among them, the daily prediction model and the monthly prediction model can both be a LSTM model. For example, the daily prediction model is obtained by training the LSTM model initialized by daily training data; the time length of each training sample in the daily training data is one day. The monthly prediction model is obtained by training the LSTM model initialized by monthly training data; the time length of each training sample in the monthly training sample is one month.
[0136] Step 303: The product of the daily prediction result and the daily weight is determined as the daily weighted result.
[0137] Step 304: The product of the monthly prediction result and the monthly weight is determined as the monthly weighted result.
[0138] Step 305: Divide the weighted sum by the weighted sum to obtain the inventory threshold.
[0139] Among them, the weighted sum is the sum of the daily weighted result and the monthly weighted result; the weighted sum is the sum of the daily weight and the monthly weight.
[0140] Exemplarily, the historical accuracy of the daily prediction model can be determined as the daily weight; and the historical accuracy of the monthly prediction model can be determined as the monthly weight.
[0141] Step 306: During the target time period, adjust the inventory quantity of the target object according to the inventory threshold.
[0142] To summarize, the method provided in this embodiment uses a deep learning LSTM model to establish a periodic inventory consumption forecast based on the same-month and month-on-month consumption data of inventory in multiple dimensions such as days and months, and expands automatic labeling and automatic model regression on this basis to enhance the model's fitting ability for short-term inventory consumption data forecasts.
[0143] For example, Figure 7 As shown, a schematic diagram of an inventory management system that adopts the inventory management method provided by an embodiment of the present application is given.
[0144] The data collection and labeling system 401 automatically collects the shipment data of the target object and automatically generates label data. For example, the shipment data of the target object is divided into one sample per minute, one sample per hour, and one sample per day according to minutes, hours, and days, and the training samples of the three types of prediction models are obtained respectively, and the consumption (label data) of the target object in the time corresponding to each sample is counted to obtain a complete training sample.
[0145] The prediction system 402 trains a multi-level prediction model based on the deep learning LSTM algorithm. The multi-level prediction model includes three levels of prediction models: minute level, hour level, and day level. The three levels of prediction models predict the cumulative value of consumption in the target time period according to the cycle size, and then obtain the final prediction value (inventory threshold) based on the weighted average of the prediction results of the three prediction models. The prediction system 402 can also automatically use the training samples provided by the data collection and labeling system 401 on a regular basis to train the regression model and adjust the model parameters.
[0146] When replenishment is needed, the inventory system 403 uses the prediction model to predict the consumption of the target object in the target time period, determines the inventory threshold based on the consumption, and performs replenishment management according to the inventory threshold.
[0147] In summary, the method provided in this embodiment can record the consumption data of the target object in real time during the daily consumption process of the target object, and automatically generate training samples based on the consumption data, train and update the prediction model, and ensure that the prediction model can learn the consumption pattern of the target object in real time and accurately. When inventory management is required, the prediction model can be called to accurately predict the consumption of the target object in the target time period, determine the inventory threshold based on the consumption, and perform inventory management of the target object, thereby realizing fully automated inventory management of the target object and improving the accuracy and efficiency of inventory management.
[0148] The following is an exemplary embodiment in which the target object is a virtual commodity. Correspondingly, the consumption amount can be replaced by the sales amount. The method includes the following steps:
[0149] Step 1: predicting the sales volume of virtual goods in a target time period, and obtaining prediction results corresponding to at least two time periods; at least two prediction results are respectively predicted based on the sales rules of virtual goods in at least two time periods.
[0150] This method can be applied to the inventory management of virtual goods in applications. For example, it can be used to manage the inventory of music members in audio applications. According to the sales patterns of music members in multiple time dimensions, the sales volume of music members in the future can be predicted, and the prediction results of each of the multiple time dimensions can be obtained.
[0151] Step 2: Determine an inventory threshold based on at least two forecast results.
[0152] For example, the weighted average of the prediction results obtained from multiple time dimensions is calculated to obtain the inventory threshold.
[0153] Step 3: During the target time period, adjust the inventory of the virtual goods according to the inventory threshold.
[0154] For example, during the target time period, the first sales channel of the music member is supplied according to the inventory threshold, wherein the forecast result is obtained according to the sales law of the music member in the first sales channel. Alternatively, during the target time period, the inventory of the music member on the platform is managed according to the inventory threshold, wherein the forecast result is obtained according to the sales law of the music member on the platform.
[0155] In summary, the method provided in this embodiment can predict sales volume according to the sales rules of virtual goods in at least two types of time periods, capture the sales rules of virtual goods from multiple dimensions, and predict sales volume based on the regular characteristics of multiple dimensions to improve the prediction accuracy. For example, the sales volume of virtual goods can be predicted from the dimensions of hours and days respectively. Based on the sales rules of virtual goods every hour in a period of time, and the sales rules of virtual goods every day in a period of time, the sales volume of virtual goods in the target time period is predicted respectively to obtain two sales volume prediction results. Then, based on the two sales volume prediction results, the inventory threshold of virtual goods in the target time period is determined, and the inventory of virtual goods in the target time period is managed based on the inventory threshold, so that the inventory can accurately match the sales volume, thereby improving the efficiency and accuracy of inventory management.
[0156] The following is an exemplary embodiment in which the target object is a production material. The method comprises the following steps:
[0157] Step 4: Predict the consumption of production materials within the target time period, and obtain prediction results corresponding to at least two types of time periods; at least two prediction results are respectively predicted based on the consumption patterns of production materials in at least two types of time periods.
[0158] This method can be applied to the inventory management of production materials in the production management system. For example, for production materials stored in the factory, the consumption of production materials in a certain period of time in the future can be predicted based on the consumption patterns of production materials in multiple time dimensions, and the prediction results of each of the multiple time dimensions can be obtained.
[0159] Step 5: Determine an inventory threshold based on at least two forecast results.
[0160] For example, the weighted average of the prediction results obtained from multiple time dimensions is calculated to obtain the inventory threshold.
[0161] Step 6: During the target time period, adjust the inventory level of production materials according to the inventory threshold.
[0162] For example, during the target time period, the inventory of production materials is managed according to the inventory threshold, and when the inventory is insufficient, the production materials are replenished in time to ensure normal production operation.
[0163] In summary, the method provided in this embodiment can predict the consumption of production materials according to the consumption rules of at least two types of time periods, capture the consumption rules of production materials from multiple dimensions, and predict the consumption based on the regular characteristics of multiple dimensions, thereby improving the prediction accuracy. For example, the consumption of production materials can be predicted from the dimensions of hours and days, respectively. Based on the hourly consumption rules of production materials in a period of time, and the daily consumption rules of production materials in a period of time, the consumption of production materials in the target time period is predicted respectively, and the prediction results of the two consumptions are obtained. Then, based on the prediction results of the two consumptions, the inventory threshold of production materials in the target time period is determined, and the inventory of production materials in the target time period is managed based on the inventory threshold, so that the inventory can accurately match the consumption, thereby improving the efficiency and accuracy of inventory management.
[0164] It should be noted that before collecting relevant data of users and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of relevant countries and regions.
[0165] It should be noted that the sequence of the method steps provided in the embodiments of the present application can be appropriately adjusted, and the steps can be increased or decreased accordingly according to the circumstances. Any technician familiar with the technical field can easily think of the changed methods within the technical scope disclosed in the present application, and they should be included in the protection scope of the present application, so they will not be repeated here.
[0166] Figure 8 1 is a schematic diagram of the structure of an inventory management device provided by an exemplary embodiment of the present application. The device includes:
[0167] The prediction module 501 is used to predict the consumption of the target object in the target time period, and obtain prediction results corresponding to at least two types of time periods; the at least two prediction results are respectively predicted based on the consumption rules of the target object in the at least two types of time periods;
[0168] A calculation module 502, configured to determine an inventory threshold according to the at least two prediction results;
[0169] The inventory module 503 is used to adjust the inventory quantity of the target object according to the inventory threshold in the target time period.
[0170] In an optional embodiment, the at least two types of time periods include a first type of time period, and a single cycle duration of the first type of time period is shorter than a duration of the target time period;
[0171] The prediction module 501 is used to determine at least one time point to be predicted in the target time period according to the single cycle duration of the first type of time period, to obtain a time group to be predicted; the duration of two adjacent time points to be predicted in the time group to be predicted is equal to the single cycle duration of the first type of time period;
[0172] The prediction module 501 is used to call the first prediction model corresponding to the first type of time period to predict the consumption corresponding to each time point to be predicted in the time group to be predicted;
[0173] The prediction module 501 is used to accumulate the consumption corresponding to each time point to be predicted in the time group to be predicted, and obtain the first prediction result corresponding to the first type of time period; the first prediction result is the total consumption of the target time period predicted based on the consumption law of the target object in the first type of time period.
[0174] In an optional embodiment, the time group to be predicted includes a first time point;
[0175] The prediction module 501 is used to input the first time information of the first time point into the first prediction model to obtain the consumption corresponding to the first time point; the first time information includes a time text describing the first time point according to the first type of time period;
[0176] Among them, the first time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark of the first time point, the price of the target object at the first time point, and the consumption activity at the first time point.
[0177] In an optional embodiment, the at least two types of time periods include a second type of time period, and the duration of a single cycle of the second type of time period is not less than the duration of the second time period;
[0178] The prediction module 501 is used to determine a second time point corresponding to the target time period; the second time point includes at least one of the following: the starting time point of the target time period, the ending time point of the target time period, the middle time point of the target time period, and the time value corresponding to the target time period in the second type of time period;
[0179] The prediction module 501 is used to call the second prediction model corresponding to the second type of time period to predict the consumption corresponding to the second time point;
[0180] The prediction module 501 is used to determine the product of the consumption corresponding to the second time point and the first proportion as the second prediction result corresponding to the second type of time period; the first proportion is the ratio of the duration of the second time period to the single cycle duration of the second type of time period; the second prediction result is the average consumption in the target time period predicted based on the consumption pattern of the target object in the second type of time period.
[0181] In an optional embodiment, the prediction module 501 is used to input the second time information of the second time point into the second prediction model to obtain the consumption corresponding to the second time point; the second time information includes a time text describing the second time point according to the second type of time period;
[0182] The second time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark, price of the target object at the second time point, and consumption activity at the second time point.
[0183] In an optional embodiment, the at least two types of time periods include at least two of the following: seconds, minutes, hours, days, weeks, months, and years.
[0184] In an optional embodiment, the calculation module 502 is used to calculate the weighted average of the at least two prediction results according to the weight values corresponding to the at least two types of time periods, so as to obtain the inventory threshold.
[0185] In an optional embodiment, the inventory module 503 is used to obtain the current inventory quantity of the target object within a target time period;
[0186] The inventory module 503 is configured to replenish the target object when the current inventory quantity is lower than the inventory threshold, until the inventory quantity of the target object reaches the inventory threshold.
[0187] In an optional embodiment, the at least two types of time periods include minutes, hours and days; the target time period includes the first week;
[0188] The prediction module 501 is used to call the minute prediction model to predict the consumption of the target object per minute in the first week; accumulate the consumption per minute in the first week to obtain a minute prediction result; the minute prediction result is the total consumption of the first week predicted according to the minute consumption rule of the target object;
[0189] The prediction module 501 is used to call the hourly prediction model to predict the hourly consumption of the target object in the first week; accumulate the hourly consumption in the first week to obtain an hourly prediction result; the hourly prediction result is the total consumption of the first week predicted according to the hourly consumption rule of the target object;
[0190] The prediction module 501 is used to call the daily prediction model to predict the daily consumption of the target object in the first week; accumulate the daily consumption in the first week to obtain a daily prediction result; the daily prediction result is the total consumption of the first week predicted based on the daily consumption pattern of the target object.
[0191] In an optional embodiment, the calculation module 502 is used to determine the product of the minute prediction result and the minute weight as the minute weighted result;
[0192] The calculation module 502 is used to determine the product of the hourly prediction result and the hourly weight as the hourly weighted result;
[0193] The calculation module 502 is used to determine the product of the weekly prediction result and the weekly weight as the weekly weighted result;
[0194] The calculation module 502 is used to divide the weighted sum by the weighted sum to obtain the inventory threshold;
[0195] The weighted sum is the sum of the minute weighted result, the hour weighted result, and the day weighted result; the weighted sum is the sum of the minute weight, the hour weight, and the day weight.
[0196] In an optional embodiment, the calculation module 502 is used to determine the historical accuracy of the minute prediction model as the minute weight;
[0197] The calculation module 502 is used to determine the historical accuracy of the hourly prediction model as the hourly weight;
[0198] The calculation module 502 is used to determine the historical accuracy of the daily prediction model as the daily weight.
[0199] It should be noted that the inventory management device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the inventory management device provided in the above embodiment and the inventory management method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0200] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0201] The embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the inventory management method provided by the above-mentioned method embodiments. The computer device can be implemented as a terminal.
[0202] For example, Fig. 9 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application.
[0203] Typically, the computer device 1700 includes a processor 1701 and a memory 1702 .
[0204] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0205] The memory 1702 may include one or more computer-readable storage media, which may be non-transitory. The memory 1702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1702 is used to store at least one instruction, which is used to be executed by the processor 1701 to implement the inventory management method provided in the method embodiment of the present application.
[0206] In some embodiments, the computer device 1700 may also optionally include: a peripheral device interface 1703 and at least one peripheral device. The processor 1701, the memory 1702 and the peripheral device interface 1703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707 and a power supply 1708.
[0207] The peripheral device interface 1703 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1701 and the memory 1702. In some embodiments, the processor 1701, the memory 1702, and the peripheral device interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1701, the memory 1702, and the peripheral device interface 1703 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.
[0208] The radio frequency circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1704 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1704 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1704 can communicate with other computer devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1704 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0209] The display screen 1705 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1705 is a touch display screen, the display screen 1705 also has the ability to collect touch signals on the surface or above the surface of the display screen 1705. The touch signal can be input to the processor 1701 as a control signal for processing. At this time, the display screen 1705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1705 can be one, and the front panel of the computer device 1700 is set; in other embodiments, the display screen 1705 can be at least two, which are respectively set on different surfaces of the computer device 1700 or are folded; in some other embodiments, the display screen 1705 can be a flexible display screen, which is set on the curved surface or folded surface of the computer device 1700. Even, the display screen 1705 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0210] The camera assembly 1706 is used to capture images or videos. Optionally, the camera assembly 1706 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the computer device 1700, and the rear camera is arranged on the back of the computer device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0211] The audio circuit 1707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1701 for processing, or input them into the radio frequency circuit 1704 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 1700. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1701 or the radio frequency circuit 1704 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1707 may also include a headphone jack.
[0212] The power supply 1708 is used to power various components in the computer device 1700. The power supply 1708 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1708 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0213] In some embodiments, the computer device 1700 further includes one or more sensors 1709 , including but not limited to: an acceleration sensor 1710 , a gyroscope sensor 1711 , a pressure sensor 1712 , an optical sensor 1713 , and a proximity sensor 1714 .
[0214] The acceleration sensor 1710 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 1700. For example, the acceleration sensor 1710 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1701 can control the touch display screen 1705 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1710. The acceleration sensor 1710 can also be used to collect game or user motion data.
[0215] The gyro sensor 1711 can detect the body direction and rotation angle of the computer device 1700, and the gyro sensor 1711 can cooperate with the acceleration sensor 1710 to collect the user's 3D actions on the computer device 1700. The processor 1701 can implement the following functions based on the data collected by the gyro sensor 1711: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0216] The pressure sensor 1712 can be set on the side frame of the computer device 1700 and / or the lower layer of the touch display screen 1705. When the pressure sensor 1712 is set on the side frame of the computer device 1700, it can detect the user's grip signal of the computer device 1700, and the processor 1701 performs left and right hand recognition or shortcut operations according to the grip signal collected by the pressure sensor 1712. When the pressure sensor 1712 is set on the lower layer of the touch display screen 1705, the processor 1701 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 1705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0217] The optical sensor 1713 is used to collect the ambient light intensity. In one embodiment, the processor 1701 can control the display brightness of the touch display screen 1705 according to the ambient light intensity collected by the optical sensor 1713. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1705 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1705 is reduced. In another embodiment, the processor 1701 can also dynamically adjust the shooting parameters of the camera assembly 1706 according to the ambient light intensity collected by the optical sensor 1713.
[0218] The proximity sensor 1714, also called a distance sensor, is usually arranged on the front panel of the computer device 1700. The proximity sensor 1714 is used to collect the distance between the user and the front of the computer device 1700. In one embodiment, when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually decreasing, the processor 1701 controls the touch display screen 1705 to switch from the screen-on state to the screen-off state; when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually increasing, the processor 1701 controls the touch display screen 1705 to switch from the screen-off state to the screen-on state.
[0219] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the computer device 1700, and the computer device 1700 may include more or less components than shown in the figure, or combine some components, or adopt a different arrangement of components.
[0220] A computer-readable storage medium is also provided in an embodiment of the present application, in which at least one instruction, at least one program, code set or instruction set is stored. When the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor of a computer device, the inventory management method provided by the above-mentioned method embodiments is implemented.
[0221] The present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the inventory management method provided by each of the above method embodiments.
[0222] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned readable storage medium may be a read-only memory, a disk or an optical disk, etc.
[0223] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An inventory management method, characterized in that: The method comprises: Predicting the consumption of the target object within the target time period, and obtaining prediction results corresponding to at least two types of time periods; the at least two prediction results are respectively predicted based on the consumption rules of the target object in the at least two types of time periods; determining an inventory threshold according to the at least two prediction results; In a target time period, the inventory quantity of the target object is adjusted according to the inventory threshold.
2. The method according to claim 1, characterized in that: The at least two types of time periods include a first type of time period, and the single cycle duration of the first type of time period is shorter than the duration of the target time period; The consumption of the target object in the target time period is predicted, and prediction results corresponding to at least two types of time periods are obtained, including: According to the single cycle duration of the first type of time cycle, at least one time point to be predicted is determined in the target time period to obtain a time group to be predicted; the duration of two adjacent time points to be predicted in the time group to be predicted is equal to the single cycle duration of the first type of time cycle; Calling a first prediction model corresponding to the first type of time period to predict the consumption corresponding to each time point to be predicted in the time group to be predicted; Accumulate the consumption corresponding to each time point to be predicted in the time group to be predicted, and obtain the first prediction result corresponding to the first type of time period; the first prediction result is the total consumption of the target time period predicted based on the consumption pattern of the target object in the first type of time period.
3. The method according to claim 2, characterized in that The time group to be predicted includes a first time point; The calling of the first prediction model corresponding to the first type of time period to predict the consumption corresponding to each time point to be predicted in the time group to be predicted includes: Inputting first time information of the first time point into the first prediction model to obtain consumption corresponding to the first time point; the first time information includes a time text describing the first time point according to the first type of time period; The first time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark of the first time point, the price of the target object at the first time point, and the consumption activity at the first time point.
4. The method according to claim 1, characterized in that: The at least two types of time periods include a second type of time period, and the duration of a single period of the second type of time period is not less than the duration of the second time period; The consumption of the target object in the target time period is predicted, and prediction results corresponding to at least two types of time periods are obtained, including: Determine a second time point corresponding to the target time period; the second time point includes at least one of the following: the starting time point of the target time period, the ending time point of the target time period, the middle time point of the target time period, and the time value corresponding to the target time period in the second type of time period; Calling a second prediction model corresponding to the second type of time period to predict the consumption corresponding to the second time point; The product of the consumption corresponding to the second time point and the first proportion is determined as the second prediction result corresponding to the second type of time period; the first proportion is the ratio of the length of the second time period to the length of a single period of the second type of time period; the second prediction result is the average consumption in the target time period predicted based on the consumption pattern of the target object in the second type of time period.
5. The method according to claim 4, characterized in that The calling the second prediction model corresponding to the second type of time period to predict the consumption corresponding to the second time point includes: inputting the second time information of the second time point into the second prediction model to obtain the consumption corresponding to the second time point; the second time information includes a time text describing the second time point according to the second type of time period; The second time information includes at least one of the following: the year, month, day, hour, minute, second, week number, day of the week, rest day mark, price of the target object at the second time point, and consumption activity at the second time point.
6. The method according to any one of claims 1 to 5, characterized in that: The at least two types of time periods include at least two of the following: seconds, minutes, hours, days, weeks, months, and years.
7. The method according to any one of claims 1 to 5, characterized in that: The determining the inventory threshold according to the at least two prediction results comprises: According to the weight values respectively corresponding to the at least two types of time periods, a weighted average of the at least two prediction results is calculated to obtain the inventory threshold.
8. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting the inventory quantity of the target object according to the inventory threshold in the target time period includes: Obtain the current inventory quantity of the target object within a target time period; When the current inventory quantity is lower than the inventory threshold, the target object is replenished until the inventory quantity of the target object reaches the inventory threshold.
9. The method according to any one of claims 1 to 5, characterized in that: The at least two types of time periods include minutes, hours and days; the target time period includes the first week; The consumption of the target object in the target time period is predicted, and prediction results corresponding to at least two types of time periods are obtained, including: Calling the minute prediction model to predict the target object's consumption per minute in the first week; accumulating the consumption per minute in the first week to obtain a minute prediction result; the minute prediction result is the total consumption of the first week predicted based on the minute consumption pattern of the target object; Calling the hourly prediction model to predict the hourly consumption of the target object in the first week; accumulating the hourly consumption in the first week to obtain an hourly prediction result; the hourly prediction result is the total consumption of the first week predicted based on the hourly consumption pattern of the target object; The daily prediction model is called to predict the daily consumption of the target object in the first week; the daily consumption in the first week is accumulated to obtain a daily prediction result; the daily prediction result is the total consumption of the first week predicted based on the daily consumption pattern of the target object.
10. The method according to any one of claims 1 to 5, characterized in that: The determining the inventory threshold according to the at least two prediction results comprises: The product of the minute prediction result and the minute weight is determined as the minute weighted result; The hourly prediction result is multiplied by the hourly weight to obtain the hourly weighted result. The weekly weighted result is determined by multiplying the weekly forecast result by the weekly weight; Dividing the weighted sum by the weighted sum to obtain the inventory threshold; The weighted sum is the sum of the minute weighted result, the hour weighted result, and the day weighted result; the weighted sum is the sum of the minute weight, the hour weight, and the day weight.
11. The method according to claim 10, characterized in that The method further comprises: Determine the historical accuracy of the minute prediction model as the minute weight; Determine the historical accuracy of the hourly prediction model as the hourly weight; The historical accuracy of the daily prediction model is determined as the daily weight.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the inventory management method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the inventory management method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the inventory management method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Inventory determination method and device for aging sensitive materials and electronic equipment
CN113283844A
Cash prediction method and device, storage medium and electronic device
CN117332885A
Data prediction method and device based on time series
CN117436325A
Material purchasing method based on multi-period dimension, storage medium and processor
CN118761719A
Inventory monitoring method and inventory monitoring system
US20240378553A1
Cited By
Method for automatically generating medicine shortage based on consumption and trend of pharmacy of medical institution
CN122158025A