WO2020082588A1 - 异常业务请求的识别方法、装置、电子设备及介质 - Google Patents

异常业务请求的识别方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2020082588A1
WO2020082588A1 PCT/CN2018/124341 CN2018124341W WO2020082588A1 WO 2020082588 A1 WO2020082588 A1 WO 2020082588A1 CN 2018124341 W CN2018124341 W CN 2018124341W WO 2020082588 A1 WO2020082588 A1 WO 2020082588A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
preset
business
time period
requests
Prior art date
Application number
PCT/CN2018/124341
Other languages
English (en)
French (fr)
Inventor
唐振华
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020082588A1 publication Critical patent/WO2020082588A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application belongs to the technical field of data processing, and in particular relates to a method, device, electronic device and medium for identifying abnormal business requests.
  • the server of a large organization needs to process a large number of business requests in a short time, but due to malicious attacks or system abnormalities of the business requester, a large number of abnormal business requests may occur in a short time. These abnormal business requests may be sent to the server. Normal operation causes harm and also wastes the processing resources of the server.
  • the existing security defense system is difficult to determine whether there are more abnormal business requests in a short period of time in real time, and often requires engineering personnel to identify abnormal business requests through post-mortem analysis after a long time interval. And lock the time period when a large number of abnormal business requests occur. Obviously, the current abnormal business request has poor real-time performance during the identification process, and the normal operation of the server may be threatened.
  • the prior art has the problem of poor real-time performance in identifying abnormal business requests.
  • a first aspect of an embodiment of the present application provides a method for identifying abnormal service requests, including:
  • the service request contains the correspondence between multiple data types and data values, the data type includes the time of receiving the service request; determine whether the time of receiving each of the service requests in the preset database meets the preset time distribution standard ; If the reception time of each of the business requests in the preset database meets a preset time distribution standard, then the correspondence between the data types and data values contained in each of the business requests in the preset database is converted to A business matrix corresponding to each of the business requests; calculate a preset number of clustering center matrices for all business matrices; if there is a clustering center matrix and all preset reference matrices whose similarity is less than the similarity threshold, then determine The business request in the preset time period is abnormal.
  • a second aspect of an embodiment of the present application provides an apparatus for identifying abnormal service requests, including:
  • the update module is used to store the business request received within the preset time period into the preset database, and delete the service request stored before the preset time period stored in the preset database to update the A preset database, the business request contains a correspondence between multiple data types and data values, and the data type includes the time when the business request is received;
  • the judgment module is used to judge whether the reception time of each of the service requests in the preset database meets a preset time distribution standard
  • the conversion module is configured to, if the reception time of each service request in the preset database meets a preset time distribution standard, convert the data type and data value contained in each service request in the preset database The corresponding relationship is converted into a service matrix corresponding to each of the service requests;
  • a calculation module configured to calculate a preset number of clustering center matrices of all service matrices, and if a similarity between a clustering center matrix and all preset reference matrices is less than a similarity threshold, determine the preset time period There is an exception in the business request within.
  • a third aspect of the embodiments of the present application provides an electronic device, including a memory and a processor.
  • the memory stores computer-readable instructions that can run on the processor.
  • the processor executes the computer. The steps of implementing the method for identifying abnormal service requests as described in the first aspect when reading instructions.
  • a fourth aspect of the embodiments of the present application provides a computer nonvolatile readable storage medium, the computer nonvolatile readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor To realize the steps of the method for identifying abnormal service requests as described in the first aspect.
  • the preset database is updated in real time; if each service in the preset database When the received time of the request conforms to the preset time distribution standard, the correspondence between the data type and data value included in the business request is converted into the business matrix corresponding to each business request; the preset number of clustering center matrices for all business matrices are calculated If the similarity between a cluster center matrix and all preset reference matrices is less than the similarity threshold, it is determined that the business request in the preset time period is abnormal, so that the user can reduce the preset time period for more real-time To grasp the abnormal situation of business request, so as to take corresponding measures in time to ensure the normal operation of the server.
  • FIG. 1 is an implementation flowchart of an abnormal service request identification method provided by an embodiment of the present application
  • FIG. 2 is a specific implementation flowchart of an abnormal service request identification method S102 provided by an embodiment of the present application
  • FIG. 3 is a specific implementation flowchart of an abnormal service request identification method S105 provided by an embodiment of the present application
  • FIG. 4 is a structural block diagram of an apparatus for identifying an abnormal service request according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of a server provided by an embodiment of the present application.
  • FIG. 1 shows an implementation flow of an abnormal service request identification method provided by an embodiment of the present application.
  • the method flow includes steps S101 to S107.
  • the specific implementation principles of each step are as follows.
  • S101 Store the service request received within the preset time period into a preset database, and delete the service request stored before the preset time period stored in the preset database to update the preset database .
  • the service request includes a correspondence between a plurality of data types and data values, and the data type includes a reception time of the service request.
  • the analysis is mainly performed on the service requests stored in the preset database.
  • the service requests in the preset database need to be updated at intervals. Understandably, by adjusting the length of the preset time period, the degree of real-time identification of abnormal business requests can be changed, where the shorter the preset time period, the better the real-time identification of abnormal business requests , Because it can shorten the period of time when a large number of abnormal business requests occur to a smaller range, so that users can make timely response measures.
  • the method for updating the preset database is to store the service request received in the preset time period into the preset database, and store the stored in the preset database before the preset time period.
  • the preset time period may be a time period between 10 seconds before the current time and the current time.
  • the service request contains data values of multiple data types.
  • the data type includes: the reception time of the business request, the request object of the business request, the request type of the business request, and the priority of the business request Grade.
  • S102 Determine whether the reception time of each service request in the preset database meets a preset time distribution standard.
  • the method often used is to send a large number of business requests in a short time, so first determine that the reception time of the business request is in accordance with the preset time
  • the subsequent comprehensive analysis of all data types is conducive to saving computing resources and finding abnormal requests as early as possible in the case of malicious attacks.
  • the preset time period can be divided into multiple unit time periods, and according to the reception time of each service request , Calculate the number of business requests corresponding to each unit time period, if there is a unit time period corresponding to the number of business requests is greater than the preset conventional quantity threshold, it is determined that the reception time of each of the business requests in the preset database does not meet According to the preset time distribution standard, if there is no service request corresponding to a unit time period greater than a preset conventional number threshold, it is determined that the reception time of each of the service requests in the preset database meets the preset time distribution standard.
  • each data type has an interval in its corresponding matrix. After converting the data value corresponding to each data type into binary, it is stored in the interval in the matrix corresponding to each data type to generate a service matrix.
  • a clustering center may be determined among a plurality of service matrices with similar similarities, and a preset number of clustering centers are determined for all the service matrices according to the engineering staff's preset.
  • the preset reference matrix is a clustering center matrix calculated according to the service request in the preset database before update, that is, the essence of the judgment in this step is: according to each service request in the current preset database Whether the cluster center matrix generated by the corresponding service matrix is at least sufficiently similar to the cluster center matrix generated by the service matrix corresponding to each service request in the preset database before updating.
  • the calculated preset number of cluster center matrices is just the cluster center matrix of a preset time period.
  • the cluster center will be added with the new business matrix and the old business. The removal of the matrix appears to move, but according to our statistics, the distance of this movement should be within a reasonable range under normal circumstances.
  • the determination that the service request within the preset time period is abnormal further includes: setting the clustering center matrix as the updated reference matrix.
  • the service request within the preset time period after determining that the service request within the preset time period is not abnormal, it further includes: setting the clustering center matrix as the updated reference matrix.
  • the preset database is updated in real time; if the preset The reception time of each business request in the database conforms to the preset time distribution standard, then the correspondence between the data types and data values contained in the business request is converted into the business matrix corresponding to each business request; Clustering center matrix.
  • the above S102 includes:
  • S1021 Calculate the number of service requests corresponding to each unit period according to the reception time of each of the service requests, and generate a correspondence between the unit time period and the number of service requests.
  • the preset time period is 10: 00: 01-10: 00: 10 and the unit time period is 1 second
  • the preset time period is divided into 10 units equally Time period, to count how many business requests there are in each unit time period, that is, to generate the correspondence between the unit time period and the number of business requests.
  • S1022 Fit the correspondence between the unit time period and the number of service requests in the preset time period through a linear regression model, and calculate the linear regression coefficients of the linear regression equation according to the least square method to generate a linear regression equation.
  • the unit time periods are sorted in chronological order, the X (n) of the first unit time period is set to 1, and the X of the second unit time period is set (N) is set to 2, the third unit time period X (n) is set to 3, and so on, X (n) as the independent variable represents the nth unit time period within 10 seconds.
  • the linear regression coefficient and the error coefficient of the linear regression equation can be calculated by the least square method.
  • S1023 Calculate the theoretical number of business requests corresponding to each unit time period through the linear regression equation, and calculate the difference between the number of business requests corresponding to each unit time period and the theoretical number of business requests.
  • the value of X (n) is brought in to calculate the theoretical number of business requests corresponding to each unit time period.
  • the difference between the number of service requests corresponding to each unit time period and the theoretical number of service requests is the difference between the real value and the theoretical value.
  • the number of service requests corresponding to a unit time period deviates from the linear change trajectory by more than a preset deviation coefficient, and it is determined that the reception time of each of the service requests in the preset database meets The preset time distribution standard.
  • the above S105 includes:
  • S1051 randomly select the preset number of service matrices as the initial clustering center matrix among all the service matrices.
  • n service matrices are arbitrarily selected as the clustering center matrix among all service matrices. Understandably, n is an integer greater than 1 and less than the total number of service matrices.
  • S1052 Calculate the Euclidean distance from each service matrix to each cluster center matrix, and classify each service matrix into a matrix set corresponding to the cluster center matrix with the smallest Euclidean distance.
  • all business matrices include: K1, K2, K3, K4, K5, K6, K7, K8, K9, K10, assuming that the current clustering center matrix is n1, n2, and n3, and by calculating each business Based on the Euclidean distance from the matrix to the clustering center matrix, it can be concluded that the distance between the service matrices K1, K2, K9 and n1 is smaller than the distance between n2 and n3, and K1, K2, and K9 are classified into the matrix set corresponding to n1.
  • S1053 Calculate the average value of the elements at the same position in all service matrices in the matrix set corresponding to each cluster center matrix to generate an average matrix corresponding to each cluster center matrix, and divide the average matrix corresponding to the cluster center matrix As the updated cluster center matrix.
  • the average value of the position elements corresponding to the service matrix K1, the service matrix K2, and the service matrix K9 is calculated to generate three The average matrix n4 of each service matrix, and replace n1 with n4 as the new clustering center.
  • S1054 Determine whether the updated cluster center matrix meets the termination condition.
  • the judging whether the updated clustering center matrix meets the termination condition includes:
  • the updated clustering center matrix does not satisfy the termination condition
  • the updated clustering center matrix meets the termination condition.
  • a preset number of clustering center matrices can be calculated.
  • FIG. 4 shows a structural block diagram of an apparatus for identifying abnormal service requests provided by embodiments of the present application. Related parts.
  • the device includes:
  • the update module 401 is used to store the service request received within the preset time period into a preset database, and delete the service request stored before the preset time period that has been stored in the preset database to update the In the preset database, the business request contains a correspondence between multiple data types and data values, and the data type includes the time when the business request is received;
  • the judgment module 402 is used to judge whether the reception time of each of the service requests in the preset database conforms to a preset time distribution standard
  • the conversion module 403 is configured to, if the reception time of each of the service requests in the preset database meets a preset time distribution standard, convert the data types and data values contained in each of the service requests in the preset database The corresponding relationship is converted into a service matrix corresponding to each of the service requests;
  • the calculation module 404 is used to calculate a preset number of clustering center matrices of all service matrices. If there is a clustering center matrix and all preset reference matrices whose similarity is less than a similarity threshold, the preset time is determined The business request in the segment is abnormal.
  • the determining whether the reception time of each of the service requests in the preset database meets a preset time distribution standard includes:
  • Y (n) aX (n) + b Fit the corresponding relationship between the unit time period and the number of business requests within the preset time period, and calculate the linear regression coefficient of the linear regression equation according to the least square method to generate the linear regression equation;
  • Y (n) Is the number of business requests corresponding to the nth unit time period in the preset time period, X (n) is the nth unit time period in the preset time period, and a is the linear regression Coefficient, the b is the error coefficient; calculate the theoretical number of business requests corresponding to each unit time period through the linear regression equation, and calculate the number of business requests corresponding to each unit time period and the theoretical number of business requests Difference; if the difference corresponding to all unit time periods is less than a preset difference threshold, it is determined that the reception time of each service request in the prese
  • the calculation of a preset number of clustering center matrices for all service matrices includes:
  • the judging whether the updated clustering center matrix meets the termination condition includes:
  • the service request in the preset time period after determining that the service request in the preset time period is abnormal, it further includes: setting the clustering center matrix as the updated reference matrix.
  • the preset database is updated in real time; if each service in the preset database When the received time of the request conforms to the preset time distribution standard, the corresponding relationship between the data type and data value included in the business request is converted into a business matrix corresponding to each business request; If the similarity between a cluster center matrix and all preset reference matrices is less than the similarity threshold, it is determined that the business request in the preset time period is abnormal, so that the user can reduce the preset time period for more real-time To grasp the abnormal situation of business request, so as to take corresponding measures in time to ensure the normal operation of the server.
  • the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and computer-readable instructions 52 stored in the memory 51 and executable on the processor 50, such as an abnormal service request Identification procedures.
  • the processor 50 executes the computer-readable instruction 52
  • the steps in the foregoing method embodiment for identifying abnormal service requests are implemented, for example, steps 101 to 107 shown in FIG. 1.
  • the processor 50 executes the computer-readable instructions 52
  • the functions of the modules / units in the foregoing device embodiments are realized, for example, the functions of the units 401 to 404 shown in FIG. 4.
  • the computer-readable instructions 52 may be divided into one or more modules / units, the one or more modules / units are stored in the memory 51 and executed by the processor 50, To complete this application.
  • the one or more modules / units may be a series of computer-readable instruction instruction segments capable of performing specific functions. The instruction segments are used to describe the execution process of the computer-readable instructions 52 in the electronic device 5.
  • the electronic device 5 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud electronic device.
  • the electronic device may include, but is not limited to, the processor 50 and the memory 51.
  • FIG. 5 is only an example of the electronic device 5 and does not constitute a limitation on the electronic device 5, and may include more or fewer components than shown, or combine certain components, or different components
  • the electronic device may further include an input and output device, a network access device, a bus, and the like.
  • the so-called processor 50 may be a central processing unit (Central Processing Unit (CPU), can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (Application Specific Integrated Circuit (ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本方案适用于数据处理技术领域,提供了一种异常业务请求的识别方法、装置、电子设备及介质,通过将预设时间段内接收的业务请求存入预设数据库,并删除预设时间段之前接收到的业务请求,实时更新预设数据库;若预设数据库中各个业务请求的接收时间符合预设的时间分布标准,则将业务请求所包含的数据类型与数据值的对应关系转换为各个业务请求对应的业务矩阵;计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定预设时间段内的业务请求存在异常,使得用户可以通过缩小预设时间段,更为实时的掌握业务请求的异常情况,从而及时采取对应措施,保障服务器的正常运行。

Description

异常业务请求的识别方法、装置、电子设备及介质
本申请要求于2018年10月25日提交中国专利局、申请号为201811249394.9、发明名称为“异常业务请求的识别方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于数据处理技术领域,尤其涉及一种异常业务请求的识别方法、装置、电子设备及介质。
背景技术
当前,一个大型机构的服务器需要短时间内处理大量的业务请求,但是可能由于恶意攻击或业务请求方系统异常等原因,在短时间内出现大量异常业务请求,这些异常业务请求可能会给服务器的正常运转造成危害,同时也会浪费服务器的处理资源。
现有的安全防御体系难以实时地判断出某一很短的时间段内是否存在较多的异常业务请求,往往需要工程人员在间隔较长的时间以后通过事后的分析才能识别出异常业务请求,并锁定出现大量异常业务请求的时间段。显然,当前的异常业务请求在识别过程中实时性较差,服务器的正常运行可能受到威胁。
技术问题
现有技术在识别异常的业务请求时存在实时性较差的问题。
技术解决方案
本申请实施例的第一方面提供了一种异常业务请求的识别方法,包括:
将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
本申请实施例的第二方面提供了一种异常业务请求的识别装置,包括:
更新模块,用于将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
判断模块,用于判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
转换模块,用于若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
计算模块,用于计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
本申请实施例的第三方面提供了一种电子设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如第一方面所述的异常业务请求的识别方法的步骤。
本申请实施例的第四方面提供了一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如第一方面所述的异常业务请求的识别方法的步骤。
有益效果
在本申请实施例中,通过将预设时间段内接收的业务请求存入预设数据库,并删除预设时间段之前接收到的业务请求,实时更新预设数据库;若预设数据库中各个业务请求的接收时间符合预设的时间分布标准,则将业务请求所包含的数据类型与数据值的对应关系转换为各个业务请求对应的业务矩阵;计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定预设时间段内的业务请求存在异常,使得用户可以通过缩小预设时间段,更为实时的掌握业务请求的异常情况,从而及时采取对应措施,保障服务器的正常运行。
附图说明
图1是本申请实施例提供的异常业务请求的识别方法的实现流程图;
图2是本申请实施例提供的异常业务请求的识别方法S102的具体实现流程图;
图3是本申请实施例提供的异常业务请求的识别方法S105的具体实现流程图;
图4是本申请实施例提供的异常业务请求的识别装置的结构框图;
图5是本申请实施例提供的服务器的示意图。
本发明的实施方式
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
图1示出了本申请实施例提供的异常业务请求的识别方法的实现流程,该方法流程包括步骤S101至S107。各步骤的具体实现原理如下。
S101,将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库。
在本申请实施例中,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间。
在本申请实施例中,主要是针对预设数据库内存储的业务请求进行分析,为了保证分析的实时性,需要每间隔一段时间就对预设数据库内的业务请求进行更新。可以理解地,通过调整预设时间段的时长的大小,可以改变对于异常业务请求进行识别的实时性程度,其中,预设时间段的时长越小,对于异常业务请求进行识别的实时性越好,因为可以将出现大量异常业务请求的时间段缩短至一个更小的范围,方便用户及时作出应对措施。
可以理解地,更新所述预设数据库的方法为:将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除。例如,预设时间段可以为当前时刻之前10秒至当前时刻之间的时间段。
在本申请实施例中,业务请求中包含了多个数据类型的数据值,可选地,数据类型包括:业务请求的接收时间、业务请求的请求对象、业务请求的请求类型以及业务请求的优先级等。
可以理解地,通过业务请求中包含的数据可以从多维度了解业务请求的情况,并在后续过程中进一步对业务请求进行分析。
S102,判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准。
在本申请实施例中,首先并不需要对于业务请求中包含的全部数据类型的数据值进行全面分析,而是首先只对其中一个数据类型即业务请求的接收时间进行分析。这样做的原因在于,在一般情况下,如果有人员恶意攻击业务系统,经常会采用的方式是在短时间内发送大量的业务请求,所以在首先判断业务请求的接收时间是符合预设的时间分布标准的前提下,再进行后续的对全部数据类型的综合分析,有利于节省计算资源,以及在恶意攻击的情况下尽早发现异常请求。
可选地,判断预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,可以通过:将预设时间段划分为多个单位时间段,并根据各个业务请求的接收时间,计算每个单位时间段对应的业务请求的数量,若存在一个单位时间段对应的业务请求的数量大于预设的常规数量阈值,则判定预设数据库中各个所述业务请求的接收时间不符合预设的时间分布标准,若不存在一个单位时间段对应的业务请求的数量大于预设的常规数量阈值,则判定预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
可选地,由于在某些系统中,在正常情况下,业务请求的数量本身就会根据时间的变化而沿一个线性变化轨迹出现增大或减少,所以在这种情况下,可以先拟合出正常的线性变化轨迹,并计算预设时间段中是否存在一个单位时间段对应的真实的业务请求的数量偏离了该线性变化轨迹,若存在一个单位时间段对应的业务请求的数量偏离了该线性变化轨迹超过了预设的偏离系数,则判定预设数据库中各个所述业务请求的接收时间不符合预设的时间分布标准,若不存在一个单位时间段对应的业务请求的数量偏离该线性变化轨迹超过预设的偏离系数,则判定预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。具体的计算过程,将在下文实施例中详细介绍。
S103,若所述预设数据库中各个所述业务请求的接收时间不符合预设的时间分布标准,则判定所述预设时间段内的业务请求存在异常。
S104,若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵。
在本申请实施例中,如上文介绍,在对业务请求中的其中一个数据类型即接收时间验证无误后,才会对各个业务请求的全部的数据类型进行一个综合的验证。
在本申请实施例中,需要将各个业务请求所包含的数据类型与数据值的对应关系转换成一个业务矩阵。具体地,每一个数据类型有其对应的矩阵中的区间,将各个数据类型对应的数据值转换成二进制后,存入各个数据类型对应的矩阵中的区间,以生成业务矩阵。
S105,计算全部业务矩阵的预设数量的聚类中心矩阵。
在本申请实施例中,可以在相似度接近的多个业务矩阵中确定一个聚类中心,根据工程人员的预先设定为全部的业务矩阵确定预设数量的聚类中心。
S106,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
在本申请实施例中,预设的参考矩阵为根据更新前的预设数据库中的业务请求计算出的聚类中心矩阵,即本步骤判断的本质为:根据当前的预设数据库中各个业务请求对应的业务矩阵生成的聚类中心矩阵是否至少与一个更新前的预设数据库中各个业务请求对应的业务矩阵生成的聚类中心矩阵的相似度足够大。
可以理解地,由于本申请实施例中预设数据库中的业务请求都是实时变化的,更新前的预设数据库中的业务请求与当前的预设数据库中的业务请求会存在一个以上的不同,所以计算出的预设数量的聚类中心矩阵,只是某一预设时间段的聚类中心矩阵,当预设数据库更新后,聚类中心会随着新的业务矩阵的加入,以及旧的业务矩阵的移除出现移动,但是根据我们的数据统计,正常情况下这个移动的距离应该在合理的范围内。所以若在预设数据库更新后,存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,即存在至少一个聚类中心矩阵移动的距离过大,则在本申请实施例中判定所述预设时间段内的业务请求存在异常。
值得注意地,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:将所述聚类中心矩阵设定为更新后的所述参考矩阵。
可以理解地,通过更新参考矩阵,为下一次比对聚类中心矩阵是否存在异常做准备。
S107,若不存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求不存在异常。
值得注意地,在所述判定所述预设时间段内的业务请求不存在异常之后,还包括:将所述聚类中心矩阵设定为更新后的所述参考矩阵。
可以理解地,通过更新参考矩阵,为下一次比对聚类中心矩阵是否存在异常做准备。
可以理解地,在本申请实施例中,通过将预设时间段内接收的业务请求存入预设数据库,并删除预设时间段之前接收到的业务请求,实时更新预设数据库;若预设数据库中各个业务请求的接收时间符合预设的时间分布标准,则将业务请求所包含的数据类型与数据值的对应关系转换为各个业务请求对应的业务矩阵;计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定预设时间段内的业务请求存在异常,使得用户可以通过缩小预设时间段,更为实时的掌握业务请求的异常情况,从而及时采取对应措施,保障服务器的正常运行。
作为本申请的一个实施例,如图2所示,上述S102包括:
S1021,根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系。
示例性地,假设在本申请实施例中,预设时间段的10:00:01-10:00:10,单位时间段的时长为1秒,则将预设时间段等分为10个单位时间段,统计各个单位时间段内有多少个业务请求,即生成单位时间段与业务请求的数量的对应关系。
S1022,通过线性回归模型拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程。
所述线性回归模型为:Y(n)=aX(n)+b,所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数。
示例性地,假设预设时间段为10秒,将各个单位时间段按照时间顺序依次排序,将第一个单位时间段的X(n)设定为1,将第二个单位时间段的X(n)设定为2,将第三个单位时间段的X(n)设定为3,依次类推,X(n)作为自变量表示10秒钟内第n个单位时间段。
在统计出预设时间段内的单位时间段与调用请求的数量的对应关系之后,可以通过最小二乘法计算所述线性回归方程的线性回归系数和误差系数。
S1023,通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值。
可以理解地,当计算出线性回归方程后,带入X(n)的取值,可以计算各个单位时间段对应的业务请求的理论数量。而各个单位时间段对应的业务请求的数量与所述业务请求的理论数量的差值就是真实值与理论值的差距。
S1024,若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
可以理解地,在这种情况下可以证明不存在一个单位时间段对应的业务请求的数量偏离该线性变化轨迹超过预设的偏离系数,则判定预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
作为本申请的一个实施例,如图3所示,上述S105包括:
S1051,在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵。
在本申请实施例中,在全部的业务矩阵中任意选取n个业务矩阵作为聚类中心矩阵,可以理解地,n为大于1且小于业务矩阵总数的整数。
S1052,计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合。
示例性地,假设全部的业务矩阵包括:K1、K2、K3、K4、K5、K6、K7、K8、K9、K10,假设当前的聚类中心矩阵为n1、n2以及n3,而且通过计算各个业务矩阵到聚类中心矩阵的欧式距离,得出业务矩阵K1、K2以及K9和n1的距离比和n2或n3的距离小,则将K1、K2以及K9归入n1对应的矩阵集合。
S1053,计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心矩阵。
示例性地,如上文示例所述,假设聚类中心矩阵n1对应的矩阵集合包含K1、K2以及K9,则计算业务矩阵K1、业务矩阵K2以及业务矩阵K9对应位置元素的平均值,以生成三个业务矩阵的平均矩阵n4,并将n4取代n1作为新的聚类中心。
S1054,判断更新后的聚类中心矩阵是否满足终止条件。
可选地,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;
若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;
若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
S1055,若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作。
S1056,若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
在本申请实施例中,通过多次循环计算,可以计算出预设数量的聚类中心矩阵。
对应于上文实施例所述的异常业务请求的识别方法,图4示出了本申请实施例提供的异常业务请求的识别装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图4,该装置包括:
更新模块401,用于将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
判断模块402,用于判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
转换模块403,用于若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
计算模块404,用于计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
可选地,所述判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,包括:
根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系;通过线性回归模型:Y(n)=aX(n)+b拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程;所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数;通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值;若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
可选地,所述计算全部业务矩阵的预设数量的聚类中心矩阵,包括:
在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵;计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合;计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心;判断更新后的聚类中心矩阵是否满足终止条件;若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作;若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
可选地,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
可选地,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:将所述聚类中心矩阵设定为更新后的所述参考矩阵。
在本申请实施例中,通过将预设时间段内接收的业务请求存入预设数据库,并删除预设时间段之前接收到的业务请求,实时更新预设数据库;若预设数据库中各个业务请求的接收时间符合预设的时间分布标准,则将业务请求所包含的数据类型与数据值的对应关系转换为各个业务请求对应的业务矩阵;计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定预设时间段内的业务请求存在异常,使得用户可以通过缩小预设时间段,更为实时的掌握业务请求的异常情况,从而及时采取对应措施,保障服务器的正常运行。
图5是本申请一实施例提供的电子设备的示意图。如图5所示,该实施例的电子设备5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机可读指令52,例如异常业务请求的识别程序。所述处理器50执行所述计算机可读指令52时实现上述各个异常业务请求的识别方法实施例中的步骤,例如图1所示的步骤101至107。或者,所述处理器50执行所述计算机可读指令52时实现上述各装置实施例中各模块/单元的功能,例如图4所示单元401至404的功能。
示例性的,所述计算机可读指令52可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器51中,并由所述处理器50执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令52在所述电子设备5中的执行过程。
所述电子设备5可以是桌上型计算机、笔记本、掌上电脑及云端电子设备等计算设备。所述电子设备可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是电子设备5的示例,并不构成对电子设备5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种异常业务请求的识别方法,其特征在于,包括:
    将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
    判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
    若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
    计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
  2. 如权利要求1所述的异常业务请求的识别方法,其特征在于,所述判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,包括:
    根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系;
    通过线性回归模型:Y(n)=aX(n)+b拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程;所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数;
    通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值;
    若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
  3. 如权利要求1所述的异常业务请求的识别方法,其特征在于,所述计算全部业务矩阵的预设数量的聚类中心矩阵,包括:
    在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵;
    计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合;
    计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心矩阵;
    判断更新后的聚类中心矩阵是否满足终止条件;
    若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作;
    若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
  4. 如权利要求2所述的异常业务请求的识别方法,其特征在于,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
    计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;
    若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;
    若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
  5. 如权利要求1所述的异常业务请求的识别方法,其特征在于,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:
    将所述聚类中心矩阵设定为更新后的所述参考矩阵。
  6. 一种异常业务请求的识别装置,其特征在于,包括:
    更新模块,用于将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
    判断模块,用于判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
    转换模块,用于若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
    计算模块,用于计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
  7. 根据权利要求6所述的异常业务请求的识别装置,其特征在于,所述判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,包括:
    根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系;通过线性回归模型:Y(n)=aX(n)+b拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程;所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数;通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值;若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
  8. 根据权利要求7所述的异常业务请求的识别装置,其特征在于,所述计算全部业务矩阵的预设数量的聚类中心矩阵,包括:
    在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵;计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合;计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心;判断更新后的聚类中心矩阵是否满足终止条件;若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作;若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
  9. 根据权利要求7所述的异常业务请求的识别装置,其特征在于,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
    计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
  10. 根据权利要求6所述的异常业务请求的识别装置,其特征在于,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:将所述聚类中心矩阵设定为更新后的所述参考矩阵。
  11. 一种电子设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
    判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
    若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
    计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
  12. 根据权利要求11所述的电子设备,其特征在于,所述判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,包括:
    根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系;
    通过线性回归模型:Y(n)=aX(n)+b拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程;所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数;
    通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值;
    若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
  13. 根据权利要求11所述的电子设备,其特征在于,所述计算全部业务矩阵的预设数量的聚类中心矩阵,包括:
    在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵;
    计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合;
    计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心矩阵;
    判断更新后的聚类中心矩阵是否满足终止条件;
    若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作;
    若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
  14. 根据权利要求12所述的电子设备,其特征在于,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
    计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;
    若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;
    若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
  15. 根据权利要求11所述的电子设备,其特征在于,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:
    将所述聚类中心矩阵设定为更新后的所述参考矩阵。
  16. 一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:
    将预设时间段内接收到的业务请求存入预设数据库,并将所述预设数据库内已存储的在预设时间段之前接收到的业务请求删除,以更新所述预设数据库,所述业务请求中包含多个数据类型与数据值的对应关系,所述数据类型包括业务请求的接收时间;
    判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准;
    若所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准,则将所述预设数据库中各个所述业务请求所包含的数据类型与数据值的对应关系转换为各个所述业务请求对应的业务矩阵;
    计算全部业务矩阵的预设数量的聚类中心矩阵,若存在一个聚类中心矩阵与全部预设的参考矩阵的相似度均小于相似度阈值,则判定所述预设时间段内的业务请求存在异常。
  17. 如权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述判断所述预设数据库中各个所述业务请求的接收时间是否符合预设的时间分布标准,包括:
    根据各个所述业务请求的接收时间,计算多个单位时段各自对应的业务请求的数量,生成单位时间段与业务请求的数量的对应关系;
    通过线性回归模型:Y(n)=aX(n)+b拟合预设时间段内的单位时间段与业务请求的数量的对应关系,并根据最小二乘法计算所述线性回归方程的线性回归系数,以生成线性回归方程;所述 Y(n)为所述预设时间段内第n个单位时间段对应的业务请求的数量,所述X(n)为所述预设时间段内第n个单位时间段,所述a为所述线性回归系数,所述b为误差系数;
    通过所述线性回归方程计算各个单位时间段对应的业务请求的理论数量,并计算各个单位时间段对应的所述业务请求的数量与所述业务请求的理论数量的差值;
    若全部单位时间段对应的所述差值小于预设的差值阈值,则判定所述预设数据库中各个所述业务请求的接收时间符合预设的时间分布标准。
  18. 如权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述计算全部业务矩阵的预设数量的聚类中心矩阵,包括:
    在全部的所述业务矩阵中任意选取所述预设数量的业务矩阵作为初始的聚类中心矩阵;
    计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合;
    计算各个聚类中心矩阵对应的矩阵集合中全部业务矩阵中各个相同位置的元素的平均值,以生成各个聚类中心矩阵对应的平均矩阵,并将所述聚类中心矩阵对应的平均矩阵作为更新后的聚类中心矩阵;
    判断更新后的聚类中心矩阵是否满足终止条件;
    若所述聚类中心矩阵不满足终止条件,则返回执行计算各个业务矩阵到各个聚类中心矩阵的欧氏距离,将各个所述业务矩阵归入与其欧氏距离最小的聚类中心矩阵对应的矩阵集合的操作;
    若所述聚类中心矩阵满足终止条件,则输出全部的聚类中心矩阵。
  19. 如权利要求17所述的计算机非易失性可读存储介质,其特征在于,所述判断更新后的聚类中心矩阵是否满足终止条件,包括:
    计算各个聚类中心矩阵与其对应的矩阵集合中各个所述业务矩阵的欧式距离的平均值之和,作为聚类误差;
    若所述聚类误差大于预设的误差阈值,则更新后的聚类中心矩阵不满足终止条件;
    若所述聚类误差小于或等于预设的误差阈值,则更新后的聚类中心矩阵满足终止条件。
  20. 如权利要求16所述的计算机非易失性可读存储介质,其特征在于,在所述判定所述预设时间段内的业务请求存在异常之后,还包括:
    将所述聚类中心矩阵设定为更新后的所述参考矩阵。
PCT/CN2018/124341 2018-10-25 2018-12-27 异常业务请求的识别方法、装置、电子设备及介质 WO2020082588A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811249394.9 2018-10-25
CN201811249394.9A CN109492394B (zh) 2018-10-25 2018-10-25 异常业务请求的识别方法及终端设备

Publications (1)

Publication Number Publication Date
WO2020082588A1 true WO2020082588A1 (zh) 2020-04-30

Family

ID=65691882

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124341 WO2020082588A1 (zh) 2018-10-25 2018-12-27 异常业务请求的识别方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN109492394B (zh)
WO (1) WO2020082588A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059013B (zh) * 2019-04-24 2023-06-23 北京百度网讯科技有限公司 软件升级后正常运行的确定方法及装置
CN110222504B (zh) * 2019-05-21 2024-02-13 平安银行股份有限公司 用户操作的监控方法、装置、终端设备及介质
CN110619019B (zh) * 2019-08-07 2024-03-15 平安科技(深圳)有限公司 数据的分布式存储方法及系统
CN111079653B (zh) * 2019-12-18 2024-03-22 中国工商银行股份有限公司 数据库自动分库方法及装置
CN111506829B (zh) * 2020-03-20 2023-08-25 微梦创科网络科技(中国)有限公司 一种异常关注行为批量实时识别方法及装置
CN112232771B (zh) * 2020-10-17 2021-06-01 力合科创集团有限公司 应用于智慧政企云服务的大数据分析方法及大数据云平台
CN112560085B (zh) * 2020-12-10 2023-09-19 支付宝(杭州)信息技术有限公司 业务预测模型的隐私保护方法及装置
CN113630425B (zh) * 2021-10-08 2022-01-07 国网浙江省电力有限公司金华供电公司 一种多电力主体的财务数据安全传输方法
CN116484230B (zh) * 2023-06-20 2023-09-01 世优(北京)科技有限公司 识别异常业务数据的方法及ai数字人的训练方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065526A (zh) * 2013-03-22 2014-09-24 腾讯科技(深圳)有限公司 一种服务器故障报警的方法和装置
WO2014188500A1 (ja) * 2013-05-20 2014-11-27 富士通株式会社 データストリーム処理の並列化プログラム、及びデータストリーム処理の並列化システム
CN104917643A (zh) * 2014-03-11 2015-09-16 腾讯科技(深圳)有限公司 异常账号检测方法及装置
CN107256257A (zh) * 2017-06-12 2017-10-17 上海携程商务有限公司 基于业务数据的异常用户生成内容识别方法及系统
CN108289077A (zh) * 2017-01-09 2018-07-17 中兴通讯股份有限公司 一种对web服务器安全性进行模糊检测分析的方法及装置
CN108491301A (zh) * 2018-02-01 2018-09-04 平安科技(深圳)有限公司 电子装置、基于redis的异常预警方法及存储介质
CN108595300A (zh) * 2018-03-21 2018-09-28 北京奇艺世纪科技有限公司 一种可配置的监控和报警的方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106469276B (zh) * 2015-08-19 2020-04-07 阿里巴巴集团控股有限公司 数据样本的类型识别方法及装置
CN107302547B (zh) * 2017-08-21 2021-07-02 深信服科技股份有限公司 一种web业务异常检测方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065526A (zh) * 2013-03-22 2014-09-24 腾讯科技(深圳)有限公司 一种服务器故障报警的方法和装置
WO2014188500A1 (ja) * 2013-05-20 2014-11-27 富士通株式会社 データストリーム処理の並列化プログラム、及びデータストリーム処理の並列化システム
CN104917643A (zh) * 2014-03-11 2015-09-16 腾讯科技(深圳)有限公司 异常账号检测方法及装置
CN108289077A (zh) * 2017-01-09 2018-07-17 中兴通讯股份有限公司 一种对web服务器安全性进行模糊检测分析的方法及装置
CN107256257A (zh) * 2017-06-12 2017-10-17 上海携程商务有限公司 基于业务数据的异常用户生成内容识别方法及系统
CN108491301A (zh) * 2018-02-01 2018-09-04 平安科技(深圳)有限公司 电子装置、基于redis的异常预警方法及存储介质
CN108595300A (zh) * 2018-03-21 2018-09-28 北京奇艺世纪科技有限公司 一种可配置的监控和报警的方法及装置

Also Published As

Publication number Publication date
CN109492394A (zh) 2019-03-19
CN109492394B (zh) 2024-05-03

Similar Documents

Publication Publication Date Title
WO2020082588A1 (zh) 异常业务请求的识别方法、装置、电子设备及介质
CN110471916B (zh) 数据库的查询方法、装置、服务器及介质
US11416456B2 (en) Method, apparatus, and computer program product for data quality analysis
WO2021042843A1 (zh) 告警信息的决策方法、装置、计算机设备及存储介质
WO2020087829A1 (zh) 数据趋势分析方法、系统、计算机装置及可读存储介质
US9792169B2 (en) Managing alert profiles
WO2021068831A1 (zh) 一种业务告警方法、设备及存储介质
US9183242B1 (en) Analyzing frequently occurring data items
WO2021051529A1 (zh) 评估云主机资源的方法、装置、设备及存储介质
WO2020119053A1 (zh) 一种图片聚类方法、装置、存储介质及终端设备
US11924231B2 (en) Malchain detection
WO2020093637A1 (zh) 设备状态预测方法、系统、计算机装置及存储介质
US20210182318A1 (en) Data Retrieval Method and Apparatus
WO2019232926A1 (zh) 数据一致性校验流控方法、装置、电子设备及存储介质
WO2020155752A1 (zh) 异常点检测模型验证方法、装置、计算机设备及存储介质
US20160269428A1 (en) Data processing
WO2021185079A1 (zh) 相似故障推荐方法及相关设备
CN115004156A (zh) 实时多租户工作负载跟踪和自动节流
CN113485792B (zh) 一种kubernetes集群内Pod调度方法、终端设备及存储介质
WO2020020098A1 (zh) 网络流测量的方法、网络测量设备以及控制面设备
KR20220118560A (ko) 리소스 관리 및 제어 방법 및 장치, 디바이스 및 저장매체
WO2021218619A1 (zh) 任务分配方法及装置、任务处理系统
CN113890842A (zh) 一种信息传输时延上界计算方法、系统、设备和存储介质
US10248508B1 (en) Distributed data validation service
WO2021212753A1 (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: 18937846

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: 18937846

Country of ref document: EP

Kind code of ref document: A1