A method, device, equipment and storage medium for predicting data distribution
By using correction values in transaction data prediction to adjust the distribution interval of transaction data, the problem of changes in distribution intervals caused by special days is solved, the accuracy of transaction data prediction is improved and false alarms are reduced.
Patent Information
- Application Number
- CN202110861831.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-07-29
AI Technical Summary
The prior art fails to consider the distribution range changes that may be caused by special days when predicting the distribution of transaction data, resulting in frequent errors in the system and affecting the accuracy of transaction data prediction.
Correction values are determined based on the deviation between the actual transaction data in the current period and the predicted distribution interval, and these correction values are used to correct the transaction data distribution interval in the subsequent target period to improve the accuracy of prediction.
It effectively improves the accuracy of transaction data prediction, reduces abnormal alarms caused by misjudgment, and ensures the accuracy of transaction data.
Smart Images

Figure CN113537617B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and is particularly applicable to the financial field, and relates to a method, device, equipment and storage medium for predicting data distribution. Background Art
[0002] The demand for data prediction stems from the demand for alarms in operation and maintenance. For example, in a trading system, the predicted values such as the number of visits or total transaction amount at a certain point in time are used as judgment criteria to determine whether the actual value of the number of visits or total transaction amount at the corresponding time point exceeds the predicted value. When the actual value exceeds the predicted value, an alarm for abnormal data is issued to determine the abnormal data.
[0003] Since most transaction data changes in a cycle of one day, for example, the number of people eating between 11 and 12 o'clock every day is relatively concentrated, so the transaction volume in the payment software during this time period will increase. Most of the existing technologies obtain the mean and variance of historical transaction data in a certain time period, and predict the normal transaction data in the corresponding time period within the range of 3 times the standard deviation of the mean according to the normal distribution formula. For example, for the transaction volume between 11 and 12 o'clock every day in the payment software, the transaction volume from 11 to 12 o'clock in the historical transaction data is obtained, and then the mean and variance of the transaction volume are calculated, and the transaction volume from 11 to 12 o'clock is predicted to be within the range of 3 times the standard deviation of the mean as the distribution interval of normal transaction volume transaction data. If there is transaction volume transaction data that is not within the above range, it can be determined that the transaction volume transaction data is abnormal transaction data.
[0004] However, the prior art does not consider that some special days may cause changes in the distribution range of normal transaction data. For example, on the Double Eleven Day every year, the transaction volume in each time period will be greater than that of the previous trading day. If the normal transaction data distribution range is still predicted based on historical transaction data, the system may continue to report errors, but in fact these transaction data are not abnormal transaction data, which will lead to errors in the judgment of abnormal transaction data and inaccurate transaction data prediction results.
[0005] Therefore, there is an urgent need for a method for predicting data distribution to improve the accuracy of transaction data prediction results. Summary of the invention
[0006] The purpose of the embodiments of this article is to provide a method, apparatus, device and storage medium for predicting data distribution, which can be applied in the financial field, especially in banking scenarios, but not limited to banking scenarios, to improve the accuracy of transaction data prediction.
[0007] To achieve the above objectives, on the one hand, an embodiment of this document provides a method for predicting data distribution, including:
[0008] Determine the correction value based on the deviation between the actual transaction data of the current period and the distribution interval of the transaction data of the period;
[0009] Predicting the transaction data distribution interval of the subsequent target period of the current period based on the historical transaction data;
[0010] Using the correction value to correct the transaction data distribution interval of the subsequent target period of the current period;
[0011] The modified distribution interval of transaction data in the target time period is used to issue an abnormality alarm.
[0012] Preferably, determining the correction value according to the deviation between the actual transaction data of the current period and the distribution interval of the transaction data of the period includes:
[0013] Compare the actual transaction data of the current period with a plurality of transaction data distribution intervals corresponding to the period, and determine the number of anomalies corresponding to each transaction data distribution interval of the current period;
[0014] Compare the multiple anomaly numbers to determine the transaction data distribution interval corresponding to the minimum anomaly number in the current period;
[0015] The correction value is determined based on the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period.
[0016] Preferably, the multiple transaction data distribution intervals are determined by the following steps:
[0017] Predicting a distribution interval of transaction data for the current period based on historical transaction data corresponding to the current period;
[0018] Multiple groups of corrections are performed by modifying the endpoint values of the transaction data distribution interval of the current period multiple times, and multiple transaction data distribution intervals corresponding to the current period are obtained after correction.
[0019] Preferably, determining the correction value according to the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period includes:
[0020] Determining a predicted mean value of the transaction data corresponding to the current period according to a distribution interval of the transaction data corresponding to the minimum number of anomalies in the current period;
[0021] Determine the actual average of the transaction data corresponding to the current period according to the actual transaction data of the current period;
[0022] determining a difference between the actual mean and the predicted mean;
[0023] Determine a first adjustment value according to a product of the difference and a first parameter corresponding to the difference, wherein the first parameter is any value within a set value range;
[0024] The correction value is determined according to the first adjustment value.
[0025] Preferably, determining the correction value according to the first adjustment value includes:
[0026] Selecting multiple time points within the current period;
[0027] Determining a second adjustment value according to the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period;
[0028] Selecting a previous time point and a next time point within the current time period, wherein the moment corresponding to the previous time point is before the moment corresponding to the next time point;
[0029] Determine a third adjustment value according to the actual transaction data corresponding to the previous time point, the actual transaction data corresponding to the next time point, and the predicted mean of the corresponding transaction data in the current time period;
[0030] The correction value is determined after the first adjustment value is adjusted by the second adjustment value and the third adjustment value.
[0031] Preferably, determining the second adjustment value according to the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period includes:
[0032] Determine the sum of the differences between the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period;
[0033] A second adjustment value is determined according to the product of the sum of the differences and a second parameter corresponding to the sum of the differences, wherein the second parameter is any value within a set value range.
[0034] Preferably, determining the third adjustment value according to the actual transaction data corresponding to the previous time point, the actual transaction data corresponding to the later time point, and the predicted mean of the corresponding transaction data in the current period includes:
[0035] Determine the difference between the actual transaction data corresponding to the previous time point and the predicted mean of the corresponding transaction data in the current time period as the previous difference;
[0036] Determine the difference between the actual transaction data corresponding to the later time point and the predicted mean of the corresponding transaction data in the current period as the later difference;
[0037] The third adjustment value is determined according to the product of the growth rate of the rear difference relative to the front difference and a third parameter corresponding to the growth rate, wherein the third parameter is any value within a set value range.
[0038] Preferably, the determining the correction value after adjusting the first adjustment value by using the second adjustment value and the third adjustment value comprises:
[0039] The correction value is determined after the first adjustment value is adjusted by the sum of the second adjustment value and the third adjustment value.
[0040] Preferably, the method of using the modified distribution interval of the transaction data in the target time period to issue an abnormality alarm includes:
[0041] Determining whether the actual transaction data of the target period is within the transaction data distribution interval of the target period;
[0042] If the actual transaction data of the target period is not within the transaction data distribution interval of the target period, an abnormality alarm is issued.
[0043] On the other hand, an embodiment of the present invention provides a device for predicting data distribution, the device comprising:
[0044] Correction value determination module: determines the correction value according to the deviation between the actual transaction data of the current period and the distribution interval of the transaction data of the period;
[0045] Interval determination module: predicting the transaction data distribution interval of the subsequent target period of the current period based on the historical transaction data;
[0046] An interval correction module: a module for correcting the transaction data distribution interval of a subsequent target period of the current period using the correction value;
[0047] Abnormal alarm module: uses the modified distribution interval of transaction data in the target time period to make abnormal alarm.
[0048] On the other hand, the embodiments of the present invention further provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the instructions of any one of the above methods are executed.
[0049] On the other hand, the embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor of a computer device, the computer program executes instructions of any one of the above-described methods.
[0050] It can be seen from the technical solution provided in the above embodiments of the present invention that the embodiments of the present invention correct the transaction data distribution interval of the subsequent target time period by using the correction value obtained by the deviation. The transaction data distribution interval of the subsequent time period is predicted by the historical transaction data, but due to the occurrence of certain special days, these special days will be different from the usual historical transaction data, and there may be special situations such as a sudden increase or decrease in transaction data. After correcting the transaction data distribution interval of the target time period by the correction value, the accuracy of the transaction data prediction results can be improved.
[0051] In order to make the above and other purposes, features and advantages of this article more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic flow chart of a method for predicting data distribution provided in an embodiment of this invention is shown;
[0054] Figure 2 A schematic diagram of a process for determining a correction value provided in an embodiment of the present invention is shown;
[0055] Figure 3 A schematic diagram showing a flow chart of a method for determining distribution intervals of multiple transaction data provided in an embodiment of this document;
[0056] Figure 4 A detailed schematic diagram of a process for determining a correction value provided in an embodiment of the present invention is shown;
[0057] Figure 5 A schematic diagram of a process for determining a correction value according to a first adjustment value provided in an embodiment of the present invention is shown;
[0058] Figure 6 A schematic diagram of a process for determining a second adjustment value provided in an embodiment of this invention is shown;
[0059] Figure 7 A schematic diagram of a process for determining a third adjustment value provided in an embodiment of this document is shown;
[0060] Figure 8 A schematic diagram of a process for performing an abnormal alarm provided in an embodiment of this invention is shown;
[0061] Fig. 9A schematic diagram of the module structure of a device for predicting data distribution provided in an embodiment of this invention is shown;
[0062] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of this invention is shown.
[0063] Description of the accompanying symbols:
[0064] 100. Correction value determination module;
[0065] 200. Interval determination module;
[0066] 300, interval correction module;
[0067] 400, abnormal alarm module;
[0068] 1002. Computer equipment;
[0069] 1004. Processor;
[0070] 1006. Memory;
[0071] 1008. Driving mechanism;
[0072] 1010, input / output module;
[0073] 1012. Input device;
[0074] 1014. Output device;
[0075] 1016. Presentation equipment;
[0076] 1018. Graphical user interface;
[0077] 1020. Network interface;
[0078] 1022. Communication link;
[0079] 1024. Communication bus. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of this article to clearly and completely describe the technical solutions in the embodiments of this article. Obviously, the described embodiments are only part of the embodiments of this article, not all of the embodiments. Based on the embodiments of this article, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this article.
[0081] Since most transaction data changes in a cycle of one day, for example, the number of people eating between 11 and 12 o'clock every day is relatively concentrated, so the transaction volume in the payment software during this time period will increase. Most of the existing technologies obtain the mean and variance of historical transaction data in a certain time period, and predict the normal transaction data in the corresponding time period within the range of 3 times the standard deviation of the mean according to the normal distribution formula. For example, for the transaction volume between 11 and 12 o'clock every day in the payment software, the transaction volume from 11 to 12 o'clock in the historical transaction data is obtained, and then the mean and variance of the transaction volume are calculated, and the transaction volume from 11 to 12 o'clock is predicted to be within the range of 3 times the standard deviation of the mean as the distribution interval of normal transaction volume transaction data. If there is transaction volume transaction data that is not within the above range, it can be determined that the transaction volume transaction data is abnormal transaction data.
[0082] However, the prior art does not consider that some special days may cause changes in the distribution range of normal transaction data. For example, on the Double Eleven Day every year, the transaction volume in each time period will be greater than that of the previous trading day. If the normal transaction data distribution range is still predicted based on historical transaction data, the system may continue to report errors, but in fact these transaction data are not abnormal transaction data, which will lead to errors in the judgment of abnormal transaction data and inaccurate transaction data prediction results.
[0083] In order to solve the above problems, the embodiments of this document provide a method for predicting data distribution. Figure 1 It is a schematic diagram of the steps of a method for predicting data distribution provided in the embodiments of this invention. This specification provides the method operation steps described in the embodiments or flowcharts, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiments or drawings or in parallel.
[0084] Reference Figure 1 , a method for predicting data distribution, comprising:
[0085] S101: determining a correction value according to a deviation between actual transaction data of the current period and a distribution interval of transaction data of the period;
[0086] S102: predicting a transaction data distribution interval of a subsequent target period of the current period based on historical transaction data;
[0087] S103: using the correction value to correct the transaction data distribution interval of the subsequent target period of the current period;
[0088] S104: Using the modified distribution interval of the transaction data in the target time period to issue an abnormality alarm.
[0089] The current period is a time period of the current period. The specific range of a time period is not specifically limited. It can be 30 minutes or 1 hour. The distribution range of transaction data in this period is obtained through prediction. The predicted range of possible distribution of transaction data in the current period is the distribution range of transaction data in this period. Since the predicted distribution range of transaction data may not be accurate enough, there may be a deviation between the actual transaction data and the predicted distribution range of transaction data. According to this deviation, the correction value can be determined.
[0090] Transaction data can be the transaction volume at a certain point in time or within a certain period of time, or the total transaction amount at a certain point in time or within a certain period of time. The meaning of transaction data varies according to actual needs, and this article does not limit the specific reference to transaction data.
[0091] Historical trading data refers to actual trading data before the current period, which can be actual trading data of the past two weeks or the past month. This article does not specify which historical period before the current period it is. The subsequent target period of the current period can be a subsequent target period that is continuous with the current period or a subsequent target period that is discontinuous with the current period. For example, if the current period is 7-8 o'clock, the subsequent period can be 8-9 o'clock or 9-10 o'clock. This article does not specify the continuity of the subsequent target period.
[0092] The method of predicting the distribution interval of transaction data in the target period based on historical transaction data can be predicted by the normal distribution method. Specifically, if you want to predict the distribution interval of transaction data from 7 to 8 o'clock today, you can take the transaction data from 7 to 8 o'clock every day in the past two weeks, and then calculate the mean and variance of these transaction data, and take the range of the mean plus / minus three times the standard deviation as the distribution interval of transaction data from 7 to 8 o'clock today. Of course, you can also take the range of the mean plus / minus two times the standard deviation as the distribution interval of transaction data from 7 to 8 o'clock today. The specific value can be determined according to the actual situation. Other methods can also be used to predict the distribution interval of transaction data in the target period based on historical transaction data. The specific method is not limited in this article.
[0093] The correction value obtained by the deviation is used to correct the distribution range of transaction data in the subsequent target period. The reason is that the distribution range of transaction data in the subsequent period is predicted by historical transaction data. However, due to the occurrence of certain special days, such as June 18 and November 11 every year, these special days will be different from the usual historical transaction data, and there may be special situations such as sudden increase or decrease in transaction data. In the face of these special situations, if the transaction data distribution range predicted by historical transaction data is still used, the actual transaction data will frequently be outside the predicted transaction data distribution range, which will cause the system to frequently report errors. This error is not caused by abnormality in the system, but simply caused by prediction errors. Therefore, it is necessary to correct the predicted transaction data distribution range.
[0094] The method of steps S101-S103 is as follows: According to the deviation between the actual transaction data from 7 to 8 o'clock on Double Eleven and the distribution range of the transaction data from 7 to 8 o'clock, a correction value is determined. The transaction data distribution range from 8 to 9 o'clock on Double Eleven is predicted using the historical transaction data of the past two weeks. Since there is a deviation between the distribution range of the transaction data from 7 to 8 o'clock on Double Eleven and the actual transaction data, the system frequently reports errors between 7 and 8 o'clock. The correction value can be determined based on this deviation, and then the predicted distribution range of the transaction data from 8 to 9 o'clock on Double Eleven can be corrected using the correction value, so that the corrected distribution range of the transaction data from 8 to 9 o'clock on Double Eleven is closer to the actual value. The corrected distribution range of the transaction data from 8 to 9 o'clock on Double Eleven is used for abnormal alarm, which can reduce the possibility of frequent system errors.
[0095] Reference Figure 2 In the embodiment of this article, the correction value is determined according to the deviation between the actual transaction data of the current period and the distribution interval of the transaction data of the period, including:
[0096] S1011: Compare the actual transaction data of the current period with a plurality of transaction data distribution intervals corresponding to the period, and determine the number of anomalies corresponding to each transaction data distribution interval of the current period;
[0097] S1012: Compare the multiple anomaly numbers to determine the transaction data distribution interval corresponding to the minimum anomaly number in the current period;
[0098] S1013: Determine a correction value according to the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period.
[0099] There are multiple settings for the transaction data distribution interval of the current period. The purpose of multiple settings can be achieved through multiple predictions, or the predicted transaction data distribution interval can be adjusted multiple times through one prediction to achieve the purpose of multiple settings. This article does not limit the specific method of multiple settings.
[0100] Since multiple transaction data distribution intervals are predicted, there will be multiple anomalies when the actual data is compared with multiple transaction data distribution intervals. Each anomaly number corresponds to a transaction data distribution interval, where the anomaly number indicates the number of actual transaction data in the actual transaction data that is not within the predicted transaction data distribution interval. It is generally recognized that the transaction distribution interval corresponding to the minimum anomaly number is the transaction data distribution interval with the most accurate prediction. This can select the transaction data distribution interval with the most accurate prediction from multiple transaction data distribution intervals. The correction value is determined based on the deviation between the transaction data distribution interval with the most accurate prediction and the actual transaction data. Since the correction value is used to correct the transaction data distribution interval of the target period, the more accurate the correction value is, the better. The correction value determined by predicting the most accurate transaction data distribution interval makes the correction value more accurate, so that the correction effect of the transaction data distribution interval of the subsequent target period is better and more accurate.
[0101] Reference Figure 3 Furthermore, the plurality of transaction data distribution intervals are determined by the following steps:
[0102] S201: predicting a distribution interval of transaction data in the current period according to historical transaction data corresponding to the current period;
[0103] S202: performing multiple groups of corrections by modifying the endpoint values of the transaction data distribution interval of the current period multiple times, and obtaining multiple transaction data distribution intervals corresponding to the current period after the corrections.
[0104] According to the historical transaction data corresponding to the current period, prediction can be made through the normal distribution method to predict the distribution range of the transaction data in the current period. It can also be predicted through other methods. The specific prediction method is not limited in this article.
[0105] After predicting the distribution interval of transaction data in the current period, a fixed range distribution interval is obtained. For example, if the transaction volume between 7 and 8 o'clock today is predicted to be between 100 and 200, multiple sets of corrections will be made to the endpoint values for the predicted distribution interval of transaction data. The endpoint values include the left endpoint value and the right endpoint value, which are 100 (left endpoint value) and 200 (right endpoint value) in the above example. The purpose of multiple sets of corrections is to obtain multiple transaction data distribution intervals through multiple sets of corrections. Multiple transaction data distribution intervals are closer to the actual transaction data, thereby improving the accuracy of the prediction. The basis for multiple sets of corrections is the distribution of actual transaction data on the day of the current period. If the actual transaction on that day suddenly increases or decreases, the distribution of the actual transaction data will be different from the predicted distribution interval of the transaction data. Therefore, multiple sets of corrections are still made based on the distribution of the actual transaction data on that day. It is well known to those skilled in the art that, assuming that the current time period is 7-8 o'clock today, the distribution of actual transaction data after 8 o'clock cannot be obtained. Therefore, the basis for multiple groups of corrections in this article is specifically the distribution of actual transaction data in the time period before the current time period, and this time period must be on the same day as the current time period, for example, the distribution of actual transaction data before 7 o'clock today, which is the basis for making multiple groups of corrections.
[0106] Reference Figure 4 In the embodiment of this article, the correction value is determined according to the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period, including:
[0107] S1013a: Determine a predicted mean value of the transaction data corresponding to the current period according to the transaction data distribution interval corresponding to the minimum number of anomalies in the current period;
[0108] S1013b: Determine the actual average of the transaction data corresponding to the current period according to the actual transaction data of the current period;
[0109] S1013c: Determine the difference between the actual mean and the predicted mean;
[0110] S1013d: Determine a first adjustment value according to a product of the difference and a first parameter corresponding to the difference, wherein the first parameter is any value within a set value range;
[0111] S1013e: Determine the correction value according to the first adjustment value.
[0112] The predicted mean value of the transaction data corresponding to the current period is a value used to reflect the overall situation of the transaction data in the current period, which can represent the transaction data in the current period. For the transaction data distribution interval corresponding to the minimum number of anomalies in the current period, it is a certain interval range. For example, if the transaction volume between 7 and 8 o'clock today is predicted to be between 100 and 200, the corresponding predicted mean value is simply the sum of the left endpoint value and the right endpoint value divided by 2, which is 150. Then 150 is the predicted mean value of the transaction volume between 7 and 8 o'clock today.
[0113] Then we get the actual trading data from 7 to 8 o'clock today. There are several actual trading data, for example, the intraday trading volume at 7:01 is 102, the intraday trading volume at 7:05 is 110, the intraday trading volume at 7:45 is 187, and so on. We average several actual trading data and get the actual average from 7 to 8 o'clock, which is assumed to be 154.
[0114] Next, determine the difference between the actual mean and the predicted mean, which is 4.
[0115] Finally, the first adjustment value is determined according to the product of the difference and the first parameter, and the correction value is determined according to the first adjustment value. The first parameter can be any value within the set value range, and the set value range can be determined as -10-10, -5-5, etc. according to actual needs. This article does not specifically limit the set value range. The first parameter is a random number within the set value range.
[0116] Preferably, in the embodiments of this article, multiple first parameters can be selected, and then the product of the difference and the first parameter also includes multiple. For example, for a difference of 4, the first parameter randomly selects 2, 0.5, and 1, then the product of the difference and the first parameter includes 8, 2, and 4, and the first adjustment value includes 8, 2, and 4. The purpose of selecting multiple first parameters is to improve the accuracy of the first adjustment value, and then improve the accuracy of the correction value. The correction value is used to determine the correction value and then correct the predicted transaction data distribution interval. Therefore, the higher the accuracy of the first adjustment value, the closer the corrected transaction data distribution interval is to the actual transaction data, and selecting multiple first parameters can obtain multiple first adjustment values. The more the number of first adjustment values, the higher the possibility of approaching the most accurate correction, and the higher the accuracy of the correction.
[0117] Reference Figure 5 Further, determining the correction value according to the first adjustment value includes:
[0118] S301: Select multiple time points within the current period;
[0119] S302: Determine a second adjustment value according to the actual transaction data at the multiple time points and the predicted mean value of the corresponding transaction data in the current period;
[0120] S303: selecting a previous time point and a next time point in the current time period, wherein the moment corresponding to the previous time point is before the moment corresponding to the next time point;
[0121] S304: determining a third adjustment value according to the actual transaction data corresponding to the previous time point, the actual transaction data corresponding to the next time point, and the predicted mean of the corresponding transaction data in the current period;
[0122] S305: After adjusting the first adjustment value by using the second adjustment value and the third adjustment value, determine the correction value.
[0123] In order to further improve the accuracy of the correction value, multiple time points within the current time period can be selected. For example, in the current time period of 7-8 o'clock today, multiple time points between 7 and 8 o'clock can be selected. Preferably, multiple time points closest to the subsequent target time period can be selected. If the subsequent target time period is 8-9 o'clock, multiple time points corresponding to the minute from 7:59 to 8 o'clock can be selected. The reason is that the closer the time point is to the subsequent target time period, the more representative it is, and the more it can reflect the data characteristics of the subsequent target time period.
[0124] In addition, you can select a before time point and a after time point in the current time period. For example, in the current time period of 7-8 o'clock today, a before time point and a after time point are selected from 7-8 o'clock. Preferably, you can select a before time point and a after time point closest to the subsequent target time period. If the subsequent target time period is 8-9 o'clock, you can select 7:55 as the before time point and 8 o'clock as the after time point. The reason is as above. The closer the time point is to the subsequent target time period, the more representative it is, and the more it can reflect the data characteristics of the subsequent target time period.
[0125] The second adjustment value and the third adjustment value can be determined through the above steps. By adjusting the first adjustment value through the second adjustment value and the third adjustment value, the accuracy of the correction value can be improved, thereby determining a correction value with higher accuracy.
[0126] Reference Figure 6 Preferably, the determining of the second adjustment value according to the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period includes:
[0127] S3021: Determine the sum of the differences between the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period;
[0128] S3022: Determine a second adjustment value according to the sum of the differences and the product of a second parameter corresponding to the sum of the differences, wherein the second parameter is any value within a set value range.
[0129] Specifically, for example, the predicted mean value of the corresponding transaction data in the current period is 150, and the actual transaction data at multiple transaction time points are 154, 152, 149, etc., then the sum of the differences is 5.
[0130] The second parameter can be any value within the set numerical range. The set numerical range can be determined as -10-10, -5-5, etc. according to actual needs. This article does not make any specific limitation on the set numerical range. The second parameter is a random number within the set numerical range.
[0131] Preferably, multiple second parameters can be selected corresponding to the first parameters, and the number of second parameters can be equal to the number of first parameters, so that there are multiple products of the sum of the differences and the second parameters, and there are multiple second adjustment values, each of which corresponds to a first adjustment value, and the first adjustment value is adjusted.
[0132] Reference Figure 7 Preferably, determining the third adjustment value according to the actual transaction data corresponding to the previous time point, the actual transaction data corresponding to the next time point, and the predicted mean of the corresponding transaction data in the current period includes:
[0133] S3041: Determine the difference between the actual transaction data corresponding to the previous time point and the predicted mean value of the corresponding transaction data in the current time period as the previous difference;
[0134] S3042: Determine the difference between the actual transaction data corresponding to the later time point and the predicted mean value of the corresponding transaction data in the current period as the later difference;
[0135] S3043: Determine a third adjustment value according to the product of the growth rate of the rear difference relative to the front difference and a third parameter corresponding to the growth rate, wherein the third parameter is any value within a set value range.
[0136] Specifically, for example, the predicted mean of the corresponding transaction data in the current time period is 150, the actual transaction data corresponding to the previous time point is 155, the previous difference is 5, the actual transaction data corresponding to the later time point is 168, the later difference is 18, the previous difference and the later difference are 5 minutes apart, and the growth rate of the later difference relative to the previous difference is the difference between the later difference and the previous interpolation value divided by 5 minutes, and the growth rate is 2.6 / minute.
[0137] The third parameter can be any value within the set numerical range. The set numerical range can be determined as -10-10, -5-5, etc. according to actual needs. This article does not specifically limit the set numerical range. The third parameter is a random number within the set numerical range.
[0138] Preferably, multiple third parameters can be selected corresponding to the first parameters, the number of third parameters can be equal to the number of first parameters, there are multiple products of the growth rate and the third parameter, there are multiple third adjustment values, each third adjustment value corresponds to a first adjustment value, and the first adjustment value is adjusted.
[0139] Further, the determining the correction value after adjusting the first adjustment value by the second adjustment value and the third adjustment value includes:
[0140] The correction value is determined after the first adjustment value is adjusted by the sum of the second adjustment value and the third adjustment value.
[0141] Preferably, for multiple first adjustment values, each first adjustment value has a corresponding second adjustment value and a third adjustment value which are used to adjust the first adjustment value. The adjusted first adjustment value is the correction value. That is, multiple correction values are set, and the transaction data distribution interval of the subsequent target time period can be corrected by multiple correction values.
[0142] Furthermore, when the transaction data distribution interval of the subsequent target period is corrected by the correction value, the endpoint value of the transaction data distribution interval of the target period is added to the correction value to obtain a new endpoint value, and the corrected transaction data distribution interval is determined according to the new endpoint value. Assuming that the subsequent period is 8-9 o'clock, the transaction data distribution interval of 8-9 o'clock obtained by historical transaction data prediction is that the transaction volume is between 200-300. Preferably, there can be multiple correction values, and the multiple correction values may be 4, 7, and 9. Taking the correction value of 4 as an example, the new endpoint values obtained are 204 and 304, and the corrected transaction data distribution interval is 204-304. Then the multiple corrected transaction data distribution intervals are 204-304; 207-307; 209-309.
[0143] Furthermore, for multiple revised trading data distribution intervals between 8 and 9 o'clock, the actual trading data between 8 and 9 o'clock can be continuously obtained, and the correction value can be determined according to the deviation between the actual trading data and the trading data distribution interval, and the trading data distribution interval of the subsequent target period, such as 9-10 o'clock, can be corrected. The whole process can be iterated cyclically, taking one period as a unit, and predicting and correcting the trading data distribution interval of the subsequent period one by one.
[0144] Preferably, a threshold value of the number of anomalies can be set, wherein the number of anomalies represents the number of actual transaction data that are not within the modified transaction data distribution interval in the corresponding time period. For the modified transaction data distribution interval with anomaly number less than the threshold, the corresponding correction value is used as the final correction value, and the loop iteration process is exited. Assuming that the threshold value is 5, for multiple modified transaction data distribution intervals 204-304; 207-307; 209-309 between 8 and 9 o'clock, when comparing the actual transaction data from 8 to 9 o'clock with multiple modified transaction data distribution intervals, it is assumed that the distribution intervals 204-304; 207-307; 209-309 correspond to 9, 7, and 4 anomalies respectively, wherein the correction accuracy of the distribution interval 209-309 is higher and less than the threshold. Then the correction value corresponding to the distribution interval can be determined as the final correction value, and the loop iteration process is exited. The transaction data distribution intervals of all subsequent time periods are corrected by the final correction value.
[0145] Of course, in the process of correcting the transaction data distribution interval of all subsequent time periods through the final correction value, the operation and maintenance personnel can also follow up the number of anomalies in each subsequent time period in real time, and judge the specific circumstances corresponding to the anomalies in each time period to determine the applicability of the final correction value.
[0146] Reference Figure 8 In the embodiment of this article, the abnormal alarm is performed by using the modified distribution interval of the transaction data in the target time period, including:
[0147] S1041: Determine whether the actual transaction data of the target period is within the transaction data distribution interval of the target period;
[0148] S1042: If the actual transaction data of the target period is not within the transaction data distribution interval of the target period, an abnormality alarm is issued.
[0149] Assume that the distribution range of transaction data in the target period after correction from 8 to 9 o'clock today is between 209 and 309 transaction volumes, but there is actual transaction data with a transaction volume of 400 in the actual transaction data from 8 to 9 o'clock. Since the actual transaction data is not between 209 and 309, an abnormal alarm will be issued.
[0150] Based on the above-described method for predicting data distribution, the embodiments of this article also provide a device for predicting data distribution. The device may include a system (including a distributed system), software (application), module, component, server, client, etc. using the method described in the embodiments of this article and a device combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of this article is as described in the following embodiments. Since the implementation scheme and method for solving the problem of the device are similar, the implementation of the specific device in the embodiments of this article can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0151] Specifically, Fig. 9 is a schematic diagram of a module structure of an embodiment of a device for predicting data distribution provided in an embodiment of this invention, with reference to Fig. 9 As shown, an apparatus for predicting data distribution provided in an embodiment of the present invention includes: a correction value determination module 100, an interval determination module 200, an interval correction module 300, and an abnormal alarm module 400.
[0152] Correction value determination module 100: determines a correction value according to a deviation between the actual transaction data of the current period and the distribution interval of the transaction data of the period;
[0153] The interval determination module 200: predicts the transaction data distribution interval of the subsequent target period of the current period according to the historical transaction data;
[0154] The interval correction module 300 is used to correct the transaction data distribution interval of the subsequent target period of the current period by using the correction value;
[0155] Abnormal alarm module 400: uses the modified distribution interval of transaction data in the target time period to make abnormal alarm.
[0156] Reference Fig.10As shown, based on the above-mentioned method for predicting data distribution, a computer device 1002 is also provided in an embodiment of the present invention, wherein the above-mentioned method is run on the computer device 1002. The computer device 1002 may include one or more processors 1004, such as one or more central processing units (CPUs) or graphics processing units (GPUs), and each processing unit may implement one or more hardware threads. The computer device 1002 may also include any memory 1006, which is used to store any kind of information such as code, settings, transaction data, etc. In a specific embodiment, the computer program on the memory 1006 and can be run on the processor 1004, when the computer program is run by the processor 1004, the instructions according to the above method can be executed. Non-limitingly, for example, the memory 1006 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 1002. In one embodiment, when the processor 1004 executes the associated instructions stored in any memory or combination of memories, the computer device 1002 can perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0157] The computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via input device 1012) and for providing various outputs (via output device 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface 1018 (GUI). In other embodiments, the input / output module 1010 (I / O), input device 1012, and output device 1014 may not be included, and the computer device 1002 may be used as a computer device in a network. The computer device 1002 may also include one or more network interfaces 1020 for exchanging transaction data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0158] The communication link 1022 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0159] Corresponds to Figure 1-Figure 8 The method in this article also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0160] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 8 The method shown.
[0161] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes 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 document.
[0162] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0163] Those of ordinary skill 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, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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 to be beyond the scope of this article.
[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0165] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0166] The units described as separate components may or may not be physically separated, and the components shown as units 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 embodiments of this article.
[0167] In addition, each functional unit in each embodiment of this invention 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. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0168] 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 technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0169] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.
Claims
1. A method for predicting data distribution, characterized in that: include: Determine the difference between the actual mean and the predicted mean of the transaction data corresponding to the current period; Determine a first adjustment value according to a product of the difference and a first parameter corresponding to the difference, wherein the first parameter is any value within a set value range; Selecting multiple time points within the current period; Determine the sum of the differences between the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data in the current period; Determine a second adjustment value according to the product of the sum of the differences and a second parameter corresponding to the sum of the differences, wherein the second parameter is any value within a set value range; Selecting a previous time point and a next time point within the current time period, wherein the moment corresponding to the previous time point is before the moment corresponding to the next time point; Determine the difference between the actual transaction data corresponding to the previous time point and the predicted mean of the corresponding transaction data in the current time period as the previous difference; Determine the difference between the actual transaction data corresponding to the later time point and the predicted mean of the corresponding transaction data in the current period as the later difference; Determine a third adjustment value according to the product of the growth rate of the rear difference relative to the front difference and a third parameter corresponding to the growth rate, wherein the third parameter is any value within a set value range; After adjusting the first adjustment value by using the second adjustment value and the third adjustment value, a correction value is determined; Predicting the transaction data distribution interval of the subsequent target period of the current period based on the historical transaction data; Using the correction value to correct the transaction data distribution interval of the subsequent target period of the current period; The modified distribution interval of transaction data in the target time period is used to issue an abnormality alarm.
2. The method for predicting data distribution according to claim 1, characterized in that: The determining of the correction value comprises: Comparing the actual transaction data of the current period with a plurality of transaction data distribution intervals corresponding to the period, and determining the number of anomalies corresponding to each transaction data distribution interval of the current period; Compare the multiple anomaly numbers to determine the transaction data distribution interval corresponding to the minimum anomaly number in the current period; The correction value is determined based on the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period.
3. The method for predicting data distribution according to claim 2, characterized in that: The multiple transaction data distribution intervals are determined by the following steps: Predicting a distribution interval of transaction data for the current period based on historical transaction data corresponding to the current period; Multiple groups of corrections are performed by modifying the endpoint values of the transaction data distribution interval of the current period multiple times, and multiple transaction data distribution intervals corresponding to the current period are obtained after correction.
4. The method for predicting data distribution according to claim 2, characterized in that: The step of determining the correction value according to the deviation between the actual transaction data of the current period and the transaction data distribution interval corresponding to the minimum number of anomalies in the period includes: Determining a predicted mean value of the transaction data corresponding to the current period according to a distribution interval of the transaction data corresponding to the minimum number of anomalies in the current period; According to the actual transaction data of the current period, an actual average value of the transaction data corresponding to the current period is determined.
5. The method for predicting data distribution according to claim 1, characterized in that: The step of determining the correction value after adjusting the first adjustment value by using the second adjustment value and the third adjustment value includes: The correction value is determined after the first adjustment value is adjusted by the sum of the second adjustment value and the third adjustment value.
6. The method for predicting data distribution according to claim 1, characterized in that: The using the modified distribution interval of the transaction data in the target time period to issue an abnormality alarm includes: Determining whether the actual transaction data of the target period is within the transaction data distribution interval of the target period; If the actual transaction data of the target period is not within the transaction data distribution interval of the target period, an abnormality alarm is issued.
7. A device for predicting data distribution, characterized in that: The device comprises: Correction value determination module: determine the difference between the actual mean and the predicted mean of the transaction data corresponding to the current period; determine the first adjustment value according to the product of the difference and the first parameter corresponding to the difference, wherein the first parameter is any value within the set value range; select multiple time points within the current period; determine the sum of the differences between the actual transaction data at the multiple time points and the predicted mean of the corresponding transaction data within the current period; determine the second adjustment value according to the product of the sum of the differences and the second parameter corresponding to the sum of the differences, wherein the second parameter is any value within the set value range; select a previous time point and a later time point within the current period point, wherein the moment corresponding to the previous time point is before the moment corresponding to the next time point; determining the difference between the actual transaction data corresponding to the previous time point and the predicted mean value of the corresponding transaction data in the current period as the previous difference; determining the difference between the actual transaction data corresponding to the next time point and the predicted mean value of the corresponding transaction data in the current period as the next difference; determining a third adjustment value according to the product of the growth rate of the next difference relative to the previous difference and a third parameter corresponding to the growth rate, wherein the third parameter is any value within a set value range; determining a correction value after adjusting the first adjustment value by the second adjustment value and the third adjustment value; Interval determination module: predicting the transaction data distribution interval of the subsequent target period of the current period based on the historical transaction data; An interval correction module: a module for correcting the transaction data distribution interval of a subsequent target period of the current period using the correction value; Abnormal alarm module: uses the modified distribution interval of transaction data in the target time period to make abnormal alarm.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data prediction method and electronic device
CN105095646A
Service volume monitoring method and device
CN113159463A