WO2020155753A1 - 基于sse的异常点比例优化方法、装置及计算机设备 - Google Patents

基于sse的异常点比例优化方法、装置及计算机设备 Download PDF

Info

Publication number
WO2020155753A1
WO2020155753A1 PCT/CN2019/117292 CN2019117292W WO2020155753A1 WO 2020155753 A1 WO2020155753 A1 WO 2020155753A1 CN 2019117292 W CN2019117292 W CN 2019117292W WO 2020155753 A1 WO2020155753 A1 WO 2020155753A1
Authority
WO
WIPO (PCT)
Prior art keywords
current
abnormal
point
residual
squares
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/CN2019/117292
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020155753A1 publication Critical patent/WO2020155753A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • This application relates to the technical field of intelligent decision-making, and in particular to an SSE-based method, device and computer equipment for optimizing the proportion of abnormal points.
  • Outlier analysis is the process of checking whether the data has input errors and contains unreasonable data. It is very dangerous to ignore the existence of outliers. Including the outliers in the calculation and analysis process of the data without eliminating them will cause bad results. influences.
  • the commonly used method of abnormal point detection is the abnormal point detection of unsupervised models.
  • the embodiments of the present application provide an SSE-based method, device, computer equipment, and storage medium for optimizing anomalous point ratios, aiming to solve the problem of setting anomalous point ratios based on experience when detecting anomalous points in an unsupervised model in the prior art And the threshold is a difficult problem to set.
  • an embodiment of the present application provides a method for optimizing the proportion of abnormal points based on SSE, which includes:
  • the sample to be classified is classified according to the single-class support vector machine and the current abnormal point ratio to obtain the data points of the current abnormal category, and the residual square sum of each data point of the current abnormal category and the center of the normal point is obtained Take it as the next residual sum of squares;
  • the residual variation range is obtained
  • the current abnormal point ratio plus the step length is used as the optimal abnormal point ratio.
  • an SSE-based abnormal point ratio optimization device which includes:
  • the support vector machine construction unit is used to receive samples to be classified, and construct a single-class support vector machine for abnormal point detection according to the preset current proportion of abnormal points and the samples to be classified;
  • the classification and positioning unit is configured to classify the sample to be classified according to the single classification support vector machine and the current abnormal point ratio to obtain the normal point center of the normal category in the classification result;
  • the first residual calculation unit is configured to obtain the residual sum of squares of each data point of the abnormal category in the classification result and the center of the normal point to obtain the current residual sum of squares;
  • the first ratio update unit is configured to subtract a preset step size from the current abnormal point ratio to update the current abnormal point ratio
  • the second residual calculation unit is used to classify the sample to be classified according to the single-class support vector machine and the current abnormal point ratio to obtain the data points of the current abnormal category, and obtain each data point of the current abnormal category and all the data points.
  • the residual sum of squares at the center of the normal point is used as the next residual sum of squares;
  • An amplitude calculation unit configured to divide the difference between the next residual sum of squares and the current residual sum of squares by the step size to obtain the residual variation range
  • a judging unit for judging whether the residual variation range exceeds a preset variation range threshold
  • the optimal ratio acquisition unit is configured to, if the residual variation range exceeds a preset variation range threshold, use the current abnormal point ratio plus the step length as the optimal abnormal point ratio.
  • an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer
  • the program implements the SSE-based abnormal point ratio optimization method described in the first aspect above.
  • the embodiments of the present application also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to execute the aforementioned first On the one hand, the SSE-based outlier ratio optimization method.
  • FIG. 1 is a schematic flowchart of a method for optimizing the proportion of abnormal points based on SSE according to an embodiment of the application;
  • FIG. 2 is a schematic diagram of another process of the method for optimizing the proportion of abnormal points based on SSE according to an embodiment of the application;
  • FIG. 3 is a schematic diagram of another flow of the method for optimizing the proportion of abnormal points based on SSE according to an embodiment of the application;
  • FIG. 4 is a schematic diagram of a sub-process of an SSE-based abnormal point ratio optimization method provided by an embodiment of the application;
  • FIG. 5 is a schematic diagram of another sub-process of the SSE-based abnormal point ratio optimization method provided by an embodiment of the application;
  • FIG. 6 is a schematic block diagram of an SSE-based abnormal point ratio optimization device provided by an embodiment of the application.
  • FIG. 7 is another schematic block diagram of an SSE-based abnormal point ratio optimization device provided by an embodiment of the application.
  • FIG. 8 is another schematic block diagram of an SSE-based abnormal point ratio optimization device provided by an embodiment of the application.
  • FIG. 9 is a schematic block diagram of the subunits of the SSE-based abnormal point ratio optimization device provided by an embodiment of the application.
  • FIG. 10 is a schematic block diagram of another subunit of the SSE-based abnormal point ratio optimization device provided by an embodiment of the application;
  • FIG. 11 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of an SSE-based abnormal point ratio optimization method provided by an embodiment of the application.
  • the SSE-based abnormal point ratio optimization method is applied to a server, and the method uses application software installed in the server. Carry out execution.
  • the method includes steps S110 to S180.
  • S110 Receive a sample to be classified, and construct a single-class support vector machine for abnormal point detection according to a preset current proportion of abnormal points and the sample to be classified.
  • the server after the server receives the sample to be classified uploaded by the uploader, it also simultaneously obtains the set initial current abnormal point ratio of 0.5 (for example, the initial current abnormal point ratio is recorded as m 0 ), which means The expected ratio of normal point samples and abnormal point samples in the classification results of the single-class support vector machine is 1:1. Since it is assumed that there are more normal points than abnormal points, the abnormal point category contains a large number of misclassified normal points. When the proportion of abnormal points decreases, normal points in the abnormal point category will be eliminated. At this point, a single-class support vector machine for outlier detection is constructed according to the preset current proportion of abnormal points and the samples to be classified, as a model basis for subsequent adjustment of the current proportion of abnormal points and reclassification.
  • step S110 includes:
  • S112 According to the first parameter and the second parameter of the hyperplane, and the current abnormal point ratio, construct a single-class support vector machine for abnormal point detection.
  • the single-class support vector machine is OneClassSVM, and its classification model is as follows:
  • ⁇ i represents the slack variable
  • v is an upper limit set in the score of outliers, or the lower bound of the number of examples in the training data set as support vectors
  • This method creates a hyperplane with parameters w and b, which has the largest distance from the zero point in the feature space, and separates the zero point from all data points.
  • the normal point center corresponding to the data point of the normal category in the classification result can be determined.
  • the point center is constant in the subsequent process.
  • step S120 includes:
  • a classification result including data points of normal categories and data points of abnormal categories is obtained.
  • the center of the normal point it is necessary to obtain the average value of the data points of the normal category first, and then use the data point closest to the average value among the data points of the normal category as the normal point center.
  • the proportion of abnormal points can be adjusted continuously, and the optimal abnormality can be obtained according to the change trend of the specified parameters (such as the average Euclidean distance between each data point of the current abnormal category and the center of the normal point) Point ratio.
  • the residual sum of squares is a measure of the degree of model fit in a linear model.
  • a continuous curve is used to approximate or compare discrete points on a plane to represent a data processing of the functional relationship between coordinates. method.
  • V 2 V 1 2 + V 1 2 + ... + V n 2
  • V i is the residual of measured data l i, l i, for example, the remaining amount of data
  • the difference can represent the residual of the data point l i of the abnormal category.
  • S140 Subtract a preset step length from the current abnormal point ratio to update the current abnormal point ratio.
  • the purpose of subtracting the preset step size from the current abnormal point ratio is to continuously adjust the current abnormal point ratio so as to obtain the optimal abnormal point ratio through the trial method.
  • the current abnormal point ratio is updated by subtracting the step size from the current abnormal point ratio. At this time, there is no need to determine the normal point center again, only the data points of the abnormal category in the classification result are obtained, and then the abnormality is calculated. The residual sum of squares of each data point of the category and the center of the normal point is used as the next residual sum of squares.
  • the current residual sum of squares obtained in step S130 is regarded as SSE 0
  • the next residual sum of squares obtained in the first execution of step S150 is regarded as SSE 1
  • the result obtained in the second execution of step S150 The next residual sum of squares is regarded as SSE 2 (the corresponding current residual sum of squares is SSE 1 at this time)
  • the next residual sum of squares obtained from the Nth execution of step S150 is regarded as SSE N (this time corresponding to The current residual sum of squares is SSE N-1 ).
  • the preset step length is denoted as l
  • the residual variation range is calculated by (SSE N -SSE N-1 )/l, where N is a positive integer greater than 0.
  • the residual variation range exceeds the preset variation range threshold, it means that some real abnormal points are classified as normal points, resulting in a sudden increase in the sum of squared residuals from the abnormal point to the normal center point.
  • the last state of the abnormal point ratio (that is, the current abnormal point ratio plus the step size) can be used as the optimal abnormal point ratio.
  • the method further includes:
  • step S190 If the residual variation range does not exceed the variation range threshold, subtract the step size from the current abnormal point ratio to update the current abnormal point ratio, and update the current residual square sum through the next residual square sum, Return to step S150.
  • the residual variation range still maintains a smooth transition, it means that the reduced proportion of abnormal points is not enough to significantly affect the sum of squared residuals between each data point of the abnormal category and the center of the normal point.
  • the current outlier ratio minus the step size to update the current outlier ratio, and the next residual sum of squares is used to update the current residual sum of squares.
  • Step S150 when (SSE N -SSE N-1 )/l does not exceed the preset variation threshold, first use SSE 1 as the current residual sum of squares, and (m 0 -l) as the current abnormal point ratio and return to execution again Step S150 is to obtain SSE 2 ; then when it flows to step S170 again, (SSE 2 -SSE 1 )/l is used as the residual variation range, and so on, until the residual variation range exceeds the preset variation range threshold. can.
  • the method further includes:
  • the sample to be classified can be classified according to the single-class support vector machine and the optimal anomaly point ratio to obtain the optimal classification result and obtain the classification effect The best unsupervised classification model.
  • step S181 the method further includes:
  • the server has completed obtaining the optimal classification result corresponding to the sample to be classified and the optimal abnormal point ratio, the optimal classification result and the optimal The proportion of abnormal points is sent to the uploading terminal corresponding to the sample to be classified, so as to realize the effective notification of the classification result of the uploading terminal.
  • the optimal classification result and the optimal abnormal point ratio can be sent to the cloud server in time at this time, and the cloud server can realize the optimization of the sample corresponding to the sample to be classified.
  • Effective storage of the optimal classification results and the optimal abnormal point ratio may also be synchronized to the cloud server.
  • the unique machine identification code such as IMEI serial number
  • the uploader must be used as the data identification bit for unique data identification.
  • the storage area corresponding to the optimal classification result and the optimal abnormal point ratio in the server can be formatted It can be deleted to effectively release storage space.
  • the method before formatting and deleting the storage area corresponding to the optimal classification result and the optimal abnormal point ratio, the method further includes:
  • the number of iterations is sent to the uploader corresponding to the sample to be classified, and the number of iterations is synchronously sent to the cloud server.
  • the preset current anomaly point ratio and the optimal anomaly point ratio may be compared The difference in the ratio is divided by the step size to obtain the number of iterations. After the number of iterations is known, the number of iterations can be sent to the uploader corresponding to the sample to be classified, and the uploader can accumulate experience in setting the optimal proportion of abnormal points.
  • This method realizes the automatic determination of the optimal proportion of abnormal points, and avoids the problem of poor classification effect caused by setting the proportion of abnormal points based on experience.
  • the embodiment of the present application also provides an SSE-based abnormal point ratio optimization device.
  • the SSE-based abnormal point ratio optimization device is used to execute any embodiment of the aforementioned SSE-based abnormal point ratio optimization method.
  • FIG. 6, is a schematic block diagram of an SSE-based abnormal point ratio optimization device provided by an embodiment of the present application.
  • the SSE-based abnormal point ratio optimization device 100 can be configured in a server.
  • the SSE-based abnormal point ratio optimization device 100 includes a support vector machine construction unit 110, a classification positioning unit 120, a first residual calculation unit 130, a first ratio update unit 140, and a second residual calculation unit 150 , Amplitude calculation unit 160, judgment unit 170, and optimal ratio acquisition unit 180.
  • the support vector machine construction unit 110 is configured to receive samples to be classified, and construct a single-class support vector machine for abnormal point detection according to the preset current proportion of abnormal points and the samples to be classified.
  • the support vector machine construction unit 110 includes:
  • the classification parameter obtaining unit 111 is configured to obtain the first parameter and the second parameter of the hyperplane corresponding to the single classification support vector machine according to the sample to be classified and the current abnormal point ratio;
  • the model acquisition unit 112 is configured to construct a single-class support vector machine for abnormal point detection according to the first parameter and the second parameter of the hyperplane and the current abnormal point ratio.
  • the classification and positioning unit 120 is configured to classify the sample to be classified according to the single classification support vector machine and the current abnormal point ratio to obtain the normal point center of the normal category in the classification result.
  • the classification and positioning unit 120 includes:
  • the initial classification unit 121 is configured to classify the sample to be classified according to the single-class support vector machine and the current abnormal point ratio to obtain a classification result; wherein, the classification result includes normal data points and abnormal data points data point;
  • the distance average calculation unit 122 is configured to obtain the average value corresponding to the data points of the normal category in the classification result to obtain the initial normal point center;
  • the normal point center obtaining unit 123 is configured to obtain the data point closest to the initial normal point center among the data points of the normal category in the classification result as the normal point center corresponding to the data points of the normal category.
  • the first residual calculation unit 130 is configured to obtain the residual square sum of each data point of the abnormal category in the classification result and the center of the normal point to obtain the current residual square sum.
  • the first ratio update unit 140 is configured to subtract a preset step size from the current abnormal point ratio to update the current abnormal point ratio.
  • the second residual calculation unit 150 is configured to classify the sample to be classified according to the single-class support vector machine and the current abnormal point ratio to obtain the data points of the current abnormal category, and obtain each data point of the current abnormal category and The residual sum of squares at the center of the normal point is taken as the next residual sum of squares.
  • the amplitude calculation unit 160 is configured to divide the difference between the next residual sum of squares and the current residual sum of squares by the step size to obtain the residual variation amplitude.
  • the determining unit 170 is configured to determine whether the residual variation range exceeds a preset variation range threshold.
  • the optimal ratio acquisition unit 180 is configured to, if the residual variation range exceeds the variation range threshold, use the current abnormal point ratio plus the step length as the optimal abnormal point ratio.
  • the SSE-based abnormal point ratio optimization apparatus 100 further includes:
  • the second ratio update unit 190 is configured to, if the residual variation range does not exceed the variation range threshold, subtract the step size from the current anomaly point ratio to update the current anomaly point ratio, and use the next residual sum of squares to calculate Update the current residual sum of squares, return to execution, classify the sample to be classified according to the single-class support vector machine and the current anomaly point ratio, obtain the data points of the current anomaly category, and obtain each data point of the current anomaly category and The residual square sum of the center of the normal point is used as the next residual square sum step.
  • the SSE-based abnormal point ratio optimization device 100 further includes:
  • the optimal classification obtaining unit 181 is configured to classify the sample to be classified according to the single classification support vector machine and the optimal anomaly point ratio to obtain an optimal classification result.
  • the device realizes the automatic determination of the optimal abnormal point ratio, and avoids the problem of poor classification effect caused by setting the abnormal point ratio based on experience.
  • the above-mentioned SSE-based abnormal point ratio optimization device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 11.
  • FIG. 11 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 500 is a server, and the server may be an independent server or a server cluster composed of multiple servers.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute the method for optimizing the ratio of abnormal points based on SSE.
  • the processor 502 is used to provide calculation and control capabilities, and support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the SSE-based abnormal point ratio optimization method.
  • the network interface 505 is used for network communication, such as providing data information transmission.
  • the structure shown in FIG. 11 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
  • the specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
  • the processor 502 is configured to run a computer program 5032 stored in a memory to implement the SSE-based abnormal point ratio optimization method disclosed in the embodiment of the present application.
  • the embodiment of the computer device shown in FIG. 11 does not constitute a limitation on the specific configuration of the computer device.
  • the computer device may include more or less components than those shown in the figure. Or combine certain components, or different component arrangements.
  • the computer device may only include a memory and a processor. In such an embodiment, the structures and functions of the memory and the processor are consistent with the embodiment shown in FIG. 11, and will not be repeated here.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • a computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer readable storage medium stores a computer program, where the computer program is executed by a processor to implement the SSE-based abnormal point ratio optimization method disclosed in the embodiments of the present application.
  • the storage medium is a physical, non-transitory storage medium, such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.
  • a physical, non-transitory storage medium such as a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a magnetic disk, or an optical disk that can store program codes. medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开了基于SSE的异常点比例优化方法、装置及计算机设备。该方法包括:根据当前异常点比例及待分类样本构建单分类支持向量机;将待分类样本进行分类得到正常点中心;获取异常类别的各数据点与其的残差平方和,以获取当前残差平方和;通过当前异常点比例减去步长以更新当前异常点比例;将待分类样本根据其进行分类,得到当前异常类别的各数据点与正常点中心的残差平方和以作为下一残差平方和;通过其与当前残差平方和之差除以步长,得到残差变动幅度;若其超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。

