WO2024036727A1 - 数据异常检测方法、装置、设备、介质及程序产品 - Google Patents

数据异常检测方法、装置、设备、介质及程序产品 Download PDF

Info

Publication number
WO2024036727A1
WO2024036727A1 PCT/CN2022/124767 CN2022124767W WO2024036727A1 WO 2024036727 A1 WO2024036727 A1 WO 2024036727A1 CN 2022124767 W CN2022124767 W CN 2022124767W WO 2024036727 A1 WO2024036727 A1 WO 2024036727A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
time series
anomaly detection
period
voting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/124767
Other languages
English (en)
French (fr)
Inventor
项术津
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Publication of WO2024036727A1 publication Critical patent/WO2024036727A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • This application relates to the field of financial technology (Fintech), and in particular to a data anomaly detection method, device, equipment, medium and program product.
  • existing data anomaly detection generally uses the 3 ⁇ method or the Grubbs test method alone, and detecting outliers usually uses a certain time series in the past, such as the last 7 days, the last month, the last year and other time ranges.
  • existing data anomaly detection methods have technical problems such as unstable anomaly detection effects on cyclically changing financial accounting data and high misjudgment rates.
  • This application provides a data anomaly detection method, device, equipment, media and program products to solve the problem that existing data anomaly detection methods have unstable and incorrect anomaly detection effects on periodically changing financial accounting data. Technical issues with high judgment rate.
  • this application provides a data anomaly detection method, including:
  • the first duration of the first period corresponding to the sample sequence is smaller than the duration of the disassembly cycle.
  • the duration of the disassembly cycle is an integer multiple of the first duration.
  • the second duration of the second period corresponding to each subsequence is smaller than the first duration.
  • the first duration is an integer multiple of the second duration.
  • the periodic characteristics of the time series data are analyzed to determine the disassembly period, including:
  • the image analysis model is used to analyze the periodic characteristics of the data curve and determine the disassembly period, including:
  • the moving average sequence corresponds to the candidate periods one-to-one;
  • the candidate period corresponding to the moving average sequence is determined as the dismantling period.
  • determine whether the data in each moving average series changes cyclically including:
  • the candidate period corresponding to the moving average sequence is determined as the dismantling period, including:
  • the smallest candidate period is determined as the dismantling period.
  • an anomaly detection model is used to perform anomaly detection on each voting time series, including:
  • whether the detection results are abnormal is judged based on preset voting rules, including:
  • this application provides a data anomaly detection device, including:
  • Processing module for:
  • this application provides an electronic device, including:
  • Memory used to store program instructions
  • the processor is configured to call and execute program instructions in the memory, and execute any possible method provided in the first aspect.
  • the present application provides a storage medium.
  • a computer program is stored in the readable storage medium, and the computer program is used to execute any possible data anomaly detection method provided in the first aspect.
  • this application also provides a computer program product, including a computer program that implements any possible data anomaly detection method provided in the first aspect when executed by a processor.
  • This application provides a data anomaly detection method, device, equipment, media and program products.
  • the disassembly cycle is determined; according to the disassembly cycle , disassemble multiple sample sequences from time series data; divide each sample sequence into multiple subsequences according to the preset division method, and combine each subsequence of the same period into a voting time series to determine multiple Multiple voting time series corresponding to different time periods; use the anomaly detection model to detect anomalies in each voting time series, and determine whether the detection results are abnormal according to the preset voting determination rules.
  • Figure 1 is a schematic diagram of an application scenario of a data anomaly detection method provided by an embodiment of the present application
  • Figure 2 is a schematic flow chart of a data anomaly detection method provided by this application.
  • FIG. 3 is a schematic flow chart of another data anomaly detection method implemented in this application.
  • Figure 4 is a schematic structural diagram of a data anomaly detection device provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of an electronic device provided by this application.
  • Time series analysis A mathematical statistical data analysis method that predicts future data patterns based on data sequences at different times.
  • Outliers In the given data, there are data that do not conform to the identification, or data that does not conform to a certain development pattern, or data that does not conform to a certain range.
  • Outlier detection Judge the current data based on past data shape patterns to see whether it is in line with development patterns.
  • Contemporaneous disassembly For periodic data, the time series is disassembled according to the same cycle or time point to better make the data more referential, such as one day of each month, Monday of each week, and every day at one o'clock in the morning and so on.
  • Voting method For data anomaly detection, a number of votes is allocated for each time period. If the data at the current time point is judged to be an outlier, the number of votes will be cast for the data. If the number of votes the data ultimately receives during the entire time period exceeds a certain threshold, the data is considered an outlier.
  • 3 ⁇ criterion Based on a set of statistical data, calculate the mean ⁇ and standard deviation ⁇ of the data. If a new number A is less than ⁇ -3 ⁇ or greater than ⁇ +3 ⁇ , the value A is considered an outlier.
  • Existing data anomaly detection generally uses the 3 ⁇ method or the Grubbs test method alone, and detecting outliers usually uses a certain time series in the past, such as the last 7 days, the last month, the last year and other time ranges.
  • the method for selecting outlier detection is single and applicable to the data range of ordinary data forms.
  • Financial accounting data has cyclical characteristics, or on the billing day/repayment day, the frequency distribution of data transactions at different time points has serious problems.
  • Slope is identified using historical data, and the detection effect is extremely unstable.
  • the 3 ⁇ criterion is better for data that conforms to the normal distribution, but may be less accurate for skewed distribution data.
  • the outlier range detection is too rough. For example, historical transaction data is used to determine whether the transaction data of the day is an outlier. In fact, there are cyclical rules in the transaction frequency and transaction amount in different time periods of a day's transactions. For financial For transaction data, ignoring this periodic pattern to identify abnormal data has a high risk of abnormal misjudgment.
  • This application proposes the idea of contemporaneous disassembly when detecting anomalies in data, taking into account the cyclical change characteristics of financial business data, more accurately using historical transaction behavior data of the same period in the same period for detection, and improving the accuracy of anomaly detection results. sex.
  • FIG. 1 is a schematic diagram of an application scenario of a data anomaly detection method provided by an embodiment of the present application.
  • the user generates transaction data by operating the user terminal.
  • the user terminal uploads the transaction data to the server.
  • the server automatically generates financial account data, that is, time series 102.
  • the data anomaly detection system 101 loads the time corresponding to the period to be detected.
  • Sequence 102, this time series 102 is generated by the financial accounting core system.
  • multiple sample sequences are extracted from the time series 102 and disassembled in the same period, and then each sample sequence is divided according to a preset division method, such as taking each hour as a division period or interval.
  • the time series data is split into more fine-grained voting time series during anomaly detection, and anomalies are identified and voted on multiple voting time series respectively.
  • the trading day data is split by hour to obtain multiple hourly granular voting time series, and then the multiple voting time series are identified for anomalies, and voting is performed based on the outlier detection results of different voting time series to ultimately determine whether there are outliers. . If there is an abnormal value, the anomaly detection system 101 will output prompt information. Improve the robustness of anomaly identification through multi-party voting with finer time granularity.
  • FIG. 2 is a schematic flowchart of a data anomaly detection method provided by an embodiment of the present application. As shown in Figure 2, the specific steps of this data anomaly detection method include:
  • Obtain financial accounting data from source systems such as the financial accounting core system including: approval data, transaction data, accounting data and other data. Standardize financial accounting data, achieve standardized data through cleaning, conversion, etc., and sort according to the timestamp corresponding to the financial accounting data to form time series data.
  • analyzing the periodic characteristics of the time series data and determining the disassembly period includes: drawing the data curve corresponding to the time series data according to the time corresponding to each data in the time series data; using the image analysis model to analyze the data Analyze the periodic characteristics of the curve to determine the disassembly period.
  • disassembly period includes: minutes, hours, days, weeks, months, quarters, years and other customized lengths.
  • the first duration of the first period corresponding to the sample sequence is smaller than the duration of the disassembly cycle.
  • the duration of the disassembly cycle is an integer multiple of the first duration.
  • the time series data will be divided into seven days a week, and then from the corresponding data of each week, extract the data related to financial dates such as reconciliation day or repayment day.
  • the data of that day is used as a sample sequence.
  • the second duration of the second period corresponding to each subsequence is smaller than the first duration.
  • the first duration is an integer multiple of the second duration.
  • the second duration is 1 hour. That is, the sample sequence corresponding to one day is divided into 24 subsequences, and each subsequence corresponds to one hour. Then the subsequences of the same hour on different days are combined to obtain 24 voting time series corresponding to 24 hours.
  • S204 Use the anomaly detection model to perform anomaly detection on each voting time series, and determine whether the detection results are abnormal according to the preset voting determination rules.
  • the anomaly detection model includes: a prediction data model corresponding to each second period.
  • the prediction data model is a model trained in advance and can predict the value of the financial data in the second period.
  • Each data in each voting time series is input into the forecast data model, and it is judged whether the data can be completely fitted to the data curve obtained in the forecast data model. If it cannot be fitted, it proves that an outlier has occurred.
  • preset voting judgment rules There are two types of preset voting judgment rules. One is a strict judgment rule, which requires that as long as an abnormal value appears in any voting time series, it will be considered that an abnormality has occurred in the period to be detected. The other is a looser determination rule, which requires that as long as the number of outliers appearing in any voting time series does not exceed the preset threshold, it is considered that there is no abnormality in the period to be detected.
  • a reminder message can be sent to the operation and maintenance personnel so that the operation and maintenance personnel can handle it in a timely manner to avoid further losses caused by data anomalies and reduce financial system risks.
  • the embodiment of the present application provides a data anomaly detection method, which obtains the time series data corresponding to the period to be detected, analyzes the periodic characteristics of the time series data, and determines the disassembly cycle; according to the disassembly cycle, the time series data is disassembled from the time series data. Multiple sample sequences are generated; according to the preset division method, each sample sequence is divided into multiple sub-sequences, and each sub-sequence of the same period is combined into a voting time series to determine multiple votes corresponding to multiple different periods. Time series; use the anomaly detection model to detect anomalies in each voting time series, and determine whether the detection results are abnormal based on the preset voting determination rules.
  • FIG 3 is a schematic flow chart of another data anomaly detection method implemented in this application. As shown in Figure 3, the specific steps of this data anomaly detection method include:
  • Obtain financial accounting data from source systems such as the financial accounting core system including: approval data, transaction data, accounting data and other data. Standardize financial accounting data and achieve standardized data through cleaning, conversion, etc.
  • Missing data is usually data with NA, and data noise is usually abnormal values, such as -9999. If the missing value of the feature is not useful for classification, It does not have much effect and can be deleted directly.
  • a feature corresponds to multiple categories, it can be combined according to the levels corresponding to different categories. For example, the features can be layered, including 1, 2, and -9999, into the same category to reduce the sparseness of the feature matrix. sex. If the source data is continuous type data, it can be filled based on the mean.
  • data conversion refers to type conversion and normalization of data. For example, gender characteristics are divided into male and female, or represented by numbers 0 and 1. Transaction amount data is usually decimal precision data, etc. for subsequent analysis.
  • the time and value corresponding to each data item are used as the horizontal and vertical coordinates to draw the data curve corresponding to the time series.
  • the image analysis model intercepts sections of a certain length of time on the data curve to determine whether there is a cyclic change trend in these sections. Specifically, you can try to adjust different segment sizes from large to small, or from small to large, until each intercepted segment directly conforms to the cyclical change trend, that is, a segment is a cycle, then you can Each period of the condition is used as a candidate period.
  • S304 Perform moving average processing on the time series data according to multiple candidate periods to determine each moving average sequence.
  • the moving average sequence corresponds to the selected period one-to-one.
  • the candidate period in order to verify whether each candidate period is selected appropriately, that is, whether a certain candidate period is really a period of time series data, the candidate period is used as the window length to calculate the moving average sequence of the time series data, that is, Use the selected period as the moving average period, calculate multiple moving averages, and arrange these moving averages into a moving average sequence.
  • the moving average sequence is drawn into a moving average. If the moving average no longer has a cyclic change trend, it is proved that the candidate period corresponding to the moving average is the real period corresponding to the time series data, that is, the disassembly period.
  • the smallest candidate period is determined as the dismantling period.
  • the candidate period is the dismantling period.
  • the method of dismantling the same period is used to convert the analysis of daily transaction time point data into the behavior analysis of customers in the same period.
  • the time series of historical transactions are analyzed and disassembled, combined with the monthly billing cycle. , assuming that the data series is split according to a 30-day monthly cycle, rather than a single observation of all time series transactions in history.
  • the specific splitting method is as follows:
  • A1 ⁇ p1, t1, b1, c1, y1, m1, n1... ⁇
  • A2 ⁇ p2, t2, b2, c2, y2, m2, n2... ⁇
  • A5 ⁇ p5, t5, b5, c5, y5, m5, n5... ⁇
  • A30 ⁇ p30, t30, b30, c30, y30, m30, n30... ⁇
  • customers have a greater probability of repayment transactions on different billing dates.
  • lending institutions often specify repayment dates, and customers repay on the repayment date. The possibility is often higher than the early repayment behavior.
  • Periodic data is more representative of customer behavior and the frequency of customer transaction behavior is more similar. Therefore, according to the date of the detection data, in A1, A2, A3, A4, A5, ..., A30 Select the sequence set corresponding to the date, that is, the sample sequence, for outlier detection.
  • the preset division method is to divide one day's data into 24 hours to obtain 24 subsequences.
  • customers can perform repayment or borrowing operations within 24 hours on the repayment date, that is, they can conduct transactions within 24 hours a day.
  • This application disassembles the S307 mid-cycle to obtain
  • the sample sequence Ai is continued to be split into 24-hour intervals according to the transaction time t, and the interval time series corresponding to 24 hours is obtained, that is, 24 subsequences. Then the subsequences corresponding to each hour in each sample sequence are combined into 24 votes.
  • Time series for example, combine all subsequences from 0 to 1 into one voting time series, and so on to get 24 voting time series. Then, outlier detection is performed on the 24 voting time series respectively. Based on the anomaly detection results of the 24 voting time series, the voting method is applied to obtain the final anomaly identification result of the daily trading data.
  • This embodiment allocates one vote to each of the 24 voting time series (those skilled in the art can also assign different weights to different time intervals based on expert experience), and votes on abnormalities and non-abnormalities respectively. If a certain voting time series is judged to be abnormal, the abnormal vote value is increased by 1 (or corresponding other weight value), otherwise, the non-abnormal vote value is increased by 1 (or corresponding other weight value).
  • anomaly detection first establishes a data model.
  • the so-called outliers are data that cannot be completely fitted to the model, or data that deviates relatively from the predicted value. Outliers and normal values can be regarded as two different categories. Therefore, the classification statistics method can be used to judge outliers, and the loan business data can be detected outliers based on the 3 ⁇ criterion based on the data form.
  • X 1 , X 1001 , X 2001 ..., X 1001 represents the time from zero to one on January 2
  • X 2001 represents the time from zero to one on January 3
  • X t represents the time from zero to one on January 31.
  • the outlier range is (- ⁇ , ⁇ 1 -3 ⁇ 1 ) ⁇ ( ⁇ 1 +3 ⁇ 1 , + ⁇ ), that is to say, when the current data X s is within this range, it is judged as an outlier.
  • the outlier range is (- ⁇ , ⁇ 2 -3 ⁇ 2 ) ⁇ ( ⁇ 2 +3 ⁇ 2 , + ⁇ ).
  • the outlier range is updated as described above.
  • other time series anomaly detection methods are also applicable to this aspect of this application.
  • the complete historical transaction data is split according to the time series of different billing cycles, and then the transaction data of the day is split into 24 intervals, and one interval is detected every hour. , perform outlier detection on 24 intervals, and use voting ideas to detect outliers in real time.
  • anomaly determination rules were formulated to evaluate the anomaly results.
  • strict exception determination rules can be used. If the abnormal votes are non-zero, it is determined that there is an abnormality in the data on that day; loose exception determination rules can be used. If the abnormal votes are higher than the non-abnormal votes, it is determined that there is an abnormality in the data on that day. abnormal.
  • the number of abnormal votes is calculated as shown in formula (1):
  • data preprocessing generates time series data. Select the loan business data within a certain time range, here it is assumed to be 3 months, that is, the business data within the time range from January 30 to April 30, and perform invalid data cleaning, data specification conversion, etc. on the business data. Days are used as days. Perform data statistics at a granular level and generate time series data of loan business.
  • hours are used as voting intervals to disassemble the time series data obtained after dismantling the same period, such as 0:00-1:00 on February 5th, 0:00-1:00 on February 12th, and 0:00-1:00 on February 19th. Point..., 0:00-1:00 on April 30, and get the first voting interval.
  • the second voting interval is obtained from 1:00 to 2:00 on February 5th, 1:00 to 2:00 on February 12th, 1:00 to 2:00 on February 19th, and 1:00 to 2:00 on April 30th.
  • 24 voting time series can be obtained.
  • interval anomaly detection Based on the characteristics of the data, select an appropriate time series anomaly detection method, such as the 3 ⁇ criterion, conduct anomaly discrimination on the 24 voting time series obtained by S3, and collect the discrimination results.
  • an appropriate time series anomaly detection method such as the 3 ⁇ criterion
  • the embodiment of this application provides a data anomaly detection method.
  • an anomaly identification method that combines simultaneous dismantling and voting is proposed. That is, firstly, based on the periodic rules of financial transaction data, the data is disassembled according to the periodic characteristics, and abnormality identification is carried out taking into account the periodic characteristics of transaction behavior, which can improve the accuracy of abnormality identification.
  • the idea of voting is proposed to split the time series data into more fine-grained voting time series during anomaly detection, and perform abnormal identification and voting on multiple voting time series respectively.
  • Figure 4 is a schematic structural diagram of a data anomaly detection device provided by an embodiment of the present application.
  • the data anomaly detection device 400 can be implemented by software, hardware, or a combination of both.
  • the data anomaly detection device 400 includes:
  • Acquisition module 401 used for time series data corresponding to the period to be detected
  • Processing module 402 used for:
  • the first duration of the first period corresponding to the sample sequence is smaller than the duration of the disassembly cycle.
  • the duration of the disassembly cycle is an integer multiple of the first duration.
  • the second duration of the second period corresponding to each subsequence is smaller than the first duration.
  • the first duration is an integer multiple of the second duration.
  • processing module 402 is used to:
  • the data curve corresponding to the time series data is drawn; the image analysis model is used to analyze the periodic characteristics of the data curve to determine the disassembly period.
  • processing module 402 is used to:
  • the moving average sequence corresponds to the candidate periods one-to-one;
  • the candidate period corresponding to the moving average sequence is determined as the dismantling period.
  • processing module 402 is used to:
  • processing module 402 is used to:
  • the smallest candidate period is determined as the dismantling period.
  • processing module 402 is used to:
  • processing module 402 is used to:
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 500 may include: at least one processor 501 and a memory 502 .
  • Figure 5 shows an electronic device taking a processor as an example.
  • Memory 502 is used to store programs.
  • the program may include program code, which includes computer operating instructions.
  • the memory 502 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the processor 501 is configured to execute computer execution instructions stored in the memory 502 to implement the methods described in the above method embodiments.
  • the processor 501 may be a central processing unit (CPU for short), or an application specific integrated circuit (ASIC for short), or a device configured to implement the embodiments of the present application. Multiple integrated circuits.
  • the memory 502 can be independent or integrated with the processor 501 .
  • the electronic device 500 may also include:
  • Bus 503 is used to connect the processor 501 and the memory 502 .
  • the bus can be an industry standard architecture (industry standard architecture, ISA) bus, a peripheral component (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • the bus can be divided into address bus, data bus, control bus, etc., but it does not mean that there is only one bus or one type of bus.
  • the memory 502 and the processor 501 can communicate through an internal interface.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium may include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory) , RAM), magnetic disks or optical disks, and other media that can store program codes.
  • the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above method embodiments.
  • An embodiment of the present application also provides a computer program product, including a computer program, which implements the methods in the above method embodiments when executed by a processor.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请提供了一种数据异常检测方法、装置、设备、介质及程序产品,通过获取待检测时段对应的时间序列数据,并对时间序列数据进行周期特性解析,确定拆解周期;根据拆解周期,从时间序列数据中拆解出多个样本序列;根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。解决了现有的数据异常检测方法存在对呈周期性变化的金融账务数据的异常检测的效果不稳定,且误判率高的技术问题。

