Transaction Loss Detection Method and Device

By smoothing the data of abnormal transaction rate data in transaction loss detection, the problem of low accuracy of transaction loss detection in the prior art is solved, and a more accurate transaction loss judgment is achieved.

CN115131152BActive Publication Date: 2025-05-30INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210861813.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2025-05-30
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

The accuracy of transaction loss detection in the prior art is not high, mainly because abnormal transaction rate data affects the prediction threshold, resulting in misjudgment.

Method used

By smoothing the actual transaction rate value at the first n times, the outliers are corrected to be within the preset range, and the transaction loss determination threshold is determined based on the smoothed transaction rate value.

Benefits of technology

It improves the accuracy of transaction loss detection, avoids misjudgment caused by outliers, and ensures the reliability of transaction status judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131152B_ABST
    Figure CN115131152B_ABST
Patent Text Reader

Abstract

The present application provides a transaction loss detection method and device, which can be used in the field of financial technology or other related fields. In the technical solution provided by the present application, data smoothing processing is performed on n actual transaction rates before the first moment to obtain n transaction rate smoothed values, and a transaction loss determination threshold at the first moment is determined based on these n transaction rate smoothed values. The method of the present application can prevent the problem that the transaction loss determination threshold is too large due to a sudden increase in the transaction rate, and can improve the detection accuracy of transaction losses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technologies, and in particular, to a method and device for detecting transaction losses. Background Art

[0002] In a business system, due to some failures, the system may be in a transaction loss state for a long time, affecting the transaction success rate. Therefore, it is necessary to detect the transaction state of the system so that when the system has transaction losses, the failures can be processed in a timely manner to improve the transaction success rate.

[0003] A method for detecting transaction losses may include: obtaining the actual transaction rate at a first moment and the actual transaction rates within a period of time before the first moment; inputting the actual transaction rates within the period of time into a prediction model to obtain a predicted lower limit value, and using the predicted lower limit value as the transaction rate prediction threshold at the first moment; if the actual transaction rate at the first moment is lower than the transaction rate prediction threshold, it is determined that there is a transaction loss at the first moment.

[0004] However, those skilled in the art found during use that when using this method to detect whether there are transaction losses in the system, the detection accuracy of transaction losses is not high. Summary of the Invention

[0005] This application provides a method and device for detecting transaction losses to solve the problem of low detection accuracy of transaction losses in the prior art.

[0006] In a first aspect, this application provides a method for detecting transaction losses, including: obtaining the actual value of the first transaction rate of a business system at a first moment and the actual values of the transaction rates of the business system at each of the previous n moments before the first moment, where n is a positive integer; performing data smoothing processing on the n actual values of the transaction rates corresponding to the previous n moments one by one to obtain n smoothed values of the transaction rates corresponding to the previous n moments one by one; determining a transaction loss determination threshold of the business system at the first moment based on the n smoothed values of the transaction rates; if the actual value of the first transaction rate is lower than the transaction loss determination threshold, it is determined that the transaction state of the business system at the first moment is a transaction loss.

[0007] In this method, performing data smoothing processing on the n actual values of the transaction rates corresponding to the previous n moments one by one means correcting the outliers outside a preset range among the n actual values of the transaction rates corresponding to the previous n moments one by one, so that these outliers can be within the preset range. That is to say, correcting the higher or lower transaction rates among the n actual values of the transaction rates, so that the higher or lower transaction rates among the n actual values of the transaction rates approach the normal range to remove the outliers among the n actual values of the transaction rates.

[0008] In this method, the trading loss determination threshold is determined based on n smoothed trading rate values. Since the trading rates in these n smoothed trading rate values are all within a preset range, this can avoid the problem that the obtained trading loss determination threshold is too large due to outliers in the actual values of the n trading rates, thereby improving the accuracy of detecting trading losses.

[0009] In some possible implementation manners, determining the trading loss determination threshold of the service system at the first moment based on the n smoothed trading rate values includes: obtaining a first trading rate prediction value of the service system at the first moment and trading rate prediction values of the service system at each of the previous n moments; determining an average prediction error value of the service system at the previous n moments based on the n smoothed trading rate values and the n trading rate prediction values corresponding to the previous n moments one by one; correcting the first trading rate prediction value based on the average prediction error value to obtain a corrected trading rate prediction value of the service system at the first moment; and determining the trading loss determination threshold based on the corrected trading rate prediction value.

[0010] In this method, determining the average prediction error value of the service system at the previous n moments based on the n smoothed trading rate values and the n trading rate prediction values corresponding to the previous n moments one by one means calculating the difference between each smoothed trading rate value in the n smoothed trading rate values and its corresponding trading rate prediction value to obtain n prediction errors, and then summing and averaging these n prediction errors to obtain the average prediction error value.