Description

基于SSE的异常点比例优化方法、装置及计算机设备
本申请要求于2019年1月28日提交中国专利局、申请号为201910079149.6、申请名称为“基于SSE的异常点比例优化方法、装置及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及智能决策技术领域,尤其涉及一种基于SSE的异常点比例优化方法、装置及计算机设备。
背景技术
异常值分析是检验数据是否有录入错误以及含有不合常理的数据的过程,忽视异常值的存在是十分危险的,不加剔除地把异常值包括进数据的计算分析过程中,对结果会产生不良影响。
目前,异常点检测常用的方法是无监督模型的异常点检测,先针对无监督模型设置异常点的比例和阈值以将样本划分为正常样本以及异常样本,然后针对分类结果可计算异常得分的大小,从而评判无监督模型的好坏。但是设置异常点的比例和阈值往往需要根据经验来手动设置,导致设置难度大。
发明内容
本申请实施例提供了一种基于SSE的异常点比例优化方法、装置、计算机设备及存储介质,旨在解决现有技术中无监督模型的异常点检测时要根据经验来设置设置异常点的比例和阈值,设置难度大的问题。
第一方面,本申请实施例提供了一种基于SSE的异常点比例优化方法,其包括:
接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方 和,以获取当前残差平方和;
通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
第二方面,本申请实施例提供了一种基于SSE的异常点比例优化装置,其包括:
支持向量机构建单元,用于接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
分类定位单元,用于将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
第一残差计算单元,用于获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和;
第一比例更新单元,用于通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
第二残差计算单元,用于将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
幅度计算单元,用于通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
判断单元,用于判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
最优比例获取单元,用于若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理 器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的基于SSE的异常点比例优化方法。
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行上述第一方面所述的基于SSE的异常点比例优化方法。
附图说明
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的基于SSE的异常点比例优化方法的流程示意图;
图2为本申请实施例提供的基于SSE的异常点比例优化方法的另一流程示意图;
图3为本申请实施例提供的基于SSE的异常点比例优化方法的另一流程示意图;
图4为本申请实施例提供的基于SSE的异常点比例优化方法的子流程示意图;
图5为本申请实施例提供的基于SSE的异常点比例优化方法的另一子流程示意图;
图6为本申请实施例提供的基于SSE的异常点比例优化装置的示意性框图;
图7为本申请实施例提供的基于SSE的异常点比例优化装置的另一示意性框图;
图8为本申请实施例提供的基于SSE的异常点比例优化装置的另一示意性框图;
图9为本申请实施例提供的基于SSE的异常点比例优化装置的子单元示意性框图;
图10为本申请实施例提供的基于SSE的异常点比例优化装置的另一子单元示意性框图;
图11为本申请实施例提供的计算机设备的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
请参阅图1,图1为本申请实施例提供的基于SSE的异常点比例优化方法的流程示意图,该基于SSE的异常点比例优化方法应用于服务器中,该方法通过安装于服务器中的应用软件进行执行。
如图1所示,该方法包括步骤S110~S180。
S110、接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机。
在本实施例中,例如,服务器接收了上传端所上传的待分类样本后,也同时获取所设置初始的当前异常点比例为0.5(如将初始的当前异常点比例记为m 0),表示所期望的单分类支持向量机的分类结果中正常点样本和异常点样本比例为1:1。由于假设正常点数量比异常点多,因此此时异常点类别中含有大量的错分正常点。当异常点比例减少的时候,异常点类别中的正常点会被剔除。此时,先根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机,作为后续调整当前异常点比例并重新分类的模型基础。
在一实施例中,如图4所示,步骤S110包括:
S111、根据所述待分类样本,及所述当前异常点比例,获取单分类支持向量机所对应的超平面的第一参数和第二参数;
S112、根据超平面的第一参数和第二参数,及所述当前异常点比例,构建用于异常点检测的单分类支持向量机。
在本实施例中,单分类支持向量机即是OneClassSVM,其分类模型如下:
Figure PCTCN2019117292-appb-000001
s.t.(w·φ(x i))≥b-ξ i,ξ i≥0;
其中,ξ i表示松弛变量;v为异常值的分数中所设置的一个上限,或是训练数据集里面做为支持向量的样例数量的下界;
由拉格朗日变换可知,上述分类模型转化为:
Figure PCTCN2019117292-appb-000002
这个方法创建了一个参数为w、b的超平面,该超平面与特征空间中的零点距离最大,并且将零点与所有的数据点分隔开。
S120、将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心。
在本实施例中,当根据初始设置的当前异常点比例将待分类样本由所述单分类支持向量机进行分类后,可以确定分类结果中正常类别的数据点对应的正常点中心,这一正常点中心在后续过程中是恒定不变的。
在一实施例中,如图5所示,步骤S120包括:
S121、将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到分类结果;其中,所述分类结果中包括正常类别的数据点和异常类别的数据点;
S122、获取所述分类结果中正常类别的数据点所对应的平均值,以获取初始正常点中心;
S123、获取所述分类结果中正常类别的数据点中与所述初始正常点中心距离最近的数据点,以作为正常类别的数据点对应的正常点中心。
在本实施例中,先根据所述单分类支持向量机及当前异常点比例将所述待分类样本进行分类后,得到了包括正常类别的数据点和异常类别的数据点的分类结果。此时为了确定正常点中心,需先获取正常类别的数据点的平均值,然后将正常类别的数据点中距离该平均值最近的数据点,以作为正常点中心。当固定所述正常点中心后,即可不断调整异常点比例,根据指定参数(如当前异常类别的每一数据点与所述正常点中心的平均欧式距离)的变化趋势,来获取最优异常点比例。
S130、获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和。
在本实施例中,残差平方和是在线性模型中衡量模型拟合程度的一个量,用连续曲线近似地刻画或比拟平面上离散点组,以表示坐标之间函数关系的一种数据处理方法。例如,在等精度测量下,残差平方和(V 2)=V 1 2+V 1 2+…+V n 2,其中V i是测量数据l i的残差,例如量数据l i的残差可以表示异常类别的数据点l i的残差。为了判断异常类别的每一数据点与正常点的残差,需计算异常类别的每一数据点与所述正常点中心的残差平方和,以作为当前残差平方和离,从当前残差平方和可以看出异常类别的每一数据点是否均远离正常点中心。
S140、通过所述当前异常点比例减去预设的步长,以更新当前异常点比例。
在本实施例,将所述当前异常点比例减去预设的步长,是为了不断调整当前异常点比例,以通过试探法得出最优异常点比例。
S150、将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和。
在本实施例中,通过将当前异常点比例减去所述步长以更新当前异常点比例,此时无需再次确定正常点中心,只需得到分类结果中的异常类别的数据点,再计算异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和。
S160、通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度。
在本实施例中,通过例如步骤S130中得到的当前残差平方和视为SSE 0,则步骤S150初次执行得到的下一残差平方和视为SSE 1,则步骤S150第二次执行 得到的下一残差平方和视为SSE 2(此时对应的当前残差平方和为SSE 1),……,步骤S150第N次执行得到的下一残差平方和视为SSE N(此时对应的当前残差平方和为SSE N-1)。若将预设的步长记为l,则是通过(SSE N-SSE N-1)/l来计算残差变动幅度,其中N为大于0的正整数。
S170、判断所述残差变动幅度是否超出预设的变动幅度阈值。
在本实施例中,当残差变动幅度陡然变大,表示此刻最新的当前异常点比例不是最优异常点比例,可考虑将此刻最新的当前异常点比例之前一个状态的当前异常点比例作为最优异常点比例。
S180、若所述残差变动幅度超出所述变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
在本实施例中,若残差变动幅度超出预设的变动幅度阈值,表示有部分真实的异常点被划分为正常点,导致异常点到正常中心点的残差平方和突增,此时当前异常点比例的上一状态(即当前异常点比例加上步长)即可作为最优异常点比例。
在一实施例中,如图2所示,步骤S180之后还包括:
S190、若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行步骤S150。
在本实施例中,当残差变动幅度仍保持平稳过渡,表示所降低的异常点比例不足以明显影响异常类别的每一数据点与所述正常点中心的残差平方和,此时需将当前异常点比例减去步长以更新当前异常点比例,并通过下一残差平方和以更新当前残差平方和。例如当(SSE N-SSE N-1)/l未超出预设的变动幅度阈值,此时先将SSE 1作为当前残差平方和,将(m 0-l)作为当前异常点比例重新返回执行步骤S150以得到SSE 2;之后再次流向步骤S170时即是以(SSE 2-SSE 1)/l作为残差变动幅度,以此类推,直至执行到残差变动幅度超出预设的变动幅度阈值即可。
在一实施例中,如图3所示,步骤S180之后还包括:
S181、将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果。
在本实施例中,当确定了最优异常点比例后,即可将所述待分类样本根据 所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果,得到分类效果最优的无监督分类模型。
在一实施例中,步骤S181之后还包括:
将所述最优分类结果及所述最优异常点比例发送至所述待分类样本对应的上传端,并将所述最优分类结果及所述最优异常点比例同步发送至云服务器;
将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除。
在本实施例中,若在服务器中完成了获取了与所述待分类样本对应的最优分类结果及所述最优异常点比例后,可以及时的将该最优分类结果及所述最优异常点比例发送至所述待分类样本对应的上传端,实现对上传端进行分类结果的有效通知。
而且为了降低服务器中的数据存储压力,此时可及时的将所述最优分类结果及所述最优异常点比例同步发送至云服务器,通过云服务器实现对与所述待分类样本对应的最优分类结果及所述最优异常点比例的有效存储。此过程中,还可以将与所述最优分类结果及所述最优异常点比例对应的述待分类样本同步至云服务器。上述的待分类样本、最优分类结果及最优异常点比例在由服务器同步至云服务器中时,需以上传端的唯一机器识别码(如IMEI串号)为数据标识位来进行唯一数据标识。
此时将所述最优分类结果及所述最优异常点比例同步发送至云服务器之后,则可对服务器中将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除,从而有效释放出存储空间。
在一实施例中,所述将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除之前,还包括:
根据预设的当前异常点比例与所述最优异常点比例之差除以所述步长,得到迭代次数;
将所述迭代次数发送至所述待分类样本对应的上传端,并将所述迭代次数同步发送至云服务器。
在本实施例中,为了清楚的获知预设的当前异常点比例所述最优异常点比例之间经过了多少次迭代,此时可以根据预设的当前异常点比例与所述最优异常点比例之差除以所述步长,得到迭代次数。当获知了所述迭代次数后,可以 将所述迭代次数发送至所述待分类样本对应的上传端,上传端对应则可积累设置最优异常点比例的经验。
该方法实现了自动确定最优异常点比例,避免了根据经验设置异常点比例而导致分类效果差的问题。
本申请实施例还提供一种基于SSE的异常点比例优化装置,该基于SSE的异常点比例优化装置用于执行前述基于SSE的异常点比例优化方法的任一实施例。具体地,请参阅图6,图6是本申请实施例提供的基于SSE的异常点比例优化装置的示意性框图。该基于SSE的异常点比例优化装置100可以配置于服务器中。
如图6所示,基于SSE的异常点比例优化装置100包括支持向量机构建单元110、分类定位单元120、第一残差计算单元130、第一比例更新单元140、第二残差计算单元150、幅度计算单元160、判断单元170、最优比例获取单元180。
支持向量机构建单元110,用于接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机。
在一实施例中,如图9所示,支持向量机构建单元110包括:
分类参数获取单元111,用于根据所述待分类样本,及所述当前异常点比例,获取单分类支持向量机所对应的超平面的第一参数和第二参数;
模型获取单元112,用于根据超平面的第一参数和第二参数,及所述当前异常点比例,构建用于异常点检测的单分类支持向量机。
分类定位单元120,用于将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心。
在一实施例中,如图10所示,分类定位单元120包括:
初始分类单元121,用于将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到分类结果;其中,所述分类结果中包括正常类别的数据点和异常类别的数据点;
距离均值计算单元122,用于获取所述分类结果中正常类别的数据点所对应的平均值,以获取初始正常点中心;
正常点中心获取单元123,用于获取所述分类结果中正常类别的数据点中与所述初始正常点中心距离最近的数据点,以作为正常类别的数据点对应的正常 点中心。
第一残差计算单元130,用于获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和。
第一比例更新单元140,用于通过所述当前异常点比例减去预设的步长,以更新当前异常点比例。
第二残差计算单元150,用于将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和。
幅度计算单元160,用于通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度。
判断单元170,用于判断所述残差变动幅度是否超出预设的变动幅度阈值。
最优比例获取单元180,用于若所述残差变动幅度超出所述变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
在一实施例中,如图7所示,基于SSE的异常点比例优化装置100还包括:
第二比例更新单元190,用于若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行执行将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和的步骤。
在一实施例中,如图8所示,基于SSE的异常点比例优化装置100还包括:
最优分类获取单元181,用于将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果。
该装置实现了自动确定最优异常点比例,避免了根据经验设置异常点比例而导致分类效果差的问题。
上述基于SSE的异常点比例优化装置可以实现为计算机程序的形式,该计算机程序可以在如图11所示的计算机设备上运行。
请参阅图11,图11是本申请实施例提供的计算机设备的示意性框图。该计算机设备500是服务器,服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。
参阅图11,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行基于SSE的异常点比例优化方法。
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行基于SSE的异常点比例优化方法。
该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现本申请实施例公开的基于SSE的异常点比例优化方法。
本领域技术人员可以理解,图11中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图11所示实施例一致,在此不再赘述。
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现本申请实施例公开的基于SSE的 异常点比例优化方法。
所述存储介质为实体的、非瞬时性的存储介质,例如可以是U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的实体存储介质。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (20)

  1. 一种基于SSE的异常点比例优化方法,包括:
    接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
    将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
    获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和;
    通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
    将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
    通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
    判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
    若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
  2. 根据权利要求1所述的基于SSE的异常点比例优化方法,其中,所述通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度之后,还包括:
    若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和的步骤。
  3. 根据权利要求1所述的基于SSE的异常点比例优化方法,其中,所述若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例之后,还包括:
    将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类, 得到最优分类结果。
  4. 根据权利要求1所述的基于SSE的异常点比例优化方法,其中,所述根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机,包括:
    根据所述待分类样本,及所述当前异常点比例,获取单分类支持向量机所对应的超平面的第一参数和第二参数;
    根据超平面的第一参数和第二参数,及所述当前异常点比例,构建用于异常点检测的单分类支持向量机。
  5. 根据权利要求1所述的基于SSE的异常点比例优化方法,其中,所述将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心,包括:
    将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到分类结果;其中,所述分类结果中包括正常类别的数据点和异常类别的数据点;
    获取所述分类结果中正常类别的数据点所对应的平均值,以获取初始正常点中心;
    获取所述分类结果中正常类别的数据点中与所述初始正常点中心距离最近的数据点,以作为正常类别的数据点对应的正常点中心。
  6. 根据权利要求3所述的基于SSE的异常点比例优化方法,其中,所述将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果之后,还包括:
    将所述最优分类结果及所述最优异常点比例发送至所述待分类样本对应的上传端,并将所述最优分类结果及所述最优异常点比例同步发送至云服务器;
    将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除。
  7. 根据权利要求6所述的基于SSE的异常点比例优化方法,其中,所述将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除之前,还包括:
    根据预设的当前异常点比例与所述最优异常点比例之差除以所述步长,得到迭代次数;
    将所述迭代次数发送至所述待分类样本对应的上传端,并将所述迭代次数同步发送至云服务器。
  8. 一种基于SSE的异常点比例优化装置,包括:
    支持向量机构建单元,用于接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
    分类定位单元,用于将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
    第一残差计算单元,用于获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和;
    第一比例更新单元,用于通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
    第二残差计算单元,用于将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
    幅度计算单元,用于通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
    判断单元,用于判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
    最优比例获取单元,用于若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
  9. 根据权利要求8所述的基于SSE的异常点比例优化装置,其中,还包括:
    第二比例更新单元,用于若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和的步骤。
  10. 根据权利要求8所述的基于SSE的异常点比例优化装置,其中,所述分类定位单元,包括:
    初始分类单元,用于将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到分类结果;其中,所述分类结果中包括正常类别的 数据点和异常类别的数据点;
    距离均值计算单元,用于获取所述分类结果中正常类别的数据点所对应的平均值,以获取初始正常点中心;
    正常点中心获取单元,用于获取所述分类结果中正常类别的数据点中与所述初始正常点中心距离最近的数据点,以作为正常类别的数据点对应的正常点中心。
  11. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:
    接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
    将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
    获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和;
    通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
    将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
    通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
    判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
    若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
  12. 根据权利要求11所述的计算机设备,其中,所述通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度之后,还包括:
    若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正 常点中心的残差平方和以作为下一残差平方和的步骤。
  13. 根据权利要求11所述的计算机设备,其中,所述若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例之后,还包括:
    将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果。
  14. 根据权利要求11所述的计算机设备,其中,所述根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机,包括:
    根据所述待分类样本,及所述当前异常点比例,获取单分类支持向量机所对应的超平面的第一参数和第二参数;
    根据超平面的第一参数和第二参数,及所述当前异常点比例,构建用于异常点检测的单分类支持向量机。
  15. 根据权利要求11所述的计算机设备,其中,所述将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心,包括:
    将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到分类结果;其中,所述分类结果中包括正常类别的数据点和异常类别的数据点;
    获取所述分类结果中正常类别的数据点所对应的平均值,以获取初始正常点中心;
    获取所述分类结果中正常类别的数据点中与所述初始正常点中心距离最近的数据点,以作为正常类别的数据点对应的正常点中心。
  16. 根据权利要求13所述的计算机设备,其中,所述将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果之后,还包括:
    将所述最优分类结果及所述最优异常点比例发送至所述待分类样本对应的上传端,并将所述最优分类结果及所述最优异常点比例同步发送至云服务器;
    将所述最优分类结果及所述最优异常点比例对应的存储区域进行格式化删除。
  17. 根据权利要求16所述的计算机设备,其中,所述将所述最优分类结果 及所述最优异常点比例对应的存储区域进行格式化删除之前,还包括:
    根据预设的当前异常点比例与所述最优异常点比例之差除以所述步长,得到迭代次数;
    将所述迭代次数发送至所述待分类样本对应的上传端,并将所述迭代次数同步发送至云服务器。
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行以下操作:
    接收待分类样本,根据预设的当前异常点比例及待分类样本构建用于异常点检测的单分类支持向量机;
    将所述待分类样本根据所述单分类支持向量机及所述当前异常点比例进行分类,得到分类结果中正常类别的正常点中心;
    获取所述分类结果中异常类别的每一数据点与所述正常点中心的残差平方和,以获取当前残差平方和;
    通过所述当前异常点比例减去预设的步长,以更新当前异常点比例;
    将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和;
    通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度;
    判断所述残差变动幅度是否超出预设的变动幅度阈值;以及
    若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述通过下一残差平方和与当前残差平方和之差除以所述步长,得到残差变动幅度之后,还包括:
    若所述残差变动幅度未超出所述变动幅度阈值,将当前异常点比例减去所述步长以更新当前异常点比例,通过下一残差平方和以更新当前残差平方和,返回执行将所述待分类样本根据所述单分类支持向量机及当前异常点比例进行分类,得到当前异常类别的数据点,获取当前异常类别的每一数据点与所述正常点中心的残差平方和以作为下一残差平方和的步骤。
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述若所述残差变动幅度超出预设的变动幅度阈值,将当前异常点比例加上步长作为最优异常点比例之后,还包括:
    将所述待分类样本根据所述单分类支持向量机及最优异常点比例进行分类,得到最优分类结果。
