Order prediction method, order prediction device, electronic equipment and program product

By selecting the appropriate prediction model and historical order quantity according to the date type, the accuracy of order quantity prediction in the area to be tested is solved, and higher accuracy prediction is achieved, which improves the purpose of driver parade and urban traffic efficiency.

CN120543221APending Publication Date: 2025-08-26SHENZHEN STREAMING VIDEO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510549358.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the number of orders in the area to be tested, resulting in large prediction errors, affecting the purpose of driver parades and urban traffic pressure.

Method used

By determining that the date type of the time period to be tested is a normal date or a special date, select the corresponding target prediction model (backpropagation neural network model or autoregressive integral sliding average model), and predict it in combination with the historical order quantity to improve the prediction accuracy.

Benefits of technology

It reduces the error in order quantity prediction, improves the prediction accuracy, enhances the purpose of driver parades, and reduces urban traffic pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543221A_ABST
    Figure CN120543221A_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of data processing, and provides an order prediction method, an order prediction device, an electronic device and a program product, the method comprising: determining a date type to which a time period to be tested belongs, the date type comprising a common date and a special date, the special date comprising a legal festival and a resting date, the common date is the date except the special date from the weekly day to the weekly day; based on the date type to which the time period to be tested belongs, determining a target prediction model and the number of historical orders of the area to be tested; and on the basis of the target prediction model and the historical order number, predicting the order number of the to-be-tested area in the to-be-tested time period. According to the invention, the order quantity of the to-be-tested area in the to-be-tested time period can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular relates to an order forecasting method, an order forecasting device, an electronic device, and a program product. Background Art

[0002] With the rapid development of technology, vehicles have become the primary mode of short-distance travel, spurring the emergence of numerous taxis and ride-hailing services. For taxi and ride-hailing drivers, aimlessly cruising the city is commonplace. A clear area with a clear number of orders significantly increases drivers' sense of purpose and reduces urban traffic pressure. Summary of the Invention

[0003] The embodiments of the present application provide an order prediction method, an order prediction device, an electronic device, and a program product, which can more accurately predict the number of orders in a test area during a test time period.

[0004] In a first aspect, an embodiment of the present application provides an order prediction method, comprising:

[0005] Determine the date type to which the time period to be tested belongs, where the date type includes ordinary dates and special dates, where the special dates include statutory holidays and compensatory holidays, and where ordinary dates are dates from Monday to Sunday excluding the special dates;

[0006] Determine a target forecasting model and the number of historical orders in the area to be tested based on the date type of the time period to be tested;

[0007] Based on the target prediction model and the historical order quantity, the order quantity of the test area in the test time period is predicted.

[0008] In an embodiment of the present application, since the number of orders in the area to be tested usually has a certain linkage relationship with the date type (for example, the flow of people in the area to be tested may be relatively large on statutory holidays and weekends, and the flow of people affects the number of orders in the area to be tested), when predicting the number of orders in the area to be tested during the time period to be tested, the date type to which the time period to be tested belongs can be determined first, and then based on the date type to which the time period to be tested belongs, the target prediction model and the number of historical orders that are more closely matched with the date type are determined. Based on the target prediction model and the number of historical orders, the number of orders in the area to be tested during the time period to be tested can be predicted more accurately, thereby reducing the prediction error and improving the prediction accuracy of the order quantity.

[0009] In a second aspect, an embodiment of the present application provides an order forecasting device, comprising:

[0010] A type determination module is used to determine the date type to which the time period to be tested belongs, wherein the date types include ordinary dates and special dates, wherein the special dates include statutory holidays and compensatory holidays, and the ordinary dates are dates from Monday to Sunday excluding the special dates;

[0011] A quantity determination module, configured to determine the target forecast model and the historical order quantity of the area to be tested based on the date type to which the time period to be tested belongs;

[0012] An order prediction module is used to predict the order quantity of the test area in the test time period based on the target prediction model and the historical order quantity.