[0011] In this method, first obtaining the average prediction error value at the previous n moments, and then correcting the prediction value at the first moment based on this average prediction error value, so that the corrected prediction value at the first moment is closer to the actual value at the first moment, can improve the accuracy of the prediction value at the first moment.

[0012] In some possible implementation manners, determining the trading loss determination threshold based on the corrected trading rate prediction value includes: multiplying the corrected trading rate prediction value by a preset ratio to obtain a first prediction lower limit value; multiplying the first trading rate prediction value by the preset ratio to obtain a second prediction lower limit value; and determining the smaller value of the first prediction lower limit value and the second prediction lower limit value as the trading loss determination threshold.

[0013] In the present method, the first prediction lower limit value is determined based on the transaction rate prediction correction value, and the second prediction lower limit value is determined based on the first transaction rate prediction value. The smaller value between the first prediction lower limit value and the second prediction lower limit value is determined as the transaction loss determination threshold. Compared with the prior art of directly determining the lower limit value of the prediction value at the first moment (i.e., the second prediction lower limit value) as the transaction loss determination threshold, the transaction loss determination threshold will not be too high due to the large prediction value at the first moment, thereby preventing the problem of misjudgment of transaction losses due to the large prediction value at the first moment.

[0014] In some possible implementations, the method may further include: obtaining the actual transaction rate value of the business system at each of the t moments before the first moment, where t is a positive integer; performing a stationarity test on a sequence consisting of the t corresponding actual transaction rate values ​​at the first t moments and the first actual transaction rate value; if the sequence is stationary, updating the transaction status of the business system at the first moment to no transaction loss.

[0015] In this method, the stationarity test of the sequence composed of the t actual transaction rate values ​​and the first actual transaction rate value corresponding to each other at the previous t moments refers to judging whether the statistical characteristics (such as mean, variance, covariance, etc.) of the time series at the first moment have changed. If the statistical characteristics of the time series at the first moment have changed, it means that the time series is not stationary; if the statistical characteristics of the time series at the first moment have not changed, it means that the time series is stationary.

[0016] In this method, a stationarity test is performed on a sequence consisting of t actual transaction rate values ​​corresponding to the first t moments and the first actual transaction rate value, so as to check whether the determination result of the transaction status at the first moment is reliable.

[0017] In some possible implementations, the data smoothing processing is performed on the n actual transaction rate values ​​corresponding one by one to the first n moments to obtain the n smoothed transaction rate values ​​corresponding one by one to the first n moments, including: deleting abnormal values ​​in the actual transaction rate values ​​corresponding one by one to the first n moments to obtain actual transaction rate values ​​of m moments, wherein the abnormal values ​​are actual transaction rate values ​​in the first n moments that are outside a preset range, m is a positive integer, and m is less than or equal to n; obtaining a transaction rate smoothing curve based on the actual transaction rate values ​​of the m moments; and determining that the transaction rate corresponding to each moment in the first n moments in the transaction rate smoothing curve is the actual transaction rate value in each moment in the first n moments after smoothing.

[0018] Optionally, after obtaining the transaction rate smoothing curve, outliers can also be corrected based on the transaction rate smoothing curve, and the actual transaction rates at m moments within the normal range can remain unchanged to obtain n actual transaction rates within the preset range.

[0019] It can be understood that the above is only a possible implementation manner for performing data smoothing processing on the n actual transaction rates corresponding to the first n moments one by one, and does not limit the method of data smoothing processing.

[0020] In some possible implementation manners, the method may further include: recording the transaction state of the service system at the first moment into a storage space, where the storage space is used to store the transaction state of the service system at each moment.

[0021] In this method, recording the transaction state at the first moment into the storage space enables the operation and maintenance personnel to obtain the transaction state of the service system at the first moment from the storage space, and enables the operation and maintenance personnel to obtain the transaction state of the service system at each moment from the storage space, so as to ensure that the operation and maintenance personnel can promptly handle the faults of the service system to improve the transaction success rate.

[0022] In a second aspect, the present application provides a transaction loss detection device, which may include: each functional module for implementing the method in the first aspect. Each functional module can be implemented in a software and / or hardware manner.

[0023] As an example, the device may include: an acquisition module, a processing module, and a determination module.

[0024] Among them, the acquisition module can be used to acquire the first actual transaction rate of the service system at the first moment and the actual transaction rates of the service system at each of the first n moments before the first moment, where n is a positive integer; the processing module can be used to perform data smoothing processing on the n actual transaction rates corresponding to the first n moments one by one to obtain n smoothed transaction rates corresponding to the first n moments; the determination module can be used to determine the transaction loss determination threshold of the service system at the first moment based on the n smoothed transaction rates; the determination module can also be used to determine that the transaction state of the service system at the first moment is a transaction loss if the first actual transaction rate is lower than the transaction loss determination threshold.

