A server security risk identification method and system based on deep learning

Through the method of combining deep learning and K-means clustering algorithm, server security risks are identified, which solves the problems of insufficient identification accuracy and lack of integrity in the existing technology, and achieves more accurate and comprehensive risk identification and response.

CN118427671BActive Publication Date: 2024-09-03GUANGZHOU QINGLIAN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410881093.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-03
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

Existing server security risk identification solutions have limited identification accuracy and lack of overall perspective, leading to problems such as false alarm triggers and security policy conflicts.

Method used

Using a method based on deep learning, the server operation logs and network traffic data are clustered through the K-means clustering algorithm, multiple clustering centers are determined, and risk type classification and model training are carried out based on these centers, combined with the deep learning model. Risk identification ensures the accuracy and integrity of risk identification results.

Benefits of technology

It improves the accuracy of server security risk identification, avoids false alarm triggers and security policy conflicts, and ensures the integrity and reliability of the identification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427671B
    Figure CN118427671B
Patent Text Reader

Abstract

The present application discloses a server security risk identification method and system based on deep learning, which relates to the field of big data analysis technology. The method is to first obtain multiple cluster centers based on the server operation log data and network traffic data of all historical unit time periods by applying the K-means clustering algorithm, and then determine the corresponding risk type for each center according to the corresponding server security risk type labeling results of all belonging time periods, and then for various types, import the positive and negative sample data obtained based on the corresponding center and the non-corresponding center into the deep learning model for model training, and identify the confidence level of the server security risk type labeling result of the current unit time period as the corresponding type, and finally, when it is found that a certain type corresponding to the maximum confidence level is a risky type, start executing the alarm action and / or server security policy corresponding to the risky type to avoid false alarm triggering or improper execution of security policies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of big data analysis, and specifically relates to a server security risk identification method and system based on deep learning. Background Art

[0002] Servers are an important support for business operations, and their security is directly related to the information security of the enterprise. Therefore, the assessment and management of server security issues are crucial. Server security risk identification is one of the important measures to assess the security risks of servers, prevent security vulnerabilities from being exploited by hackers, and protect enterprise information security.

[0003] At present, the types of server security risks mainly include intrusion attempt risk type, malware activity risk type, internal data leakage risk type, DDoS (Distributed Denial of Service) attack risk type or port scanning risk type, etc.; the identification and response solutions for these risk types are mostly: firstly, the identification model is independently trained and applied based on the corresponding positive and negative sample data, and then the corresponding alarm action and / or server security policy (for example, a pre-established security policy based on firewall rules or intrusion detection configuration parameters) is independently executed based on the identification results. This will cause the accuracy of the risk identification results to a large extent to depend on the accuracy of the division of positive and negative sample data, and the division of positive and negative sample data is mainly done manually (for example, the server security risk type labeling results corresponding to the sample data are obtained by the administrator), which makes the existing server security risk identification scheme have the problem of limited identification accuracy, which may lead to situations such as false alarm triggering and / or improper security policy execution. At the same time, due to the independent training and application of the identification model and the independent execution of the corresponding server security policy, the existing server security risk identification scheme lacks overall globality, which may lead to situations such as conflicts between different security policies executed at the same time. Summary of the invention

[0004] The purpose of the present invention is to provide a server security risk identification method and system based on deep learning, so as to solve the problems of limited identification accuracy and lack of overall globality in existing server security risk identification schemes, thereby avoiding situations such as false alarms, improper execution of security policies and / or conflicts between different security policies executed simultaneously.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] In a first aspect, a server security risk identification method based on deep learning is provided, comprising:

[0007] Obtain the server security risk type annotation results of all historical unit periods and the server operation log data and network traffic data recorded in the corresponding period, wherein the server security risk type annotation results are annotated risk-free types or certain risky types;

[0008] For each period in all the historical unit periods, extracting a multidimensional data feature value for server security risk identification from the corresponding server operation log data and the network traffic data;

[0009] According to the multidimensional data feature values ​​of the respective time periods, a K-means clustering algorithm is applied to obtain a plurality of cluster centers, wherein the total number of centers of the plurality of cluster centers is equal to the total number of types in the server security risk type labeling results of the respective historical unit time periods;

[0010] For each of the time periods, the corresponding first Euler distances are calculated according to the multiple cluster centers and the corresponding multidimensional data eigenvalues, and the corresponding time period is used as the belonging time period of a certain cluster center corresponding to the shortest first Euler distance, wherein the first Euler distance refers to the Euler distance from the position determined by the multidimensional data eigenvalue of the corresponding time period to the multiple cluster centers, and the certain cluster center belongs to the multiple cluster centers;

[0011] For each of the multiple cluster centers, the occurrence frequency of various types in the server security risk type labeling results of all corresponding belonging time periods is counted, and a certain type corresponding to the highest frequency is used as the corresponding server security risk type, wherein the certain type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center;

[0012] For each type in the server security risk type annotation results of all the historical unit time periods, all the corresponding positive sample data and all the negative sample data are imported into the deep learning model for model training to obtain the corresponding server security risk type identification model, wherein the positive sample data contains a first model input item and a numerical value "1" used as a model output item, and the first model input item is the multidimensional data feature value of the belonging time period of the corresponding center, and the negative sample data contains a second model input item and a numerical value "0" used as a model output item, and the second model input item is the multidimensional data feature value of the belonging time period of the non-corresponding center;

[0013] Extracting a new multidimensional data feature value for server security risk identification from the server operation log data and network traffic data recorded in the current unit time period, wherein the new multidimensional data feature value corresponds one-to-one to the multidimensional data feature value;