[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements an order prediction method as described in any one of the first aspects above.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the order prediction method as described in the first aspect above is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when run, enables the order prediction method described in any one of the first aspects above to be executed.

[0016] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 Schematic diagram of the order forecasting method provided in the embodiment of the present application;

[0019] Figure 2 This is an example diagram of the test results of the target prediction model provided in the embodiment of the present application;

[0020] Figure 3is another example diagram of the test results of the target prediction model provided in an embodiment of the present application;

[0021] Figure 4 Schematic diagram of the structure of the order prediction device provided in the embodiment of the present application;

[0022] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0024] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0025] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0026] The order prediction method provided in the embodiments of the present application can be applied to electronic devices such as servers, mobile phones, tablet computers, wearable devices, vehicle-mounted devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0027] See also Figure 1 , Figure 1 The following is a flow chart of an order prediction method provided in an embodiment of the present application. As an example and not a limitation, the method includes the following steps:

[0028] Step 101: Determine the date type to which the time period to be measured belongs.

[0029] Date types include regular dates and special dates. Special dates include statutory holidays and compensatory holidays. Regular dates are Monday through Sunday, excluding special dates. Statutory holidays are holidays mandated by national law. Compensatory holidays are dates that are normally off days (such as Saturdays or Sundays) and become workdays due to statutory holidays.

[0030] It should be understood that the time period to be measured may refer to a time interval or time period during which order quantity prediction is required.

[0031] The prediction time period is usually a certain time period in the future, so as to predict the order quantity in a certain time period in the future in advance. Of course, it is understandable that, depending on the specific application scenario, the time period to be measured can also refer to a certain time period in the past.

[0032] In one embodiment, the specific date of the time period to be measured may be determined first, where the specific date may include a specific year, month, and day. Then, based on the specific date of the time period to be measured, the date type of the time period to be measured may be determined.

[0033] In order to improve the prediction accuracy of the order quantity and reduce the fluctuation of the prediction curve of the prediction area, the length of the test time period can be set to less than one hour. The predicted order curve represents the mapping relationship between each test time period and the predicted order quantity. The test area can refer to the geographical range or area where the order quantity prediction is required. Optionally, the test area can be selected according to the scenario requirements. As an example and not a limitation, popular areas such as stations, airports, and tourist attractions with large order demand are selected as the test areas.

[0034] As an example and not a limitation, the duration of the time period to be measured is half an hour.

[0035] Of course, it should be understood that the length of the time period to be measured may also be greater than or equal to one hour, and this application does not limit this.

[0036] In one application scenario, in order to ensure that the overall changes in the number of orders in the test area can be observed and to reduce the fluctuation range of the prediction curve, a day is divided into 48 segments with half-hour time intervals. The first segment is from 00:00 to 00:30 of the day, the second segment is from 00:30 to 01:00 of the day,..., and the 48th segment is from 23:30 of the day to 00:00 of the next day. The time period to be tested can be any of the above 48 segments.

[0037] In real-world scenarios, the number of orders in the same region, on different dates, and during the same time period may vary. For example, the number of people on statutory holidays and compensatory days is often greater than that on non-statutory holidays and non-compensatory days. Therefore, considering the significant impact of statutory holidays and compensatory days on regional order demand, dates can be divided into two types: ordinary dates and special dates.

[0038] As an example and not a limitation, the time period to be tested is from 00:30 to 01:00 on October 1, 2024. Since October 1 is a statutory holiday, the date type to which the time period to be tested belongs is a special date; the time period to be tested is from 08:00 to 08:30 on October 18, 2024. Since October 18, 2024 is neither a statutory holiday nor a compensatory holiday, the date type to which the time period to be tested belongs is an ordinary date.

[0039] Step 102: Determine the target forecasting model and the number of historical orders in the area to be tested based on the date type of the time period to be tested.

[0040] Since the number of orders in the test area is usually linked to the date type (for example, the test area may have high traffic on statutory holidays and compensatory holidays, which affects the number of orders in the test area), based on the date type of the test time period, it is possible to determine a target prediction model and historical order quantity that best matches the date type, thereby more accurately predicting the number of orders for the test time period. The number of orders in the test area during the test time period can refer to the number of orders where the passenger's boarding location is in the test area and the boarding time is within the test time period.

[0041] The historical order quantity can refer to the actual number of orders received by vehicles in the test area during each specific time period, where the latest time in each specific time period is earlier than the start time of the test period. The actual order quantity can represent the order acceptance status of vehicles in the test area during the corresponding time period.

[0042] For any specific time period, the actual number of orders in the test area during that specific time period may refer to the number of orders where the passenger's boarding location is within the test area and the boarding time is within that specific time period. It should be understood that the vehicle used by the passenger may be at least one of a taxi, an online ride-hailing service, or other vehicles providing travel services.