[0025] Optionally, the obtaining module can also be used to obtain the first transaction rate prediction value of the business system at the first moment and the transaction rate prediction values of the business system at each of the previous n moments; the determining module can also be used to determine the average prediction error value of the business system at the previous n moments based on the n transaction rate smoothing values and the n transaction rate prediction values corresponding to the previous n moments one by one; the determining module can also be used to correct the first transaction rate prediction value based on the average prediction error value to obtain the corrected transaction rate prediction value of the business system at the first moment; the determining module can also be used to determine the transaction loss determination threshold based on the corrected transaction rate prediction value.

[0026] Optionally, the determining module can also be used to multiply the corrected transaction rate prediction value by a preset ratio to obtain a first prediction lower limit value; the determining module can also be used to multiply the first transaction rate prediction value by the preset ratio to obtain a second prediction lower limit value; the determining module can also be used to determine the smaller value of the first prediction lower limit value and the second prediction lower limit value as the transaction loss determination threshold.

[0027] Optionally, the obtaining module can also be used to obtain the actual transaction rate values at each of the previous t moments of the business system at the first moment, where t is a positive integer; the processing module can also be used to perform a stationarity test on the sequence composed of the t actual transaction rate values corresponding to the previous t moments one by one and the first actual transaction rate value.

[0028] Optionally, the device may further include an updating module, and the updating module can be used to update the transaction state of the business system at the first moment to no transaction loss if the sequence is stationary.

[0029] Optionally, the processing module can also be used to delete the outliers in the actual transaction rate values corresponding to the previous n moments one by one to obtain the actual transaction rate values at m moments, where the outliers are the actual transaction rate values outside the preset range among the previous n moments, m is a positive integer, and m is less than or equal to n; the processing module can also be used to obtain a transaction rate smoothing curve based on the actual transaction rate values at the m moments; the determining module can be used to determine that the transaction rate corresponding to each of the previous n moments on the transaction rate smoothing curve is the actual transaction rate value at each of the previous n moments after smoothing.

[0030] In a third aspect, the present application provides a transaction loss detection device, which may include a memory and a processor coupled to the memory.

[0031] The processor is used to execute program instructions to implement the instructions executed by the method in the first aspect; the memory is used to store the instructions executed by the processor or store the input data required for the processor to run the instructions or store the data generated after the processor runs the instructions.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium storing program code for execution by a processor, the program code including instructions for implementing the method in the first aspect.

[0033] In a fifth aspect, the present application provides a computer program product, which, when running on a processor, enables the transaction loss detection device to implement the method in the first aspect.

[0034] It can be understood that the technical effects achievable by the transaction loss detection device, computer-readable storage medium, and computer program product provided by the present application can refer to the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and, together with the specification, are used to explain the principles of the present application.

[0036] Figure 1 FIG. [ID] is a schematic diagram of an application scenario applicable to the present application;

[0037] Figure 2 FIG. [ID] is a schematic diagram of a business system architecture applicable to the present application;

[0038] Figure 3 FIG. [ID] is a schematic diagram of a process flow of a transaction loss detection method provided by an embodiment of the present application;

[0039] Figure 4 FIG. [ID] is a schematic diagram of a process flow of a method for performing a stationarity test on an actual value of a first transaction rate provided by an embodiment of the present application;

[0040] Figure 5 FIG. [ID] is a schematic diagram of a transaction loss detection device provided by an embodiment of the present application;

[0041] Figure 6 FIG. [ID] is a schematic diagram of a transaction loss detection device provided by another embodiment of the present application.

[0042] Through the above accompanying drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These accompanying drawings and written descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0044] Figure 1 It is a schematic diagram of a transaction scenario applicable to the present application. In a business system, multiple transaction requests can be received and these multiple transaction requests can be processed. However, during the transaction processing, the system may be in a transaction loss state for a long time due to some failures, affecting the transaction success rate. Therefore, the transaction state of the business system can also be detected in real time to determine whether there is a transaction loss in the business system; after detecting the transaction state of the business system, the transaction state can also be fed back to the operation and maintenance personnel in real time, so that when the system has a transaction loss, the operation and maintenance personnel can handle the failure in time to improve the transaction success rate.

[0045] Figure 2 It is a schematic diagram of a business system architecture applicable to the present application. As Figure 2 shown, the business system may include a client, Server 1, and Server 2. Communication can occur between the client and Server 1, and communication can also occur between Server 1 and Server 2.

[0046] The client is the party that sends the transaction request. For example, a user can send transaction request information to the server through the client to complete the transaction request. It can be understood that there can be at least one client in the system, and each client can send one or more transaction requests.

