Payment order anomaly detection method based on standard deviation dynamic threshold

Through sliding window statistics and standard deviation calculation, dynamically set thresholds are solved, and the static thresholds in existing payment systems cannot adapt to changes are achieved, more accurate abnormal detection and flexible monitoring are achieved, and operational efficiency is improved.

CN119004335APending Publication Date: 2024-11-22E SURFING VIDEO MEDIA CO LTD
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202411199294.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the existing payment system, order data abnormal detection relies on static thresholds and cannot be adjusted dynamically, resulting in frequent false alarms or missed alarms, and lack of reasonable utilization of historical data and dynamic detection strategies.

Method used

Use historical data statistics in the form of sliding windows to calculate the average value and standard deviation, dynamically set the abnormal detection threshold for the number of payment orders and the payment completion ratio, detect the current data in real time and compare it with the set threshold, and trigger an abnormal alarm.

Benefits of technology

It improves the accuracy and flexibility of detection, can adapt to order quantity fluctuations, filter normal data fluctuations, accurately identify abnormalities, provide data-driven decision support, and optimize operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004335A_ABST
    Figure CN119004335A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software development, and provides a payment order anomaly detection method based on a standard deviation dynamic threshold, which comprises the following steps: S1, setting a basic historical data statistical dimension of a query alarm task, and adopting a sliding window form to trace order data and a payment completion proportion in a preset time period; s2, calculating an average value and a standard deviation of historical data in the same time period in the preset time period; s3, according to the average value and the standard deviation, dynamically setting an abnormal detection threshold value of the payment order quantity and the payment completion proportion; and S4, detecting the number of payment orders and the payment completion proportion in the current time period in real time, and comparing the number and the proportion with a set anomaly detection threshold value to judge whether an anomaly exists or not. According to the method, the threshold value of anomaly detection is dynamically adjusted by calculating the standard deviation of the historical data, so that the method can adapt to order quantity fluctuation conditions in different time periods, and the accuracy and flexibility of detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a payment order anomaly detection method based on a standard deviation dynamic threshold. Background Art

[0002] In existing payment systems, order data anomaly detection usually relies on preset static thresholds, which are set by operators based on experience and lack full utilization of historical data and dynamic adjustment mechanisms.

[0003] With the growth of business volume and changes in the payment environment, static thresholds are often difficult to adapt to the actual situation, resulting in frequent false positives or missed positives. In general payment systems, order data anomaly detection mainly relies on operators to plan the upper and lower thresholds in advance to trigger alarms. If you want to change the alarm trigger threshold or the alarm time segmentation granularity, you need to manually change the configuration. As for anomaly detection, there is actually a lack of reasonable calculation and utilization of historical data, a lack of dynamic detection strategies for historical data in the form of related sliding windows, and an inability to automatically compare horizontally to trigger specific alarm rules. Summary of the invention

[0004] In view of the above problems, the present invention provides a payment order anomaly detection method based on standard deviation dynamic threshold.

[0005] To solve the above problems, the technical solution adopted by the present invention is:

[0006] A payment order anomaly detection method based on standard deviation dynamic threshold includes the following steps:

[0007] S1. Set the basic historical data statistical dimensions of the query alarm task, using a sliding window to trace back the order data and payment completion ratio within the preset time period;

[0008] S2. Calculate the average value and standard deviation of the historical data in the same time period within the preset time period;

[0009] S3. Dynamically set anomaly detection thresholds for the number of payment orders and payment completion ratio based on the average value and standard deviation;

[0010] S4. Real-time detection of the number of payment orders and payment completion ratio in the current time period, and comparison with the set abnormality detection threshold to determine whether there is an abnormality;

[0011] S5. After comparing the number of payment orders and the payment completion ratio detected in real time with the set anomaly detection threshold, when the real-time data exceeds the set threshold, an anomaly alarm is triggered.

[0012] Preferably, in step S1, the preset time period is 10 natural days traced back, and the statistical dimensions are the order data and payment completion ratio in the same time period every day.

[0013] Preferably, in step S3, the abnormality detection threshold comprises an upper threshold and a lower threshold, which are obtained by adding or subtracting the standard deviation from the average value multiplied by a preset coefficient.

[0014] Preferably, the preset coefficient is 1.5, which is used to adjust the sensitivity of the threshold to meet the needs of different business scenarios.

[0015] Preferably, a timed task execution mechanism is also included to execute an anomaly detection task once at a preset time interval to achieve continuous monitoring of payment order data.

[0016] The beneficial effects of the present invention are:

[0017] 1. Dynamic adaptability: The present invention calculates the standard deviation of historical data and dynamically adjusts the threshold of anomaly detection, so that it can adapt to the fluctuation of order quantity in different time periods, thereby improving the accuracy and flexibility of detection.