[0043] In order to make the historical order number more comprehensively reflect the passengers' travel needs, and thus more accurately predict the order number based on the historical order number, when counting the actual order number of the test area in any specific time period, the order number of all vehicles providing travel services in the test area (including taxis, online car-hailing, etc.) can be counted.

[0044] As an example and not a limitation, for vehicles providing travel services (including taxis, online ride-hailing services, etc.), the vehicle's on-board equipment can obtain the vehicle's location information in real time and send the vehicle's location information to an electronic device (such as a server equipped with a vehicle management platform, which is used to comprehensively manage and dispatch vehicles providing travel services to achieve efficient, safe, and orderly operation services) so that the electronic device can obtain the vehicle's location information in real time. For taxis, when the driver presses the meter button, the meter records the moment the meter button is pressed and determines that moment as the boarding moment, and sends the boarding moment to the electronic device. If the boarding moment is within a specific time period and the taxi's location information at the boarding moment is within the location information range of the area to be tested, it can be determined that the passenger's current ride or the taxi's current order is an order for that specific time period, and the actual number of orders for that specific time period is increased by 1. For online ride-hailing vehicles, after picking up a passenger, the driver can start the pricing function of the vehicle management platform through a mobile phone or the smart device in the car. The electronic device can automatically record the time at this moment and determine it as the boarding time. If the boarding time is within a specific time period and the location information of the online ride-hailing vehicle at the time of boarding is within the location information range of the tested area, it can be determined that the passenger's current ride or the online ride-hailing vehicle's current order is an order for that specific time period, and the actual number of orders for that specific time period will be increased by 1.

[0045] In one embodiment, the length of each specific time period is the same as the time period to be tested, so that the actual order quantity in each specific time period can more accurately reflect the order quantity in the time period to be tested, and the distribution characteristics of the actual order quantity in each specific time period are more likely to match the time period to be tested, thereby improving the prediction accuracy of the order quantity.

[0046] It should be understood that the number of specific time periods may be one or more, and this application does not limit this. When the number of specific time periods is one, the latest time of each specific time period may refer to the end time of the specific time period. When the number of specific time periods is more than one, the latest time of each specific time period may refer to the latest time among the end times of the multiple specific time periods.

[0047] It should be understood that the specific date of the specific time period may be the same as or different from the specific date of the time period to be measured, and this application does not limit this. When the specific date of the specific time period is different from the specific date of the time period to be measured, the specific date of the specific time period is earlier than the specific date of the time period to be measured, and any moment of the specific date of the specific time period is earlier than the start time of the time period to be measured.

[0048] As an example and not a limitation, the time period to be measured is 00:30 to 01:00 on October 1, 2024, and the specific time period includes 08:00 to 08:30 on September 30, 2024. Any time on September 30, 2024 is earlier than the start time of the time period to be measured (i.e., 00:30).

[0049] If there are multiple specific time periods, some of the specific time periods may have the same specific date, while others may have different specific dates. This is not limited in this application. If some of the specific time periods have different specific dates, the earlier the specific date, the earlier the end time of the corresponding specific time period.

[0050] As an example and not limitation, the multiple specific time periods include 08:00 to 08:30 on September 30, 2024 and 14:00 to 14:30 on September 29, 2024, and the end time of 14:00 to 14:30 on September 29, 2024 (i.e., 14:30) is earlier than the end time of 08:00 to 08:30 on September 30, 2024 (i.e., 08:30).

[0051] In one possible implementation, the target prediction model is determined by:

[0052] If the date type of the time period to be tested is an ordinary date, the back propagation neural network model is determined as the target prediction model;

[0053] If the date type of the time period to be tested is a special date, the autoregressive integrated moving average model is determined as the target prediction model.

[0054] The Back Propagation Neural Network (BPNN) model is a model based on artificial neural networks. It models complex input-output relationships through the nonlinear combination of multiple layers of neurons and has strong long-term prediction capabilities.

[0055] Before using the back-propagation neural network model to predict the order quantity, the parameters of the back-propagation neural network model (such as weights and biases) can be optimized through the back-propagation algorithm. As the training progresses, the parameters are continuously adjusted so that the error between the predicted value and the true value of the order quantity gradually decreases, thereby achieving effective approximation of the order quantity prediction function. The back-propagation algorithm effectively utilizes optimization methods such as gradient descent, and can quickly determine the parameter combination that minimizes the error, thereby improving the learning efficiency and approximation accuracy of the back-propagation neural network model.