[0014] For each type, the new value of the multidimensional data feature is imported into the corresponding server security risk type identification model, and the server security risk type labeling result of the current unit time period is output as the confidence of the corresponding type;

[0015] The server security risk type labeling result of the current unit time period is the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is started and executed.

[0016] Based on the above invention content, a new solution for server security risk identification based on clustering algorithm and deep learning model is provided, that is, firstly, according to the server operation log data and network traffic data of all historical unit time periods, a K-means clustering algorithm is applied to obtain multiple clustering centers, and then for each center, the corresponding risk type is determined according to the server security risk type labeling results of all corresponding belonging time periods, and then for various types, the positive and negative sample data obtained based on the corresponding center and the non-corresponding center are imported into the deep learning model for model training to obtain the corresponding risk type identification model, and the server security risk type labeling of the current unit time period is identified. The result is the confidence of the corresponding type. Finally, when it is found that a certain type corresponding to the maximum confidence is a risky type, the alarm action and / or server security policy corresponding to the risky type is started. In this way, the application of the clustering algorithm can achieve a secondary division and correction of the initial division results of the positive and negative sample data (i.e., the server security risk type labeling results). This not only ensures the accuracy of the risk identification results, but also ensures that the identification process of various risk types is no longer independent and specific. The overall globality can avoid situations such as false alarms, improper execution of security policies, and / or conflicts between different security policies executed at the same time, which is convenient for practical application and promotion.

[0017] In one possible design, the certain risk type is an intrusion attempt risk type, a malware activity risk type, an internal data leakage risk type, a DDoS attack risk type, or a port scanning risk type.

[0018] In a possible design, according to the multidimensional data feature values ​​of each time period, a K-means clustering algorithm is applied to obtain multiple cluster centers, including:

[0019] For each of the time periods, a corresponding second Euler distance is calculated based on the corresponding multidimensional data characteristic value and the multidimensional data characteristic values ​​of each other time period in all the historical unit time periods, and the corresponding number of distances is obtained by counting, wherein the second Euler distance refers to the Euler distance from the position determined by the multidimensional data characteristic value of the corresponding time period to the position determined by the multidimensional data characteristic value of each other time period, and the number of distances refers to the number of second Euler distances that are less than a preset distance threshold;

[0020] Determine a plurality of time periods having maximum distance numbers according to the number of distances of the various time periods and the distribution positions of the various time periods in the multidimensional space, wherein the dimensions in the multidimensional space correspond one-to-one to the eigenvalues ​​of the dimensional data in the multidimensional data eigenvalues, and the plurality of time periods belong to all the historical unit time periods;

[0021] Arrange the multiple time periods in descending order according to the maximum values ​​of the number of distances to obtain a time period sequence;

[0022] Select the previous time period, and the previous The multidimensional data feature values ​​of each time period correspond one by one to Initial cluster centers, where Indicates the total number of server security risk type annotation results in all historical unit periods;

[0023] Based on the Initial cluster centers are selected, and a plurality of cluster centers are obtained by clustering using subsequent steps of the K-means clustering algorithm, wherein the subsequent steps refer to other steps after the initial cluster center selection step.

[0024] In a possible design, after obtaining the server security risk type of each center, the method further includes:

[0025] If it is found that the server security risk type of at least two centers is the same type, then the at least two centers are sorted in descending order according to the frequency of occurrence of the same type to obtain a center queue, and the same type continues to be the server security risk type of the first center in the center queue;

[0026] For each non-first center in the center queue, the frequency of occurrence of various other types in the server security risk type labeling results of all corresponding belonging time periods are counted respectively, and a certain other type corresponding to the highest frequency is updated as the corresponding server security risk type, wherein the other type refers to other server security risk types other than the same type, and the certain other type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center.

[0027] In a possible design, the server security risk type labeling result of the current unit time period is the confidence of the various types, and if a type corresponding to the maximum confidence is found to be a risky type, then starting to execute a preset alarm action and / or a preset server security policy corresponding to the risky type, including:

[0028] According to the confidence level of the server security risk type labeling result of the current unit period as the various types, the new confidence level of the server security risk type labeling result of the current unit period as the various types is calculated according to the following formula:

[0029]

[0030] In the formula, Indicates less than or equal to A positive integer, represents the total number of centers of the plurality of cluster centers, Indicates that according to the first The third Euler distance calculated from the center and the new value of the multidimensional data feature is the distance from the position determined by the new value of the multidimensional data feature to the The Euler distance of the centers, Indicates that the server security risk type labeling result of the current unit period is the same as the The confidence level of the server security risk type corresponding to each center, Indicates that the server security risk type labeling result of the current unit period is the same as the The new confidence level of the server security risk type corresponding to each center, represents the maximum value function, represents the minimum value function, represents a negative correlation function;

[0031] The server security risk type labeling result of the current unit time period is the new confidence of the various types. If a type corresponding to the maximum new confidence is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is initiated.

[0032] In one possible design, the deep learning model adopts a convolutional neural network model, a deep belief network model, or a stacked autoencoder network model.

[0033] In one possible design, the method further includes:

[0034] The server security risk type labeling result of the current unit time period is the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risk-free type, and a preset server security policy corresponding to any risky type is being executed, then the execution of the preset server security policy corresponding to any risky type is stopped.

[0035] In one possible design, the method further includes:

[0036] If the server security risk type labeling result of the current unit time period is confirmed, then at the end time of the current unit time period, based on the server security risk type labeling results of the current unit time period and all historical unit time periods and the server operation log data and network traffic data recorded in the corresponding time periods, the multiple clustering centers are re-clustered, and the server security risk type of each center is re-determined, and various types of server security risk type identification models are re-trained.