Description

数据异常检测方法、装置、设备、介质及程序产品
本申请要求于2022年08月17日提交中国专利局、申请号为202210988998.5、申请名称为“数据异常检测方法、装置、设备、介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及金融科技(Fintech)领域,尤其涉及一种数据异常检测方法、装置、设备、介质及程序产品。
背景技术
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变。
目前,现有的数据异常检测一般是单一使用3σ方法或者Grubbs测试方法,并且检测异常值通常是采用过去某段时间序列,比如最近7天,最近一个月,最近一年等时间范围。
但是现有的数据异常检测方法对具有周期性的金融账务数据的检测效果较差,异常值范围检测过于粗糙,使得误判的概率大大提高。
即现有的数据异常检测方法存在对呈周期性变化的金融账务数据的异常检测的效果不稳定,且误判率高的技术问题。
发明内容
本申请提供一种数据异常检测方法、装置、设备、介质及程序产品,以解决了现有的数据异常检测方法存在对呈周期性变化的金融账务数据的异常检测的效果不稳定,且误判率高的技术问题。
第一个方面,本申请提供一种数据异常检测方法,包括:
获取待检测时段对应的时间序列数据,并对时间序列数据进行周期特性解析,确定拆解周期;
根据拆解周期,从时间序列数据中拆解出多个样本序列;
根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;
利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
在一种可能的设计中,样本序列对应的第一时段的第一时长小于拆解周期的时长。
可选的,拆解周期的时长是第一时长的整数倍。
在一种可能的设计中,每个子序列对应的第二时段的第二时长小于第一时长。
可选的,第一时长是第二时长的整数倍。
在一种可能的设计中,对时间序列数据进行周期特性解析,确定拆解周期,包括:
根据时间序列数据中各项数据对应的时间,绘制时间序列数据对应的数据曲线;
利用图像分析模型,对数据曲线进行周期特性解析,确定拆解周期。
在一种可能的设计中,利用图像分析模型,对数据曲线进行周期特性解析,确定拆解周期,包括:
利用图像分析模型解析数据曲线的周期特征,确定多个待选周期;
根据多个待选周期分别对时间序列数据进行移动平均处理,确定各个移动平均序列,移动平均序列与待选周期一一对应;
判断各个移动平均序列中的各项数据是否呈周期性变化;
若否,则将移动平均序列对应的待选周期,确定为拆解周期。
在一种可能的设计中,判断各个移动平均序列中的各项数据是否呈周期性变化,包括:
根据移动平均序列中各项数据的先后顺序,绘制移动平均序列对应的移动平均线;
利用图像分析模型,对移动平均线进行周期特性解析,并根据解析结果判断移动平均线是否呈周期性变化。
在一种可能的设计中,将移动平均序列对应的待选周期,确定为拆解周期,包括:
当存在多个移动平均序列不呈周期性变化时,将最小的待选周期确定为拆解周期。
在一种可能的设计中,利用异常检测模型,对各个投票时间序列进行异常检测,包括:
计算每个投票时间序列与每个投票时段对应的数据预测模型的拟合度;
判断拟合度是否满足预设拟合要求;
若否,则确定投票时间序列出现异常。
在一种可能的设计中,根据预设投票判定规则,判断检测结果是否出现异常,包括:
若存在出现异常的投票时间序列,则确定检测结果出现异常;或者,
若出现异常的投票时间序列的数量小于预设数量阈值,则确定检测结果没有出现异常。
第二方面,本申请提供一种数据异常检测装置,包括:
获取模块,用于待检测时段对应的时间序列数据;
处理模块,用于:
对时间序列数据进行周期特性解析,确定拆解周期;
根据拆解周期,从时间序列数据中拆解出多个样本序列;
根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;
利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
第三个方面,本申请提供一种电子设备,包括:
存储器,用于存储程序指令;
处理器,用于调用并执行所述存储器中的程序指令,执行第一方面所提供的任意一种可能的方法。
第四方面,本申请提供一种存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序用于执行第一方面所提供的任意一种可能的数据异常检测方法。
第五方面,本申请还提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现第一方面所提供的任意一种可能的数据异常检测方法。
本申请提供了一种数据异常检测方法、装置、设备、介质及程序产品,通过获取待检测时段对应的时间序列数据,并对时间序列数据进行周期特性解析,确定拆解周期;根据拆解周期,从时间序列数据中拆解出多个样本序列;根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。解决了现有的数据异常检测方法存在对呈周期性变化的金融账务数据的异常检测的效果不稳定,且误判率高的技术问题。达到了提高金融账务的异常检测效果的稳定性,降低误判率的技术效果。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。
图1为本申请实施例提供的一种数据异常检测方法的应用场景示意图;
图2为本申请提供的一种数据异常检测方法的流程示意图;
图3为本申请实施提供的另一种数据异常检测方法的流程示意图;
图4为本申请实施例提供的一种数据异常检测装置的结构示意图;
图5为本申请提供的一种电子设备的结构示意图。
通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,包括但不限于对多个实施例的组合,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
下面对本申请所涉及到的专业名词作出解释:
时间序列分析:一种数理统计数据分析方法,根据不同时间的数据序列来预测未来的数据形态。
异常值:在既定的数据中,出现了不符合认定的数据,或者不符合某个发展规律的数据,或者不符合一定范围内的数据。
异常值检测:根据过去的数据形态规律对当前数据进行判断,是否是符合发展规律的。
同期拆解:对于周期性的数据,按照相同的周期或者时间点进行时间序列拆解,以便更好地让数据具有更好的参照性,比如每个月的某一天,每周的周一,每天的凌晨一点等等。
投票方法:对于数据异常检测,每个时间周期分配一个票数,若判断当前时点的数据是异常值,则将票数投给该数据。如果最终该数据在整个时间周期内得票数超过一定阈值,则认为该数据是异常值。
3σ准则:根据一组统计数据,计算数据的平均值μ和标准差σ,如果某个新出现的数A小于μ-3σ或大于μ+3σ,则认为数值A是异常值。
现有数据异常检测一般是单一使用3σ方法或者Grubbs测试方法,并且检测异常值通常是采用过去某段时间序列,比如最近7天,最近一个月,最近一年等时间范围。
但是现有的数据异常检测方法存在以下缺点:
(1)选取异常值检测的方法单一,适用普通数据形态的数据范围,金融账务数据具有周期性的特征,或者在账单日/还款日还款当天,不同时点数据交易频数分布存在严重倾斜,用历史数据去识别,检测的效果极不稳定,比如3σ准则对符合正态分布的数据效果较好,对偏态分布数据准确性可能较差。
(2)异常值范围检测过于粗糙,比如通过历史交易的数据,来判断当天交易数据是否是异常值,事实上一天的交易不同的时间段交易频数和交易金额是存在周期性规律的,对于金融交易数据来说,忽视这种周期性规律进行异常数据识别,具有较高的异常误判风险。
为解决上述问题,本申请的发明构思是:
(1)本申请对数据做异常检测时提出同期拆解的思想方法,顾及金融业务数据的周期性变化特征,更加精确地利用历史同期时间序列的交易行为数据进行检测,提高异常检测结果的准确性。
(2)本申请对数据做异常检测时对当天24小时交易时点数据按每个小时区间的交易行为数据进行检测,并打标签,然后统计24小时即24个区间内的检测数据结果,汇总标签数据,最后基于投票思想方法来确定最终是否是异常值,在数据精细化拆解的基础上,通过多方法集成的方式,提高异常检测结果的准确性,避免使用某个单一区间影响检测效果。
图1为本申请实施例提供的一种数据异常检测方法的应用场景示意图。如图1所示,用户通过操作用户终端产生了交易数据,用户终端将交易数据上传到服务器中,由服务器自动生成金融账目数据即时间序列102,数据异常检测系统101加载待检测时段对应的时间序列102,该时间序列102是由金融账务核心系统产生的。然后根据时间序列102的变化周期,从时间序列102中提取多个样本序列即进行同期拆解,然后将每个样本序列都按照预设划分方式进行划分,如以每个小时为划分周期或间隔,分成多个子序列,然后将对应时段的子序列组合成一个投票时间序列。即采用投票的思想,在异常检测时将时间序列数据拆分更细粒度的投票时间序列,对多个投票时间序列分别进行异常识别并投票,比如要识别交易日当天数据是否存在异常,可将交易日数据按照小时进行拆分后得到多个小时粒度的投票时间序列,然后分别对多个投票时间序列进行异常识别,根据不同投票时间序列的异常值检测结果进行投票,最终确定是否存在异常值。如果存在异常值,则异常检测系统101就会输出提示信息。通过更细时间粒度的多方投票,提高异常识别的稳健性。
下面具体介绍本申请提供的数据异常检测方法:
图2为本申请实施例提供的一种数据异常检测方法的流程示意图。如图2所示,该数据异常检测方法的具体步骤包括:
S201、获取待检测时段对应的时间序列数据,并对时间序列数据进行周期特性解析,确定拆解周期。
在本步骤中,获取待检测时段对应的时间序列数据,包括:
获取源系统如金融账务核心系统中的金融账务数据,包括:审批数据、交易数据,入账数据等数据。对金融账务数据进行标准化,通过清洗、转换等达到标准化数据,并根据金融账务数据对应的时间戳排序,形成时间序列数据。
在本实施例中,对时间序列数据进行周期特性解析,确定拆解周期,包括:根据时间序列数据中各项数据对应的时间,绘制时间序列数据对应的数据曲线;利用图像分析模型,对数据曲线进行周期特性解析,确定拆解周期。
需要说明的是,拆解周期包括:分钟、小时、天、周、月、季度、年以及其它自定义的时长。
S202、根据拆解周期,从时间序列数据中拆解出多个样本序列。
在本步骤中,样本序列对应的第一时段的第一时长小于拆解周期的时长。可选的,拆解周期的时长是第一时长的整数倍。
例如,拆解周期为一周,第一时长为一天,则将时间序列数据按一周7天进行划分,然后在每周对应的数据中,提取出与对账日或还款日等金融日期相关的那一天的数据,作为样本序列。
S203、根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列。
在本步骤中,每个子序列对应的第二时段的第二时长小于第一时长。可选的,第一时长是第二时长的整数倍。
在本实施例中,为了便于理解,第二时长为1小时。即将一天对应的样本序列划分成24份子序列,每个子序列对应一个小时。然后将不同日的同一个小时的子序列进行组合,得到24个小时对应的24个投票时间序列。
S204、利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
在本步骤中,异常检测模型包括:与每个第二时段对应的预测数据模型,该预测数据模型是提前训练好的模型,能够对第二时段的金融数据的数值进行预测。
将各个投票时间序列中的各个数据分别输入预测数据模型中,判断这些数据是否能够与预测数据模型中得到的数据曲线完全拟合,若无法拟合,则证明出现了异常值。
或者判断投票时间序列中的数据与预测数据模型中预测值的偏差是否在预设偏差阈值范围之内,若不在偏差阈值范围之内,则证明出现了异常值。
预设投票判定规则包括两种类型,一种是严苛的判定规则,其要求只要任意一个投票时间序列中出现了异常值,则认为待检测时段出现了异常。另一种是较为宽松的判定规则,其要求只要任意一个投票时间序列中出现的异常值的数量没有超过预设数量阈值,则认为待检测时段没有出现异常。
在检测到异常后,可以向运维人员发送提醒信息,以便于运维人员及时处理,避免数据异常带来进一步的损失,降低金融系统风险。
本申请实施例提供了一种数据异常检测方法,获取待检测时段对应的时间序列数据,并对时间序列数据进行周期特性解析,确定拆解周期;根据拆解周期,从时间序列数据中拆解出多个样本序列;根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。解决了现有的数据异常检测方法存在对呈周期性变化的金融账务数据的异常检测的效果不稳定,且误判率高的技术问题。达到了提高金融账务的异常检测效果的稳定性,降低误判率的技术效果。
图3为本申请实施提供的另一种数据异常检测方法的流程示意图。如图3所示,该数据异常检测方法的具体步骤包括:
S301、获取待检测时段对应的时间序列数据。
在本步骤中,具体包括:
获取源系统如金融账务核心系统中的金融账务数据,包括:审批数据、交易数据,入账数据等数据。对金融账务数据进行标准化,通过清洗、转换等达到标准化数据。
在本实施例中,在数据清洗阶段,首先处理缺失值和噪声数据,数据缺失通常为存在NA的数据,数据噪声通常为异常值,比如数位为-9999,如果该特征的缺失值对于分类并无太大作用,可以直接删除,如果一个特征对应多个类别,可以根据不同类对应的层次进行组合,比如将特征分层,包含1、2、-9999归为同一类,减少特征矩阵的稀疏性。如果源数据是连续型类型的数据,则可以根据均值进行填充。此外,数据转换指的是对数据进行类型转换、归一化。比如性别特征分为男、女表示,或者数字0和1表示,交易金额数据通常为decimal十进制精度的数据等等,以便后续进行分析。
S302、根据时间序列数据中各项数据对应的时间,绘制时间序列数据对应的数据曲线。
在本步骤中,以各项数据对应的时间和取值作为横纵坐标,绘制出时间序列对应的数据曲线。
S303、利用图像分析模型解析数据曲线的周期特征,确定多个待选周期。
在本步骤中,图像分析模型在数据曲线上截取一定时间长度的区段,判断这些区段是否存在周期性变化趋势。具体的,可以从大到小,或者从小到大来尝试调整不同的区段大小,直至所截取到的各个区段直接符合周期性变化趋势,即一个区段就是一个周期,那么就可以把符合条件的各个周期作为待选周期。
S304、根据多个待选周期分别对时间序列数据进行移动平均处理,确定各个移动平均序列。
在本步骤中,移动平均序列与待选周期一一对应。
在本实施例中,为了验证各个待选周期是否选择恰当,即某个待选周期是否真的是时间序列数据的周期,将待选周期作为窗口长度,计算时间序列数据的移动平均序列,即以待选周期为移动平均周期,计算多个移动平均值,将这些移动平均值依次排列成移动平均序列。
S305、判断各个移动平均序列中的各项数据是否呈周期性变化。
在本步骤中,若否,则执行步骤S303,
在本实施例中,具体包括:
根据移动平均序列中各项数据的先后顺序,绘制移动平均序列对应的移动平均线;利用图像分析模型,对移动平均线进行周期特性解析,并根据解析结果判断移动平均线是否呈周期性变化。
具体的,将移动平均序列绘制成移动平均线,如果移动平均线不再程序周期性变化趋势,则证明该移动平均线对应的待选周期就是时间序列数据对应的真实周期,即拆解周期。
S306、将移动平均序列对应的待选周期,确定为拆解周期。
在本实施例中,具体包括:
当存在多个移动平均序列不呈周期性变化时,将最小的待选周期确定为拆解周期。
或者,按各个待选周期的从小到大或从大到小的顺序来绘制移动平均线,直到出现移动平均线不成周期性变化时,该待选周期就是拆解周期。
S307、根据拆解周期,从时间序列数据中拆解出多个样本序列。
在本实施例中,利用同期拆解的方法,将分析每天的交易时点数据转化为按同周期的客户的行为分析,对历史交易的时间序列进行分析拆解,结合每个月的账单周期,假设按照每月30天一个周期进行数据序列拆分,而不是单一的观察历史所有的时间序列交易。具体拆分方法如下:
设定整个时间序列为集合A,A包含数据形态特征,唯一标识值p,交易时间t,客户账单周期b,客户标识c,其他的交易属性为y,m,n,…,则A={p,t,b,c,y,m,n…}。
按照不同的账单周期b(此处为30)进行同期拆解,相同账单周期的为同一个数据集合,拆分出不同的时间序列集合A1,A2,A3,A4,A5,…,A28,A29,A30则:
A1={p1,t1,b1,c1,y1,m1,n1…}
A2={p2,t2,b2,c2,y2,m2,n2…}
A3={p3,t3,b3,c3,y3,m3,n3…}
A4={p4,t4,b4,c4,y4,m4,n4…}
A5={p5,t5,b5,c5,y5,m5,n5…}
A30={p30,t30,b30,c30,y30,m30,n30…}
结合客户账单周期交易行为数据,客户在不同的账单日进行的还款交易概率更大,以信用卡数据为例,借贷单位往往会指定还款日,客户在还款日当天进行还款的行为的可能性往往高于提前还款行为,周期数据更具有客户行为的代表性,客户交易行为频率更相似,因此可根据检测数据所在日期,在A1,A2,A3,A4,A5,…,A30中选择对应日期的序列集合即样本序列进行异常值检测。
S308、根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列。
在本实施例中,假设样本序列对应的时长为1天,预设划分方式是将一天的数据对应24小时进行分割,得到24个子序列。客户在历史交易时间序列中即时间序列数据中,还款日当天24小时内都可以进行还款或者借款操作,即一天24小时之内都可以进行交易行为,本申请将S307中周期拆解得到的样本序列Ai,按照交易时间t继续拆分到24个小时区间,得到对应24个小时的区间时间序列即24个子序列,然后将各个样本序列中每个小时对应的子序列组合成24个投票时间序列,例如将0-1时的所有子序列合并成一个投票时间序列,以此类推得到24个投票时间序列。然后分别对24个投票时间序列进行异常值检测,根据24个投票时间序列的异常检测结果,应用投票方法,得到最终的日交易数据的异常识别结果。具体操作方式如下:首先将周期时间序列Ai即样本序列按照客户交易时间t进行分拆区间为{t 1,t 2,t 3,...,t 24},即t={t 1,t 2,t 3,...,t 24}。
本实施例对24个投票时间序列分别分配1票(本领域技术人员也可根据专家经验对不同的时间区间分配不同的权重),分别对异常和非异常进行投票。如果某个投票时间序列被判定为异常,则异常得票值加1(或对应其它权重值),否则,非异常得票加1(或对应其它权重值)。
S309、利用异常检测模型,对各个投票时间序列进行异常检测。
在本步骤中,具体包括:
计算每个投票时间序列与每个投票时段对应的数据预测模型的拟合度;
判断拟合度是否满足预设拟合要求;
若否,则确定投票时间序列出现异常。
在本实施例中,异常检测首先建立一个数据模型,所谓异常值就是那些与模型不能完全拟合得数据,或者相对偏离预测值得数据,异常值和正常值可以看作是两个不同得类,因此可以使用分类统计的方法进行异常值判断,针对数据形态基于3σ准则对贷款业务数据进行异常值检测。
选取历史时序数据T N时间对应的贷款业务交易量X 1,X 1001,X 2001…,X t,其中,X 1代表1月31号零点到一点。X 1001代表1月2号零点到一点,X 2001代表1月3号零点到一点,X t代表1月31号零点到一点。
计算这组数据的均值μ 1和标准差σ 1,则对于当前时间T N+1的数据来说,异常值范围是(-∞,μ 1-3σ 1)∪(μ 1+3σ 1,+∞),也就是说当前数据X s在这个范围内时就被判定为异常值。当新来一个实时数据X n时,按照前一个的处理方式,提取每一天中与X n时间对应的交易量,计算这组数据的均值μ 2和标准差σ 2,则对于当前实时数据X N+2来说,异常值范围是(-∞,μ 2-3σ 2)∪(μ 2+3σ 2,+∞)。每当新来一个实时数据时,按照如前所述的方法更新异常值范围。可选地,其他时间序列异常检测方法同样适用于本申请的此环节。
S310、根据预设投票判定规则,判断检测结果是否出现异常。
在本实施例中,若存在出现异常的投票时间序列,则确定检测结果出现异常;或者,若出现异常的投票时间序列的数量小于预设数量阈值,则确定检测结果没有出现异常。
具体的,在进行金融数据异常识别时,将完整历史的交易数据按照不同账单周期 时间序列进行数据拆分,然后将当天的交易数据拆分成24个区间,每1个小时为一个区间进行检测,对24个区间进行异常值检测,采用投票思想,实时检测出异常值。
最终,基于24个区间时间序列的异常得票结果,根据业务对异常的宽容程度,制定异常判定规则,对异常结果进行评判。可选地,严苛的异常判定规则可采用,若异常得票非零,则判定该日数据存在异常;宽松的异常判定规则可采用,若异常得票高于非异常得票,则判定该日数据存在异常。
为了便于具体实施,异常得票数计算如公式(1)所示:
Figure PCTCN2022124767-appb-000001
其中,
Figure PCTCN2022124767-appb-000002
严苛的异常判定条件(E=1表示判定是异常值,E=0表示判定不是异常值),如公式(2)所示:
Figure PCTCN2022124767-appb-000003
宽松的异常判定条件(E=1表示判定是异常值,E=0表示判定不是异常值),如公式(3)所示:
Figure PCTCN2022124767-appb-000004
为了便于理解以上各个步骤,下面以一个具体例子来进行说明:
假定场景:当前我们需要对某金融单位4月30日(周六)的贷款业务数据是否存在异常进行识别。依据本专利的技术方案,识别流程如下:
首先,数据预处理生成时间序列数据。选取一定时间范围的贷款业务数据,这里假定为3个月,即1月30日至4月30日时间范围内的业务数据,对业务数据进行无效数据清洗、数据规格转换等处理,以天为粒度进行数据统计,生成贷款业务的时间序列数据。
然后,进行数据周期拆解。绘制时间序列图,通过观察确定待选周期,可发现贷款业务存在着较为明显的周周期性,以7为移动窗口长度,对时间序列数据进行移动平均处理,观察结果序列的平稳性,判断数据周期。这里以7为周期,对数据进行周期进行拆解,2月5号、2月12号、2月19号……、4月30号,得到长度为13的时间序列数据。
接下来,进行投票区间拆解。这里以小时作为投票区间,对同期拆解后得到的时间序列数据进行拆解,比如2月5号0点-1点、2月12号0点-1点、2月19号0点-1点……、4月30号0点-1点,得到第一个投票区间。2月5号1点-2点、2月12号1点-2点、2月19号1点-2点……、4月30号1点-2点得到第二个投票区间,以此类推可得到24个投票时间序列。
再然后,进行区间异常检测。针对数据特点,选择合适的时间序列异常检测方法,比如3σ准则,对S3得到的24个投票时间序列分别进行异常判别,收集判别结果。
最后,进行异常投票判定。参考本专利给出的严苛和宽松两种不同的判定准则,给出最终的异常判定结果。
本申请实施例提供了一种数据异常检测方法,基于金融交易数据的周期性特征,提出同期拆解和投票相结合的异常识别方法。即首先依据金融交易数据的周期规律,按照周期特征进行数据拆解,顾及交易行为的周期特征进行异常识别,可提高异常识别的准确性。同时提出采用投票的思想,在异常检测时将时间序列数据拆分更细粒度的投票时间序列,对多个投票时间序列分别进行异常识别并投票,比如要识别交易日当天数据是否存在异常,可将交易日数据按照小时进行拆分后得到多个小时粒度的投票时间序列,然后分别对多个投票时间序列进行异常识别,根据不同投票时间序列的异常值检测结果进行投票,最终确定是否存在异常值,通过更细时间粒度的多方投票,提高异常识别的稳健性。
图4为本申请实施例提供的一种数据异常检测装置的结构示意图。该数据异常检测装置400可以通过软件、硬件或者两者的结合实现。
如图4所示,该数据异常检测装置400包括:
获取模块401,用于待检测时段对应的时间序列数据;
处理模块402,用于:
对时间序列数据进行周期特性解析,确定拆解周期;根据拆解周期,从时间序列数据中拆解出多个样本序列;
根据预设划分方式,将每个样本序列划分成多个子序列,并将相同时段的各个子序列组合成一个投票时间序列,以确定多个不同的时段对应的多个投票时间序列;
利用异常检测模型,对各个投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
在一种可能的设计中,样本序列对应的第一时段的第一时长小于拆解周期的时长。可选的,拆解周期的时长是第一时长的整数倍。
在一种可能的设计中,每个子序列对应的第二时段的第二时长小于第一时长。可选的,第一时长是第二时长的整数倍。
在一种可能的设计中,处理模块402,用于:
根据时间序列数据中各项数据对应的时间,绘制时间序列数据对应的数据曲线;利用图像分析模型,对数据曲线进行周期特性解析,确定拆解周期。
在一种可能的设计中,处理模块402,用于:
利用图像分析模型解析数据曲线的周期特征,确定多个待选周期;
根据多个待选周期分别对时间序列数据进行移动平均处理,确定各个移动平均序列,移动平均序列与待选周期一一对应;
判断各个移动平均序列中的各项数据是否呈周期性变化;
若否,则将移动平均序列对应的待选周期,确定为拆解周期。
在一种可能的设计中,处理模块402,用于:
根据移动平均序列中各项数据的先后顺序,绘制移动平均序列对应的移动平均线;利用图像分析模型,对移动平均线进行周期特性解析,并根据解析结果判断移动平均线是否呈周期性变化。
在一种可能的设计中,处理模块402,用于:
当存在多个移动平均序列不呈周期性变化时,将最小的待选周期确定为拆解周期。
在一种可能的设计中,处理模块402,用于:
计算每个投票时间序列与每个投票时段对应的数据预测模型的拟合度;判断拟合度是否满足预设拟合要求;若否,则确定投票时间序列出现异常。
在一种可能的设计中,处理模块402,用于:
若存在出现异常的投票时间序列,则确定检测结果出现异常;或者,
若出现异常的投票时间序列的数量小于预设数量阈值,则确定检测结果没有出现异常。
值得说明的是,图4所示实施例提供的装置,可以执行上述任一方法实施例中所提供的方法,其具体实现原理、技术特征、专业名词解释以及技术效果类似,在此不再赘述。
图5为本申请实施例提供的一种电子设备的结构示意图。如图5所示,该电子设备500,可以包括:至少一个处理器501和存储器502。图5示出的是以一个处理器为例的电子设备。
存储器502,用于存放程序。具体地,程序可以包括程序代码,程序代码包括计算机操作指令。
存储器502可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
处理器501用于执行存储器502存储的计算机执行指令,以实现以上各方法实施例所述的方法。
其中,处理器501可能是一个中央处理器(central processing unit,简称为CPU),或者是特定集成电路(application specific integrated circuit,简称为ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路。
可选地,存储器502既可以是独立的,也可以跟处理器501集成在一起。当所述存储器502是独立于处理器501之外的器件时,所述电子设备500,还可以包括:
总线503,用于连接所述处理器501以及所述存储器502。总线可以是工业标准体系结构(industry standard architecture,简称为ISA)总线、外部设备互连(peripheral component,PCI)总线或扩展工业标准体系结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等,但并不表示仅有一根总线或一种类型的总线。
可选的,在具体实现上,如果存储器502和处理器501集成在一块芯片上实现,则存储器502和处理器501可以通过内部接口完成通信。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁盘或者光盘等各种可以存储程序代码的介质,具体的,该计算机可读存储介质中存储有程序指令,程序指令用于上述各方法实施例中的方法。
本申请实施例还提供一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、 用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由本申请的权利要求书指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求书来限制。

Claims (20)

  1. 一种数据异常检测方法,其特征在于,包括:
    获取待检测时段对应的时间序列数据,并对所述时间序列数据进行周期特性解析,确定拆解周期;
    根据所述拆解周期,从所述时间序列数据中拆解出多个样本序列;
    根据预设划分方式,将每个所述样本序列划分成多个子序列,并将相同时段的各个所述子序列组合成一个投票时间序列,以确定多个不同的所述时段对应的多个所述投票时间序列;
    利用异常检测模型,对各个所述投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
  2. 根据权利要求1所述的数据异常检测方法,其特征在于,所述样本序列对应的第一时段的第一时长小于所述拆解周期的时长。
  3. 根据权利要求2所述的数据异常检测方法,其特征在于,所述拆解周期的时长是所述第一时长的整数倍。
  4. 根据权利要求2或3所述的数据异常检测方法,其特征在于,每个所述子序列对应的第二时段的第二时长小于所述第一时长。
  5. 根据权利要求4所述的数据异常检测方法,其特征在于,所述第一时长是所述第二时长的整数倍。
  6. 根据权利要求1所述的数据异常检测方法,其特征在于,所述对所述时间序列数据进行周期特性解析,确定拆解周期,包括:
    根据所述时间序列数据中各项数据对应的时间,绘制所述时间序列数据对应的数据曲线;
    利用图像分析模型,对所述数据曲线进行所述周期特性解析,确定所述拆解周期。
  7. 根据权利要求6所述的数据异常检测方法,其特征在于,所述利用图像分析模型,对所述数据曲线进行所述周期特性解析,确定所述拆解周期,包括:
    利用所述图像分析模型解析所述数据曲线的周期特征,确定多个待选周期;
    根据多个所述待选周期分别对所述时间序列数据进行移动平均处理,确定各个移动平均序列,所述移动平均序列与所述待选周期一一对应;
    判断各个所述移动平均序列中的各项数据是否呈周期性变化;
    若否,则将所述移动平均序列对应的所述待选周期,确定为所述拆解周期。
  8. 根据权利要求7所述的数据异常检测方法,其特征在于,所述判断各个所述移动平均序列中的各项数据是否呈周期性变化,包括:
    根据所述移动平均序列中各项数据的先后顺序,绘制所述移动平均序列对应的移动平均线;
    利用所述图像分析模型,对所述移动平均线进行所述周期特性解析,并根据解析结果判断所述移动平均线是否呈所述周期性变化。
  9. 根据权利要求7或8所述的数据异常检测方法,其特征在于,所述将所述移动平均序列对应的所述待选周期,确定为所述拆解周期,包括:
    当存在多个所述移动平均序列不呈所述周期性变化时,将最小的所述待选周期确定为所述拆解周期。
  10. 根据权利要求1所述的数据异常检测方法,其特征在于,所述利用异常检测模型,对各个所述投票时间序列进行异常检测,包括:
    计算每个所述投票时间序列与每个投票时段对应的数据预测模型的拟合度;
    判断所述拟合度是否满足预设拟合要求;
    若否,则确定所述投票时间序列出现异常。
  11. 根据权利要求1所述的数据异常检测方法,其特征在于,所述根据预设投票判定规则,判断检测结果是否出现异常,包括:
    若存在出现异常的所述投票时间序列,则确定所述检测结果出现异常;或者,
    若出现异常的所述投票时间序列的数量小于预设数量阈值,则确定所述检测结果没有出现异常。
  12. 一种数据异常检测装置,其特征在于,包括:
    获取模块,用于待检测时段对应的时间序列数据;
    处理模块,用于:
    对所述时间序列数据进行周期特性解析,确定拆解周期;
    根据所述拆解周期,从所述时间序列数据中拆解出多个样本序列;
    根据预设划分方式,将每个所述样本序列划分成多个子序列,并将相同时段的各个所述子序列组合成一个投票时间序列,以确定多个不同的所述时段对应的多个所述投票时间序列;
    利用异常检测模型,对各个所述投票时间序列进行异常检测,并根据预设投票判定规则,判断检测结果是否出现异常。
  13. 根据权利要求12所述的装置,其特征在于,所述样本序列对应的第一时段的第一时长小于所述拆解周期的时长。
  14. 根据权利要求13所述的装置,其特征在于,所述拆解周期的时长是所述第一时长的整数倍。
  15. 根据权利要求12或13所述的装置,其特征在于,所述每个所述子序列对应的第二时段的第二时长小于所述第一时长。
  16. 根据权利要求15所述的装置,其特征在于,所述第一时长是所述第二时长的整数倍。
  17. 根据权利要求12所述的装置,其特征在于,所述处理模块在对所述时间序列数据进行周期特性解析,确定拆解周期时,具体可以用于:
    根据所述时间序列数据中各项数据对应的时间,绘制所述时间序列数据对应的数据曲线;
    利用图像分析模型,对所述数据曲线进行所述周期特性解析,确定所述拆解周期。
  18. 一种电子设备,其特征在于,包括:
    处理器;以及,
    存储器,用于存储所述处理器的计算机程序;
    其中,所述处理器配置为经由执行所述计算机程序来执行权利要求1至11任一项所述的数据异常检测方法。
  19. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至11任一项所述的数据异常检测方法。
  20. 一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至11任一项所述的数据异常检测方法。
PCT/CN2022/124767 2022-08-17 2022-10-12 数据异常检测方法、装置、设备、介质及程序产品 Ceased WO2024036727A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210988998.5 2022-08-17
CN202210988998.5A CN115271929A (zh) 2022-08-17 2022-08-17 数据异常检测方法、装置、设备、介质及程序产品

Publications (1)

Publication Number Publication Date
WO2024036727A1 true WO2024036727A1 (zh) 2024-02-22

Family

ID=83752058

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/124767 Ceased WO2024036727A1 (zh) 2022-08-17 2022-10-12 数据异常检测方法、装置、设备、介质及程序产品

Country Status (2)

Country Link
CN (1) CN115271929A (zh)
WO (1) WO2024036727A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120045942A (zh) * 2025-04-23 2025-05-27 浙江文谷科技有限公司 一种基于周期性数据的设备异常智能检测方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116245666B (zh) * 2023-01-16 2023-09-19 广州尼森网络科技有限公司 一种基于数据处理的费用核算方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931868A (zh) * 2020-09-24 2020-11-13 常州微亿智造科技有限公司 时间序列数据异常检测方法和装置
CN112241751A (zh) * 2019-07-18 2021-01-19 中移(苏州)软件技术有限公司 一种异常检测方法和系统,及计算机可读存储介质
CN113656461A (zh) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 数据处理方法、装置、电子设备和介质
CN113836240A (zh) * 2021-09-07 2021-12-24 招商银行股份有限公司 时序数据分类方法、装置、终端设备及存储介质
WO2022033885A1 (en) * 2020-08-10 2022-02-17 Siemens Aktiengesellschaft System, device and method of detecting abnormal datapoints
CN114218009A (zh) * 2021-12-30 2022-03-22 山东云海国创云计算装备产业创新中心有限公司 一种时间序列异常值检测方法、装置、设备及存储介质
CN114443331A (zh) * 2020-11-04 2022-05-06 中国电信股份有限公司 时序数据异常检测方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101785547B1 (ko) * 2016-07-08 2017-10-17 한양대학교 산학협력단 주기성 시계열 데이터의 변동 추정 장치 및 방법
CN111061620B (zh) * 2019-12-27 2022-07-01 南京林科斯拉信息技术有限公司 一种混合策略的服务器异常智能检测方法及检测系统
CN111860897B (zh) * 2020-08-05 2024-07-16 青岛特来电新能源科技有限公司 一种异常检测方法、装置、设备及计算机可读存储介质
CN112966222B (zh) * 2021-03-10 2024-06-21 中国民航信息网络股份有限公司 一种时间序列异常数据检测方法及相关设备
CN114663232A (zh) * 2022-03-22 2022-06-24 中国工商银行股份有限公司 异常交易行为的监测方法、装置及计算机程序产品

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241751A (zh) * 2019-07-18 2021-01-19 中移(苏州)软件技术有限公司 一种异常检测方法和系统,及计算机可读存储介质
WO2022033885A1 (en) * 2020-08-10 2022-02-17 Siemens Aktiengesellschaft System, device and method of detecting abnormal datapoints
CN111931868A (zh) * 2020-09-24 2020-11-13 常州微亿智造科技有限公司 时间序列数据异常检测方法和装置
CN114443331A (zh) * 2020-11-04 2022-05-06 中国电信股份有限公司 时序数据异常检测方法和装置
CN113656461A (zh) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 数据处理方法、装置、电子设备和介质
CN113836240A (zh) * 2021-09-07 2021-12-24 招商银行股份有限公司 时序数据分类方法、装置、终端设备及存储介质
CN114218009A (zh) * 2021-12-30 2022-03-22 山东云海国创云计算装备产业创新中心有限公司 一种时间序列异常值检测方法、装置、设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120045942A (zh) * 2025-04-23 2025-05-27 浙江文谷科技有限公司 一种基于周期性数据的设备异常智能检测方法
CN120045942B (zh) * 2025-04-23 2025-08-01 浙江文谷科技有限公司 一种基于周期性数据的设备异常智能检测方法

Also Published As

Publication number Publication date
CN115271929A (zh) 2022-11-01

Similar Documents

Publication Publication Date Title
CN110415119B (zh) 模型训练、票据交易预测方法、装置、存储介质及设备
CN105184574B (zh) 一种套用商户类别码欺诈行为的检测方法
WO2022267735A1 (zh) 业务数据处理方法、装置、计算机设备和存储介质
Hautsch et al. Capturing the zero: a new class of zero-augmented distributions and multiplicative error processes
CN111738819A (zh) 表征数据筛选方法、装置和设备
CN104766144A (zh) 订单预测方法及系统
CN109583729B (zh) 用于平台在线模型的数据处理方法和装置
Al Parisi Overview of forecasting zakat collection in Indonesia using multiplicative decomposition
WO2024036727A1 (zh) 数据异常检测方法、装置、设备、介质及程序产品
CN112907356A (zh) 逾期催收方法、装置、系统及计算机可读存储介质
CN110851494A (zh) 一种用于账单分析交易特征行为的方法和系统
CN112116464A (zh) 基于事件序列频繁项集的异常交易行为分析方法和系统
CN104866922A (zh) 一种用户离网的预测方法及装置
CN120125362A (zh) 基于机器学习的财务数据风险监测与分析方法及系统
CN110647724B (zh) 一种加清钞模型构建方法、模型构建设备及存储介质
CN112132689A (zh) 一种基于时序因子事件的推荐方法和装置
MOHAMED YOUSOP et al. Lunar effect on stock returns and volatility: An empirical study of Islamic countries
CN103678322A (zh) 一种样本数据的整合系统及方法
WO2024244951A1 (zh) 一种基于深度学习的成本预测方法及系统
CN113537631B (zh) 药品需求量的预测方法、装置、电子设备及存储介质
Madjumerd et al. Evaluation of Multiple Bubbles in the Stock Market of Tehran
CN117132317A (zh) 数据处理方法、装置、设备、介质及产品
CN115375474A (zh) 信息提示方法、装置及电子设备
CN115577879A (zh) 一种现金流预测方法、装置、电子设备及存储介质
CN115481118A (zh) 一种会计科目数据标准化方法、装置、设备、存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22955501

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/06/2025)

122 Ep: pct application non-entry in european phase

Ref document number: 22955501

Country of ref document: EP

Kind code of ref document: A1