[0056] The amount of data for ordinary dates is large. For example, Mondays, which are not special dates, appear many times in a year. Therefore, if the date type of the time period to be tested is an ordinary date, the back propagation neural network model can be used to predict the order quantity.

[0057] The back propagation neural network model has dynamic adaptability and can regularly update the parameters of the back propagation neural network model at preset time intervals (i.e., regularly update or retrain the back propagation neural network model), thereby quickly adapting to the changing trend of order quantity and maintaining the accuracy and effectiveness of the back propagation neural network model.

[0058] As an example and not a limitation, an area can be planned according to scenario requirements. After the area is planned, if the back propagation neural network model needs to be trained (for example, for the first time or retraining), the actual number of orders in any area in the past S years at the current moment can be obtained, where S is an integer greater than zero. The actual number of orders in the past S years can be split into an F-dimensional training data set according to each specific time period, where F is the number of specific time periods, and the label of the training data set is the actual number of orders corresponding to the specific time period. Based on the training data set and the corresponding label, the back propagation neural network model can be trained.

[0059] The Autoregressive Integrated Moving Average Model (ARIMA) uses linear combination modeling such as autoregression and moving average to effectively capture short-term trends and fluctuations in historical order quantities, making it more suitable for short-term forecasting.

[0060] The amount of data on special dates is relatively small, such as the first day of the Spring Festival, which only occurs once a year. Therefore, if the date type of the time period to be tested is a special date, the autoregressive integrated moving average model can be used to predict order data.

[0061] In one possible implementation, the method for determining the number of historical orders includes:

[0062] If the date type of the time period to be tested is a normal date, then obtain the actual order quantity of each first time period in the N weeks before the time period to be tested, the actual order quantity of each second time period in the first M days, and the actual order quantity of the first L time periods in the region to be tested. Each first time period is in the same week and time period as the time period to be tested, and each second time period is in the same time period as the time period to be tested. N, M, and L are integers greater than zero.

[0063] The actual order quantity of each first time period, the actual order quantity of each second time period, and the actual order quantity of the previous L time periods are determined as the historical order quantity;

[0064] If the date type of the time period to be tested is a special date, then obtain the actual order quantity of the area to be tested in the P time periods before the time period to be tested, where P is an integer greater than zero;

[0065] The actual order quantity in the first P time periods is determined as the historical order quantity.

[0066] The amount of data for ordinary dates is large. When the date type of the time period to be tested is an ordinary date, taking into account the periodic changes in the number of orders (for example, the number of orders on the current day is usually similar to the number of orders in the previous weeks, days, and time periods) and avoiding the introduction of too many useless orders, each specific time period may include the above-mentioned first time periods, the above-mentioned second time periods, and the above-mentioned first L time periods. Predictions are made based on the actual number of orders in the above-mentioned first time periods, the actual number of orders in the above-mentioned second time periods, and the actual number of orders in the above-mentioned first L time periods, which can better reflect the changing pattern of the order quantity and thus improve the prediction accuracy of the order quantity.

[0067] As an example and not a limitation, when the date type to which the time period to be measured belongs is an ordinary date, each specific time period includes the same time period within the 4 weeks before the time period to be measured that is in the same week as the time period to be measured, the same time period within the 6 days before the time period to be measured, and the 4 time periods before the time period to be measured. The test period is from 08:00 to 08:30 on October 18, 2024, and October 18, 2024 is a Friday. The same time periods in the first four weeks of the test period that fall on the same week as the test period include 08:00 to 08:30 on October 11, 2024, 08:00 to 08:30 on October 4, 2024, 08:00 to 08:30 on September 27, 2024, and 08:00 to 08:30 on September 20, 2024. The same time periods in the first six days of the test period include 08:00 to 08:30 on October 17, 2025, 08:00 to 08:30 on October 1, 2025, 08:00 to 08:30 on October 6, 2025, 08:00 to 08:30 on October 15, 2025, 08:00 to 08:30 on October 14, 2025, 08:00 to 08:30 on October 13, 2025, and 08:00 to 08:30 on October 12, 2025. The first four time periods to be tested include 07:30 to 08:00 on October 18, 2024, 07:00 to 07:30 on October 18, 2024, 06:30 to 07:00 on October 18, 2024, and 06:00 to 06:30 on October 18, 2024.