[0037] In the second aspect, a server security risk identification system based on deep learning is provided, including a historical data acquisition unit, a feature data extraction unit, a cluster center determination unit, an attribution time period division unit, a risk type division unit, an identification model training unit, an identification model application unit and a security measure execution unit;

[0038] The historical data acquisition unit is used to obtain the server security risk type annotation results of all historical unit periods and the server operation log data and network flow data recorded in the corresponding period, wherein the server security risk type annotation result is a marked risk-free type or a risky type;

[0039] The feature data extraction unit is communicatively connected to the historical data acquisition unit, and is used to extract multidimensional data feature values ​​for server security risk identification from the corresponding server operation log data and the network traffic data for each period in all the historical unit periods;

[0040] The cluster center determination unit is communicatively connected to the feature data extraction unit, and is used to apply a K-means clustering algorithm to cluster the multidimensional data feature values ​​of each time period to obtain a plurality of cluster centers, wherein the total number of centers of the plurality of cluster centers is equal to the total number of types in the server security risk type labeling results of all the historical unit time periods;

[0041] The attribution time period division unit is respectively connected to the feature data extraction unit and the cluster center determination unit in communication, and is used to calculate the corresponding first Euler distance for each time period according to the multiple cluster centers and the corresponding multidimensional data feature values, and use the corresponding time period as the attribution time period of a certain cluster center corresponding to the shortest first Euler distance, wherein the first Euler distance refers to the Euler distance from the position determined by the multidimensional data feature value of the corresponding time period to the multiple cluster centers, and the certain cluster center belongs to the multiple cluster centers;

[0042] The risk type division unit is communicatively connected to the attribution time period division unit, and is used to count the occurrence frequencies of various types in the server security risk type labeling results of all corresponding attribution time periods for each center in the multiple cluster centers, and use a certain type corresponding to the highest frequency as the corresponding server security risk type, wherein the certain type belongs to the server security risk type labeling results of all attribution time periods of the corresponding center;

[0043] The identification model training unit is respectively communicatively connected to the feature data extraction unit and the risk type classification unit, and is used to import all corresponding positive sample data and all corresponding negative sample data into the deep learning model for model training for various types in the server security risk type labeling results of all historical unit time periods, so as to obtain a corresponding server security risk type identification model, wherein the positive sample data contains a first model input item and a numerical value "1" used as a model output item, and the first model input item is the multidimensional data feature value of the belonging time period of the corresponding center, and the negative sample data contains a second model input item and a numerical value "0" used as a model output item, and the second model input item is the multidimensional data feature value of the belonging time period of the non-corresponding center;

[0044] The feature data extraction unit is further used to extract a new multidimensional data feature value for server security risk identification from the server operation log data and network traffic data recorded in the current unit time period, wherein the new multidimensional data feature value corresponds one-to-one to the multidimensional data feature value;

[0045] The identification model application unit is respectively connected to the identification model training unit and the feature data extraction unit for communication, and is used to import the new multidimensional data feature value into the corresponding server security risk type identification model for each type, and output the confidence level of the server security risk type labeling result obtained in the current unit time period as the corresponding type;

[0046] The security measure execution unit is communicatively connected to the identification model application unit, and is used to label the server security risk type in the current unit time period as the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risky type, then the preset alarm action and / or preset server security policy corresponding to the risky type is started to be executed.

[0047] In a third aspect, the present invention provides a computer system comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the server security risk identification method as described in the first aspect or any possible design of the first aspect.

[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the server security risk identification method as described in the first aspect or any possible design of the first aspect is executed.

[0049] In a fifth aspect, the present invention provides a computer program product, including a computer program or instructions, which, when executed by a computer, implements the server security risk identification method as described in the first aspect or any possible design of the first aspect.

[0050] Beneficial effects of the above scheme:

[0051] (1) The present invention creatively provides a new solution for server security risk identification based on clustering algorithm and deep learning model, that is, firstly, based on the server operation log data and network traffic data of all historical unit time periods, a K-means clustering algorithm is applied to obtain multiple cluster centers, and then for each center, the corresponding risk type is determined according to the server security risk type labeling results of all corresponding belonging time periods, and then for each type, the positive and negative sample data obtained based on the corresponding center and the non-corresponding center are imported into the deep learning model for model training to obtain the corresponding risk type identification model, and the server security risk of the current unit time period is identified. The risk type labeling result is the confidence of the corresponding type. Finally, when a certain type corresponding to the maximum confidence is found to be a risky type, the alarm action and / or server security policy corresponding to the risky type is started. In this way, the clustering algorithm can be applied to perform a secondary division and correction on the initial division results of the positive and negative sample data (i.e., the server security risk type labeling result). This not only ensures the accuracy of the risk identification results, but also ensures that the identification process of various risk types is no longer independent and specific overall, thereby avoiding situations such as false alarm triggering, improper execution of security policies, and / or conflicts between different security policies executed at the same time.

[0052] (2) The server security risk type identification model can also be continuously trained and optimized to improve the overall solution's ability and accuracy in identifying various security risk types;

[0053] (3) It can also help administrators to promptly discover and respond to server security issues, improve the overall security of the server system, and facilitate practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A flowchart of a server security risk identification method based on deep learning provided in an embodiment of the present application.

[0056] Figure 2 A schematic diagram of the structure of a server security risk identification system based on deep learning provided in an embodiment of the present application.

[0057] Figure 3 A schematic diagram of the structure of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these embodiments without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0059] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.