[0047] Server 1 is the party that receives the transaction request and provides corresponding services. For example, when Server 1 receives the transaction request information sent by the client, it can provide corresponding services based on this information to complete the transaction request. It can be understood that Server 1 can receive one or more transaction requests, and the multiple business requests received by this Server 1 can come from different clients.

[0048] Server 2 is used to obtain transaction data from Server 1 and detect the transaction state of the business system based on the transaction data of Server 1 to determine whether there is a transaction loss in the business system.

[0049] In this embodiment, Server 1 and Server 2 can be servers with certain computing capabilities. Optionally, Server 1 and Server 2 can also be the same server.

[0050] Optionally, a database may also be included in the business system architecture. Each time the server 2 detects the transaction status of the business system, it may record the detected transaction status of the business system in the database, and the database may be used to store the transaction status of the business system.

[0051] A method for detecting transaction losses may include: obtaining the actual transaction rate at a first moment and the actual transaction rates within a period of time before the first moment; inputting the actual transaction rates within the period of time into a prediction model to obtain a predicted lower limit value, and using the predicted lower limit value as the transaction rate prediction threshold at the first moment; if the actual transaction rate at the first moment is lower than the transaction rate prediction threshold, it is determined that there is a transaction loss at the first moment.

[0052] However, those skilled in the art found during use that the actual transaction rates within the period of time before the first moment may include some abnormal data, such as data with a sudden increase in the transaction rate, resulting in a relatively large transaction rate prediction threshold. In this case, when the actual transaction rate at the first moment is normal, it may also be lower than the prediction threshold, and it will be determined that there is a loss transaction at the first moment, thus resulting in misjudgment and reducing the accuracy of transaction loss detection.

[0053] Therefore, the present application proposes a new technical solution to solve the problem of low accuracy in detecting transaction losses in the prior art.

[0054] In the technical solution of the present application, after obtaining the actual transaction rates within a period of time before the first moment, smoothing processing is performed on the actual transaction rates within the period of time, that is, the abnormal transaction rates within the period of time are corrected, and the abnormal transaction rates can be corrected to within a preset range. Then, based on the smoothed actual transaction rates, the transaction loss determination threshold at the first moment is determined. Since the smoothed actual transaction rates are all within the preset range, the transaction loss determination threshold obtained based on the smoothed actual transaction rates is more accurate, thereby improving the accuracy of transaction loss detection.

[0055] In the technical solution of the present application, when the actual value of the transaction rate at the first moment is lower than the transaction loss determination threshold, a stationarity test may also be performed on the sequence composed of the actual value of the transaction rate at the first moment and the actual values of the transaction rates within a period of time before the first moment to verify the loss determination result at the first moment, further improving the accuracy of transaction loss detection.

[0056] It should be noted that the transaction loss detection method and device of the present application can be used in the field of financial technology and can also be used in any field other than the financial field. The present application does not limit the application field.

[0057] Figure 3Schematic flow diagram of a transaction loss detection method provided by an embodiment of this application. As Figure 3 shown, the transaction loss detection method may include S301, S302, S303, S304, S305, and S306. This method may be executed by a server 2 as Figure 2 shown.

[0058] S301, obtain the actual value of the first transaction rate of the business system at the first moment and the actual values of the transaction rates of the business system at each of the previous n moments before the first moment, where n is a positive integer.

[0059] In this embodiment, when the business system completes a business transaction at the first moment, obtain the actual value of the first transaction rate of the business system at the first moment, and obtain the actual values of the transaction rates within a period of time before the first moment of the business system.

[0060] It can be understood that the business system obtains the actual value of the transaction rate every short period of time. Therefore, obtaining the actual values of the transaction rates within a period of time before the first moment of the business system is equivalent to obtaining the actual values of the transaction rates at each of the previous n moments before the first moment.

[0061] In one example, assume that the actual values of the transaction rates within 10 minutes (min) before the first moment of the business system are obtained, and the business system obtains the actual value of the transaction rate every 10 seconds (s). Then, obtaining the actual values of the transaction rates within 10 min before the first moment of the business system is equivalent to obtaining the actual values of the transaction rates at each of the previous 60 moments before the first moment.

[0062] It should be noted that during the process of obtaining the actual values of the transaction rates within a period of time before the first moment of the business system, the actual values of the transaction rates obtained within a period of time may be incomplete due to reasons such as failures. In this case, it is necessary to perform interpolation filling on the actual values of the transaction rates obtained within a period of time to fill in the missing values.

[0063] For example, assume that the actual values of the transaction rates within 10 min before the first moment of the business system are obtained, and the business system obtains the actual value of the transaction rate every 10 s. Then, 60 actual values of the transaction rates before the first moment of the business system should be obtained, but only 58 actual values of the transaction rates are actually obtained. In this case, it is necessary to perform interpolation filling based on these 58 actual values of the transaction rates to obtain 60 actual values of the transaction rates.