[0068] The amount of data for special dates is relatively small. When the date type of the time period to be tested is a special date, considering the strong correlation between the order quantities in adjacent time periods, each specific time period can include the first P time periods mentioned above. Predictions based on the actual order quantities in the first P time periods can better capture the short-term trends and fluctuation characteristics of the order quantities, thereby improving the accuracy of the prediction.

[0069] By way of example and not limitation, if the date type to which the time period to be tested belongs is a special date, each specific time period includes the first 48 time periods of the time period to be tested. If the time period to be tested is from 00:30 to 01:00 on October 1, 2024, then the first 48 time periods of the time period to be tested include from 00:00 to 00:30 on October 1, 2024, and 47 time periods on September 30, 2024 (i.e., from 23:30 to 24:00 on September 30, 2024, from 23:00 to 23:30 on September 30, 2024, ..., from 00:30 to 01:00 on September 30, 2024).

[0070] In one embodiment, the length of each specific time period, each second time period, the first L time periods, the first P time periods, etc. is the same as the length of the time period to be tested. In this way, the actual order quantity in the specific time period can more accurately reflect the order quantity in the time period to be tested, and the distribution characteristics of the actual order quantity in the specific time period are more likely to match the time period to be tested, thereby improving the prediction accuracy of the order quantity.

[0071] In one embodiment, when a first target time period exists in each of the first time period, each of the second time period, and the first L time periods, the first target time period is a time period whose date type is a special date. Before determining the actual order quantity in the first target time period as the historical order quantity, the following steps are further included:

[0072] Get the actual order quantity of the tested area in the last R years before the first target time period, where R is an integer greater than zero.

[0073] Based on the actual order quantity in the past R years, determine the actual order quantity of each third time period in the past R years, where each third time period is in the same week and time period as the first target time period;

[0074] Calculate the mean of the actual order quantity in each third time period;

[0075] The actual order quantity in the first target time period is updated to the average of the actual order quantities in each third time period.

[0076] The actual number of orders in each third time period may refer to the actual number of orders in the same time period on the same day of each week in the past R years (ie, nearly R years) on the day in which the first target time period is located.

[0077] After obtaining the actual number of orders in the past R years, the actual number of orders in the past R years can be divided by week and time period to obtain 7*W sets of data (where 7 represents 7 days from Monday to Sunday, and W is the number of time periods into which a day is divided). For the same week, each set of data corresponds to the actual number of orders in a time period. Here, the actual number of orders in a time period includes the actual number of orders in the same time period on the same day of each week in the past R years. On this basis, the actual number of orders in each third time period can be obtained. Optionally, R can be set according to scenario requirements. This application does not limit the specific value of R.

[0078] As an example and not a limitation, the first target time period is 08:00 to 08:30 on October 4, 2024. The first target time period belongs to Friday, R is 1, and W is 48. Then 7*48 pieces of data can be obtained, with 48 pieces of data corresponding to each from Monday to Sunday. The actual order quantity of each third time period includes the actual order quantity from 08:00 to 08:30 on every Friday in the past year before October 4, 2024. The average of the actual order quantity of these third time periods can be calculated (that is, the average order quantity from 08:00 to 08:30 on Friday), and the actual order quantity from 08:00 to 08:30 on October 4, 2024 can be updated to the average order quantity from 08:00 to 08:30 on Friday.

[0079] Optionally, the actual order quantities in each third time period may be added together to obtain a total order quantity, and the total order quantity may be divided by the total quantity in the third time period to obtain an average of the actual order quantities in each third time period.

[0080] The order demand on special dates is usually affected by factors such as holiday promotions and travel peaks, and is usually significantly different from the order demand on ordinary dates. If the actual order quantity of the first target time period is directly determined as the historical order quantity, it will interfere with the target prediction model's analysis of the order pattern of the test time period. The actual order quantity of the first target time period can be updated or replaced with the average of the actual order quantity of each third time period, which can make the historical order quantity more stable and more accurately predict the order quantity of the test time period.

[0081] In one embodiment, before updating the actual order quantity in the first target time period to the average of the actual order quantities in each third time period, the method further includes:

[0082] Calculate the standard deviation of the actual order quantity for each third time period;

[0083] Based on the mean and standard deviation of the actual order quantity in each third time period, calculate a first value and a second value, where the first value is the difference between the mean and standard deviation of the actual order quantity in each third time period (i.e., the first value is the value obtained by subtracting the standard deviation from the mean of the actual order quantity in each third time period), and the second value is the sum of the mean and standard deviation of the actual order quantity in each third time period;

[0084] Based on the first value and the second value, determining the actual order quantity of each second target time period from the actual order quantity of each third time period, each second target time period being a third time period in which the actual order quantity is greater than or equal to the first value and less than or equal to the second value;

[0085] Calculate the average of the actual order quantity in each second target time period;

[0086] The average of the actual order quantities in each third time period is updated to the average of the actual order quantities in each second target time period.

[0087] Optionally, the standard deviation of the actual order quantity in each third time period may be calculated based on the actual order quantity in each third time period, the mean of the actual order quantity in each third time period, and the total quantity in the third time period.

[0088] Based on the first value and the second value, the actual order quantity in each third time period that is less than the first value or greater than the second value can be filtered to obtain the actual order quantity in each second target time period. The filtered data differs greatly from the standard deviation and is likely to be noise. Therefore, filtering these data can make the actual order quantity in the second target time period more stable and closer to the actual demand. Updating the mean of the actual order quantity in each third time period to the mean of the actual order quantity in each second target time period can make the historical order quantity more stable and more accurately predict the order quantity in the test time period.

[0089] In one possible implementation, determining the actual order quantity in each third time period within the past R years based on the actual order quantity within the past R years includes:

[0090] From the actual order quantity in the past R years, determine the actual order quantity belonging to the common date;

[0091] From the actual order quantities belonging to the common dates, the actual order quantities for each third time period are determined.

[0092] Optionally, the actual order quantities belonging to special dates may be filtered from the actual order quantities in the past R years to obtain the actual order quantities belonging to ordinary dates.

[0093] Order demand on special dates is usually affected by factors such as holiday promotions and tourist peaks, and is usually significantly different from order demand on ordinary dates. Therefore, filtering the actual order quantity belonging to special dates from the actual order quantity in the past R years can reduce the impact of this data on the target prediction model, allowing the target prediction model to better capture the order patterns of the time period belonging to ordinary dates and improve the prediction accuracy of the order quantity.

[0094] Step 103 : Based on the target prediction model and the historical order quantity, the order quantity of the test area in the test time period is predicted.

[0095] Optionally, the historical order quantity can be input into the target prediction model, which predicts the order quantity of the test area in the test time period based on the historical order quantity and outputs the predicted order quantity of the test area in the test time period.

[0096] In one application scenario, taking a domestic airport area as an example, the actual order quantity of the airport area in the past 13 months can be obtained, the actual order quantity of the first 12 months is used to train the back propagation neural network model, and the actual order quantity of the last month is used to test the back propagation neural network model, such as Figure 2 and Figure 3 The following are the test results of several randomly selected time periods. Figure 2 and Figure 3 The blue line (i.e., actual order curve) in the graph represents the change in the actual order quantity (i.e., actual order quantity), and the orange line (i.e., predicted order curve) represents the change in the predicted order quantity. Each coordinate point represents the order quantity in half an hour. Figure 2 and Figure 3 It can be seen that the predicted order curve is almost fitted with the actual order curve. For the same time period, the predicted order quantity and the actual order quantity are similar in most cases.

[0097] In an embodiment of the present application, since the number of orders in the area to be tested usually has a certain linkage relationship with the date type (for example, the flow of people in the area to be tested may be relatively large on statutory holidays and weekends, and the flow of people affects the number of orders in the area to be tested), when predicting the number of orders in the area to be tested during the time period to be tested, the date type to which the time period to be tested belongs can be determined first, and then based on the date type to which the time period to be tested belongs, the target prediction model and the number of historical orders that are more closely matched with the date type are determined. Based on the target prediction model and the number of historical orders, the number of orders in the area to be tested during the time period to be tested can be predicted more accurately, thereby reducing the prediction error and improving the prediction accuracy of the order quantity.

[0098] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0099] Corresponding to the order prediction method described in the above embodiment, Figure 4 A structural schematic diagram of the order forecasting device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0100] Reference Figure 4 , the device comprises:

[0101] Type determination module 401, configured to determine the date type to which the time period to be tested belongs, where the date types include ordinary dates and special dates, where the special dates include statutory holidays and compensatory holidays, and ordinary dates are dates from Monday to Sunday excluding the special dates;

[0102] A quantity determination module 402 is configured to determine a target forecasting model and a historical order quantity of a region to be tested based on the date type of the time period to be tested;

[0103] The order prediction module 403 is configured to predict the order quantity of the test area in the test time period based on the target prediction model and the historical order quantity.

[0104] Optionally, the data determination module 402 includes:

[0105] A model determination unit is used to determine the back propagation neural network model as the target prediction model if the date type to which the time period to be tested belongs is the ordinary date; if the date type to which the time period to be tested belongs is the special date, then determine the autoregressive integrated moving average model as the target prediction model.

[0106] Optionally, the data determination module 402 includes:

[0107] A first acquiring unit is configured to, if the date type of the time period to be tested is the ordinary date, acquire the actual order quantity of each first time period within N weeks preceding the time period to be tested, the actual order quantity of each second time period within M days preceding the time period to be tested, and the actual order quantity of each second time period within L time periods in the area to be tested, where each first time period is in the same week and time period as the time period to be tested, and each second time period is in the same time period as the time period to be tested, and N, M, and L are integers greater than zero;

[0108] a first determining unit, configured to determine the actual order quantity of each first time period, the actual order quantity of each second time period, and the actual order quantity of the first L time periods as the historical order quantity;

[0109] A second obtaining unit is configured to obtain, if the date type of the time period to be tested is a special date, the actual order quantity of the area to be tested in the P time periods before the time period to be tested, where P is an integer greater than zero;

[0110] The second determining unit is configured to determine the actual order quantity in the first P time periods as the historical order quantity.

[0111] Optionally, when a first target time period exists among the first time periods, the second time periods, and the first L time periods, the first target time period is a time period whose date type is the special date, and the data determining module 402 further includes:

[0112] A third acquiring unit is configured to acquire the actual order quantity of the tested area in the past R years before the first target time period, where R is an integer greater than zero;

[0113] a third determining unit, configured to determine, based on the actual order quantity in the recent R years, the actual order quantity in each third time period in the recent R years, where each third time period is in the same week and time period as the first target time period;

[0114] A first calculation unit is used to calculate the average of the actual order quantities in each third time period;

[0115] The first updating unit is configured to update the actual order quantity in the first target time period to an average of the actual order quantities in the third time periods.

[0116] Optionally, the data determination module 402 further includes:

[0117] a second calculation unit, configured to calculate a standard deviation of the actual order quantity in each third time period;

[0118] a third calculating unit, configured to calculate a first value and a second value based on the mean and standard deviation of the actual order quantities in each third time period, wherein the first value is the difference between the mean and standard deviation of the actual order quantities in each third time period, and the second value is the sum of the mean and standard deviation of the actual order quantities in each third time period;

[0119] a fourth determining unit, configured to determine, based on the first value and the second value, an actual order quantity for each second target time period from the actual order quantity for each third time period, wherein each second target time period is a third time period in which the actual order quantity is greater than or equal to the first value and less than or equal to the second value;

[0120] a fourth calculation unit, configured to calculate an average of the actual order quantities in each second target time period;

[0121] The second updating unit is configured to update the average of the actual order quantities in the third time periods to the average of the actual order quantities in the second target time periods.

[0122] Optionally, the third determining unit is specifically configured to:

[0123] Determine the actual order quantity belonging to the common date from the actual order quantity of the said recent R years;

[0124] The actual order quantity of each third time period is determined from the actual order quantity belonging to the common date.

[0125] Optionally, the duration of each first time period, the duration of each second time period, the duration of the first L time periods, and the duration of the first P time periods are all the same as the duration of the time period to be measured.

[0126] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0127] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: at least one processor 50 ( Figure 5 Only one is shown), a memory 51 and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps of any of the above-mentioned method embodiments when executing the computer program 52.

[0128] The electronic device may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 This is merely an example of the electronic device 5 and does not constitute a limitation on the electronic device 5 . The electronic device 5 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0129] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.

[0130] In some embodiments, the memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. In other embodiments, the memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Furthermore, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store an operating system, application programs, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 51 may also be used to temporarily store data that has been output or is about to be output.