PCT/CN2019/117292 2019-01-28 2019-11-12 基于sse的异常点比例优化方法、装置及计算机设备 Ceased WO2020155753A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910079149.6 2019-01-28
CN201910079149.6A CN109919185A (zh) 2019-01-28 2019-01-28 基于sse的异常点比例优化方法、装置及计算机设备

Publications (1)

Publication Number Publication Date
WO2020155753A1 true WO2020155753A1 (zh) 2020-08-06

Family

ID=66960888

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117292 Ceased WO2020155753A1 (zh) 2019-01-28 2019-11-12 基于sse的异常点比例优化方法、装置及计算机设备

Country Status (2)

Country Link
CN (1) CN109919185A (zh)
WO (1) WO2020155753A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198821B (zh) * 2020-01-06 2021-07-16 瑞庭网络技术(上海)有限公司 接口异常判断方法、装置及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771758A (zh) * 2008-12-31 2010-07-07 北京亿阳信通软件研究院有限公司 一种性能指标值正常波动范围的动态确定方法及其装置
CN101964998A (zh) * 2009-07-24 2011-02-02 北京亿阳信通软件研究院有限公司 一种电信网络普通节日话务量的预测方法及其装置
CN108614284A (zh) * 2018-04-24 2018-10-02 北京邮电大学 一种定位信号处理方法、装置及设备
CN109961086A (zh) * 2019-01-28 2019-07-02 平安科技(深圳)有限公司 基于聚类和sse的异常点比例优化方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771758A (zh) * 2008-12-31 2010-07-07 北京亿阳信通软件研究院有限公司 一种性能指标值正常波动范围的动态确定方法及其装置
CN101964998A (zh) * 2009-07-24 2011-02-02 北京亿阳信通软件研究院有限公司 一种电信网络普通节日话务量的预测方法及其装置
CN108614284A (zh) * 2018-04-24 2018-10-02 北京邮电大学 一种定位信号处理方法、装置及设备
CN109961086A (zh) * 2019-01-28 2019-07-02 平安科技(深圳)有限公司 基于聚类和sse的异常点比例优化方法及装置