[0064] In this embodiment, the interpolation filling method may include but is not limited to: polynomial interpolation, Hermite interpolation, piecewise interpolation, and spline interpolation, etc.

[0065] S302. Perform data smoothing on the n actual transaction rates corresponding to the previous n moments to obtain the n smoothed transaction rates corresponding to the previous n moments.

[0066] In this embodiment, performing data smoothing on the n actual transaction rates corresponding to the previous n moments means correcting the outliers outside the preset range among the n actual transaction rates corresponding to the previous n moments according to a certain strategy so that these outliers can be within the preset range. That is to say, correct the relatively high or low transaction rates among the n actual transaction rates so that the relatively high or low transaction rates among the n actual transaction rates approach the normal range to remove the outliers in the n actual transaction rates.

[0067] For example, assume that the minimum actual transaction rate among the n actual transaction rates corresponding to the previous n moments is 0 transactions per second, the maximum actual transaction rate is 100 transactions per second, and the preset range is 25% - 75%. Then correct the actual transaction rates less than 25 transactions per second and greater than 75 transactions per second among the n actual transaction rates to values within the preset range.

[0068] In a possible implementation, the method for performing data smoothing on the n actual transaction rates corresponding to the previous n moments may include: deleting the outliers in the actual transaction rates corresponding to the previous n moments to obtain the actual transaction rates at m moments, where m is a positive integer and m is less than or equal to n; obtaining a transaction rate smoothing curve based on the actual transaction rates at m moments; determining the transaction rate corresponding to each of the previous n moments on this transaction rate smoothing curve as the actual transaction rate of each of the previous n moments after smoothing.

[0069] Optionally, after obtaining the transaction rate smoothing curve, the outliers can also be corrected based on this transaction rate smoothing curve, while the actual transaction rates at the m moments within the normal range can remain unchanged to obtain n actual transaction rates within the preset range.

[0070] In another possible implementation, the method for performing data smoothing on the n actual transaction rates corresponding to the previous n moments may include: obtaining a transaction rate smoothing curve based on the n actual transaction rates corresponding to the previous n moments; determining the transaction rate corresponding to each of the previous n moments on this transaction rate smoothing curve as the actual transaction rate of each of the previous n moments after smoothing.

[0071] Optionally, after obtaining the transaction rate smoothing curve, the outliers among the previous n moments can also be corrected based on this transaction rate smoothing curve, while the actual transaction rates within the normal range can remain unchanged to obtain n actual transaction rates within the preset range.

[0072] It should be noted that the data smoothing technology in this embodiment may include but is not limited to: exponential smoothing, convolution smoothing, polynomial smoothing, spline smoothing, Gaussian smoothing, binary smoothing, etc.

[0073] Optionally, before performing data smoothing processing on the n actual transaction rate values corresponding to the first n moments one by one, a first-order difference calculation may also be performed on these n actual transaction rate values.

[0074] In this embodiment, by performing data smoothing processing on the n actual transaction rate values corresponding to the first n moments one by one, the outliers in these n actual transaction rate values can be corrected within a preset range, achieving the purpose of removing outliers. This can avoid the situation of transaction misjudgment when a relatively large outlier results in a relatively large transaction loss determination threshold.

[0075] S303. Determine the transaction loss determination threshold of the service system at the first moment based on the n smoothed transaction rate values.

[0076] In this embodiment, the method for determining the transaction loss determination threshold of the service system at the first moment based on the n smoothed transaction rate values may include: obtaining the first transaction rate prediction value of the service system at the first moment and the transaction rate prediction values of the service system at each of the first n moments; determining the average prediction error value of the service system at the first n moments based on the n smoothed transaction rate values and the n transaction rate prediction values corresponding to the first n moments one by one; correcting the first transaction rate prediction value based on the average prediction error value to obtain the corrected transaction rate prediction value of the service system at the first moment; and determining the transaction loss determination threshold based on the corrected transaction rate prediction value.

[0077] In this embodiment, the method for obtaining the first transaction rate prediction value of the service system at the first moment may include: inputting the actual transaction rate values of each of the first n moments of the service system at the first moment into a prediction model to obtain the first transaction rate prediction value at the first moment. This prediction model can be used to predict the transaction rate of the service system at each moment. In one example, this prediction model may be an autoregressive integrated moving average (ARIMA) model.

[0078] It can be understood that the method for obtaining the transaction rate prediction values of the service system at each of the first n moments is the same as the method for obtaining the first transaction rate prediction value of the service system at the first moment, and will not be elaborated here.

[0079] In this embodiment, determining the average prediction error value of the business system at the first n moments based on the n trading rate smoothing values and the n trading rate prediction values corresponding to the first n moments one by one means calculating the difference between each trading rate smoothing value in the n trading rate smoothing values and the corresponding trading rate prediction value, obtaining n prediction errors, and then summing and averaging these n prediction errors to obtain the average prediction error value.