[0018] 2. Improve the accuracy of anomaly detection: Using statistical methods to set thresholds by calculating the mean and standard deviation can filter out normal data fluctuations and more accurately identify abnormal order quantities and payment completion ratios.

[0019] 3. Data-driven decision-making: Through in-depth analysis of historical data, it provides strong support for business decisions, helps optimize order processing, adjust resource allocation, and improve overall operational efficiency.

[0020] 4. Wide range of application scenarios: The present invention can be applied to a variety of business scenarios and payment methods, and can perform anomaly detection through segmented dimensions to meet the needs of different business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0024] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined. In addition, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0025] Reference Figure 1 , a payment order anomaly detection method based on standard deviation dynamic threshold, comprising the following steps:

[0026] S1. Set the basic historical data statistical dimensions of the query alarm task, using a sliding window to trace back the order data and payment completion ratio within the preset time period;

[0027] S2. Calculate the average value and standard deviation of the historical data in the same time period within the preset time period;

[0028] S3. Dynamically set anomaly detection thresholds for the number of payment orders and payment completion ratio based on the average value and standard deviation;

[0029] S4. Real-time detection of the number of payment orders and payment completion ratio in the current time period, and comparison with the set abnormality detection threshold to determine whether there is an abnormality;

[0030] S5. After comparing the number of payment orders and the payment completion ratio detected in real time with the set anomaly detection threshold, when the real-time data exceeds the set threshold, an anomaly alarm is triggered.

[0031] Furthermore, in step S1, the preset time period is 10 natural days traced back, and the statistical dimensions are the order data and payment completion ratio in the same time period every day. In step S3, the anomaly detection threshold includes an upper threshold and a lower threshold, which are obtained by adding or subtracting the standard deviation from the average value multiplied by a preset coefficient. The preset coefficient is 1.5, which is used to adjust the sensitivity of the threshold to meet the needs of different business scenarios. It also includes a scheduled task execution mechanism, which executes an anomaly detection task at a preset time interval to achieve continuous monitoring of payment order data.

[0032] The design plan is as follows: Set the statistical dimension of the basic historical data of the query alarm task to trace back 10 natural days (in the form of a sliding window), that is, count the current time, trace back the order volume and payment completion ratio of the same time period 10 days ago. For example, if the current time is 5:05, trigger the query of related order data of the previous hour to see if an alarm is needed. First, calculate the payment order volume (OT) and payment order closed-loop volume, that is, the payment completion ratio OTR, between 04:00 and 05:00 (not included) on the same day. Then, based on the query of the current date Go back 10 dates, and find the payment order quantity and payment completion ratio at the same time point (04:00-05:00) on each date. For example, query the payment order quantity of the previous 10 natural days, and the payment order quantity in the same time period is HT_List = {10, 17, 20, 23, 9, 19, 11, 14, 10, 17}, and the payment completion ratios are HTR_List = {0.30, 0.47, 0.40, 0.43, 0.44, 0.44, 0.45, 0.39, 0.5, 0.35};

[0033] Then calculate the average values ​​of the historical data in the same time period queried in the first step: the average value of the order quantity HT_MEANVALUE, which is the cumulative sum of the values ​​of the loop HT_LIST and then divided by the number of data dimensions, that is, the size of HT_LIST 10; the average value of the payment completion ratio HTR_MEANVALUE = the cumulative sum of all values ​​of HTR_List and then divided by the size of HTR_List 10;

[0034] Then calculate the standard deviation of the two statistical indicators. When calculating the standard deviation, first calculate the square of the difference between each relevant data point and the average value in the same period of the above 10 natural days, and then take the square root of the average value of these square differences. This process involves the following steps:

[0035] (1) For each data point, calculate its difference from the mean (i.e., deviation);

[0036] (2) Square these differences;

[0037] (3) Calculate the average value of the squared values (i.e., variance);

[0038]

[0039] Where: xi represents the data point, μ represents the mean value, and n represents the number of data points;

[0040] (4) Finally, take the square root of the squared difference to obtain the standard deviation of the order placement quantity and the standard deviation of the payment completion quantity within a unit time;

[0041]

[0042] Calculate the standard deviation of the order placement completion payment ratio in the same way;

[0043] Based on past experience in handling abnormal data, we calculate the upper and lower critical thresholds of reasonable data respectively,

[0044] Upper abnormal critical value of order placement quantity: otUpperLimit = average value (HT_MEANVALUE) + standard deviation of order placement quantity * 1.5;

[0045] Lower abnormal critical value of order placement quantity: otLowerLimit = average value (HT_MEANVALUE) - standard deviation of order placement quantity * 1.5;

