Method, device, readable medium and electronic device for predicting the quantity of resources delivered
By combining the linear regression model and the regression tree model, the benchmark and residual data of the quantity of resources invested are obtained, which solves the problem of poor prediction accuracy of the quantity of resources put in the existing technology, improves the accuracy of the prediction results, and provides a reliable basis for resource placement. .
Patent Information
- Application Number
- CN202111284856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-01
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-11-01
AI Technical Summary
Existing time series forecasting methods have poor accuracy in predicting the quantity of resources to be delivered, and cannot provide reliable data basis for ensuring the smooth progress of resource delivery in the later period.
By obtaining the target data characteristics, including target trend characteristics, business characteristics and resource change cycle characteristics, input them into the preset linear regression model and regression tree model, and combine the baseline resource quantity data and residual resource quantity data to calculate the forecast The target forecast quantity of resources to be delivered during the time period.
It effectively improves the accuracy of prediction results, provides reliable data basis for later resource placement, and ensures smooth delivery.
Smart Images

Figure CN113837814B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular, to a method, device, readable medium and electronic device for predicting the quantity of deployed resources. Background Art
[0002] With the continuous development of network technology, more and more marketing operations are carried out through the Internet. In the process of marketing through the Internet, it is often necessary to promote products in the form of resource delivery (for example, to deliver relevant advertisements on the Internet, and the advertisements can be text links, film and television images, banner images, etc.). In order to ensure the reliability of resource delivery, the current number of delivered resources is usually used to predict the number of delivered resources that may appear in the future.
[0003] However, the time series forecasting methods currently used to predict the amount of resources deployed usually have poor prediction results and are unable to provide reliable data basis to ensure the smooth deployment of resources in the later stage. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] The present disclosure provides a method, device, readable medium and electronic device for predicting the quantity of resources to be delivered.
[0006] In a first aspect, the present disclosure provides a method for predicting the quantity of deployed resources, the method comprising:
[0007] Acquire target data features, the target data features including target trend features, target business features and resource change cycle features, the target trend features are used to characterize the change trend of the quantity of the delivered resources in a historical time period, and the target business features are pre-set influencing parameters on the change of the delivered resources in the forecast time period;
[0008] Inputting the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period;
[0009] Input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period;
[0010] The sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data is used as the target predicted delivery resource quantity data within the prediction time period.
[0011] In a second aspect, the present disclosure provides a device for predicting the quantity of resources to be delivered, the device comprising:
[0012] A first acquisition module is used to acquire target data features, wherein the target data features include target trend features, target business features, and resource change cycle features. The target trend features are used to characterize the change trend of the quantity of the delivered resources within a historical time period. The target business features are pre-set influencing parameters on the change of the delivered resources within the forecast time period.
[0013] A first determination module is used to input the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period;
[0014] A second determination module is used to input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period;
[0015] The third determination module is used to use the sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data within the prediction time period.
[0016] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect above.
[0017] In a fourth aspect, the present disclosure provides an electronic device, including:
[0018] a storage device having a computer program stored thereon;
[0019] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect above.
[0020] The above technical solution obtains target data features, including target trend features, target business features, and resource change cycle features, and inputs the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period; inputs the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period; and uses the sum of the benchmark resource quantity data and the residual resource quantity data as the target forecast resource quantity data within the forecast time period. In this way, the target forecast resource quantity data determined by the benchmark resource quantity data and the residual resource quantity data can be obtained by combining the preset linear regression model and the preset regression tree model, which can effectively improve the accuracy of the forecast results and provide a reliable data basis for ensuring the smooth progress of resource delivery in the later stage.
[0021] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0023] Figure 1 is a flow chart of a method for predicting the quantity of resources delivered, shown in an exemplary embodiment of the present disclosure;
[0024] Figure 2 is a flowchart of a method for predicting the quantity of resources delivered, shown in another exemplary embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of an STL decomposition result shown in an exemplary embodiment of the present disclosure;
[0026] Figure 4 It is a block diagram of a device for predicting the quantity of resources provided according to an exemplary embodiment of the present disclosure;
[0027] Figure 5 is based on Figure 4 The illustrated embodiment shows a block diagram of a device for predicting the quantity of resources put in;
[0028] Figure 6 It is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] Before introducing the specific implementation methods of the present disclosure in detail, the application scenarios of the present disclosure are first described as follows. The present disclosure can be applied in the process of time series prediction of the number of resources to be delivered in the future based on the number of resources delivered in the current historical time, wherein the number of resources delivered can be the number of advertisements delivered, revenue, etc., and the advertisement can be a text link, a film and television image, a banner image, etc. In the related art, commonly used time series prediction methods generally include: traditional regression methods such as ARMA (English: Autoregressive moving average model), ARIMA (Autoregressive Integrated Moving Average model), linear regression methods, decision trees, GBDT (Gradient Boosting Decision Tree), xgboost (composite tree) and other tree algorithms, or MLP (Multilayer Perceptron), CNN (Convolutional Neural Network), LSTM (Long Short-Term However, the inventors have found that the traditional regression method is usually difficult to add custom features (such as holiday features, business features, etc.), and it takes a lot of time and energy to determine the optimal parameters, and the model acquisition efficiency is low; the simple linear regression usually has a relatively weak fitting ability and cannot capture periodic fluctuations, which is not conducive to improving the accuracy of the prediction results; the simple tree algorithm usually has a weak extrapolation ability and is difficult to fit the data with an upward trend; and the neural network requires a lot of training sample data in the model training process, so it is not suitable for all time series prediction processes. Usually, when the training sample data is insufficient, it is easy to cause the prediction result to be less accurate; that is to say, the current time series prediction model method usually has the problem of poor prediction result accuracy, and cannot provide a reliable data basis for ensuring the smooth implementation of resource allocation in the later stage.
[0036] In order to solve the above technical problems, the present disclosure provides a method, device, readable medium and electronic device for predicting the quantity of resources to be delivered. The method can obtain target predicted quantity of resources delivered determined by benchmark quantity of resources delivered and residual quantity of resources delivered data by combining the preset linear regression model and the preset regression tree model, which can effectively improve the accuracy of the prediction results and provide a reliable data basis for ensuring the smooth progress of resource delivery in the later stage.
[0037] The technical solution of the present disclosure is described in detail below in conjunction with specific embodiments.
[0038] Figure 1 is a flowchart of a method for predicting the number of resources provided according to an exemplary embodiment of the present disclosure; Figure 1 , the method may include the following steps:
[0039] Step 101, obtaining target data features.
[0040] The target data feature includes a target trend feature, a target business feature, and a resource change cycle feature. The target trend feature is used to characterize the change trend of the number of the delivered resources in the historical time period. The target business feature is a pre-set parameter affecting the change of the delivered resources in the forecast time period. The target data feature can be a feature sequence formed by data features corresponding to multiple times in the forecast time period.
[0041] It should be noted that the target trend feature may be the change trend of the number of resources in the historical number of resources data, and the prediction time period may be a future time after the current time, or a time after the recording time corresponding to the historical number of resources data before the current time. For example, the recording time corresponding to the historical number of resources data is May 1, 2019, the end of the recording time is January 1, 2021, and the current time is July 29, 2021. The prediction time period may be a time period after July 29, 2021, or a time period between January 1, 2021 and July 29, 2021. The target business feature may include: whether it is a shopping discount time period (for example, June 1 to June 18, November 1 to November 11, and December 12 of each year are all preset shopping discount times), whether it is during the Spring Festival holiday, whether it is during the National Day holiday, whether it is during other holidays, etc. Since the shopping discount time period and the long holiday period are important parameters that affect the number of resources, the target business feature is needed as a data feature for predicting the number of resources. The resource change cycle feature can be the cycle presented by the historical resource quantity data, which can include cycles of different lengths. For example, a periodic change occurs every 7 days, every 30 days, every quarter, and every year. Therefore, the resource change cycle can include 7 days, 30 days, 90 days, 365 days, etc.
[0042] In addition, the resource change cycle characteristics can be expressed in the form of trigonometric functions. For example, when the frequency is f, the resource change cycle characteristics are expressed as β1cos(2πft), β2sin(2πft), where β1 and β2 are fixed parameters related to the cycle duration, f is the frequency, and t is the time variable. Representing the cycle characteristics in the form of the above trigonometric functions is conducive to reducing the data processing dimension when the cycle is long, thereby reducing the difficulty of data processing and reducing the amount of calculation based on time series prediction, thereby effectively improving the prediction efficiency.
[0043] Step 102: input the target data feature into a preset linear regression model to output the benchmark resource quantity data within the forecast time period.
[0044] The benchmark resource quantity data may be a sequence data formed by multiple benchmark resource quantities, for example (Y1, Y2, ..., Y n ), Y n In order to predict the benchmark resource quantity corresponding to the nth preset unit time in a time period, the preset linear regression model can be fitted in the following way: obtain multiple second resource quantity data samples in the historical time period, the second resource quantity data samples include the resource quantity data of the second historical time, and the business characteristics, trend characteristics and periodic characteristics corresponding to the resource quantity data of the second historical time; perform linear fitting based on the multiple second resource quantity data samples to obtain the preset linear regression model.
[0045] It should be noted that the second historical time may be any recorded time in the recorded time corresponding to the existing historical resource quantity data. For example, if there is historical resource quantity data for each day between May 1, 2019 and January 1, 2021, then the second historical time may be any day between May 1, 2019 and January 1, 2021. The business feature may be a feature of a factor that affects the quantity of resources delivered, such as whether the second historical time is a holiday, whether it is a shopping discount time period, etc. The trend feature may be a trend of changes in the quantity of resources delivered in the historical resource quantity data within a preset time period in history. The trend feature of the second historical time may be It is the changing trend of the number of resources put in the historical resource quantity data within the preset time period of the second historical time. For example, in the existing historical resource quantity data between May 1, 2019 and January 1, 2021, the number of resources put in showed an increasing trend from May 1, 2019 to January 1, 2020, a decreasing trend from January 1, 2020 to April 30, 2020, and an increasing trend from May 1, 2020 to January 1, 2021. If the second historical moment is April 1, 2020, then the trend feature is a decreasing trend; if the second historical moment is June 1, 2019, then the trend feature is an increasing trend. The periodic feature may be the period presented by the historical resource quantity data, and may include periods of different lengths. For example, a periodic change may occur every 7 days, every 30 days, every quarter, and every year. Therefore, the resource change period may include 7 days, 30 days, 90 days, 365 days, etc.
[0046] In addition, the core formula of the preset linear regression model can be: Y=aX1+bX2+cX3+d, where X1 can be a business characteristic, X2 can be a trend characteristic, and X3 can be a periodic characteristic. The parameters a, b, c, and d can be calculated by least squares fitting based on multiple data samples of the second resource quantity.
[0047] Step 103: input the target data feature into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period.
[0048] The preset regression tree model can be a tree algorithm model such as GBDT, decision tree, or xgboost. The residual resource quantity data can be a sequence data formed by multiple residual resource quantities, such as (ΔY1, ΔY2, ..., ΔY n ), ΔY n is the residual resource quantity corresponding to the nth preset unit time in the prediction time period. The preset regression tree model can be trained by the following steps S11 to S15:
[0049] S11, obtaining a plurality of third delivery resource quantity data samples within a historical time period.
[0050] The third resource quantity data sample includes the resource quantity of the third historical time, and the business characteristics, trend characteristics and periodic characteristics corresponding to the resource quantity of the third historical time.
[0051] It should be noted that the third historical time may be any recorded time corresponding to the recorded time of the existing historical resource quantity data, may be the same as the second historical time, or may be different from the second historical time. The business feature may be a feature of a factor that affects the resource quantity, for example, whether the third historical time belongs to a holiday, whether it belongs to a shopping discount time period, etc. The trend feature may be a trend of changes in the resource quantity in the historical resource quantity data within a preset time period. The trend feature of the third historical time may be a trend of changes in the resource quantity in the historical resource quantity data within the third historical time. The change trend presented in the preset historical time period of the time period, for example, in the existing historical resource quantity data between May 1, 2019 and January 1, 2021, the quantity of resources put in shows an increasing trend from May 1, 2019 to January 1, 2020, a decreasing trend from January 1, 2020 to April 30, 2020, and an increasing trend from May 1, 2020 to January 1, 2021. If the third historical moment is April 5, 2020, the trend feature is a decreasing trend, and if the third historical moment is August 2, 2019, the trend feature is an increasing trend. The periodic feature can be the period presented by the historical resource quantity data, which can include periods of different lengths, for example, a periodic change is presented every 7 days, and a periodic change is presented every 30 days, every quarter, and every year. Therefore, the resource change cycle can include 7 days, 30 days, 90 days, 365 days, etc.
[0052] S12, inputting the periodic characteristics, trend characteristics and business characteristics corresponding to the resource quantity data of the third historical time in each of the third resource quantity data samples into the preset linear regression model to output the predicted resource quantity corresponding to the third historical time.
[0053] For example, if the number of resources in a third resource quantity data sample is y1, the corresponding business feature is x1, the trend feature is x2, and the period feature is x3, and the preset linear regression model is Y=aX1+bX2+cX3+d, then the business feature x1, the trend feature x2, and the period feature x3 are input into the preset linear regression model to obtain the predicted resource quantity corresponding to the current sample in the predicted resource quantity data as ax1+bx2+cx3+d. Similarly, the predicted resource quantity corresponding to each third resource quantity data sample can be obtained, thereby obtaining the predicted resource quantity data formed by multiple predicted resource quantities corresponding to multiple third resource quantity data samples.
[0054] S13, obtaining a target difference between the quantity of delivered resources at each third historical time and the predicted quantity of delivered resources at the third historical time.
[0055] For example, still taking the example shown in S12 as an example, if the number of resources put into use at the third historical time in the third resource put into use quantity data sample is y1, and the predicted number of resources put into use is ax1+bx2+cx3+d, then the target difference is y1-(ax1+bx2+cx3+d).
[0056] S14, taking the business characteristics, trend characteristics, cycle characteristics corresponding to the quantity of resources put in the third historical time in the plurality of data samples of the third quantity of resources put in, and the target difference corresponding to each of the third historical time as the second training data.
[0057] S15, training the second preset initial model using the second training data to obtain the preset regression tree model.
[0058] Among them, the second preset initial model can be a GBDT model. During the model training process, in addition to setting the training data, a verification data set and a test data set can also be set. The verification data set is a sample set set aside separately during the model training process. It is used to adjust the hyperparameters of the model and conduct a preliminary evaluation of the generalization ability of the model to decide whether to stop training. The test data set is used to evaluate the generalization ability of the final model.
[0059] In this way, through the method shown in the above steps S11 to S15, the preset regression tree model can be trained, and accurate residual resource quantity data can be obtained through the preset regression tree model, which is beneficial to improving the accuracy of the target predicted resource quantity data within the prediction time period.
[0060] Step 104: taking the sum of the benchmark resource quantity data and the residual resource quantity data as the target predicted resource quantity data within the prediction time period.
[0061] For example, if the benchmark resource quantity data is (Y1, Y2, ..., Y n ), the residual resource quantity data is (ΔY1, ΔY2,…, ΔY n ), then the target forecast resource quantity data is (Y1+ΔY1,Y2+ΔY2,…,Y n +ΔY n ), where Y n is the benchmark resource quantity corresponding to the nth preset unit time in the forecast period, ΔY n is the residual resource quantity corresponding to the nth preset unit time in the forecast period. n +ΔY n The target predicted resource quantity corresponding to the nth preset unit time within the forecast time period. The preset unit time can be one day, two days, or one week, month, etc.
[0062] Optionally, after step 104, a data feedback step may be included to feed back the target predicted resource quantity data; or, the target predicted resource quantity data may be displayed to formulate a corresponding resource delivery strategy or adjust the resource delivery strategy.
[0063] Optionally, if the target predicted resource quantity data exceeds a preset threshold range, for example, is lower than a preset minimum threshold, or exceeds a preset maximum threshold, or exceeds a predetermined value ± a set range value, a prompt message may be further displayed to indicate that adjustments need to be made to the current resource allocation strategy.
[0064] The above technical scheme, by combining the preset linear regression model and the preset regression tree model, obtains the target predicted resource quantity data determined by the benchmark resource quantity data and the residual resource quantity data, which can effectively improve the accuracy of the prediction results and provide a reliable data basis for ensuring the smooth progress of resource allocation in the later stage.
[0065] Figure 2 is a flowchart of a method for predicting the number of resources provided according to another exemplary embodiment of the present disclosure; Figure 2 , the method may include the following steps:
[0066] Step 201, obtaining historical data on the quantity of resources delivered.
[0067] The historical resource quantity data includes the resource quantity corresponding to each preset unit time in the historical time period, and the resource change cycle characteristics corresponding to the resource quantity in the historical time period.
[0068] It should be noted that the preset unit time can be one day, two days, one week, one month, etc., and the historical resource quantity data can also include trend characteristics and business characteristics corresponding to the quantity of resources in the historical time period. The resource change cycle characteristics can include multiple cycles of different lengths, such as a periodic change every 7 days, a periodic change every 30 days, a quarter, and a year.
[0069] Step 202: determining a period component weight value according to the historical resource quantity data.
[0070] In this step, the weight value of the periodic component can be obtained through the following steps S21 to S23:
[0071] S21, according to the longest target cycle in the resource change cycle characteristics, the historical resource quantity data is decomposed by a preset time series decomposition algorithm to obtain trend component data and cycle component data corresponding to the historical resource quantity data.
[0072] The preset time series decomposition algorithm may be an STL decomposition algorithm, which may decompose the historical resource quantity data into trend component data, period component data and residual component data, such as Figure 3 As shown, Figure 3 is a schematic diagram of an STL decomposition result shown in an exemplary embodiment of the present disclosure, in which Figure 3 In the figure, the first curve from top to bottom is the change curve of the number of resources in the historical resource quantity data within the historical time period, the second curve is the curve of the Trend component after decomposition by the STL decomposition algorithm, the third curve is the curve of the Season component after decomposition by the STL decomposition algorithm, and the fourth curve is the curve of the Resid component after decomposition by the STL decomposition algorithm.
[0073] In addition, when the resource change cycle characteristics include multiple cycles of different lengths, the longest cycle among the cycles is determined as the target cycle. For example, when the resource change cycle characteristics include 7 days and 365 days, 365 days is used as the target cycle.
[0074] S22, determining a target ratio of the trend component to the periodic component corresponding to each preset unit time in the historical time period according to the trend component data and the periodic component data, so as to obtain a plurality of the target ratios.
[0075] The target ratio may be the absolute value of the ratio of the trend component to the period component.
[0076] S23, taking an average value of the multiple target ratios as the weight value of the period component.
[0077] Through the above S21 to S23, the period component weight value can be effectively obtained, and according to the period component weight value, it is helpful to determine whether the current historical resource quantity data is time series data dominated by periodic changes.
[0078] Step 203, obtaining the historical record duration corresponding to the historical resource quantity data and the longest target cycle in the resource change cycle characteristics.
[0079] For example, the recording time corresponding to the historical resource quantity data is May 1, 2019, and the end recording time is January 1, 2021. The length of the historical record is 20 months. When the resource change cycle characteristics include 7 days and 365 days, the 365 days (ie 12 months) is used as the target cycle.
[0080] Step 204, determining whether the period component weight value is greater than the preset weight threshold;
[0081] The preset weight threshold may be 0.5.
[0082] In this step, if it is determined that the period component weight value is greater than the preset weight threshold, step 205 is executed, and if it is determined that the period component weight value is less than or equal to the preset weight threshold, step 207 is executed.
[0083] Step 205: Determine whether the target period is greater than the preset multiple of the historical record duration.
[0084] The preset multiple may be a value less than or equal to 1 such as 1 / 2, 1 / 3, 1, or a value greater than 1 such as 1.4, 2, 2.5.
[0085] In this step, if it is determined that the target period is greater than the preset multiple of the historical record length, step 206 is executed; if it is determined that the target period is less than or equal to the preset multiple of the historical record length, steps 207 to 209 are executed.
[0086] Step 206, inputting the target data features into a preset neural network model so that the preset neural network model outputs the target predicted resource quantity within the prediction time period.
[0087] The preset neural network model is trained by the following steps:
[0088] Acquire multiple first data samples of the quantity of resources delivered within a historical time period, the first data samples of the quantity of resources delivered include the quantity of resources delivered at a first historical time, and business characteristics, trend characteristics and periodic characteristics corresponding to the quantity of resources delivered at the first historical time, the business characteristics being influencing parameters of changes in the delivered resources; use the multiple first data samples of the quantity of resources delivered as first training data, and perform model training on a first preset initial model through the first training data to obtain the preset neural network model.
[0089] It should be noted that the first preset initial model may be an initial model of an MLP (Multilayer Perceptron), thereby obtaining a preset neural network model based on the MLP.
[0090] Step 207: input the target data feature into a preset linear regression model to output the benchmark resource quantity data within the forecast time period.
[0091] Among them, the target data characteristics include target trend characteristics, target business characteristics and resource change cycle characteristics. The target trend characteristics are used to characterize the change trend of the number of invested resources in the historical time period, and the target business characteristics are pre-set parameters that affect the change of the invested resources in the predicted time period.
[0092] It should be noted that the target data feature may be a feature sequence formed by data features corresponding to multiple times within the forecast period, and the benchmark resource quantity data may be sequence data formed by multiple benchmark resource quantities, for example (Y1, Y2, ..., Y n ), the Y n The benchmark resource quantity corresponding to the nth preset unit time in the forecast time period.
[0093] Step 208: input the target data feature into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period.
[0094] The residual resource quantity data may be a sequence data formed by a plurality of residual resource quantities, for example (ΔY1, ΔY2, ..., ΔY n ), ΔY n The amount of residual resources allocated for the nth preset unit time within the forecast period.
[0095] Step 209: taking the sum of the reference delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data within the prediction time period.
[0096] For example, if the benchmark resource quantity data is (Y1, Y2, ..., Y n), the residual resource quantity data is (ΔY1, ΔY2,…, ΔY n ), then the target forecast resource quantity data is (Y1+ΔY1,Y2+ΔY2,…,Y n +ΔY n ), where Y n +ΔY n The target predicted resource quantity corresponding to the nth preset unit time within the forecast time period. The preset unit time can be one day, two days, or one week, month, etc.
[0097] The above technical scheme determines the target predicted quantity of resources within the prediction time period through a preset neural network model when it is determined that the weight value of the period component is greater than the preset weight threshold and the target period is greater than the preset multiple of the historical record length. When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to the preset multiple of the historical record length, the target predicted quantity of resources is determined by combining the preset linear regression model and the preset regression tree model. In this way, the neural network model is used for prediction of time series dominated by cycles, and the combination of the preset linear regression model and the preset regression tree model is used for prediction of time series dominated by non-cycles. This can effectively improve the accuracy of the prediction results and provide a reliable data basis for ensuring the smooth implementation of resource allocation in the later stage.
[0098] Figure 4 is a block diagram of a device for predicting the number of resources provided according to an exemplary embodiment of the present disclosure; Figure 4 , the device may include:
[0099] The first acquisition module 401 is used to acquire target data features, which include target trend features, target business features, and resource change cycle features. The target trend features are used to characterize the change trend of the number of deployed resources in a historical time period. The target business features are pre-set influencing parameters on the change of the deployed resources in the forecast time period.
[0100] The first determination module 402 is used to input the target data feature into a preset linear regression model to output the benchmark resource quantity data within the forecast time period;
[0101] The second determination module 403 is used to input the target data feature into a preset regression tree model to output the residual resource quantity data corresponding to the prediction time period;
[0102] The third determination module 404 is configured to use the sum of the reference delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data within the prediction time period.
[0103] The above technical scheme, by combining the preset linear regression model and the preset regression tree model, obtains the target predicted resource quantity data determined by the benchmark resource quantity data and the residual resource quantity data, which can effectively improve the accuracy of the prediction results and provide a reliable data basis for ensuring the smooth progress of resource allocation in the later stage.
[0104] Figure 5 is based on Figure 4 The embodiment shown is a block diagram of a device for predicting the number of resources to be put in; see Figure 5 , the device may also include:
[0105] The second acquisition module 405 is used to acquire historical resource quantity data, where the historical resource quantity data includes the resource quantity corresponding to each preset unit time in the historical time period, and the resource change cycle characteristics corresponding to the resource quantity in the historical time period;
[0106] A fourth determination module 406 is used to determine a period component weight value according to the historical resource quantity data;
[0107] The third acquisition module 407 is used to obtain the historical record duration corresponding to the historical resource quantity data and the longest target cycle in the resource change cycle feature;
[0108] Accordingly, the first determining module 402 is used to:
[0109] When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to the preset multiple of the historical record length, the target data feature is input into the preset linear regression model to output the benchmark resource quantity data within the forecast time period.
[0110] Optionally, the fourth determining module 406 is configured to:
[0111] According to the longest target cycle in the resource change cycle characteristics, the historical resource quantity data is decomposed by a preset time series decomposition algorithm to obtain trend component data and cycle component data corresponding to the historical resource quantity data;
[0112] Determine a target ratio of the trend component to the periodic component corresponding to each preset unit time in the historical time period according to the trend component data and the periodic component data, so as to obtain a plurality of the target ratios;
[0113] The average value of multiple target ratios is used as the weight value of the period component.
[0114] Optionally, the first determining module 402 is further configured to:
[0115] When it is determined that the weight value of the period component is greater than the preset weight threshold and the target period is greater than the preset multiple of the historical record length, the target data feature is input into the preset neural network model so that the preset neural network model outputs the target predicted resource quantity within the prediction time period.
[0116] Optionally, the preset neural network model is trained by the following steps:
[0117] Acquire multiple first resource quantity data samples within a historical time period, the first resource quantity data samples including the resource quantity of the first historical time, and the business characteristics, trend characteristics and cycle characteristics corresponding to the resource quantity of the first historical time, the business characteristics being the influencing parameters of the resource change;
[0118] A plurality of data samples of the first resource quantity are used as first training data, and a first preset initial model is trained through the first training data to obtain the preset neural network model.
[0119] Optionally, the preset linear regression model is fitted by the following steps:
[0120] Acquire multiple second resource quantity data samples within a historical time period, where the second resource quantity data samples include the resource quantity of the second historical time, and the business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the second historical time;
[0121] Linear fitting is performed based on a plurality of data samples of the second resource quantity to obtain the preset linear regression model.
[0122] Optionally, the preset regression tree model is trained by the following steps:
[0123] Acquire multiple third resource quantity data samples within a historical time period, where the third resource quantity data samples include the resource quantity of the third historical time, and business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the third historical time;
[0124] Input the periodic characteristics, trend characteristics and business characteristics corresponding to the quantity of resources put in the third historical time in each of the third quantity of resources data samples into the preset linear regression model to output the predicted quantity of resources put in the third historical time;
[0125] Obtaining a target difference between the quantity of delivered resources at each third historical time and the predicted quantity of delivered resources at the third historical time;
[0126] The business characteristics, trend characteristics, cycle characteristics corresponding to the quantity of resources put in the third historical time in the plurality of data samples of the third quantity of resources put in, and the target difference corresponding to each of the third historical time are used as second training data;
[0127] The second preset initial model is trained using the second training data to obtain the preset regression tree model.
[0128] The above technical scheme determines the target predicted quantity of resources within the prediction time period through a preset neural network model when it is determined that the weight value of the period component is greater than the preset weight threshold and the target period is greater than the preset multiple of the historical record length. When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to the preset multiple of the historical record length, the target predicted quantity of resources is determined by combining the preset linear regression model and the preset regression tree model. In this way, the neural network model is used for prediction of time series dominated by cycles, and the combination of the preset linear regression model and the preset regression tree model is used for prediction of time series dominated by non-cycles. This can effectively improve the accuracy of the prediction results and provide a reliable data basis for ensuring the smooth implementation of resource allocation in the later stage.
[0129] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0130] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0131] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0132] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0133] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0134] In some embodiments, the client can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0135] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0136] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0137] Obtain target data features, the target data features including target trend features, target business features and resource change cycle features, the target trend features are used to characterize the change trend of the quantity of the delivered resources in the historical time period, and the target business features are pre-set influencing parameters on the change of the delivered resources in the predicted time period; input the target data features into a preset linear regression model to output benchmark delivery resource quantity data in the predicted time period; input the target data features into a preset regression tree model to output residual delivery resource quantity data corresponding to the predicted time period; and use the sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data in the predicted time period.
[0138] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0140] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first acquisition module may also be described as a "module for acquiring target data features".
[0141] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0142] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0143] According to one or more embodiments of the present disclosure, Example 1 provides a method for predicting the quantity of delivery resources, the method comprising:
[0144] Acquire target data features, the target data features including target trend features, target business features and resource change cycle features, the target trend features are used to characterize the change trend of the quantity of the delivered resources in a historical time period, and the target business features are pre-set influencing parameters on the change of the delivered resources in the forecast time period;
[0145] Inputting the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period;
[0146] Input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period;
[0147] The sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data is used as the target predicted delivery resource quantity data within the prediction time period.
[0148] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, and before inputting the target data feature into a preset linear regression model to output the benchmark resource quantity data within the forecast time period, the method further includes:
[0149] Acquire historical resource quantity data, wherein the historical resource quantity data includes the resource quantity corresponding to each preset unit time in a historical time period, and the resource change cycle characteristics corresponding to the resource quantity in the historical time period;
[0150] Determine the period component weight value according to the historical resource quantity data;
[0151] Obtain the historical record duration corresponding to the historical resource quantity data, and the longest target cycle in the resource change cycle characteristics;
[0152] Accordingly, the inputting of the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period includes:
[0153] When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to a preset multiple of the historical record length, the target data feature is input into a preset linear regression model to output the benchmark resource quantity data within the predicted time period.
[0154] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein determining the period component weight value according to the historical resource quantity data includes:
[0155] According to the longest target cycle in the resource change cycle characteristics, the historical resource quantity data is decomposed by a preset time series decomposition algorithm to obtain trend component data and cycle component data corresponding to the historical resource quantity data;
[0156] Determine a target ratio of the trend component to the periodic component corresponding to each preset unit time in the historical time period according to the trend component data and the periodic component data, so as to obtain a plurality of the target ratios;
[0157] An average value of the plurality of target ratios is used as the period component weight value.
[0158] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein the method further includes:
[0159] When it is determined that the weight value of the period component is greater than the preset weight threshold and the target period is greater than the preset multiple of the historical record length, the target data feature is input into the preset neural network model so that the preset neural network model outputs the target predicted quantity of resources within the prediction time period.
[0160] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein the preset neural network model is trained by the following steps:
[0161] Acquire multiple first resource quantity data samples within a historical time period, wherein the first resource quantity data samples include the resource quantity of the first historical time, and the business characteristics, trend characteristics and cycle characteristics corresponding to the resource quantity of the first historical time, wherein the business characteristics are influencing parameters of the resource change;
[0162] A plurality of the first resource quantity data samples are used as first training data, and a first preset initial model is trained using the first training data to obtain the preset neural network model.
[0163] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the preset linear regression model is fitted by the following steps:
[0164] Acquire multiple second resource quantity data samples within a historical time period, wherein the second resource quantity data samples include the resource quantity of the second historical time, and the business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the second historical time;
[0165] Linear fitting is performed based on multiple data samples of the second resource quantity to obtain the preset linear regression model.
[0166] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein the preset regression tree model is trained by the following steps:
[0167] Acquire multiple third resource quantity data samples within a historical time period, wherein the third resource quantity data samples include the resource quantity of the third historical time, and the business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the third historical time;
[0168] Inputting the periodic characteristics, trend characteristics and business characteristics corresponding to the quantity of resources delivered at the third historical time in each of the third quantity of resources data samples into the preset linear regression model to output the predicted quantity of resources delivered corresponding to the third historical time;
[0169] Obtaining a target difference between the quantity of delivered resources at each of the third historical times and the predicted quantity of delivered resources at the third historical times;
[0170] The business characteristics, trend characteristics, cycle characteristics corresponding to the quantity of resources delivered at the third historical time in the plurality of data samples of the quantity of third resources delivered and the target difference corresponding to each of the third historical time are used as second training data;
[0171] The second preset initial model is trained using the second training data to obtain the preset regression tree model.
[0172] According to one or more embodiments of the present disclosure, Example 8 provides a device for predicting the number of delivery resources, the device comprising:
[0173] A first acquisition module is used to acquire target data features, wherein the target data features include target trend features, target business features, and resource change cycle features. The target trend features are used to characterize the change trend of the quantity of the delivered resources within a historical time period. The target business features are pre-set influencing parameters on the change of the delivered resources within the forecast time period.
[0174] A first determination module is used to input the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period;
[0175] A second determination module is used to input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period;
[0176] The third determination module is used to use the sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data within the prediction time period.
[0177] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, wherein the program implements the steps of the method described in any one of Examples 1-7 above when executed by a processing device.
[0178] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, including:
[0179] a storage device having a computer program stored thereon;
[0180] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-7 above.
[0181] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0182] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0183] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A method for predicting the quantity of resources put in, characterized in that: The method comprises: Acquire target data features, the target data features including target trend features, target business features and resource change cycle features, the target trend features are used to characterize the change trend of the quantity of the delivered resources in a historical time period, and the target business features are pre-set influencing parameters on the change of the delivered resources in the forecast time period; Inputting the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period; Input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period; The sum of the benchmark delivery resource quantity data and the residual delivery resource quantity data is used as the target forecast delivery resource quantity data within the forecast time period; Before inputting the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period, the method further includes: Acquire historical resource quantity data, wherein the historical resource quantity data includes the resource quantity corresponding to each preset unit time in a historical time period, and the resource change cycle characteristics corresponding to the resource quantity in the historical time period; Determine a period component weight value according to the historical resource quantity data, wherein the period component weight value is used to characterize the ratio of the trend component to the period component of the historical resource quantity data; Obtain the historical record duration corresponding to the historical resource quantity data, and the longest target cycle in the resource change cycle characteristics; Accordingly, the inputting of the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period includes: When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to a preset multiple of the historical record length, the target data feature is input into a preset linear regression model to output the benchmark resource quantity data within the predicted time period.
2. The method according to claim 1, characterized in that The step of determining the period component weight value according to the historical resource quantity data includes: According to the longest target cycle in the resource change cycle characteristics, the historical resource quantity data is decomposed by a preset time series decomposition algorithm to obtain trend component data and cycle component data corresponding to the historical resource quantity data; Determine a target ratio of the trend component to the periodic component corresponding to each preset unit time in the historical time period according to the trend component data and the periodic component data, so as to obtain a plurality of the target ratios; An average value of the plurality of target ratios is used as the period component weight value.
3. The method according to claim 1, characterized in that The method further comprises: When it is determined that the weight value of the period component is greater than the preset weight threshold and the target period is greater than the preset multiple of the historical record length, the target data feature is input into the preset neural network model so that the preset neural network model outputs the target predicted quantity of resources within the prediction time period.
4. The method according to claim 3, characterized in that The preset neural network model is trained by the following steps: Acquire multiple first resource quantity data samples within a historical time period, wherein the first resource quantity data samples include the resource quantity of the first historical time, and the business characteristics, trend characteristics and cycle characteristics corresponding to the resource quantity of the first historical time, wherein the business characteristics are influencing parameters of the resource change; A plurality of the first resource quantity data samples are used as first training data, and a first preset initial model is trained using the first training data to obtain the preset neural network model.
5. The method according to claim 1, characterized in that The preset linear regression model is fitted by the following steps: Acquire multiple second resource quantity data samples within a historical time period, wherein the second resource quantity data samples include the resource quantity of the second historical time, and the business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the second historical time; Linear fitting is performed based on multiple data samples of the second resource quantity to obtain the preset linear regression model.
6. The method according to claim 1, characterized in that The preset regression tree model is trained by the following steps: Acquire multiple third resource quantity data samples within a historical time period, wherein the third resource quantity data samples include the resource quantity of the third historical time, and the business characteristics, trend characteristics, and period characteristics corresponding to the resource quantity of the third historical time; Inputting the periodic characteristics, trend characteristics and business characteristics corresponding to the quantity of resources delivered at the third historical time in each of the third quantity of resources data samples into the preset linear regression model to output the predicted quantity of resources delivered corresponding to the third historical time; Obtaining a target difference between the quantity of delivered resources at each of the third historical times and the predicted quantity of delivered resources at the third historical times; The business characteristics, trend characteristics, cycle characteristics corresponding to the quantity of resources delivered at the third historical time in the plurality of data samples of the quantity of third resources delivered and the target difference corresponding to each of the third historical time are used as second training data; The second preset initial model is trained using the second training data to obtain the preset regression tree model.
7. A device for predicting the quantity of resources put into use, characterized in that: The device comprises: A first acquisition module is used to acquire target data features, wherein the target data features include target trend features, target business features, and resource change cycle features. The target trend features are used to characterize the change trend of the quantity of the delivered resources within a historical time period. The target business features are pre-set influencing parameters on the change of the delivered resources within the forecast time period. A first determination module is used to input the target data features into a preset linear regression model to output the benchmark resource quantity data within the forecast time period; A second determination module is used to input the target data features into a preset regression tree model to output the residual resource quantity data corresponding to the forecast time period; A third determination module is used to use the sum of the reference delivery resource quantity data and the residual delivery resource quantity data as the target predicted delivery resource quantity data within the prediction time period; The device also includes: A second acquisition module is used to acquire historical resource quantity data, wherein the historical resource quantity data includes the resource quantity corresponding to each preset unit time in a historical time period, and the resource change cycle characteristics corresponding to the resource quantity in the historical time period; A fourth determination module is used to determine a period component weight value according to the historical resource quantity data, wherein the period component weight value is used to characterize the ratio of the trend component to the period component of the historical resource quantity data; A third acquisition module is used to obtain the historical record duration corresponding to the historical resource quantity data and the longest target cycle in the resource change cycle characteristics; Accordingly, the first determining module is used to: When it is determined that the weight value of the period component is less than or equal to the preset weight threshold, or the target period is less than or equal to a preset multiple of the historical record length, the target data feature is input into a preset linear regression model to output the benchmark resource quantity data within the forecast time period.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Medicine sales prediction method and medicine sales prediction system based on hybrid model
CN105976199A
Advertisement page prediction method and device
CN106354836A
Advertisement inventory prediction method and device
CN111260414A
Resource quantity prediction method and device, electronic equipment and storage medium
CN111985726A
Method and device for optimizing advertisement putting strategy
CN112801712A