[0080] For example, the calculation method of the average prediction error value can be as shown in formula (1):

[0081]

[0082] Among them, avgminus represents the average prediction error value at the first n moments, real_valuei represents the trading rate smoothing value corresponding to the i-th moment among the first n moments, predict_valuei represents the trading rate prediction value corresponding to the i-th moment among the first n moments, and i ranges from 1 to n.

[0083] Optionally, the average prediction error value at the first n moments can be used to correct the prediction value at the first moment. Therefore, the average prediction error value at the first n moments can also be referred to as the auxiliary correction value at the first moment.

[0084] In this embodiment, the method for correcting the first trading rate prediction value based on the average prediction error value to obtain the trading rate prediction correction value of the business system at the first moment may include: adding the first trading rate prediction value of the business system at the first moment to the average prediction error value to obtain the trading rate prediction correction value of the business system at the first moment.

[0085] For example, the calculation method of the trading rate prediction correction value at the first moment can be as shown in formula (2):

[0086] repredict_value = predict_value + avgminus (2)

[0087] Among them, repredict_value represents the trading rate prediction correction value of the business system at the first moment, and predict_value represents the first trading rate prediction value of the business system at the first moment.

[0088] In a possible implementation manner, the method for determining the trading loss determination threshold based on the trading rate prediction correction value may include: multiplying the trading rate prediction correction value by a preset ratio to obtain a first prediction lower limit value; multiplying the first trading rate prediction value by the preset ratio to obtain a second prediction lower limit value; and determining the smaller value of the first prediction lower limit value and the second prediction lower limit value as the trading loss determination threshold.

[0089] For example, the calculation method of the first prediction lower limit value can be as shown in formula (3):

[0090] predict_low1 = repredict_value × threshold (3)

[0091] Wherein, predict_low1 represents the first prediction lower limit value, and threshold represents a preset ratio.

[0092] The calculation method of the second prediction lower limit value can be as shown in formula (4):

[0093] predict_low2 = predict_value × threshold (4)

[0094] Wherein, predict_low2 represents the second prediction lower limit value.

[0095] The calculation method of the trading loss determination threshold can be as shown in formula (5):

[0096] warning = min(predict_low1, predict_low2) (5)

[0097] Wherein, warning represents the trading loss determination threshold, and min() represents the minimum value. In this embodiment, min(predict_low1, predict_low2) represents the smaller value between the first prediction lower limit value and the second prediction lower limit value.

[0098] In this embodiment, the preset ratios used when calculating the first prediction lower limit value and the second prediction lower limit value at the first moment can be the same. Optionally, the preset ratios used when calculating the first prediction lower limit value and the second prediction lower limit value at different moments and the preset ratio used at the first moment can be different.

[0099] S304, determine whether the actual value of the first transaction rate is lower than the trading loss determination threshold. If the actual value of the first transaction rate is lower than the trading loss determination threshold, execute S305; if the actual value of the first transaction rate is not lower than the trading loss determination threshold, execute S306.

[0100] S305, determine that the trading state of the business system at the first moment is a trading loss.

[0101] In this embodiment, when the actual value of the first transaction rate is lower than the trading loss determination threshold, it can be preliminarily determined that the trading state at the first moment is a trading loss.

[0102] After initially determining that the transaction status at the first moment indicates a transaction loss, a stationarity test can also be performed on the actual value of the first transaction rate at the first moment to verify whether the determination result of the transaction status at the first moment is reliable.

[0103] S306. Determine that the transaction status of the business system at the first moment is that there is no transaction loss.

[0104] In this embodiment, when the actual value of the first transaction rate is not lower than the transaction loss determination threshold, it can be determined that the transaction status at the first moment is that there is no transaction loss.

[0105] Optionally, when the predicted value of the first transaction rate of the business system at the first moment is very small, the second predicted lower limit value obtained based on this predicted value of the first transaction rate is very small. Since the actual value of the first transaction rate of the business system at the first moment can easily reach this second predicted lower limit value, it can be directly determined that the transaction status of the business system at the first moment is that there is no transaction loss.

[0106] Optionally, after the server determines the transaction status of the business system at the first moment, it can record the transaction status at the next first moment in the storage space, and this storage space is used to store the transaction status of the business system at each moment. In one example, this storage space can be a database.

[0107] Similarly, the transaction status at each moment can be recorded in the storage space, enabling the operation and maintenance personnel to call the transaction status at each moment from this storage space, and display the transaction status at each moment through a display screen, which can be connected to this storage space. Optionally, if the transaction status for multiple consecutive moments is that there is a transaction loss, when the display screen shows the transaction status, these multiple moments can be specially marked.