[0060] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can indicate three situations: A exists alone, B exists alone, or A and B exist at the same time. For another example, A, B and / or C can indicate the existence of any one of A, B and C or any combination of them. The term " / and" that may appear in this document describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can indicate two situations: A exists alone or A and B exist at the same time. In addition, the character " / " that may appear in this document generally indicates that the previous and next associated objects are in an "or" relationship.

[0061] Example

[0062] like Figure 1 As shown, the server security risk identification method based on deep learning provided in the first aspect of this embodiment can be executed by, but is not limited to, a computer system with certain computing resources, such as a cloud platform device. Figure 1 As shown, the server security risk identification method may include but is not limited to the following steps S1 to S9.

[0063] S1. Obtain the server security risk type labeling results of all historical unit time periods and the server operation log data and network traffic data recorded in the corresponding time period, wherein the server security risk type labeling result is a labeled risk-free type or a risky type.

[0064] In step S1, the unit time periods in all the historical unit time periods may be, but are not limited to, time granularities such as 1 hour, half an hour, 15 minutes, or 5 minutes. The server security risk type labeling result may be automatically labeled by the machine when a server security risk event (such as an intrusion attempt event, a malware activity event, an internal data leakage event, a DDoS attack event, or a port scanning event, etc.) is triggered, or may be manually labeled by the administrator when noticing whether a server security risk event has occurred. For example, for a certain historical unit time period (for example, from 10:00 to 10:15 yesterday), if the administrator notices that no server security risk event has occurred, then the non-risk type is labeled, otherwise the risk type is labeled. Specifically, the certain risk type may be, but is not limited to, an intrusion attempt risk type, a malware activity risk type, an internal data leakage risk type, a DDoS attack risk type, or a port scanning risk type, etc. The server operation log data is one or more log files automatically created and maintained by the server, which contains a list of activities performed by the server, specifically but not limited to the client IP (Internet Protocol) address, request date / time, requested web page, HTTP (Hypertext Transfer Protocol) code, number of bytes provided, user agent and / or reference address, etc. The network traffic data refers to the amount of data passing through the computer network within a certain period of time, including website visits and / or mobile data usage. In addition, the server operation log data and the network traffic data can be recorded and read conventionally through existing technologies.

[0065] S2. For each time period in all the historical unit time periods, extract a multidimensional data feature value for server security risk identification from the corresponding server operation log data and the network traffic data.

[0066] In step S2, the multidimensional data feature values ​​may specifically include, but are not limited to, data feature values ​​of dimensions such as the number of requests per minute, the average packet size, the number of failed login attempts, and / or the frequency of error reports, and these feature values ​​may be conventionally extracted based on the server operation log data and the network flow data using existing statistical methods. In addition, it is also necessary to perform conventional data cleaning processing on the server operation log data and the network flow data before extraction in order to remove some dirty data, some null value data, and / or some abnormal value data, etc.

[0067] S3. Based on the multidimensional data feature values ​​of each time period, a K-means clustering algorithm is applied to obtain a plurality of cluster centers, wherein the total number of centers of the plurality of cluster centers is equal to the total number of types in the server security risk type labeling results of all the historical unit time periods.

[0068] In step S3, the K-means clustering algorithm is an iterative clustering analysis algorithm, and its steps are generally: pre-dividing the data into K groups, and randomly selecting K objects as initial cluster centers, and then calculating the distance between each object and each seed cluster center, assigning each object to the cluster center closest to it, and continuously updating the iterative cluster center until the error sum (i.e., the criterion function) converges to obtain the clustering result. Considering that the existing K-means clustering algorithm will change the compactness and discreteness of the clusters due to the influence of extreme values ​​during the clustering process, reducing the accuracy of the entire clustering result, preferably, according to the multidimensional data feature values ​​of each time period, the K-means clustering algorithm is applied to cluster to obtain multiple cluster centers, including but not limited to the following steps S31 to S35.

[0069] S31. For each of the time periods, the corresponding second Euler distance is calculated based on the corresponding multidimensional data characteristic value and the multidimensional data characteristic values ​​of each other time period in all the historical unit time periods, and the corresponding number of distances is obtained by counting, wherein the second Euler distance refers to the Euler distance from the position determined by the multidimensional data characteristic value of the corresponding time period to the position determined by the multidimensional data characteristic value of each other time period, and the number of distances refers to the number of second Euler distances that are less than a preset distance threshold.

[0070] In step S31, the specific calculation formula of the Euler distance is an existing formula. For example, for a certain time period, if there are 511 other time periods, 511 second Euler distances will be calculated, and if 127 of the 511 second Euler distances are less than the preset distance threshold, the number of distances in the certain time period is 127. The aforementioned number of distances positively reflects the number of other time periods around the certain time period in the multidimensional space, that is, it positively reflects the size of the neighbor density corresponding to the certain time period.

[0071] S32. According to the number of distances of each time period and the distribution position of each time period in the multidimensional space, determine a plurality of time periods with maximum number of distances, wherein each dimension in the multidimensional space corresponds one-to-one to each dimensional data feature value in the multidimensional data feature value, and the plurality of time periods belong to all the historical unit time periods.

[0072] In the step S32, the number of distances of each time period in the multiple time periods is greater than the number of distances of adjacent time periods in the multiple dimensions, which can be similar to the method of finding extreme values ​​through partial derivatives of multivariate functions. According to the number of distances of each time period and the distribution position of each time period in the multidimensional space, the multiple time periods with the maximum number of distances are determined.

[0073] S33. Arrange the multiple time periods in order from large to small according to the maximum values ​​of the number of distances to obtain a time period sequence.