Also Published As

Publication number Publication date
CN109919185A (zh) 2019-06-21

Similar Documents

Publication Publication Date Title
WO2020155756A1 (zh) 基于聚类和sse的异常点比例优化方法及装置
WO2020155755A1 (zh) 基于谱聚类的异常点比例优化方法、装置及计算机设备
WO2020155752A1 (zh) 异常点检测模型验证方法、装置、计算机设备及存储介质
CN106206346B (zh) 具取样率决定机制的量测抽样方法
WO2020155754A1 (zh) 异常点比例优化方法、装置、计算机设备及存储介质
CN104952753B (zh) 测量抽样方法
WO2020143304A1 (zh) 损失函数优化方法、装置、计算机设备及存储介质
CN111177505A (zh) 指标异常检测模型的训练方法、推荐的方法及装置
JP2005535130A (ja) 最新のプロセス制御システム内で誤って表された計測データを取り扱う方法、システム、および媒体
KR101522385B1 (ko) 반도체 제조 공정에서의 이상 감지 방법, 장치 및 기록매체
US20140032450A1 (en) Classifying unclassified samples
CN108540244B (zh) 预加重系数测试方法、装置及通信设备
CN114564814B (zh) 一种针对稀疏数据的动态阈值高斯核密度估计系统和方法
CN112308278A (zh) 预测模型的优化方法、装置、设备和介质
CN113723716A (zh) 一种客流分级预警异常告警方法、设备及存储介质
CN108089938A (zh) 异常数据处理方法及装置
WO2018006631A1 (zh) 一种用户等级自动划分方法及系统
CN109960626B (zh) 端口异常的识别方法、装置、设备及介质
WO2020155753A1 (zh) 基于sse的异常点比例优化方法、装置及计算机设备
US20170134251A1 (en) Method and device for rapidly detecting sensitivity of a wireless radio-frequency receiver
CN109560978B (zh) 网络流量检测方法、装置及系统和计算机可读存储介质
CN111343573A (zh) 根据环境差异标校在线rssi值的指纹定位方法及装置
CN108495265B (zh) 一种室内定位方法、装置及计算设备
CN114782185A (zh) 银行分布式系统中的差错交易处理方法及装置
CN107677290A (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: 19912912

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19912912

Country of ref document: EP

Kind code of ref document: A1

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 21.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19912912

Country of ref document: EP

Kind code of ref document: A1