[0108] Next, this application will use Figure 4 as an example to illustrate the method for performing a stationarity test on the actual value of the first transaction rate. In S401, obtain the actual value of the transaction rate at each of the first t moments before the first moment of the business system, where t is a positive integer. In S402, perform a stationarity test on the sequence composed of the t actual values of the transaction rate corresponding to the first t moments and the actual value of the first transaction rate one by one. In S403, determine whether this sequence is stationary. If this sequence is stationary, execute S404; if this sequence is not stationary, execute S405. In S404, update the transaction status of the business system at the first moment to that there is no transaction loss. In S405, determine that the transaction status of the business system at the first moment is that there is a transaction loss.

[0109] Performing a stationarity test on a sequence means testing whether the data sequence in the time series dataset is stationary over time. The stationarity of a time series means that a set of time series data looks flat and its statistical characteristics of all orders (such as mean, variance, covariance, etc.) do not change over time.

[0110] In this embodiment, performing a stationarity test on the sequence composed of the t actual transaction rates corresponding to the first t moments and the first actual transaction rate means determining whether the statistical characteristics (such as mean, variance, covariance, etc.) of this time series change at the first moment. If the statistical characteristics of this time series change at the first moment, it means that this time series is non-stationary; if the statistical characteristics of this time series do not change at the first moment, it means that this time series is stationary.

[0111] In this embodiment, when performing a stationarity test on the sequence composed of the t actual transaction rates corresponding to the first t moments and the first actual transaction rate, methods such as the augmented dickey-fuller (ADF) test and the phillips-perron (PP) test can be used for the test.

[0112] Taking the ADF test method as an example, the method for performing a stationarity test on the sequence composed of the t actual transaction rates corresponding to the first t moments and the first actual transaction rate can specifically include: first assuming that there is a unit root in this sequence, calculating the test statistic of this sequence; and determining whether this test statistic is lower than a preset critical value. If this test statistic is lower than the preset critical value, then there is no unit root in this sequence, the original hypothesis can be rejected, and this time series is stationary. If this test statistic is not lower than the preset critical value, then there is a unit root in this sequence, and this time series is non-stationary.

[0113] Figure 5 It is a schematic diagram of a transaction loss detection device provided by an embodiment of the present application, as Figure 5 shown. The transaction loss detection device 500 may include: an acquisition module 501, a processing module 502, a determination module 503, and a judgment module 504.

[0114] The transaction loss detection device 500 can be used to implement Figure 3 the schematic flowchart of the transaction loss detection method in the shown embodiment. Among them, the acquisition module 501 can be used to execute S301, the processing module 502 can be used to execute S302, the determination module 503 can be used to execute S303, S305, and S306, and the judgment module 504 can be used to execute S304.

[0115] Optionally, the transaction loss detection device 500 can also be used to implement Figure 4Schematic diagram of the method flow of the illustrated embodiment. The transaction loss detection device 500 may further include an update module 505. Among them, the acquisition module 501 may be used to execute S401, the processing module 502 may be used to execute S402, the determination module 503 may be used to execute S405, the judgment module 504 may be used to execute S403, and the update module 505 may be used to execute S404.

[0116] Figure 6 Schematic diagram of the transaction loss detection device provided by another embodiment of this application, as Figure 6 shown, the transaction loss detection device 600 may include: a processor 601 and an interface circuit 602. The processor 601 and the interface circuit 602 are coupled to each other. It can be understood that the interface circuit 602 may be a transceiver or an input / output interface. Optionally, the software digital watermark device 600 may further include a memory 603 for storing instructions executed by the processor 601 or storing input data required for the processor 601 to run instructions or storing data generated after the processor 601 runs instructions.

[0117] As an example, the processor 601 may be used to implement the functions of the above-mentioned processing module 502, determination module 503, judgment module 504, and update module 505, and the interface circuit 602 may be used to implement the function of the above-mentioned acquisition module 501.

[0118] It can be understood that the processor in the embodiments of this application may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0119] The method steps in the embodiments of the present application can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a removable hard disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Additionally, the ASIC can be located in a network device or a terminal device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.

[0120] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, or other programmable devices. The computer program or instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid-state drive.

[0121] In various embodiments of the present application, without special instructions and logical conflicts, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships. The term "plurality" in this article means two or more. The term "and / or" in this article is merely a description of the associated relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after; in a formula, the character " / " represents a "division" relationship between the associated objects before and after.

[0122] It can be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0123] It can be understood that in the embodiments of the present application, the magnitude of the sequence numbers of the above processes does not mean the sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. Those skilled in the art will easily think of other implementation manners of the present application after considering the specification and practicing the invention disclosed herein. The present application aims to cover any variations, uses or adaptations of the present application, and these variations, uses or adaptations follow the general principles of the present application and include the common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and the embodiments are only regarded as exemplary, and the true scope of the present application is pointed out by the claims.