[0074] S34. Select the previous time period, and the previous The multidimensional data feature values ​​of each time period correspond one by one to Initial cluster centers, where Indicates the total number of server security risk type annotation results in all historical unit time periods.

[0075] S35. Based on the Initial cluster centers are selected, and subsequent steps of the K-means clustering algorithm are applied to obtain multiple cluster centers, wherein the subsequent steps refer to other steps after the initial cluster center selection step.

[0076] Therefore, based on the above steps S31 to S35, the sample distribution information can be used to select multiple points with the highest density as the initial clustering centers, so as to effectively solve the problem of clustering falling into local optimality due to human interference or extreme value influence, so that the final clustering result can meet the conditions that the similarity of the same cluster is the highest and the similarity of different clusters is the lowest, thereby ensuring the stability of the clustering result.

[0077] S4. For each of the time periods, the corresponding first Euler distances are calculated based on the multiple cluster centers and the corresponding multidimensional data eigenvalues, and the corresponding time period is used as the attribution time period of a certain cluster center corresponding to the shortest first Euler distance, wherein the first Euler distance refers to the Euler distance from the position determined by the multidimensional data eigenvalue of the corresponding time period to the multiple cluster centers, and the certain cluster center belongs to the multiple cluster centers.

[0078] In the step S4, for example, if the Euler distances from the positions determined by the multidimensional data characteristic values ​​of the certain time period to the multiple cluster centers are calculated respectively based on the multiple cluster centers and the multidimensional data characteristic values ​​of the certain time period, the Euler distances to cluster center A are 57 unit distances, and the Euler distance to cluster center B is 68 unit distances; the Euler distance to cluster center C is 73 unit distances, the Euler distance to cluster center D is 88 unit distances, and the Euler distance to cluster center E is 45 unit distances, then the certain time period can be used as the attribution time period of cluster center E.

[0079] S5. For each center among the multiple clustering centers, the frequency of occurrence of various types in the server security risk type labeling results of all corresponding belonging time periods is counted, and a certain type corresponding to the highest frequency is used as the corresponding server security risk type, wherein the certain type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center.

[0080] In step S5, for example, if in the server security risk type labeling results of all the time periods belonging to the cluster center E, type A appears 55 times (that is, among all the time periods belonging to the cluster center E, there are 55 time periods with type A), type B appears 32 times (that is, among all the time periods belonging to the cluster center E, there are 32 time periods with type B), type C appears 81 times (that is, among all the time periods belonging to the cluster center E, there are 81 time periods with type C) and type D appears 9 times (that is, among all the time periods belonging to the cluster center E, there are 9 time periods with type D), then type C can be used as the server security risk type of the cluster center E.

[0081] After step S5, consider the situation where there are at least two centers with the same server security risk type, for example, cluster center B and cluster center D have server security risk types of type A. In order to avoid this situation, ensure that the multiple cluster centers have different server security risk types. Preferably, after obtaining the server security risk types of each center, the method also includes but is not limited to the following steps S51 to S52.

[0082] S51. If it is found that the server security risk type of at least two centers is the same type, then the at least two centers are sorted in order from high to low according to the frequency of occurrence of the same type to obtain a center queue, and the same type continues to be the server security risk type of the first center in the center queue.

[0083] In the step S51, for example, if the server security risk types of cluster center A, cluster center B and cluster center D are all type A, and in the server security risk type labeling results of all belonging time periods of cluster center A, type A appears 42 times, in the server security risk type labeling results of all belonging time periods of cluster center B, type A appears 88 times, and in the server security risk type labeling results of all belonging time periods of cluster center D, type A appears 48 times, then the obtained center queue is: cluster center B, cluster center D and cluster center A, and type A can be used as the server security risk type of cluster center B.

[0084] S52. For each non-first center in the center queue, the occurrence frequency of various other types in the server security risk type labeling results of all corresponding belonging time periods are counted respectively, and a certain other type corresponding to the highest frequency is updated as the corresponding server security risk type, wherein the other type refers to other server security risk types other than the same type, and the certain other type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center.

[0085] In step S52, for example, if in the server security risk type labeling results of all the belonging time periods of cluster center A, type A appears 42 times, type B appears 35 times, type C appears 27 times, and type D appears 17 times, then type B (that is, relative to type A of the same type, type B, type C, and type D are respectively the other types) can be updated as the server security risk type of cluster center A. In addition, if after the aforementioned steps S51 to S52, a new situation occurs in which the server security risk type of at least two centers is the same type, the aforementioned steps S51 to S52 will continue to be circumvented until each cluster center has a different server security risk type.

[0086] S6. For various types in the server security risk type labeling results of all the historical unit time periods, all the corresponding positive sample data and all the negative sample data are imported into the deep learning model for model training to obtain the corresponding server security risk type identification model, wherein the positive sample data contains a first model input item and a numerical value "1" used as a model output item, and the first model input item is the multidimensional data feature value of the time period attributable to the corresponding center; the negative sample data contains a second model input item and a numerical value "0" used as a model output item, and the second model input item is the multidimensional data feature value of the time period attributable to the non-corresponding center.