[0046] When the order placement quantity OT in the currently statistically period > otUpperLimit or OT < otLowerLimit, trigger an alarm for abnormal order placement quantity;

[0047] Calculate the alarm threshold of the payment completion ratio,

[0048] Upper alarm critical value otrUpperLimit = average value (HTR_MEANVALUE) + standard deviation of payment completion ratio * 1.5;

[0049] Lower alarm critical value otrLowerLimit = average value (HTR_MEANVALUE) - standard deviation of payment completion ratio * 1.5;

[0050] That is, when the payment completion ratio OTR in the currently statistically period > otrUpperLimit or OTR < otrLowerLimit, trigger an alarm for abnormal data of the payment completion ratio;

[0051] One business implementation based on this solution is the Tianyi UHD payment platform data anomaly detection solution. In the payment platform, it supports payment orders in various business scenarios, and supports users to choose various payment methods such as Alipay, WeChat, and YiPay to make payments, and then receive the payment success callback notification of the third-party payment completion. In the platform system, a related scheduled task will be started and executed every hour to detect the order data of the previous hour. By subdividing multiple business sources and multiple payment methods, the current data and historical quantities of the target time period are counted. Through the above designed method, the data is detected and the push alarm information is triggered based on multiple business dimensions.

[0052] To summarize the above, first, set the basic historical data statistical dimensions of the query alarm task, and use a sliding window to trace back the order data and payment completion ratio within 10 natural days; second, calculate the average and standard deviation of the historical data in the same time period within these 10 days; then, based on the calculated average and standard deviation, dynamically set the anomaly detection threshold of the payment order quantity and payment completion ratio, where the threshold is determined by adding the average value to the standard deviation and multiplying it by a preset coefficient (such as 1.5); finally, detect the payment order quantity and payment completion ratio in the current time period in real time, and compare them with the set anomaly detection threshold. Once the threshold range is exceeded, an anomaly alarm is triggered.

[0053] The present invention realizes dynamic adaptability, automatically adjusts the threshold value through the standard deviation algorithm, can flexibly respond to the fluctuation of the number of orders in different time periods, and improves the accuracy and flexibility of detection. Secondly, the method improves the accuracy of anomaly detection, adopts statistical principles, effectively filters normal data fluctuations, and more accurately identifies abnormal data. In addition, the present invention also realizes data-driven decision support, and provides a strong basis for business optimization and resource adjustment through in-depth analysis of historical data. Finally, the method has a wide range of application scenarios, and can be applied to a variety of business scenarios and payment methods to meet the needs of different business scenarios. In summary, the present invention has significant technical advantages and application value in the field of payment order anomaly detection.

[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A payment order anomaly detection method based on standard deviation dynamic threshold, characterized in that: The following steps are involved: S1. Set the basic historical data statistical dimensions of the query alarm task, using a sliding window to trace back the order data and payment completion ratio within the preset time period; S2. Calculate the average value and standard deviation of the historical data in the same time period within the preset time period; S3. Dynamically set anomaly detection thresholds for the number of payment orders and payment completion ratio based on the average value and standard deviation; S4. Real-time detection of the number of payment orders and payment completion ratio in the current time period, and comparison with the set abnormality detection threshold to determine whether there is an abnormality; S5. After comparing the number of payment orders and the payment completion ratio detected in real time with the set anomaly detection threshold, when the real-time data exceeds the set threshold, an anomaly alarm is triggered.

2. According to claim 1, a payment order anomaly detection method based on standard deviation dynamic threshold is characterized in that: In step S1, the preset time period is 10 natural days going back in time, and the statistical dimensions are the order data and payment completion ratio in the same time period every day.

3. The payment order anomaly detection method based on standard deviation dynamic threshold according to claim 1 is characterized in that: In step S3, the abnormality detection threshold includes an upper threshold and a lower threshold, which are obtained by adding or subtracting the standard deviation from the average value multiplied by a preset coefficient.

4. The payment order anomaly detection method based on standard deviation dynamic threshold according to claim 3 is characterized in that: The preset coefficient is 1.5, which is used to adjust the sensitivity of the threshold to meet the needs of different business scenarios.

5. The payment order anomaly detection method based on standard deviation dynamic threshold according to claim 1 is characterized in that: It also includes a scheduled task execution mechanism, which executes an anomaly detection task at a preset time interval to achieve continuous monitoring of payment order data.

Citation Information

Cited By

  • Payment method and device based on risk association model, and network system

    CN119313347A

  • Power amplifier output impedance anomaly detection method and system

    CN120044309A

  • Streaming computing task intelligent operation and maintenance method based on real-time monitoring

    CN120179506A

  • Transaction abnormity monitoring method and system based on big data fusion

    CN120851881A

  • A transaction anomaly monitoring method and system based on big data fusion

    CN120851881B