[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0133] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0134] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0135] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0137] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. An order forecasting method, characterized in that: include: Determine the date type to which the time period to be tested belongs, where the date type includes ordinary dates and special dates, where the special dates include statutory holidays and compensatory holidays, and where ordinary dates are dates from Monday to Sunday excluding the special dates; Determine a target forecasting model and the number of historical orders in the area to be tested based on the date type of the time period to be tested; Based on the target prediction model and the historical order quantity, the order quantity of the test area in the test time period is predicted.

2. The order prediction method according to claim 1, characterized in that: The target prediction model is determined by: If the date type to which the time period to be measured belongs is the ordinary date, the back propagation neural network model is determined as the target prediction model; If the date type to which the time period to be measured belongs is the special date, the autoregressive integrated moving average model is determined as the target prediction model.

3. The order prediction method according to claim 1 or 2, characterized in that: The method for determining the number of historical orders includes: If the date type of the time period to be tested is the ordinary date, obtain the actual order quantity of each first time period in the N weeks before the time period to be tested, the actual order quantity of each second time period in the first M days, and the actual order quantity of the first L time periods in the area to be tested, where each first time period is in the same week and time period as the time period to be tested, and each second time period is in the same time period as the time period to be tested, where N, M, and L are integers greater than zero. Determine the actual order quantity of each first time period, the actual order quantity of each second time period, and the actual order quantity of the first L time periods as the historical order quantity; If the date type of the time period to be tested is a special date, then obtain the actual order quantity of the area to be tested in the P time periods before the time period to be tested, where P is an integer greater than zero; The actual order quantity in the first P time periods is determined as the historical order quantity.

4. The order prediction method according to claim 3, characterized in that: When a first target time period exists among the first time periods, the second time periods, and the first L time periods, the first target time period is a time period whose date type is the special date. Before determining the actual order quantity in the first target time period as the historical order quantity, the method further includes: Obtain the actual order quantity of the tested area in the last R years before the first target time period, where R is an integer greater than zero; Based on the actual order quantity in the past R years, determine the actual order quantity of each third time period in the past R years, where each third time period is in the same week and time period as the first target time period; Calculating the average of the actual order quantities in each third time period; The actual order quantity in the first target time period is updated to the average of the actual order quantities in the third time periods.

5. The order prediction method according to claim 4, characterized in that: Before updating the actual order quantity of the first target time period to the average of the actual order quantities of the third time periods, the method further includes: Calculating the standard deviation of the actual order quantity in each third time period; Calculate a first value and a second value based on the mean and standard deviation of the actual order quantity in each third time period, where the first value is the difference between the mean and standard deviation of the actual order quantity in each third time period, and the second value is the sum of the mean and standard deviation of the actual order quantity in each third time period; determining, based on the first value and the second value, the actual order quantity of each second target time period from the actual order quantity of each third time period, each second target time period being a third time period in which the actual order quantity is greater than or equal to the first value and less than or equal to the second value; Calculating the average of the actual order quantities in each second target time period; The average of the actual order quantities in the third time periods is updated to the average of the actual order quantities in the second target time periods.

6. The order prediction method according to claim 4, characterized in that: Determining the actual order quantity in each third time period within the past R years based on the actual order quantity within the past R years includes: Determine the actual order quantity belonging to the common date from the actual order quantity of the said recent R years; The actual order quantity of each third time period is determined from the actual order quantity belonging to the common date.

7. The order prediction method according to claim 3, characterized in that: The duration of each first time period, the duration of each second time period, the duration of the first L time periods, and the duration of the first P time periods are all the same as the duration of the time period to be measured.

8. An order forecasting device, characterized in that: include: A type determination module is used to determine the date type to which the time period to be tested belongs, wherein the date types include ordinary dates and special dates, wherein the special dates include statutory holidays and compensatory holidays, and the ordinary dates are dates from Monday to Sunday excluding the special dates; A quantity determination module, configured to determine the target forecast model and the historical order quantity of the area to be tested based on the date type to which the time period to be tested belongs; An order prediction module is used to predict the order quantity of the test area in the test time period based on the target prediction model and the historical order quantity.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the electronic device implements the order prediction method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The invention comprises a computer program, which enables the order prediction method according to any one of claims 1 to 7 to be executed when the computer program is executed.