[0087] In step S6, deep learning (DL) is a new research direction in the field of machine learning (ML), which is introduced into machine learning to make it closer to the original goal - artificial intelligence (AI). The deep learning model is usually composed of multiple layers of neural networks, each layer contains multiple neurons, and these neurons are connected by weights to transmit and process information, thereby achieving great success in image recognition, speech recognition, natural language processing and other fields. Specifically, the deep learning model can be, but is not limited to, a convolutional neural network model, a deep trust network model or a stacked autoencoder network model. For example, if the server security risk type of cluster center B is type A, then for type A, the corresponding positive sample data contains the multidimensional data feature value of the belonging time period of cluster center B (i.e., as the first model input item) and the value "1" used as the model output item, and the corresponding negative sample data contains the multidimensional data feature value of the belonging time period of cluster center A, cluster center C, cluster center D or cluster center E (i.e., these centers are non-corresponding centers) (i.e., as the second model input item) and the value "0" used as the model output item. The specific training process of the server security risk type identification model can be achieved through a conventional calibration verification modeling process (specifically including a calibration process and a verification process of the model, that is, first by comparing the model simulation results with the measured data, and then adjusting the model parameters according to the comparison results, so that the simulation results are consistent with the actual process). In addition, in the calibration verification modeling process of the server security risk type identification model, it is preferred to use a tree-structured Bayesian optimization algorithm to tune the model parameters.

[0088] S7. Extract new multidimensional data feature values ​​for server security risk identification from the server operation log data and network traffic data recorded in the current unit time period, wherein the new multidimensional data feature values ​​correspond one-to-one to the multidimensional data feature values.

[0089] In the step S7, the specific extraction details of the new value of the multi-dimensional data feature can be derived with reference to the aforementioned step S2, which will not be repeated here.

[0090] S8. For each type, the new value of the multidimensional data feature is imported into the corresponding server security risk type identification model, and the server security risk type labeling result of the current unit time period is output as the confidence level of the corresponding type.

[0091] S9. The server security risk type labeling result of the current unit time period is the confidence level of the various types. If a type corresponding to the maximum confidence level is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is started and executed.

[0092] In step S9, for example, if the server security risk type labeling result of the current unit period is type A with a confidence of 80%, the server security risk type labeling result of the current unit period is type B with a confidence of 20%, the server security risk type labeling result of the current unit period is type C with a confidence of 17%, and the server security risk type labeling result of the current unit period is type D with a confidence of 23%, then when type A is a risky type, the preset alarm action and / or preset server security policy corresponding to type A is started. The preset alarm action is specifically but not limited to an audible and visual alarm method; the preset server security policy can be but not limited to a pre-defined security policy based on firewall rules or intrusion detection configuration parameters. In addition, in order to achieve the purpose of dynamically starting and stopping the execution of the preset server security policy, preferably, the method also includes but is not limited to: labeling the server security risk type of the current unit time period as the confidence of the various types, if it is found that a type corresponding to the maximum confidence is a risk-free type, and the preset server security policy corresponding to any risky type is being executed, then stop executing the preset server security policy corresponding to any risky type.

[0093] In the step S9, in order to correct and update the confidence of the labeled type based on the clustering result so as to further improve the accuracy of the alarm action and / or the execution of the server security policy, preferably, the server security risk type labeling result of the current unit time period is the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is initiated, including but not limited to the following steps S91 to S92.

[0094] S91. According to the confidence level of the server security risk type labeling result of the current unit period as the various types, the new confidence level of the server security risk type labeling result of the current unit period as the various types is calculated according to the following formula:

[0095]

[0096] In the formula, Indicates less than or equal to A positive integer, represents the total number of centers of the plurality of cluster centers, Indicates that according to the first The third Euler distance calculated from the center and the new value of the multidimensional data feature is the distance from the position determined by the new value of the multidimensional data feature to the The Euler distance of the centers, Indicates that the server security risk type labeling result of the current unit period is the same as the The confidence level of the server security risk type corresponding to each center, Indicates that the server security risk type labeling result of the current unit period is the same as the The new confidence level of the server security risk type corresponding to each center, represents the maximum value function, represents the minimum value function, Represents a negative correlation function.

[0097] S92. The server security risk type labeling result of the current unit time period is the new confidence of the various types. If a type corresponding to the maximum new confidence is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is started.

[0098] After step S9, in order to continuously train and optimize the server security risk type identification model to improve the overall solution's ability and accuracy in identifying various security risk types, preferably, the method further includes: if the server security risk type labeling result of the current unit period is confirmed (specifically, it can be a manual confirmation method or a machine automatic confirmation method), then at the end of the current unit period, based on the server security risk type labeling results of the current unit period and all historical unit periods and the server operation log data and network traffic data recorded in the corresponding period, re-cluster to obtain the multiple clustering centers, and re-determine the server security risk type of each center, and also re-train to obtain various types of server security risk type identification models. Specifically, the aforementioned steps S1 to S6 are re-executed again.

[0099] Therefore, based on the server security risk identification method described in the aforementioned steps S1 to S9, a new solution for server security risk identification based on clustering algorithm and deep learning model is provided, that is, firstly, according to the server operation log data and network traffic data of all historical unit time periods, a K-means clustering algorithm is applied to obtain multiple cluster centers, and then for each center, the corresponding risk type is determined according to the server security risk type labeling results of all corresponding time periods, and then for each type, the positive and negative sample data obtained based on the corresponding center and the non-corresponding center are imported into the deep learning model for model training to obtain the corresponding risk type identification model, and the server security risk type of the current unit time period is identified. The server security risk type labeling result is the confidence of the corresponding type. Finally, when a certain type corresponding to the maximum confidence is found to be a risky type, the alarm action and / or server security policy corresponding to the risky type is started. In this way, the application of the clustering algorithm can achieve a secondary division and correction of the initial division results of the positive and negative sample data (i.e., the server security risk type labeling results). This not only ensures the accuracy of the risk identification results, but also ensures that the identification process of various risk types is no longer independent and specific. The overall globality can avoid situations such as false alarms, improper execution of security policies, and / or conflicts between different security policies executed at the same time, which is convenient for practical application and promotion.