[0124] It should be understood that the present application is not limited to the precise structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. A method for detecting transaction losses, characterized in that, it includes: Obtain the actual value of the first transaction rate of the business system at the first moment and the actual value of the transaction rate of the business system at each of the previous n moments before the first moment, where n is a positive integer; Perform data smoothing on the n actual transaction rate values corresponding to the previous n moments one by one to obtain n smoothed transaction rate values corresponding to the previous n moments one by one; Based on the n smoothed transaction rate values, determine the transaction loss determination threshold of the business system at the first moment; If the actual value of the first transaction rate is lower than the transaction loss determination threshold, determine that the transaction status of the business system at the first moment is a transaction loss; The determining the transaction loss determination threshold of the business system at the first moment based on the n smoothed transaction rate values includes: Obtain the predicted value of the first transaction rate of the business system at the first moment and the predicted value of the transaction rate of the business system at each of the previous n moments; Based on the n smoothed transaction rate values and the n predicted transaction rate values corresponding to the previous n moments one by one, determine the average prediction error value of the business system at the previous n moments; Based on the average prediction error value, correct the predicted value of the first transaction rate to obtain the corrected predicted value of the transaction rate of the business system at the first moment; Multiply the corrected predicted value of the transaction rate by a preset ratio to obtain the first predicted lower limit value; Multiply the predicted value of the first transaction rate by the preset ratio to obtain the second predicted lower limit value; Determine the smaller value of the first predicted lower limit value and the second predicted lower limit value as the transaction loss determination threshold.

2. The method according to claim 1, characterized in that, the method further includes: Obtain the actual value of the transaction rate of the business system at each of the previous t moments before the first moment, where t is a positive integer; Perform a stationarity test on the sequence composed of the t actual transaction rate values corresponding to the previous t moments and the actual value of the first transaction rate; If the sequence is stationary, update the transaction status of the business system at the first moment to no transaction loss.

3. The method according to claim 1, characterized in that, the performing data smoothing on the n actual transaction rate values corresponding to the previous n moments one by one to obtain n smoothed transaction rate values corresponding to the previous n moments one by one includes: Delete the outliers in the actual transaction rate values corresponding to the previous n moments one by one to obtain the actual transaction rate values at m moments, where the outliers are the actual transaction rate values outside the preset range among the previous n moments, m is a positive integer, and m is less than or equal to n; Based on the actual transaction rate values at the m moments, obtain a transaction rate smoothing curve; Determine that the transaction rate corresponding to each of the previous n moments on the transaction rate smoothing curve is the actual transaction rate value of each of the previous n moments after smoothing.

4. The method according to any one of claims 1 to 3, characterized in that, the method further includes: Record the transaction status of the business system at the first moment in a storage space, where the storage space is used to store the transaction status of the business system at each moment.

5. A transaction loss detection device, characterized in that, it includes: An acquisition module, configured to acquire the actual value of the first transaction rate of the business system at the first moment and the actual values of the transaction rates of the business system at each of the previous n moments of the first moment, where n is a positive integer; A processing module, configured to perform data smoothing processing on the n actual values of the transaction rates corresponding to the previous n moments respectively to obtain n smoothed values of the transaction rates corresponding to the previous n moments respectively; A determination module, configured to determine the transaction loss determination threshold of the business system at the first moment based on the n smoothed values of the transaction rates; The determination module is further configured to determine that the transaction status of the business system at the first moment is a transaction loss if the actual value of the first transaction rate is lower than the transaction loss determination threshold; Specifically, the determination module is configured to acquire the predicted value of the first transaction rate of the business system at the first moment and the predicted values of the transaction rates of the business system at each of the previous n moments; determine the average prediction error value of the business system at the previous n moments based on the n smoothed values of the transaction rates and the n predicted values of the transaction rates corresponding to the previous n moments respectively; correct the predicted value of the first transaction rate based on the average prediction error value to obtain a corrected predicted value of the transaction rate of the business system at the first moment; multiply the corrected predicted value of the transaction rate by a preset ratio to obtain a first predicted lower limit value; multiply the predicted value of the first transaction rate by the preset ratio to obtain a second predicted lower limit value; determine the smaller value of the first predicted lower limit value and the second predicted lower limit value as the transaction loss determination threshold.

6. A transaction loss detection device, characterized in that, it includes a memory and a processor coupled to the memory; The memory is used to store program instructions; The processor is configured to execute the program instructions to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores program code for computer execution, and the program code includes instructions for implementing the method according to any one of claims 1 to 4.

8. A computer program product, characterized in that, it includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Anomaly detection method and device

    CN107086944A

  • Transaction flow monitoring method and system

    CN111382020A