Method, system, device and storage medium for generating inventory layout information of products
By predicting the target optimal data volume and splitting or merging the source tasks, the memory overflow and uncontrollable execution time of inventory layout calculation in the prior art is solved, and fast and accurate inventory layout information generation and overnight tasks are achieved. Stable processing improves user experience.
Patent Information
- Application Number
- CN201910199504.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-15
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2039-03-15
AI Technical Summary
The method of determining product inventory layout in the prior art can easily lead to memory overflow, uncontrollable execution time, and overnight tasks are prone to failure, reducing user experience.
By obtaining the initial processing data of the product source task, predicting the target optimal data volume, splitting or merging the source task, using the target processing data calculation to generate inventory layout information, and storing data in the calculation storage area, ensuring that the task is completed within the set time Or stop.
Effectively avoid memory overflow, improve computing speed, ensure the rapid generation and accuracy of inventory layout information, improve user experience, and solve the problems of overnight tasks failure and uncontrollable progress.
Smart Images

Figure CN111695846B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, device and storage medium for generating inventory layout information of a product. Background Art
[0002] At present, the product inventory layout network routes are built through the products, product warehousing locations and product sales coverage areas of users who have settled in the Internet platform (such as the small and medium-sized items network, 7*31 network routes from product warehousing locations to product sales coverage areas, where 7 represents 7 product warehousing locations, and 31 represents 31 product sales coverage areas covering 31 provinces and cities across the country) to ensure efficient and fast logistics and transportation.
[0003] The method for determining the inventory layout of products in the prior art mainly includes: obtaining the source tasks of each product created by users on the Internet platform on the Internet platform (such as including the product parameter data of the product within three months), and then multiple source tasks enter the task distribution link and the data algorithm processing link in turn, and then obtain the task processing results, determine the product coverage area corresponding to each product, and determine the inventory layout information corresponding to the product according to the product coverage area.
[0004] However, the above method for determining the inventory layout of products has the following problems:
[0005] 1) Based on products, sales, and layout networks, the amount of data involved in the inventory layout calculation of products increases dramatically. When the number of products and sales data of users is large, it is easy to cause OOM (memory overflow);
[0006] 2) The source tasks of the inventory layout are unevenly distributed, which may lead to unstable resources during the day, uneven number of products of users, and uneven level of product data set, resulting in uncontrollable execution time of the product source tasks created by each user, which reduces the user experience;
[0007] 3) Data is stored independently on a daily basis. That is, when the source task of product inventory needs to be executed overnight, it may be impossible to obtain the data required for task calculation in full, which can easily cause task execution failure. Summary of the invention
[0008] The technical problem to be solved by the present invention is that the method for determining the inventory layout of products in the prior art has defects such as easy to cause memory overflow, uncontrollable execution time of the product source task created by each user, reduced user experience, and easy execution failure when the source task of the product inventory needs to be executed overnight. The purpose of the present invention is to provide a method, system, device and storage medium for generating inventory layout information of products.
[0009] The present invention solves the above technical problems through the following technical solutions:
[0010] The present invention provides a method for generating inventory layout information of a product, the method comprising:
[0011] Obtaining a source task of a product created in an Internet platform, and obtaining initial processing data for calculating the source task;
[0012] Acquire product parameter data corresponding to the product within a set time period according to the source task;
[0013] Acquire a first data volume corresponding to the source task according to the product parameter data;
[0014] Obtaining historical log data corresponding to each processing link of the source task calculated by the initial processing data in a historical time period, and predicting a target optimal data volume for a single calculation of the initial processing data in a current time period based on the historical log data;
[0015] Acquire a target computing task of the source task within the current time period according to the first data amount and the target optimal data amount;
[0016] The target processing data corresponding to the current time period is obtained from the initial processing data; the target calculation task is calculated using the target processing data to generate the inventory layout information of the product.
[0017] Preferably, the step of calculating the target calculation task using the target processing data to generate the inventory layout information of the product includes:
[0018] Calculating the target calculation task using the target processing data to determine a target sales coverage area for storing the product;
[0019] Inventory layout information for the product is generated according to the target sales coverage.
[0020] Preferably, the product parameter data includes at least one of parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information.
[0021] Preferably, when the product parameter data includes quantity information of the product, the step of acquiring the first data volume corresponding to the source task according to the product parameter data includes:
[0022] The first data volume corresponding to the source task is calculated based on the quantity information of the product, the set time period, the total number of product warehouses of the Internet platform, and the total number of product sales coverage areas.
[0023] Preferably, the historical log data includes at least one of the amount of data calculated in a single calculation, the calculation time corresponding to the amount of data calculated in a single calculation, the CPU (central processing unit) occupancy and the remaining memory resource size;
[0024] When the historical log data includes the data volume of the single calculation and the calculation duration corresponding to the data volume of the single calculation, the step of predicting the target optimal data volume of the single calculation of the initial processing data in the current time period according to the historical log data includes:
[0025] Determine the single calculated data amount within the historical time period when the calculation time corresponding to the single calculated data amount has the smallest value as the first optimal data amount of the single calculated data of the initial processing data within the historical time period;
[0026] Predicting a target optimal data volume of a single calculation of the initial processing data within the current time period according to the first optimal data volume;
[0027] The current time period corresponds to the historical time period.
[0028] Preferably, the step of acquiring the target computing task of the source task within the current time period according to the first data amount and the target optimal data amount includes:
[0029] When the first data amount is greater than the target optimal data amount, calculating a ratio of the first data amount to the target optimal data amount;
[0030] Determine the number of the target computing tasks according to the ratio, and split the source task according to the number of the target computing tasks to obtain a plurality of the target computing tasks;
[0031] When the first data amount is smaller than the target optimal data amount, merging the source task with other source tasks in the source task queue to obtain the target computing task;
[0032] Among them, the data volume corresponding to the merged target computing task is smaller than the target optimal data volume.
[0033] Preferably, the step of calculating the target calculation task using the target processing data to generate the inventory layout information of the product includes:
[0034] When the target processing data is for the target computing task, the management data of the source task, the data of the target computing task and the progress data of the target computing task are obtained, and stored in the computing storage area;
[0035] estimating the remaining computing time of the target computing task by computing the target computing task with the target processing data according to the management data of the source task, the data of the target computing task and the progress data of the target computing task;
[0036] Acquire the current time point, and calculate the target processing data according to the remaining calculation duration and the current time point to obtain the first time point when the target calculation task is calculated;
[0037] Determine whether the first time point exceeds the set time point, and if not, when the target processing data completes all calculations of the target computing task, generate the inventory layout information of the product according to the management data of all the source tasks that have been calculated, the data of the target computing task, and the progress data of the target computing task, and transfer the management data of all the source tasks that have been calculated, the data of the target computing task, and the progress data of the target computing task from the computing storage area to the permanent storage area;
[0038] Otherwise, when the time point for calculating the target computing task with the target processing data reaches the set time point, stop calculating the target computing task, and transfer the management data of the source task that has been partially calculated, the data of the target computing task, and the progress data of the target computing task from the computing storage area to the permanent storage area.
[0039] Preferably, the management data of the source task includes at least one of the number, data volume, status, running start time, running end time, number and list of the target computing tasks;
[0040] The data of the target computing task includes at least one of the state of the target computing task, the relationship with the source task, and the type and information of the target processing data;
[0041] The progress data of the target computing task includes at least one of a failure state, a success state, and a completion state of the target computing task that has been completed;
[0042] Preferably, the same source task corresponds to one piece of initial processing data;
[0043] The same target computing task corresponds to one target processing data.
[0044] The present invention also provides a system for generating inventory layout information of a product, the system comprising a source task acquisition module, an initial processing data acquisition module, a product parameter data acquisition module, a first data volume acquisition module, a historical log data acquisition module, a target optimal data volume acquisition module, a target calculation task acquisition module, a target processing data acquisition module and an inventory layout determination module;
[0045] The source task acquisition module is used to acquire the source tasks of products created on the Internet platform;
[0046] The initial processing data acquisition module is used to acquire initial processing data for calculating the source task;
[0047] The product parameter data acquisition module is used to acquire the product parameter data corresponding to the product within a set time period according to the source task;
[0048] The first data volume acquisition module is used to acquire the first data volume corresponding to the source task according to the product parameter data;
[0049] The historical log data acquisition module is used to obtain the historical log data corresponding to each processing link of the source task calculated by the initial processing data within the historical time period;
[0050] The target optimal data volume acquisition module is used to predict the target optimal data volume of the initial processing data calculated once in the current time period according to the historical log data;
[0051] The target computing task acquisition module is used to acquire the target computing task of the source task within the current time period according to the first data amount and the target optimal data amount;
[0052] The target processing data acquisition module is used to acquire the target processing data corresponding to the current time period from the initial processing data;
[0053] The inventory layout determination module is used to calculate the target calculation task using the target processing data to generate the inventory layout information of the product.
[0054] Preferably, the inventory layout determination module includes a coverage area determination unit and an inventory layout information generation unit;
[0055] The coverage area determination unit is used to calculate the target calculation task using the target processing data to determine the target sales coverage area for storing the product;
[0056] The inventory layout information generating unit is used to generate the inventory layout information of the product according to the target sales coverage.
[0057] Preferably, the product parameter data includes at least one of parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information.
[0058] Preferably, when the product parameter data includes quantity information of the product, the first data quantity acquisition module is used to calculate the first data quantity corresponding to the source task based on the quantity information of the product, the set time period, the total number of product warehousing locations and the total number of product sales coverage locations of the Internet platform.
[0059] Preferably, the historical log data includes at least one of the amount of data calculated in a single calculation, the calculation time corresponding to the amount of data calculated in a single calculation, CPU occupancy, and the size of remaining memory resources;
[0060] When the historical log data includes the data volume of the single calculation and the calculation time corresponding to the data volume of the single calculation, the target optimal data volume acquisition module includes a first optimal data volume acquisition unit and a target optimal data volume acquisition unit;
[0061] The first optimal data volume acquisition unit is used to determine the single calculated data volume within the historical time period when the calculation time corresponding to the single calculated data volume has the smallest value as the first optimal data volume of the single calculated initial processing data within the historical time period;
[0062] The target optimal data volume acquisition unit is used to predict the target optimal data volume of the initial processing data calculated once in the current time period according to the first optimal data volume;
[0063] The current time period corresponds to the historical time period.
[0064] Preferably, the target computing task acquisition module includes a ratio computing unit and an execution unit;
[0065] The ratio calculation unit is used for calculating the ratio of the first data amount to the target optimal data amount when the first data amount is greater than the target optimal data amount;
[0066] The execution unit is used to determine the number of the target computing tasks according to the ratio, and split the source task according to the number of the target computing tasks to obtain a plurality of the target computing tasks;
[0067] The execution unit is further configured to merge the source task with other source tasks in the source task queue to obtain the target computing task when the first data amount is less than the target optimal data amount;
[0068] Among them, the data volume corresponding to the merged target computing task is smaller than the target optimal data volume.
[0069] Preferably, the inventory layout determination module includes a data acquisition unit, an estimation unit, a time point acquisition unit, a judgment unit and a transfer unit;
[0070] The data acquisition unit is used to acquire the management data of the source task, the data of the target computing task and the progress data of the target computing task when the target processing data is used for the target computing task, and store them in the computing storage area;
[0071] The estimation unit is used to estimate the remaining computing time of the target computing task calculated by the target processing data according to the management data of the source task, the data of the target computing task and the progress data of the target computing task;
[0072] The time point acquisition unit is used to acquire the current time point, and calculate the target processing data according to the remaining calculation duration and the current time point to obtain the first time point when the target calculation task is calculated;
[0073] The judging unit is used to judge whether the first time point exceeds the set time point, and if not, call the inventory layout information generating unit;
[0074] The inventory layout information generating unit is used to generate the inventory layout information of the product according to the management data of the source tasks that have all been calculated, the data of the target computing tasks and the progress data of the target computing tasks when the target processing data has completed all the calculations of the target computing tasks, and call the transfer unit to transfer the management data of the source tasks that have all been calculated, the data of the target computing tasks and the progress data of the target computing tasks from the computing storage area to the permanent storage area;
[0075] When the judgment unit determines that the first time point exceeds the set time point, the calculation of the target computing task is stopped, and the transfer unit is called to transfer the management data of the source task that has been partially calculated, the data of the target computing task, and the progress data of the target computing task from the computing storage area to the permanent storage area.
[0076] Preferably, the management data of the source task includes at least one of the number, data volume, status, running start time, running end time, number and list of the target computing tasks;
[0077] The data of the target computing task includes at least one of the state of the target computing task, the relationship with the source task, and the type and information of the target processing data;
[0078] The progress data of the target computing task includes at least one of a failure state, a success state, and a completion state of the target computing task that has been completed;
[0079] Preferably, the same source task corresponds to one piece of initial processing data;
[0080] The same target computing task corresponds to one target processing data.
[0081] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method of generating inventory layout information of a product when executing the computer program.
[0082] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating inventory layout information of a product are implemented.
[0083] The positive and progressive effects of the present invention are:
[0084] In the present invention, the target optimal data volume of the initial processing data for a single calculation within the current time period is calculated, and the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task; in addition, the data being calculated is stored in the calculation storage area, and the completed data is stored in the permanent storage area, which improves the calculation query speed, effectively solves the problems of easy failure of overnight tasks and uncontrollable task progress, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 This is a flow chart of a method for generating inventory layout information of a product according to Embodiment 1 of the present invention.
[0086] Figure 2 This is a flow chart of a method for generating inventory layout information for products according to Embodiment 2 of the present invention.
[0087] Figure 3 A schematic diagram of an inventory layout network for a method for generating inventory layout information for products according to Embodiment 2 of the present invention.
[0088] Figure 4 This is a flow chart of a method for generating inventory layout information of a product according to Embodiment 3 of the present invention.
[0089] Figure 5 This is a module diagram of a system for generating inventory layout information of products according to Embodiment 4 of the present invention.
[0090] Figure 6 This is a module diagram of a system for generating inventory layout information of products according to Embodiment 5 of the present invention.
[0091] Figure 7This is a module diagram of a system for generating inventory layout information of products according to Embodiment 6 of the present invention.
[0092] Figure 8 This is a schematic diagram of the structure of an electronic device for implementing the method for generating inventory layout information of products in Embodiment 7 of the present invention. DETAILED DESCRIPTION
[0093] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0094] Example 1
[0095] like Figure 1 As shown, the method for generating inventory layout information of a product in this embodiment includes:
[0096] S101, obtaining a source task of a product created in an Internet platform, and obtaining initial processing data for calculating the source task;
[0097] Among them, the same source task corresponds to one initial processing data;
[0098] S102, obtaining product parameter data corresponding to the product within a set time period according to the source task;
[0099] The product parameter data includes at least one of parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information.
[0100] Specifically, each user who settles in the Internet platform manually creates a source task for each product on the application side. The source task includes data dimensions such as parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information, etc.
[0101] In this embodiment, each source task created by different users is stored in order of creation time. During task processing, each source task in the source task queue is processed in order according to the FIFO (First Input First Output) principle.
[0102] S103, acquiring a first data volume corresponding to the source task according to the product parameter data;
[0103] S104, obtaining historical log data corresponding to each processing link of the calculation source task of the initial processing data within the historical time period;
[0104] S105, predicting the target optimal data volume of the initial processing data for a single calculation in the current time period according to the historical log data;
[0105] S106. Obtain a target computing task of the source task in the current time period according to the first data amount and the target optimal data amount;
[0106] S107, obtaining target processing data corresponding to the current time period from the initial processing data; S108, calculating the target calculation task using the target processing data to generate product inventory layout information, wherein the same target calculation task corresponds to one target processing data.
[0107] In this embodiment, the target optimal data volume for a single calculation of the initial processing data within the current time period is calculated, and the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task.
[0108] Example 2
[0109] like Figure 2 As shown, the method for generating inventory layout information of products in this embodiment is a further improvement of Embodiment 1, specifically:
[0110] When the product parameter data includes quantity information of the product, step S103 includes:
[0111] S1031. Calculate the first data volume corresponding to the source task based on the quantity information of the product, the set time period, the total number of product warehouses on the Internet platform, and the total number of product sales coverage areas.
[0112] like Figure 3 As shown, this is the inventory layout network corresponding to the Internet platform.
[0113] a indicates the origin of the product;
[0114] b indicates the location where the product enters the warehouse;
[0115] c represents the sales coverage of the product;
[0116] d represents the customer who purchased the product.
[0117] For small and medium-sized networks, the formula for calculating the first data volume corresponding to the source task is as follows:
[0118] S=M*7*31*N
[0119] Wherein, S represents the first data volume;
[0120] M represents the quantity information of the product;
[0121] 7 represents the total number of product warehouses on the Internet platform;
[0122] 31 represents the total number of locations covered by product sales;
[0123] N represents the number of days the product is sold (such as 90 days, 120 days, etc.).
[0124] The historical log data includes at least one of the amount of data calculated in a single time, the calculation time corresponding to the amount of data calculated in a single time, CPU usage, and the remaining memory resource size;
[0125] When the historical log data includes the amount of data calculated in a single time and the calculation time corresponding to the amount of data calculated in a single time, step S105 includes:
[0126] S1051, determining the single calculated data amount with the smallest calculation duration corresponding to the single calculated data amount in the historical time period as the first optimal data amount of the single calculated data of the initial processing data in the historical time period;
[0127] S1052. Predict a target optimal data volume of a single calculation of the initially processed data within the current time period according to the first optimal data volume.
[0128] Among them, the current time period corresponds to the historical time period.
[0129] Specifically, based on the historical log data, determine the first optimal data volume of a single calculation of the initial processing data in each time period of each previous day. If you want to obtain the target optimal data volume of a single calculation of the initial processing data in a certain time period of the day (such as 06:00-06:30), obtain the first optimal data volume of a single calculation of the initial processing data in the time period (06:00-06:30) of each previous day, and use it as the target optimal data volume for a single calculation of the initial processing data in the time period of the day, and then dynamically modify the default value based on the target optimal data volume.
[0130] Step S106 includes:
[0131] S1061. When the first data amount is greater than the target optimal data amount, a ratio of the first data amount to the target optimal data amount is calculated; the number of target computing tasks is determined according to the ratio, and the source task is split according to the number of target computing tasks to obtain multiple target computing tasks;
[0132] When the first data amount is smaller than the target optimal data amount, the source task is merged with other source tasks in the source task queue to obtain the target computing task;
[0133] Among them, the data volume corresponding to the merged target computing task is smaller than the target optimal data volume.
[0134] The number of target computing tasks split from each source task is 0≤x≤S / best, that is, the number of tasks added to the source task queue is 0≤y≤n*S / best.
[0135] Among them, best represents the target optimal data volume;
[0136] n represents the number of source tasks in the source task queue.
[0137] The following table explains in detail:
[0138]
[0139] As can be seen from the table above, the total data volume corresponding to the source task is obtained by multiplying the data volume of the source task, the quantity information of the product, the small and medium-sized network, and the sales days. When the total data volume is greater than the target optimal data volume, the total data volume is divided by the target optimal data volume, and the result is rounded to the integer, which is the number of target calculation tasks after splitting.
[0140] For example, 1*4000**7*31*90=78120000, 78120000 / 10000000=7.812, so the source task is split into 8 target computing tasks.
[0141] For example, 1*400**7*31*120=10416000, / 10000000=1.0416, so the source task is split into two target computing tasks.
[0142] When the amount of data in the source task queue is small, multiple source tasks can be combined for calculation. For example, if the quantity information of the products corresponding to the three source tasks is 10, 100, and 30 respectively, then add them together and calculate the total amount of data: 3*140*7*31*90=2734200, 2734200 / 10000000=0.27342, so the three source tasks are combined into one target calculation task.
[0143] Step S108 includes:
[0144] S1081. Calculate the target calculation task using the target processing data to determine the target sales coverage area for storing the product;
[0145] S1082. Generate product inventory layout information based on the target sales coverage area.
[0146] In this embodiment, the target optimal data volume for a single calculation of the initial processing data within the current time period is calculated, and the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task.
[0147] Example 3
[0148] like Figure 4 As shown, the method for generating inventory layout information of products in this embodiment is a further improvement of Embodiment 1, specifically:
[0149] Step S108 includes:
[0150] S1083, when the target processing data is for the target computing task, the management data of the source task, the data of the target computing task and the progress data of the target computing task in the computing management area are obtained, and stored in the computing storage area;
[0151] The management data of the source task includes at least one of the source task number, data volume, status, running start time, running end time, number of target computing tasks and a list;
[0152] The data of the target computing task includes at least one of the state of the target computing task, the relationship with the source task, and the type and information of the target processing data;
[0153] The progress data of the target computing task includes at least one of a failure state, a success state, and a completion state of the target computing task that has been completed;
[0154] S1084, estimating the remaining computing time of the target processing data computing target computing task according to the management data of the source task, the data of the target computing task and the progress data of the target computing task;
[0155] S1085, obtaining the current time point, and calculating the first time point when the target computing task is completed according to the remaining computing time and the target processing data at the current time point;
[0156] S1086, determining whether the first time point exceeds the set time point, if not, when the target processing data completes all calculations of the target computing tasks, determining the inventory layout information of the product according to the management data of all the source tasks that have been calculated, the data of the target computing tasks, and the progress data of the target computing tasks, and transferring the management data of all the source tasks that have been calculated, the data of the target computing tasks, and the progress data of the target computing tasks from the computing storage area to the permanent storage area;
[0157] Otherwise, when the time point for calculating the target computing task of the target processing data reaches the set time point, the calculation of the target computing task is stopped, and the management data of the source task that has been calculated, the data of the target computing task, and the progress data of the target computing task are transferred from the computing storage area to the permanent storage area; the management data of the source task that has not been completed, the data of the target computing task, and the progress data of the target computing task are stored in the computing storage area.
[0158] Specifically, if the set time point is 00:00 and the current time point is 23:30, if it is estimated that the remaining calculation time of the target processing data to calculate the target calculation task is 25 minutes, so it will not exceed 00:00, then when the target processing data completes the calculation of the target calculation task, the inventory layout information of the product is determined according to the management data of all the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task, and the management data of all the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task are transferred from the calculation storage area to the permanent storage area;
[0159] If it is estimated that the remaining calculation time of the target processing data calculation target calculation task is 50 minutes, it will exceed 00:00. In this case, when the target processing data is calculated to 00:00, the calculation of the target calculation task is stopped, and the management data of some of the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task are transferred from the calculation storage area to the permanent storage area, thereby solving the problem of overnight task execution failure.
[0160] According to the management data of the source task, the data of the target computing task and the target computing task of the data in the computing management area and the computing storage area, the various heterogeneous data calculated by each target processing data are aggregated into the source task dimension.
[0161] In addition, there are a lot of processing data in the processing pool, such as commodity inventory layout processing data, replenishment suggestion calculation processing data, slow-selling suggestion calculation processing data, etc.
[0162] The same type of processing data can also have multiple processing data. For example, multiple commodity inventory layout processing data can be used to parallel calculate commodity inventory layout information. The scheduling of multiple processing data is uniformly managed by the computing management area.
[0163] In this embodiment, by calculating the target optimal data volume of the initial processing data for a single calculation in the current time period, the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task;
[0164] In addition, the data in the calculation is stored in the calculation storage area, and the completed data is stored in the permanent storage area, that is, the calculated data and historical data are separated, thereby improving the calculation query speed, effectively solving the problems of overnight task failure and uncontrollable task progress, and improving the user experience.
[0165] Example 4
[0166] like Figure 5As shown, the system for generating inventory layout information of products in this embodiment includes a source task acquisition module 1, an initial processing data acquisition module 2, a product parameter data acquisition module 3, a first data volume acquisition module 4, a historical log data acquisition module 5, a target optimal data volume acquisition module 6, a target calculation task acquisition module 7, a target processing data acquisition module 8 and an inventory layout determination module 9.
[0167] The source task acquisition module 1 is used to acquire the source tasks of products created on the Internet platform;
[0168] Among them, the same source task corresponds to one initial processing data;
[0169] The initial processing data acquisition module 2 is used to acquire the initial processing data for computing the source task;
[0170] The product parameter data acquisition module 3 is used to acquire the product parameter data corresponding to the product within a set time period according to the source task;
[0171] The product parameter data includes at least one of parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information.
[0172] Specifically, each user who settles in the Internet platform manually creates a source task for each product on the application side. The source task includes data dimensions such as parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information, etc.
[0173] In this embodiment, each source task created by different users is stored in order of creation time.
[0174] During the task processing process, each source task in the source task queue is traversed and processed in turn according to the FIFO (First Input First Output) principle.
[0175] The first data volume acquisition module 4 is used to acquire the first data volume corresponding to the source task according to the product parameter data;
[0176] The historical log data acquisition module 5 is used to acquire the historical log data of each processing link calculated by the initial processing data within the historical time period;
[0177] The target optimal data volume acquisition module 6 is used to predict the target optimal data volume of the initial processing data for a single calculation in the current time period according to the historical log data;
[0178] The target computing task acquisition module 7 is used to acquire the target computing task of the source task in the current time period according to the first data amount and the target optimal data amount;
[0179] The inventory layout determination module 9 is used to calculate the target calculation task using the target processing data to determine the inventory layout information of the product.
[0180] Among them, the same target computing task corresponds to one target processing data.
[0181] In this embodiment, the target optimal data volume for a single calculation of the initial processing data within the current time period is calculated, and the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task.
[0182] Example 5
[0183] like Figure 6 As shown, the system for generating inventory layout information of products in this embodiment is a further improvement of Embodiment 4, specifically:
[0184] When the product parameter data includes product quantity information, the first data quantity acquisition module 4 is used to calculate the first data quantity corresponding to the source task based on the product quantity information, the set time period, the total number of product warehousing locations on the Internet platform, and the total number of product sales coverage locations.
[0185] like Figure 3 As shown, this is the inventory layout network corresponding to the Internet platform.
[0186] a indicates the origin of the product;
[0187] b indicates the location where the product enters the warehouse;
[0188] c represents the sales coverage of the product;
[0189] d represents the customer who purchased the product.
[0190] For small and medium-sized networks, the formula for calculating the first data volume corresponding to the source task is as follows:
[0191] S=M*7*31*N
[0192] Wherein, S represents the first data volume;
[0193] M represents the quantity information of the product;
[0194] 7 represents the total number of product warehouses on the Internet platform;
[0195] 31 represents the total number of locations covered by product sales;
[0196] N represents the number of days the product is sold (such as 90 days, 120 days, etc.).
[0197] The historical log data includes at least one of the amount of data calculated in a single time, the calculation time corresponding to the amount of data calculated in a single time, CPU usage, and the remaining memory resource size;
[0198] When the historical log data includes the data volume of a single calculation and the calculation duration corresponding to the data volume of a single calculation, the target optimal data volume acquisition module 6 includes a first optimal data volume acquisition unit 61 and a target optimal data volume acquisition unit 62;
[0199] The first optimal data volume acquisition unit 61 is used to determine the single calculated data volume in the historical time period when the calculation time corresponding to the single calculated data volume has the smallest value as the first optimal data volume of the single calculated initial processing data in the historical time period;
[0200] The target optimal data volume acquisition unit 62 is used to predict the target optimal data volume of the initial processing data calculated once in the current time period according to the first optimal data volume;
[0201] Among them, the current time period corresponds to the historical time period.
[0202] Specifically, based on the historical log data, determine the first optimal data volume of a single calculation of the initial processing data in each time period of each previous day. If you want to obtain the target optimal data volume of a single calculation of the initial processing data in a certain time period of the day (such as 06:00-06:30), obtain the first optimal data volume of a single calculation of the initial processing data in the time period (06:00-06:30) of each previous day, and use it as the target optimal data volume for a single calculation of the initial processing data in the time period of the day, and then dynamically modify the default value based on the target optimal data volume.
[0203] The target computing task acquisition module 7 includes a ratio computing unit 71 and an execution unit 72 .
[0204] The ratio calculation unit 71 is used for calculating the ratio of the first data amount to the target optimal data amount when the first data amount is greater than the target optimal data amount;
[0205] The execution unit 72 is used to determine the number of target computing tasks according to the ratio, and split the source task according to the number of target computing tasks to obtain multiple target computing tasks;
[0206] Specifically, the number of target computing tasks split from each source task is 0≤x≤S / best, that is, the number of tasks added to the source task queue is 0≤y≤n*S / best.
[0207] Among them, best represents the target optimal data volume;
[0208] n represents the number of source tasks in the source task queue.
[0209] The execution unit 72 is further configured to merge the source task with other source tasks in the source task queue to obtain a target computing task when the first data amount is less than the target optimal data amount;
[0210] Among them, the data volume corresponding to the merged target computing task is smaller than the target optimal data volume.
[0211] The following table explains in detail:
[0212]
[0213] As can be seen from the above table, the total data volume corresponding to the source task is obtained by multiplying the data volume of the source task, the quantity information of the product, the small and medium-sized item network, and the sales days.
[0214] When the total data volume is greater than the target optimal data volume, the total data volume is divided by the target optimal data volume, and the result is rounded to the integer, which is the number of target computing tasks after splitting.
[0215] For example, 1*4000**7*31*90=78120000, 78120000 / 10000000=7.812, so the source task is split into 8 target computing tasks;
[0216] For example, 1*400**7*31*120=10416000, / 10000000=1.0416, so the source task is split into two target computing tasks.
[0217] When the amount of data in the source task queue is small, multiple source tasks can be combined for calculation. For example, if the quantity information of the products corresponding to the three source tasks is 10, 100, and 30 respectively, then add them together and calculate the total amount of data: 3*140*7*31*90=2734200, 2734200 / 10000000=0.27342, so the three source tasks are combined into one target calculation task.
[0218] The inventory layout determination module 9 includes a coverage area determination unit 91 and an inventory layout information generation unit 92;
[0219] The coverage area determination unit 91 is used to calculate the target calculation task using the target processing data to determine the target sales coverage area for storing the product;
[0220] The inventory layout information generating unit 92 is used to generate inventory layout information of products according to the target sales coverage.
[0221] In this embodiment, the target optimal data volume for a single calculation of the initial processing data within the current time period is calculated, and the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task.
[0222] Example 6
[0223] like Figure 7 As shown, the system for generating inventory layout information of products in this embodiment is a further improvement of Embodiment 4, specifically:
[0224] The inventory layout determination module 9 includes a data acquisition unit 93, an estimation unit 94, a time point acquisition unit 95, a judgment unit 96 and a transfer unit 97;
[0225] The data acquisition unit 93 is used to acquire the management data of the source task, the data of the target computing task and the progress data of the target computing task in the computing management area when the target processing data is for the target computing task, and store them in the computing storage area;
[0226] The management data of the source task includes at least one of the source task number, data volume, status, running start time, running end time, number of target computing tasks and a list;
[0227] The data of the target computing task includes at least one of the state of the target computing task, the relationship with the source task, and the type and information of the target processing data;
[0228] The progress data of the target computing task includes at least one of a failure state, a success state, and a completion state of the target computing task that has been completed.
[0229] The estimation unit 94 is used to estimate the remaining computing time of the target processing data computing target computing task according to the management data of the source task, the data of the target computing task and the progress data of the target computing task;
[0230] The time point acquisition unit 95 is used to acquire the current time point, and calculate the first time point when the target computing task is completed according to the remaining computing time and the target processing data at the current time point;
[0231] The judging unit 96 is used to judge whether the first time point exceeds the set time point, and if not, call the inventory layout information generating unit 92;
[0232] The inventory layout information generating unit 92 is used to determine the inventory layout information of the product according to the management data of all the source tasks that have been calculated, the data of the target computing tasks and the progress data of the target computing tasks when the target processing data completes all the calculations of the target computing tasks, and call the transfer unit 97 to transfer the management data of all the source tasks that have been calculated, the data of the target computing tasks and the progress data of the target computing tasks from the calculation storage area to the permanent storage area;
[0233] When the judgment unit 96 judges that the first time point exceeds the set time point, the calculation of the target computing task is stopped, and the transfer unit 97 is called to transfer the management data of the partially completed source task, the data of the target computing task and the progress data of the target computing task from the calculation storage area to the permanent storage area;
[0234] The management data of the unfinished source tasks, the data of the target computing tasks, and the progress data of the target computing tasks are stored in the computing storage area.
[0235] Specifically, if the set time point is 00:00 and the current time point is 23:30, if it is estimated that the remaining calculation time of the target processing data to calculate the target calculation task is 25 minutes, so it will not exceed 00:00, then when the target processing data completes the calculation of the target calculation task, the inventory layout information of the product is determined according to the management data of all the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task, and the management data of all the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task are transferred from the calculation storage area to the permanent storage area;
[0236] If it is estimated that the remaining calculation time of the target processing data calculation target calculation task is 50 minutes, it will exceed 00:00. In this case, when the target processing data is calculated to 00:00, the calculation of the target calculation task is stopped, and the management data of some of the source tasks that have been calculated, the data of the target calculation task and the progress data of the target calculation task are transferred from the calculation storage area to the permanent storage area, thereby solving the problem of overnight task execution failure.
[0237] According to the management data of the source task, the data of the target computing task and the target computing task of the data in the computing management area and the computing storage area, the various heterogeneous data calculated by each target processing data are aggregated into the source task dimension.
[0238] In addition, there are a lot of processing data in the processing pool, such as commodity inventory layout processing data, replenishment suggestion calculation processing data, slow-selling suggestion calculation processing data, etc.
[0239] The same type of processing data can also have multiple processing data. For example, multiple commodity inventory layout processing data can be used to parallel calculate commodity inventory layout information. The scheduling of multiple processing data is uniformly managed by the computing management area.
[0240] In this embodiment, by calculating the target optimal data volume of the initial processing data for a single calculation in the current time period, the source tasks are split or merged, thereby effectively avoiding the OOM situation and improving the calculation speed of the source tasks, so as to quickly and effectively determine the inventory layout information corresponding to each product of each source task;
[0241] In addition, the data in the calculation is stored in the calculation storage area, and the completed data is stored in the permanent storage area, that is, the calculated data and historical data are separated, thereby improving the calculation query speed, effectively solving the problems of overnight task failure and uncontrollable task progress, and improving the user experience.
[0242] Example 7
[0243] Figure 8 A schematic diagram of the structure of an electronic device provided in Example 7 of the present invention.
[0244] The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for generating inventory layout information of a product in any one of embodiments 1 to 3 is implemented.
[0245] Figure 8 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0246] like Figure 8 As shown, the electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device.
[0247] The components of the electronic device 30 may include, but are not limited to: the at least one processor 31 mentioned above, the at least one memory 32 mentioned above, and a bus 33 connecting different system components (including the memory 32 and the processor 31).
[0248] The bus 33 includes a data bus, an address bus, and a control bus.
[0249] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .
[0250] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0251] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the method of generating inventory layout information of products in any one of embodiments 1 to 3 of the present invention.
[0252] The electronic device 30 may also communicate with one or more external devices 34 (eg, keyboards, pointing devices, etc.).
[0253] Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model generating device 30 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) via a network adapter 36.
[0254] like Figure 8 As shown, the network adapter 36 communicates with other modules of the model generating device 30 via the bus 33 .
[0255] It should be understood that although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0256] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, such division is merely exemplary and not mandatory.
[0257] In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above may be embodied in one unit / module.
[0258] On the contrary, the features and functions of one unit / module described above may be further divided into multiple units / modules to be embodied.
[0259] Example 8
[0260] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps in the method for generating inventory layout information of a product in any one of Embodiments 1 to 3 are implemented.
[0261] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0262] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps in the method for generating inventory layout information of a product in any one of embodiments 1 to 3.
[0263] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0264] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these are only examples, and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A method for generating inventory layout information of a product, characterized in that: The method comprises: Obtaining a source task of a product created in an Internet platform, and obtaining initial processing data for calculating the source task; Acquire product parameter data corresponding to the product within a set time period according to the source task; Acquire a first data volume corresponding to the source task according to the product parameter data; Obtaining historical log data corresponding to each processing link of the source task calculated by the initial processing data in a historical time period, and predicting a target optimal data volume for a single calculation of the initial processing data in a current time period based on the historical log data; Acquire a target computing task of the source task within the current time period according to the first data amount and the target optimal data amount; Acquire target processing data corresponding to the current time period from the initial processing data; Using the target processing data to calculate the target calculation task, and generating inventory layout information of the product; The step of calculating the target calculation task using the target processing data to generate the inventory layout information of the product comprises: Calculating the target calculation task using the target processing data to determine a target sales coverage area for storing the product; Inventory layout information for the product is generated according to the target sales coverage.
2. The method for generating inventory layout information of a product according to claim 1, characterized in that: The product parameter data includes at least one of parameter setting information, task setting information, product transportation price information, delivery price information, sales volume information and quantity information.
3. The method for generating inventory layout information of a product according to claim 1, characterized in that: When the product parameter data includes quantity information of the product, the step of acquiring the first data volume corresponding to the source task according to the product parameter data includes: The first data volume corresponding to the source task is calculated based on the quantity information of the product, the set time period, the total number of product warehouses of the Internet platform, and the total number of product sales coverage areas.
4. The method for generating inventory layout information of a product according to claim 1, characterized in that: The historical log data includes at least one of the amount of data calculated in a single calculation, the calculation time corresponding to the amount of data calculated in a single calculation, CPU usage, and the remaining memory resource size; When the historical log data includes the data volume of the single calculation and the calculation duration corresponding to the data volume of the single calculation, the step of predicting the target optimal data volume of the single calculation of the initial processing data in the current time period according to the historical log data includes: Determine the single calculated data amount within the historical time period when the calculation time corresponding to the single calculated data amount has the smallest value as the first optimal data amount of the single calculated data of the initial processing data within the historical time period; Predicting a target optimal data volume of a single calculation of the initial processing data within the current time period according to the first optimal data volume; The current time period corresponds to the historical time period.
5. The method for generating inventory layout information of a product according to claim 1, characterized in that: The step of acquiring the target computing task of the source task within the current time period according to the first data amount and the target optimal data amount includes: When the first data amount is greater than the target optimal data amount, calculating a ratio of the first data amount to the target optimal data amount; Determine the number of the target computing tasks according to the ratio, and split the source task according to the number of the target computing tasks to obtain a plurality of the target computing tasks; When the first data amount is smaller than the target optimal data amount, merging the source task with other source tasks in the source task queue to obtain the target computing task; Among them, the data volume corresponding to the merged target computing task is smaller than the target optimal data volume.
6. The method for generating inventory layout information of a product according to claim 1, characterized in that: The step of calculating the target calculation task using the target processing data to generate the inventory layout information of the product comprises: When the target processing data is for the target computing task, the management data of the source task, the data of the target computing task and the progress data of the target computing task are obtained, and stored in the computing storage area; estimating the remaining computing time of the target computing task by computing the target computing task with the target processing data according to the management data of the source task, the data of the target computing task and the progress data of the target computing task; Acquire the current time point, and calculate the target processing data according to the remaining calculation duration and the current time point to obtain the first time point when the target calculation task is calculated; Determine whether the first time point exceeds the set time point, and if not, when the target processing data completes all calculations of the target computing task, generate the inventory layout information of the product according to the management data of all the source tasks that have been calculated, the data of the target computing task, and the progress data of the target computing task, and transfer the management data of all the source tasks that have been calculated, the data of the target computing task, and the progress data of the target computing task from the computing storage area to the permanent storage area; Otherwise, when the time point for calculating the target computing task with the target processing data reaches the set time point, stop calculating the target computing task, and transfer the management data of the source task that has been partially calculated, the data of the target computing task, and the progress data of the target computing task from the computing storage area to the permanent storage area.
7. The method for generating inventory layout information of a product according to claim 6, characterized in that: The management data of the source task includes at least one of the number, data volume, status, running start time, running end time, number and list of the target computing tasks; The data of the target computing task includes at least one of the state of the target computing task, the relationship with the source task, and the type and information of the target processing data; The progress data of the target computing task includes at least one of a failure state, a success state, and a completion state of the target computing task that has been calculated and completed.
8. The method for generating inventory layout information of a product according to claim 1, characterized in that: The same source task corresponds to one piece of initial processing data; The same target computing task corresponds to one target processing data.
9. A system for generating inventory layout information of a product, characterized in that: The system includes a source task acquisition module, an initial processing data acquisition module, a product parameter data acquisition module, a first data volume acquisition module, a historical log data acquisition module, a target optimal data volume acquisition module, a target calculation task acquisition module, a target processing data acquisition module and an inventory layout determination module; The source task acquisition module is used to acquire the source tasks of products created on the Internet platform; The initial processing data acquisition module is used to acquire initial processing data for calculating the source task; The product parameter data acquisition module is used to acquire the product parameter data corresponding to the product within a set time period according to the source task; The first data volume acquisition module is used to acquire the first data volume corresponding to the source task according to the product parameter data; The historical log data acquisition module is used to obtain the historical log data corresponding to each processing link of the source task calculated by the initial processing data within the historical time period; The target optimal data volume acquisition module is used to predict the target optimal data volume of the initial processing data calculated once in the current time period according to the historical log data; The target computing task acquisition module is used to acquire the target computing task of the source task within the current time period according to the first data amount and the target optimal data amount; The target processing data acquisition module is used to acquire the target processing data corresponding to the current time period from the initial processing data; The inventory layout determination module is used to calculate the target calculation task using the target processing data to generate the inventory layout information of the product; The inventory layout determination module includes a coverage area determination unit and an inventory layout information generation unit; The coverage area determination unit is used to calculate the target calculation task using the target processing data to determine the target sales coverage area for storing the product; The inventory layout information generating unit is used to generate the inventory layout information of the product according to the target sales coverage.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for generating inventory layout information of products according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating inventory layout information of products described in any one of claims 1 to 8 are implemented.