[0100] like Figure 2 As shown, the second aspect of this embodiment provides a virtual system for implementing the server security risk identification method described in the first aspect, including a historical data acquisition unit, a feature data extraction unit, a cluster center determination unit, an attribution time period division unit, a risk type division unit, an identification model training unit, an identification model application unit and a security measure execution unit;

[0101] The historical data acquisition unit is used to obtain the server security risk type annotation results of all historical unit periods and the server operation log data and network flow data recorded in the corresponding period, wherein the server security risk type annotation result is a marked risk-free type or a risky type;

[0102] The feature data extraction unit is communicatively connected to the historical data acquisition unit, and is used to extract multidimensional data feature values ​​for server security risk identification from the corresponding server operation log data and the network traffic data for each period in all the historical unit periods;

[0103] The cluster center determination unit is communicatively connected to the feature data extraction unit, and is used to apply a K-means clustering algorithm to cluster the multidimensional data feature values ​​of each time period to obtain a plurality of cluster centers, wherein the total number of centers of the plurality of cluster centers is equal to the total number of types in the server security risk type labeling results of all the historical unit time periods;

[0104] The attribution time period division unit is respectively connected to the feature data extraction unit and the cluster center determination unit in communication, and is used to calculate the corresponding first Euler distance for each time period according to the multiple cluster centers and the corresponding multidimensional data feature values, and use the corresponding time period as the attribution time period of a certain cluster center corresponding to the shortest first Euler distance, wherein the first Euler distance refers to the Euler distance from the position determined by the multidimensional data feature value of the corresponding time period to the multiple cluster centers, and the certain cluster center belongs to the multiple cluster centers;

[0105] The risk type division unit is communicatively connected to the attribution time period division unit, and is used to count the occurrence frequencies of various types in the server security risk type labeling results of all corresponding attribution time periods for each center in the multiple cluster centers, and use a certain type corresponding to the highest frequency as the corresponding server security risk type, wherein the certain type belongs to the server security risk type labeling results of all attribution time periods of the corresponding center;

[0106] The identification model training unit is respectively communicatively connected to the feature data extraction unit and the risk type classification unit, and is used to import all corresponding positive sample data and all corresponding negative sample data into the deep learning model for model training for various types in the server security risk type labeling results of all historical unit time periods, so as to obtain a corresponding server security risk type identification model, wherein the positive sample data contains a first model input item and a numerical value "1" used as a model output item, and the first model input item is the multidimensional data feature value of the belonging time period of the corresponding center, and the negative sample data contains a second model input item and a numerical value "0" used as a model output item, and the second model input item is the multidimensional data feature value of the belonging time period of the non-corresponding center;

[0107] The feature data extraction unit is further used to extract a new multidimensional data feature value for server security risk identification from the server operation log data and network traffic data recorded in the current unit time period, wherein the new multidimensional data feature value corresponds one-to-one to the multidimensional data feature value;

[0108] The identification model application unit is respectively connected to the identification model training unit and the feature data extraction unit for communication, and is used to import the new multidimensional data feature value into the corresponding server security risk type identification model for each type, and output the confidence level of the server security risk type labeling result obtained in the current unit time period as the corresponding type;

[0109] The security measure execution unit is communicatively connected to the identification model application unit, and is used to label the server security risk type in the current unit time period as the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risky type, then the preset alarm action and / or preset server security policy corresponding to the risky type is started to be executed.

[0110] The working process, working details and technical effects of the aforementioned system provided in the second aspect of this embodiment can be found in the server security risk identification method described in the first aspect, and will not be repeated here.

[0111] like Figure 3 As shown, the third aspect of this embodiment provides a computer system for executing the server security risk identification method as described in the first aspect, including a memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the server security risk identification method as described in the first aspect. For example, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may include, but is not limited to, a microprocessor of the STM32F105 series. In addition, the computer system may also include, but is not limited to, a power module, a display screen and other necessary components.

[0112] The working process, working details and technical effects of the aforementioned computer system provided in the third aspect of this embodiment can be found in the server security risk identification method described in the first aspect, and will not be repeated here.

[0113] The fourth aspect of this embodiment provides a computer-readable storage medium storing instructions including the server security risk identification method as described in the first aspect, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the server security risk identification method as described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to computer-readable storage media such as floppy disks, optical disks, hard disks, flash memories, USB flash drives, and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0114] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be referred to the server security risk identification method described in the first aspect, and will not be repeated here.

