Order data analysis method, device and electronic equipment
Through the combination of multiple indicators, the abnormal order data is analyzed, and the explanatory variables are determined using historical order data and interval estimation calculation method, which solves the problem of single analysis and inaccurate conclusions in the existing technology, and achieves fast and accurate data Exceptional positioning.
Patent Information
- Application Number
- CN201910708338.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-01
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology relies on manual fixed analysis dimensions and logic in business analysis, resulting in a single analysis of the causes of data changes and the conclusions are not comprehensive and accurate enough.
The analysis dimensions are divided by combining multiple indicators, the abnormal current order data is analyzed, the historical order data is used to determine whether the current data is abnormal, and the first confidence interval is determined through the interval estimation calculation method, and an explanatory variable is added to locate the cause of the data abnormality.
It realizes the rapid and accurate positioning of explanatory variables for data abnormalities, and improves the comprehensiveness and accuracy of data analysis.
Smart Images

Figure CN111833135B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an order data analysis method, device and electronic equipment. Background Art
[0002] When doing business analysis, a large amount of business information needs to be analyzed, mined, and processed to determine the reasons for changes in some data. For example, when determining the reasons for changes in order volume over a period of time, staff often rely on their own pre-set analysis dimensions, such as analyzing the change process of order volume from the dimension of time, to find the reasons for the changes. This analysis method relies on some fixed analysis dimensions and logic manually, and the reasons for data changes analyzed and mined are relatively simple, and the data conclusions are not comprehensive and accurate enough. Summary of the invention
[0003] In view of this, the purpose of this application is to provide an order data analysis method, device and electronic device, which analyzes the abnormal current order data through the analysis dimensions corresponding to the combination of multiple indicators, and can quickly and accurately locate the explanatory variables that cause data anomalies.
[0004] According to one aspect of the present application, a method for analyzing order data is provided, the method comprising: judging whether current order data is abnormal based on historical order data; if the current order data is abnormal, dividing the historical order data and the current order data according to each indicator combination, and obtaining historical order sub-data and current order sub-data corresponding to each indicator combination; wherein the indicator combination comprises: at least one sub-indicator corresponding to at least one business indicator; traversing the historical order sub-data and the current order sub-data corresponding to each indicator combination, and applying the historical order sub-data to judge whether the current order sub-data is abnormal; performing the following operations on the abnormal current sub-order data: judging whether the current order sub-data is within a first confidence interval of the historical order sub-data; wherein the first confidence interval is calculated for the historical order sub-data by an interval estimation algorithm; if it is not within the first confidence interval, adding the sub-indicator in the currently traversed indicator combination to the explanatory variables of the current order data.
[0005] In some embodiments, the above step of determining whether the current order data is abnormal based on the historical order data includes: calculating the rate of change between the current order data and the historical order data; if the rate of change is greater than a preset rate of change threshold, determining that the current order data is abnormal.
[0006] In some embodiments, the above step of determining whether the current order data is abnormal based on the historical order data includes: calculating a second confidence interval corresponding to the historical order data through an interval estimation algorithm; if the current order data is not within the second confidence interval, determining that the current order data is abnormal.
[0007] In some embodiments, the above-mentioned step of applying historical order sub-data to determine whether the current order sub-data is abnormal includes: calculating the sub-change rate between the current order sub-data and the historical order sub-data; if the sub-change rate is greater than a preset sub-change rate threshold, determining that the current order sub-data is abnormal.
[0008] In some embodiments, the above-mentioned step of dividing the historical order data according to each indicator combination includes: dividing the historical order data according to business indicator groups to obtain first historical order data corresponding to each business indicator group; wherein the business indicator group includes at least one business indicator; for the first historical order data corresponding to each business indicator group: dividing the first historical order data according to the sub-indicator group contained in the business indicator group to obtain second historical order data corresponding to each sub-indicator group, and using the second historical order data as the historical order sub-data of the indicator combination corresponding to the business indicator group; wherein the sub-indicator group includes at least one sub-indicator.
[0009] In some embodiments, after the step of applying historical order sub-data to determine whether the current order sub-data is abnormal, it also includes: if there are multiple current order sub-data that are judged to be abnormal, calculating the third confidence interval corresponding to the sub-change rates of the multiple current order sub-data through an interval estimation algorithm; determining the current order sub-data corresponding to the sub-change rate that is not within the third confidence interval as significantly abnormal order sub-data; taking the significantly abnormal order sub-data as abnormal current order sub-data, and continuing to execute the step of determining whether the current order sub-data is within the first confidence interval of the historical order sub-data.
[0010] In some embodiments, before the step of determining whether the current order sub-data is within the first confidence interval of the historical order sub-data, it also includes: respectively calculating the mean and variance of the historical order sub-data; based on the mean and variance of the historical order sub-data, and a preset confidence interval coefficient, calculating the first confidence interval corresponding to the historical order sub-data.
[0011] In some embodiments, the above method also includes: obtaining a first change rate between the current order data and the historical order data and a second change rate between the current order sub-data that is not within the first confidence interval and the corresponding historical order sub-data; and displaying the first change rate, the second change rate and the explanatory variables corresponding to the current order data.
[0012] In some embodiments, if there are multiple current order sub-data that are not within the first confidence interval, the method further includes: ranking the multiple explanatory variables corresponding to the current order data in importance according to the degree of deviation of each current order sub-data from the corresponding first confidence interval.
[0013] In some embodiments, both current order data and historical order data include: order quantity data, order duration data or order amount data; business indicators include at least one of the following: time, weather and holidays; sub-indicators include at least one of the following: morning peak, flat peak, evening peak, sunny, cloudy, rainy, holidays and non-holidays.
[0014] According to another aspect of the present application, there is also provided an analysis device for order data, the device comprising: a data judgment module, for judging whether current order data is abnormal based on historical order data; a data division module, for, if the current order data is abnormal, dividing the historical order data and the current order data according to each indicator combination, to obtain historical order sub-data and current order sub-data corresponding to each indicator combination; wherein the indicator combination comprises: at least one sub-indicator corresponding to at least one business indicator; a traversal module, for traversing the historical order sub-data and the current order sub-data corresponding to each of the indicator combinations, and applying the historical order sub-data to judge whether the current order sub-data is abnormal; an explanatory variable determination module, for performing the following operations on the abnormal current sub-order data: judging whether the current order sub-data is within a first confidence interval of the historical order sub-data; wherein the first confidence interval is calculated for the historical order sub-data by an interval estimation algorithm; if not within the first confidence interval, adding the sub-indicator in the currently traversed indicator combination to the explanatory variable of the current order data.
[0015] In some embodiments, the above-mentioned data judgment module is also used to: calculate the change rate between the current order data and the historical order data; if the change rate is greater than a preset change rate threshold, determine that the current order data is abnormal.
[0016] In some embodiments, the above-mentioned data judgment module is also used to: calculate a second confidence interval corresponding to the historical order data through an interval estimation algorithm; if the current order data is not within the second confidence interval, determine that the current order data is abnormal.
[0017] In some embodiments, the traversal module is further used to: calculate the sub-change rate between the current order sub-data and the historical order sub-data; if the sub-change rate is greater than a preset sub-change rate threshold, determine that the current order sub-data is abnormal.
[0018] In some embodiments, the above-mentioned data partitioning module is also used to: divide the historical order data according to the business indicator group to obtain the first historical order data corresponding to each business indicator group; wherein the business indicator group includes at least one business indicator; for the first historical order data corresponding to each business indicator group: divide the first historical order data according to the sub-indicator group contained in the business indicator group to obtain the second historical order data corresponding to each sub-indicator group, and use the second historical order data as the historical order sub-data of the indicator combination corresponding to the business indicator group; wherein the sub-indicator group includes at least one sub-indicator.
[0019] In some embodiments, the above-mentioned device also includes: a data screening module, which is used to: if there are multiple current order sub-data that are judged to be abnormal, calculate the third confidence interval corresponding to the sub-change rates of the multiple current order sub-data through an interval estimation algorithm; determine the current order sub-data corresponding to the sub-change rate that is not within the third confidence interval as significantly abnormal order sub-data; take the significantly abnormal order sub-data as abnormal current order sub-data, and continue to execute the step of determining whether the current order sub-data is within the first confidence interval of the historical order sub-data.
[0020] In some embodiments, the above-mentioned device also includes: an interval estimation module, which is used to: calculate the mean and variance of the historical order sub-data respectively; based on the mean and variance of the historical order sub-data, and a preset confidence interval coefficient, calculate the first confidence interval corresponding to the historical order sub-data.
[0021] In some embodiments, the above-mentioned device also includes: a data display module, which is used to: obtain a first change rate between current order data and historical order data and a second change rate between current order sub-data that is not within the first confidence interval and the corresponding historical order sub-data; and display the first change rate, the second change rate and the explanatory variables corresponding to the current order data.
[0022] In some embodiments, if there are multiple current order sub-data that are not within the first confidence interval, the above-mentioned device also includes: a sorting module, which is used to sort the importance of multiple explanatory variables corresponding to the current order data according to the degree of deviation of each current order sub-data from the corresponding first confidence interval.
[0023] In some embodiments, both current order data and historical order data include: order quantity data, order duration data or order amount data; business indicators include at least one of the following: time, weather and holidays; sub-indicators include at least one of the following: morning peak, flat peak, evening peak, sunny, cloudy, rainy, holidays and non-holidays.
[0024] According to another aspect of the present application, an electronic device is provided, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the above methods.
[0025] According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are executed.
[0026] Based on any of the above aspects, the present application first makes an overall judgment on the current order data based on the historical order data. If the current order data is abnormal, the historical order data and the current order data are divided according to each indicator combination to obtain the historical order sub-data and the current order sub-data corresponding to each indicator combination; the indicator combination includes: at least one sub-indicator corresponding to at least one business indicator; then the historical order sub-data and the current order sub-data corresponding to each indicator combination are traversed, and the historical order sub-data are applied to determine whether the current order sub-data is abnormal; the abnormal current sub-order data is operated as follows: determine whether the current order sub-data is within the first confidence interval of the historical order sub-data; the first confidence interval is calculated by the interval estimation algorithm for the historical order sub-data; if it is not within the first confidence interval, add the sub-indicator in the currently traversed indicator combination to the explanatory variables of the current order data. The present application analyzes the abnormal current order data through the analysis dimensions corresponding to multiple indicator combinations, and can quickly and accurately locate the explanatory variables that cause data abnormalities. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A schematic diagram of the architecture of an order data analysis system provided in an embodiment of the present application is shown;
[0029] Figure 2 A flowchart of an order data analysis method provided by an embodiment of the present application is shown;
[0030] Figure 3 A flowchart showing another method for analyzing order data provided by an embodiment of the present application is shown;
[0031] Figure 4A schematic diagram showing another method for analyzing order data provided by an embodiment of the present application;
[0032] Figure 5 A schematic diagram showing a display of explanatory variables in an order data analysis method provided in an embodiment of the present application is shown;
[0033] Figure 6 A schematic diagram showing the structure of an order data analysis device provided in an embodiment of the present application is shown;
[0034] Figure 7 A schematic diagram showing the structure of another order data analysis device provided in an embodiment of the present application is shown;
[0035] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0037] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0038] In order to enable those skilled in the art to use the contents of this application, the following implementation is provided in conjunction with a specific application scenario, "Analysis scenario of online ride-hailing order data". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around online ride-hailing order data, it should be understood that this is only an exemplary embodiment.
[0039] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0040] Figure 1 1 is a schematic diagram of the architecture of an order data analysis system 100 provided in an embodiment of the present application. For example, the order data analysis system 100 may be an online transportation service platform for transportation services such as taxis, chauffeur services, express trains, carpooling, bus services, driver rentals, or shuttle services, or any combination thereof, or an online ordering platform for takeout ordering. The order data analysis system 100 may include one or more of a server 110, a network 120, a service request terminal 130, and a database 140.
[0041] In some embodiments, the server 110 may include a processor. The processor may process information and / or data related to the service request to perform one or more functions described in the present application. For example, the processor may determine a target vehicle for providing a service based on a service request such as a taxi request obtained from the service request end 130.
[0042] In some embodiments, the device type corresponding to the service request end 130 can be a mobile device, such as a smart home device, a wearable device, a smart mobile device, a virtual reality device, or an augmented reality device, etc. It can also be a tablet computer, a laptop computer, or a built-in device in a motor vehicle, etc.
[0043] In some embodiments, the database 140 may be connected to the network 120 to communicate with one or more components (e.g., the server 110, the service requester 130, etc.) in the order data analysis system 100. One or more components in the order data analysis system 100 may access data or instructions stored in the database 140 via the network 120. In some embodiments, the database 140 may be directly connected to one or more components in the order data analysis system 100, or the database 140 may also be part of the server 110.
[0044] The following is combined with the above Figure 1 The contents described in the order data analysis system 100 shown are used to explain in detail the order data analysis method provided in the embodiment of the present application.
[0045] Reference Figure 2The figure is a flow chart of an order data analysis method provided in an embodiment of the present application. The method can perform data analysis on the overall order data to determine the cause of the data anomaly, that is, the explanatory variable. The above order data can include online car-hailing order data or food delivery order data. The following is an example of the order data of online car-hailing service. The method can be executed by the server in the order data analysis system 100. The specific execution process includes the following steps:
[0046] Step S202, judging whether the current order data is abnormal based on the historical order data.
[0047] In specific applications, both the current order data and the historical order data can be order quantity data, order amount data, or order duration data. In other words, the analysis variables of the order data may include: order quantity, order amount, order duration, and many other data. Taking the order quantity as an example, the current order data can be the order quantity within today, the order quantity within the current week, or the order quantity within a month, etc. The corresponding historical order data can be the order quantity within the previous week, or the order quantity within the previous month, etc., without specific limitation here. In the following examples, the current order data is taken as the order quantity within today.
[0048] First, compare the current order data with the historical order data to preliminarily determine whether the current order data is abnormal. There are many specific ways to make the judgment, such as comparing the change rate between the current order data and the historical order data with a preset change rate threshold; or, comparing with the confidence interval corresponding to the historical order data, which will not be repeated here.
[0049] Step S204, if the current order data is abnormal, the historical order data and the current order data are divided according to each indicator combination to obtain the historical order sub-data and the current order sub-data corresponding to each indicator combination.
[0050] Among them, the above-mentioned indicator combination includes: at least one sub-indicator corresponding to at least one business indicator. The indicator combination here can also be said to be the dimension of data analysis, for example: business indicators include: time, weather, holidays, etc., and each business indicator includes multiple sub-indicators, such as time includes morning peak, flat peak, and evening peak; weather includes sunny, cloudy, and rainy; holidays include holidays and non-holidays; then the above-mentioned business indicators and their sub-indicators can be combined to obtain a variety of combinations of different dimensions, for example: the indicator combination under the combination of the two business indicators of weather and holidays can include: [holidays, sunny], [holidays, cloudy], [holidays, rain], [non-holidays, sunny], [non-holidays, cloudy] and [non-holidays, rain] six combinations.
[0051] It should be noted that the above indicator combination may include at least one sub-indicator in a business indicator, such as the morning peak sub-indicator under the time business indicator.
[0052] After determining that the current order data is abnormal, the historical order data and the current order data are divided according to each of the above-mentioned indicator combinations to obtain the shard data of the historical order data and the current order data corresponding to each indicator combination, that is, the historical order sub-data and the current order sub-data corresponding to each indicator combination.
[0053] Step S206, traversing the historical order sub-data and current order sub-data corresponding to each indicator combination, and applying the historical order sub-data to determine whether the current order sub-data is abnormal.
[0054] In specific implementation, the traversal process can be achieved through the KD tree query algorithm, which can traverse all analysis dimensions of the order data, that is, each indicator combination mentioned above.
[0055] In the above process of traversing each indicator combination, for each indicator combination of historical order sub-data and current order sub-data, it is determined whether the current order sub-data is abnormal based on the historical order sub-data. The specific judgment method can be to compare the change rate of the current order sub-data with a preset change rate threshold. If it exceeds the threshold, it is determined that the current order sub-data is abnormal. After traversing all indicator combinations, it can be determined whether there is abnormal current order sub-data in the current order sub-data under each indicator combination corresponding to the current order data. If so, it is further possible to determine the indicator combination corresponding to the abnormal current order sub-data.
[0056] S208, performing the following operations on the abnormal current sub-order data: determining whether the current order sub-data is within the first confidence interval of the historical order sub-data; if not within the first confidence interval, adding the sub-indicators in the currently traversed indicator combination to the explanatory variables of the current order data.
[0057] The first confidence interval is calculated by the interval estimation algorithm for the historical order sub-data. For the abnormal current order sub-data, it is further determined whether the current order sub-data is within the first confidence interval corresponding to the historical order sub-data. If it is, it means that the indicator combination is not the cause of the abnormality of the current order data. If it is not within the first confidence interval, it means that the indicator combination is the cause of the abnormality of the current order data. The sub-indicator corresponding to the indicator combination is added to the explanatory variable of the current order data. If there are multiple abnormal current order sub-data, multiple explanatory variables corresponding to the current order data can be obtained.
[0058] In the order data analysis method provided in the embodiment of the present application, firstly, the current order data is judged overall according to the historical order data. If the current order data is abnormal, the historical order data and the current order data are divided according to each indicator combination to obtain the historical order sub-data and the current order sub-data corresponding to each indicator combination; then the historical order sub-data and the current order sub-data corresponding to each indicator combination are traversed, and the historical order sub-data are used to judge whether the current order sub-data is abnormal; the abnormal current sub-order data is operated as follows: judging whether the current order sub-data is within the first confidence interval of the historical order sub-data; the first confidence interval is calculated by the interval estimation algorithm for the historical order sub-data; if it is not within the first confidence interval, the sub-indicator in the currently traversed indicator combination is added to the explanatory variable of the current order data. By analyzing the abnormal current order data through the analysis dimensions corresponding to multiple indicator combinations, the explanatory variables that cause data abnormality can be quickly and accurately located.
[0059] In order to explain in detail the above process of determining whether the current order data is abnormal, two specific implementation methods are listed below:
[0060] The first method is to calculate the change rate between the current order data and the historical order data; if the change rate is greater than a preset change rate threshold, the current order data is determined to be abnormal.
[0061] For example, Table 1 shows the order volumes corresponding to the current order data and the historical order data respectively. The historical order data is the order volumes corresponding to the six days from 2019.1.1 to 2019.1.6, and the current order data is the order volumes on 2019.1.7.
[0062] Table 1
[0063] 2019.1.1 2019.1.2 2019.1.3 2019.1.4 2019.1.5 2019.1.6 2019.1.7 31 35 37 31 32 38 30
[0064] Based on the data shown in Table 4, the rate of change between the current order data and the historical order data is calculated. The specific calculation method can be: (the order volume of the day - the average of the historical order volume of six days) / the average of the historical order volume of six days; or, (the order volume of the day - the order volume of the previous day) / the order volume of the previous day.
[0065] After the change rate is calculated, it is compared with the preset change rate threshold. If it is greater than the change rate threshold, the current order data is determined to be abnormal. This method can quickly determine whether the current order number is abnormal.
[0066] The second method: using an interval estimation algorithm to calculate the second confidence interval corresponding to the historical order data; if the current order data is not within the second confidence interval, it is determined that the current order data is abnormal.
[0067] Based on the data shown in Table 4 above, first calculate the mean and variance corresponding to the historical order data, for example:
[0068] Mean: u = (31 + 35 + 37 + 31 + 32 + 38 + 30) / 7 = 33.43;
[0069] variance:
[0070] s=[(31-33.43) 2 +(35-33.43) 2 +(37-33.43) 2 +(31-33.43) 2 +(32-33.43) 2 +(38-33.43) 2 +(30-33.43) 2 ] / 7=8.82;
[0071] Assuming that the data follows a normal distribution and the coefficient of the 95% confidence interval is 1.96, the second confidence interval is [33.43-8.82*1.96, 33.43+8.82*1.96]=[16.14, 50.71].
[0072] The current order data, that is, the order volume on January 7, 2019 is 30, which is within the second confidence interval [16.14, 50.71], so it is determined that the current order data is normal. If it is not within the second confidence interval, it means that the current order data is abnormal. This method is relatively more accurate in judging the result.
[0073] In this embodiment, the algorithms for calculating all confidence intervals, such as the first confidence interval corresponding to the historical order sub-data used later and the third confidence interval of the sub-change rate, can refer to the calculation process of the second confidence interval mentioned above and will not be repeated hereafter.
[0074] Similarly, the above-mentioned step of applying historical order sub-data to determine whether the current order sub-data is abnormal can also be achieved by calculating and comparing the change rate. Specifically, the sub-change rate of the current order sub-data and the historical order sub-data is calculated, and then it is determined whether the sub-change rate is greater than a preset sub-change rate threshold. If so, it is determined that the current order sub-data is abnormal, which will not be repeated here.
[0075] In order to clearly illustrate the above steps of dividing historical order data according to each indicator combination, a specific application example is listed below. Figure 3 As shown:
[0076] Step S302: divide the historical order data according to the business indicator groups to obtain first historical order data corresponding to each business indicator group.
[0077] The business indicator group includes at least one business indicator. For example, the historical order data is the order volume corresponding to each day from January 1 to January 6. First, it is divided according to the business indicator group to obtain the first historical order volume corresponding to each business indicator group. The business indicator group can be [time], [weather], [time, weather] or [time, weather, holidays], etc.
[0078] Step S304, for the first historical order data corresponding to each business indicator group: divide the first historical order data according to the sub-indicator groups contained in the business indicator group, obtain the second historical order data corresponding to each sub-indicator group, and use the second historical order data as the historical order sub-data of the indicator combination corresponding to the business indicator group.
[0079] Among them, the sub-indicator group includes at least one sub-indicator. For example, for the first historical order data corresponding to the above-mentioned [time] business indicator group, secondary division is performed based on the sub-indicator group to obtain the second historical order data corresponding to each sub-indicator group, and the sub-indicator group includes [morning peak], [flat peak] and [evening peak]. For the first historical order data corresponding to the above-mentioned [time, weather] business indicator group, secondary division is performed based on the sub-indicator group to obtain the second historical order data corresponding to each sub-indicator group, and the sub-indicator group includes nine groups: [sunny, morning peak], [sunny, flat peak], [sunny, evening peak], [cloudy, morning peak], [cloudy, flat peak], [cloudy, evening peak], [rainy, morning peak], [rainy, flat peak] and [rainy, evening peak], and so on.
[0080] The current order data is divided in the same way as the above-mentioned historical order data. The total order quantity in the current order data can be divided into sub-order quantities under each indicator combination. If there is no order that meets the conditions under a certain indicator combination, the sub-order quantity is 0. The data with a sub-order quantity of 0 is not considered.
[0081] Table 2 below shows the historical order sub-data and current order sub-data (order volume on January 7) corresponding to the three indicator combinations under the [time] business indicator combination, Table 3 shows the historical order sub-data and current order sub-data corresponding to the nine indicator combinations under the [time, weather] business indicator combination (only 5 columns are shown), and Table 4 shows the historical order sub-data and current order sub-data corresponding to the eighteen indicator combinations under the [time, weather, holidays] business indicator combination (only 5 columns are shown):
[0082] Table 2
[0083]
[0084]
[0085] Table 3
[0086] Sunny, morning rush hour Sunny, flat Sunny, evening peak Cloudy, morning peak Overcast, flat peak January 1 X X X X X January 2 X X X X X January 3 X X X X X … January 7 X X X X X
[0087] Table 4
[0088]
[0089] After the historical order data is divided according to each indicator combination and multiple historical order sub-data are obtained, the following operations can be performed for each historical order sub-data: the mean and variance of the historical order sub-data are calculated respectively; based on the mean and variance of the historical order sub-data and the preset confidence interval coefficient, the first confidence interval corresponding to the historical order sub-data is calculated. Thus, the first confidence interval corresponding to each historical order sub-data is obtained. The specific process refers to the aforementioned interval estimation algorithm, which will not be repeated here.
[0090] Compared to Figure 2 The order data analysis method shown in FIG. 1 is a method for analyzing order data. In this embodiment, after determining multiple abnormal current order sub-data, there is also a process of screening the current order sub-data with significant abnormalities. For details, see Figure 4 As shown, the following steps are included:
[0091] Step S402, judging whether the current order data is abnormal based on the historical order data.
[0092] Step S404: if the current order data is abnormal, the historical order data and the current order data are divided according to each indicator combination to obtain the historical order sub-data and the current order sub-data corresponding to each indicator combination.
[0093] Step S406, traversing the historical order sub-data and current order sub-data corresponding to each indicator combination, and applying the historical order sub-data to determine whether the current order sub-data is abnormal.
[0094] Step S408: If the judgment result is that there are multiple current order sub-data that are abnormal, calculate the third confidence interval corresponding to the sub-change rate of the multiple current order sub-data through an interval estimation algorithm.
[0095] Step S410, determining the current order sub-data corresponding to the sub-change rate that is not within the third confidence interval as significantly abnormal order sub-data; and treating the significantly abnormal order sub-data as abnormal current order sub-data.
[0096] Step S412, performing the following operations on the abnormal current sub-order data: determining whether the current order sub-data is within the first confidence interval of the historical order sub-data; if not within the first confidence interval, adding the sub-indicator in the currently traversed indicator combination to the explanatory variables of the current order data.
[0097] The specific implementation process of the above steps S402, S404, S406 and S412 can be found in Figure 2 The specific description of the steps described in will not be repeated here. In step S408 and step S410, firstly, the third confidence interval of the sub-change rate corresponding to the multiple abnormal current order sub-data is calculated, and then the change rate of each abnormal current order sub-data is compared with the third confidence interval, and the abnormal current order sub-data corresponding to the change rate that is not within the third confidence interval is determined as the significantly abnormal order sub-data, and further, the significantly abnormal order sub-data is compared with the first confidence interval corresponding to the corresponding historical order sub-data, so as to determine whether the indicator combination corresponding to the significantly abnormal order sub-data is the cause of the abnormality of the current order data.
[0098] This method of screening out significantly abnormal order sub-data can reduce the workload of data analysis and quickly determine the explanatory variables corresponding to the abnormal current order data. In this case, since there are multiple abnormal order sub-data, there may also be multiple explanatory variables, and the importance of multiple explanatory variables can be ranked, that is, to see which sub-indicator in which indicator combination is the most direct cause of the abnormal current order data.
[0099] For example, according to the degree of deviation between each current order sub-data and the corresponding first confidence interval, the importance of multiple explanatory variables corresponding to the current order data is ranked. The current order sub-data here refers to abnormal current order sub-data. The greater the degree of deviation between it and the first confidence interval corresponding to the corresponding historical order sub-data, the more important the sub-indicator in the corresponding indicator combination is, that is, the more important the explanatory variable corresponding to the abnormal current order data is.
[0100] In addition, in order to intuitively reflect the reason why the current order data is abnormal, the above method may also include the following steps: obtaining a first change rate between the current order data and the historical order data and a second change rate between the current order sub-data that is not within the first confidence interval and the corresponding historical order sub-data; displaying the first change rate, the second change rate and the explanatory variables corresponding to the current order data, such as Figure 5 As shown. The total current order data corresponds to an order volume growth rate of 80%, and there are three corresponding explanatory variables, namely [Sunny, morning rush hour], [Morning rush hour] and [Holidays]. The sub-order growth rates corresponding to the order sub-data in the three explanatory variables are 50%, 40% and 20% respectively. It can be seen that the explanatory variables that cause the current order data to be abnormal are ranked from high to low in terms of importance: [Sunny, morning rush hour], [Morning rush hour] and [Holidays].
[0101] It should be noted that there are many ways to display data. Figure 5This is just an example and there is no specific limitation on the specific display form.
[0102] The order data analysis method provided in the embodiment of the present application can not only analyze the abnormal current order data through the analysis dimensions corresponding to the combination of multiple indicators, but also quickly and accurately locate the explanatory variables that cause data anomalies, and can also sort the importance of the explanatory variables and display the final results, so that the user can intuitively see the reasons for the data anomalies for subsequent processing.
[0103] Based on the above method embodiment, the present application embodiment also provides an order data analysis device, see Figure 6 As shown, the device includes: a data judgment module 62, a data division module 64, a traversal module 66 and an explanation variable determination module 68.
[0104] Among them, the data judgment module 62 is used to judge whether the current order data is abnormal based on the historical order data; the data division module 64 is used to divide the historical order data and the current order data according to each indicator combination if the current order data is abnormal, and obtain the historical order sub-data and the current order sub-data corresponding to each indicator combination; wherein the indicator combination includes: at least one sub-indicator corresponding to at least one business indicator; the traversal module 66 is used to traverse the historical order sub-data and the current order sub-data corresponding to each of the indicator combinations, and apply the historical order sub-data to judge whether the current order sub-data is abnormal; the explanatory variable determination module 68 is used to perform the following operations on the abnormal current sub-order data: judge whether the current order sub-data is within the first confidence interval of the historical order sub-data; wherein the first confidence interval is calculated for the historical order sub-data by the interval estimation algorithm; if it is not within the first confidence interval, add the sub-indicator in the currently traversed indicator combination to the explanatory variable of the current order data.
[0105] The order data analysis device provided in the embodiment of the present application analyzes abnormal current order data through analysis dimensions corresponding to a plurality of indicator combinations, and can quickly and accurately locate explanatory variables that cause data anomalies.
[0106] Figure 7 A structural schematic diagram of another order data analysis device is shown, which includes, in addition to a data judgment module 702, a data partitioning module 704, a traversal module 706 and an explanatory variable determination module 708 similar to the previous embodiment, a data screening module 710, an interval estimation module 712, a data display module 714 and a sorting module 716.
[0107] Among them, the above-mentioned data screening module 710 is used for: if there are multiple current order sub-data that are judged to be abnormal, calculating the third confidence interval corresponding to the sub-change rates of the multiple current order sub-data through the interval estimation algorithm; determining the current order sub-data corresponding to the sub-change rate that is not within the third confidence interval as significantly abnormal order sub-data; taking the significantly abnormal order sub-data as the current order sub-data, and continuing to execute the step of determining whether the current order sub-data is within the first confidence interval of the historical order sub-data.
[0108] The interval estimation module 712 is used to: calculate the mean and variance of the historical order sub-data respectively; and calculate the first confidence interval corresponding to the historical order sub-data based on the mean and variance of the historical order sub-data and a preset confidence interval coefficient.
[0109] The above-mentioned data display module 714 is used to: obtain the first change rate between the current order data and the historical order data and the second change rate between the current order sub-data that is not within the first confidence interval and the corresponding historical order sub-data; and display the first change rate, the second change rate and the explanatory variables corresponding to the current order data.
[0110] If there are multiple current order sub-data that are not within the first confidence interval, the sorting module 716 is used to sort the importance of multiple explanatory variables corresponding to the current order data according to the degree of deviation of each current order sub-data from the corresponding first confidence interval.
[0111] In some embodiments, the data judgment module 702 is further used to: calculate the change rate between the current order data and the historical order data; if the change rate is greater than a preset change rate threshold, determine that the current order data is abnormal.
[0112] In some embodiments, the data judgment module 702 is further used to: calculate a second confidence interval corresponding to the historical order data through an interval estimation algorithm; if the current order data is not within the second confidence interval, determine that the current order data is abnormal.
[0113] In some embodiments, the traversal module 706 is further used to: calculate the sub-change rate between the current order sub-data and the historical order sub-data; if the sub-change rate is greater than a preset sub-change rate threshold, determine that the current order sub-data is abnormal.
[0114] In some embodiments, the data partitioning module 704 is further used to: partition the historical order data according to business indicator groups to obtain first historical order data corresponding to each business indicator group; wherein the business indicator group includes at least one business indicator; for the first historical order data corresponding to each business indicator group: partition the first historical order data according to the sub-indicator groups included in the business indicator group to obtain second historical order data corresponding to each sub-indicator group, and use the second historical order data as historical order sub-data of the indicator combination corresponding to the business indicator group; wherein the sub-indicator group includes at least one sub-indicator.
[0115] In some embodiments, the above-mentioned current order data and historical order data both include: order quantity data, order duration data or order amount data; business indicators include at least one of the following: time, weather and holidays; sub-indicators include at least one of the following: morning peak, flat peak, evening peak, sunny, cloudy, rainy, holidays and non-holidays.
[0116] The modules can be connected or communicated with each other via wired or wireless connections. The wired connection can include metal cables, optical cables, hybrid cables, etc., or any combination thereof. The wireless connection can include connections in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units.
[0117] For ease of understanding, Figure 8 A schematic diagram showing exemplary hardware and software components of an electronic device 800 that can implement the concept of the present application according to some embodiments of the present application. For example, a processor 820 can be used on the electronic device 800 and used to perform the functions in the present application.
[0118] The electronic device 800 can be a general-purpose computer or a special-purpose computer, both of which can be used to implement the order data analysis method of the present application. Although only one computer is shown in the present application, for convenience, the functions described in the present application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0119] For example, the electronic device 800 may include a network port 810 connected to a network, one or more processors 820 for executing program instructions, a communication bus 830, and storage media 840 in different forms, such as disks, ROMs or RAMs, or any combination thereof. Exemplarily, the computer platform may also include program instructions stored in ROMs, RAMs or other types of non-temporary storage media or any combination thereof. The method of the present application may be implemented according to these program instructions. The electronic device 800 also includes an input / output (I / O) interface 850 between the computer and other input / output devices (e.g., keyboards, display screens).
[0120] For ease of explanation, only one processor is described in the electronic device 800. However, it should be noted that the electronic device 800 in the present application may also include multiple processors, so the steps performed by one processor described in the present application may also be performed jointly or individually by multiple processors. For example, if the processor of the electronic device 800 performs step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor perform steps A and B together.
[0121] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned order data analysis method are executed.
[0122] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned order data analysis method, thereby solving the technical problems in the prior art that the data analysis method is single and the data conclusions are not comprehensive and accurate enough.
[0123] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules 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 communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0124] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0126] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0127] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for analyzing order data, characterized in that: include: Determine whether the current order data is abnormal based on historical order data; If the current order data is abnormal, the historical order data and the current order data are divided according to each indicator combination to obtain historical order sub-data and current order sub-data corresponding to each indicator combination; wherein the indicator combination includes: at least one sub-indicator corresponding to at least one business indicator; Traversing the historical order sub-data and the current order sub-data corresponding to each of the indicator combinations, and applying the historical order sub-data to determine whether the current order sub-data is abnormal; Perform the following operations on the abnormal current sub-order data: Determine whether the current order sub-data is within a first confidence interval of the historical order sub-data; wherein the first confidence interval is calculated for the historical order sub-data using an interval estimation algorithm; If it is not within the first confidence interval, adding the sub-indicator in the currently traversed indicator combination to the explanatory variable of the current order data, wherein the explanatory variable is used to characterize the cause of the data anomaly; If there are multiple current order sub-data not within the first confidence interval, the method further includes: According to the degree of deviation between each current order sub-data and the corresponding first confidence interval, the multiple explanatory variables corresponding to the current order data are ranked in importance. The greater the degree of deviation between the current order sub-data and the first confidence interval, the more important the sub-indicator in the indicator combination corresponding to the current order sub-data.
2. The method according to claim 1, characterized in that The steps of judging whether the current order data is abnormal based on the historical order data include: Calculate the second confidence interval corresponding to the historical order data by using an interval estimation algorithm; If the current order data is not within the second confidence interval, it is determined that the current order data is abnormal.
3. The method according to claim 1, characterized in that The step of applying the historical order sub-data to determine whether the current order sub-data is abnormal includes: Calculating a sub-change rate between the current order sub-data and the historical order sub-data; If the sub-change rate is greater than a preset sub-change rate threshold, it is determined that the current order sub-data is abnormal.
4. The method according to claim 1, characterized in that: The step of dividing the historical order data according to each indicator combination comprises: Divide the historical order data according to business indicator groups to obtain first historical order data corresponding to each business indicator group; wherein the business indicator group includes at least one business indicator; For the first historical order data corresponding to each of the business indicator groups: divide the first historical order data according to the sub-indicator groups contained in the business indicator group, obtain the second historical order data corresponding to each sub-indicator group, and use the second historical order data as the historical order sub-data of the indicator combination corresponding to the business indicator group; wherein the sub-indicator group includes at least one sub-indicator.
5. The method according to claim 3, characterized in that: After the step of applying the historical order sub-data to determine whether the current order sub-data is abnormal, the method further includes: If there are multiple sub-data of the current order that are judged to be abnormal, the third confidence intervals corresponding to the sub-change rates of the multiple sub-data of the current order are calculated by the interval estimation algorithm; Determine the current order sub-data corresponding to the sub-change rate not within the third confidence interval as significantly abnormal order sub-data; The significantly abnormal order sub-data is used as the abnormal current order sub-data, and the step of determining whether the current order sub-data is within the first confidence interval of the historical order sub-data is continued.
6. The method according to claim 1, characterized in that The method further comprises: Acquire a first change rate between the current order data and the historical order data and a second change rate between the current order sub-data not within the first confidence interval and the corresponding historical order sub-data; The explanatory variables corresponding to the first change rate, the second change rate and the current order data are displayed.
7. An order data analysis device, characterized in that: include: The data judgment module is used to judge whether the current order data is abnormal based on the historical order data; A data partitioning module, configured to partition the historical order data and the current order data according to each indicator combination if the current order data is abnormal, to obtain historical order sub-data and current order sub-data corresponding to each indicator combination; wherein the indicator combination includes: at least one sub-indicator corresponding to at least one business indicator; A traversal module, used for traversing the historical order sub-data and the current order sub-data corresponding to each of the indicator combinations, and applying the historical order sub-data to determine whether the current order sub-data is abnormal; Explanatory variable determination module, used to perform the following operations on abnormal current sub-order data: Determine whether the current order sub-data is within a first confidence interval of the historical order sub-data; wherein the first confidence interval is calculated for the historical order sub-data using an interval estimation algorithm; If it is not within the first confidence interval, the sub-indicator in the currently traversed indicator combination is added to the explanatory variable of the current order data, wherein the explanatory variable is used to characterize the cause of the data anomaly. If there are multiple current order sub-data that are not within the first confidence interval, the multiple explanatory variables corresponding to the current order data are ranked in importance according to the degree of deviation of each current order sub-data from the corresponding first confidence interval. The greater the degree of deviation of the current order sub-data from the first confidence interval, the more important the sub-indicator in the indicator combination corresponding to the current order sub-data.
8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of any method as claimed in claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Method and system for identifying an abnormal online taxi reservation order
CN106557955A