[0115] In a fifth aspect, the present embodiment provides a computer program product, including a computer program or an instruction, wherein the computer program or the instruction, when executed by a computer, implements the server security risk identification method as described in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0116] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A server security risk identification method based on deep learning, characterized in that: include: Obtain the server security risk type annotation results of all historical unit periods and the server operation log data and network traffic data recorded in the corresponding period, wherein the server security risk type annotation results are annotated risk-free types or certain risky types; For each period in all the historical unit periods, extracting a multidimensional data feature value for server security risk identification from the corresponding server operation log data and the network traffic data; According to the multidimensional data feature values ​​of the respective time periods, a K-means clustering algorithm is applied to obtain a plurality of cluster centers, wherein the total number of centers of the plurality of cluster centers is equal to the total number of types in the server security risk type labeling results of the respective historical unit time periods; For each of the time periods, the corresponding first Euler distances are calculated according to the multiple cluster centers and the corresponding multidimensional data eigenvalues, and the corresponding time period is used as the belonging time period of a certain cluster center corresponding to the shortest first Euler distance, wherein the first Euler distance refers to the Euler distance from the position determined by the multidimensional data eigenvalue of the corresponding time period to the multiple cluster centers, and the certain cluster center belongs to the multiple cluster centers; For each of the multiple cluster centers, the occurrence frequency of various types in the server security risk type labeling results of all corresponding belonging time periods is counted, and a certain type corresponding to the highest frequency is used as the corresponding server security risk type, wherein the certain type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center; After obtaining the server security risk types of each center, if it is found that the server security risk types of at least two centers are the same type, then according to the frequency of occurrence of the same type, the at least two centers are sorted in order from high to low to obtain a center queue, and the same type continues to be used as the server security risk type of the first center in the center queue; for each non-first center in the center queue, the frequency of occurrence of various other types in the corresponding server security risk type labeling results of all belonging time periods are counted respectively, and a certain other type corresponding to the highest frequency is updated as the corresponding server security risk type, wherein the other type refers to other server security risk types except the same type, and the certain other type belongs to the server security risk type labeling results of all belonging time periods of the corresponding center; For each type in the server security risk type annotation results of all the historical unit time periods, all the corresponding positive sample data and all the negative sample data are imported into the deep learning model for model training to obtain the corresponding server security risk type identification model, wherein the positive sample data contains a first model input item and a numerical value "1" used as a model output item, and the first model input item is the multidimensional data feature value of the belonging time period of the corresponding center, and the negative sample data contains a second model input item and a numerical value "0" used as a model output item, and the second model input item is the multidimensional data feature value of the belonging time period of the non-corresponding center; Extracting a new multidimensional data feature value for server security risk identification from the server operation log data and network traffic data recorded in the current unit time period, wherein the new multidimensional data feature value corresponds one-to-one to the multidimensional data feature value; For each type, the new value of the multidimensional data feature is imported into the corresponding server security risk type identification model, and the server security risk type labeling result of the current unit time period is output as the confidence of the corresponding type; According to the confidence of the various types of server security risk type labeling results in the current unit time period, if a certain type corresponding to the maximum confidence is found to be a risky type, then start executing the preset alarm action and / or preset server security policy corresponding to the risky type, specifically including: according to the confidence of the various types of server security risk type labeling results in the current unit time period, calculate the new confidence of the various types of server security risk type labeling results in the current unit time period according to the following formula: In the formula, Indicates less than or equal to A positive integer, represents the total number of centers of the plurality of cluster centers, Indicates that according to the first The third Euler distance calculated from the center and the new value of the multidimensional data feature is the distance from the position determined by the new value of the multidimensional data feature to the The Euler distance of the centers, Indicates that the server security risk type labeling result of the current unit period is the same as the The confidence level of the server security risk type corresponding to each center, Indicates that the server security risk type labeling result of the current unit period is the same as the The new confidence level of the server security risk type corresponding to each center, represents the maximum value function, represents the minimum value function, Represents a negative correlation function; according to the server security risk type labeling result of the current unit time period, the new confidence of the various types is obtained. If a type corresponding to the maximum new confidence is found to be a risky type, the preset alarm action and / or preset server security policy corresponding to the risky type is started.

2. The server security risk identification method according to claim 1, characterized in that: The certain risk type is an intrusion attempt risk type, a malware activity risk type, an internal data leakage risk type, a DDoS attack risk type or a port scanning risk type.

3. The server security risk identification method according to claim 1, characterized in that: According to the multidimensional data feature values ​​of each time period, a K-means clustering algorithm is applied to obtain multiple cluster centers, including: For each of the time periods, a corresponding second Euler distance is calculated based on the corresponding multidimensional data characteristic value and the multidimensional data characteristic values ​​of each other time period in all the historical unit time periods, and the corresponding number of distances is obtained by counting, wherein the second Euler distance refers to the Euler distance from the position determined by the multidimensional data characteristic value of the corresponding time period to the position determined by the multidimensional data characteristic value of each other time period, and the number of distances refers to the number of second Euler distances that are less than a preset distance threshold; Determine a plurality of time periods having maximum distance numbers according to the number of distances of the various time periods and the distribution positions of the various time periods in the multidimensional space, wherein the dimensions in the multidimensional space correspond one-to-one to the eigenvalues ​​of the dimensional data in the multidimensional data eigenvalues, and the plurality of time periods belong to all the historical unit time periods; Arrange the multiple time periods in descending order according to the maximum values ​​of the number of distances to obtain a time period sequence; Select the previous time period, and the previous The multidimensional data feature values ​​of each time period correspond one by one to Initial cluster centers, where Indicates the total number of server security risk type annotation results in all historical unit periods; Based on the Initial cluster centers are selected, and subsequent steps of the K-means clustering algorithm are applied to obtain multiple cluster centers, wherein the subsequent steps refer to other steps after the initial cluster center selection step.

4. The server security risk identification method according to claim 1, characterized in that: The deep learning model adopts a convolutional neural network model, a deep belief network model or a stacked autoencoder network model.

5. The server security risk identification method according to claim 1, characterized in that: The method further comprises: The server security risk type labeling result of the current unit time period is the confidence of the various types. If a type corresponding to the maximum confidence is found to be a risk-free type, and a preset server security policy corresponding to any risky type is being executed, then the execution of the preset server security policy corresponding to any risky type is stopped.

6. The server security risk identification method according to claim 1, characterized in that: The method further comprises: If the server security risk type labeling result of the current unit time period is confirmed, then at the end time of the current unit time period, based on the server security risk type labeling results of the current unit time period and all historical unit time periods and the server operation log data and network traffic data recorded in the corresponding time periods, the multiple clustering centers are re-clustered, and the server security risk type of each center is re-determined, and various types of server security risk type identification models are re-trained.

7. A computer system, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the server security risk identification method as described in any one of claims 1 to 6.