Time baseline determination method and device, electronic equipment and readable storage medium

By generating target sequences and combining anomaly detection and sequence fluctuation judgment models, the time baseline is determined, which solves the problem of low accuracy of time baseline generation during working hours in the existing technology, improves the flexibility and relevance of the time baseline, and enhances zero trust. Schema's login validation accuracy.

CN118802294AActive Publication Date: 2024-10-18中国移动通信集团云南有限公司 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410409647.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2024-10-18
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

The accuracy of the time baseline generated through working hours in the existing technology is low and cannot effectively cover the user's common working time periods, resulting in inaccurate login verification in the zero-trust architecture.

Method used

By obtaining the login information of the target user within the target time period, the target sequence is generated. If the number of logins exceeds the threshold, the anomaly detection machine learning model is used to determine the time baseline. If it does not exceed the threshold, the sequence fluctuation judgment model is used to determine the time baseline and improve the time baseline. flexibility and relevance.

Benefits of technology

The accuracy of the time baseline is improved, making it more relevant to the user's login behavior, meeting more needs, adapting to complex login modes, and enhancing the security of network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802294A_ABST
    Figure CN118802294A_ABST
Patent Text Reader

Abstract

The invention discloses a time baseline determination method and device, electronic equipment and a readable storage medium, and belongs to the field of computers. Comprising the steps that login information of a target user in a target time period is acquired, the target time period comprises M unit time granularities, and the login information comprises the number of login times; based on the login information, a target sequence of the target user is obtained, the target sequence comprises M target values, the M target values are in one-to-one correspondence with the M unit time granularities, and the target values represent login times of the target user in one unit time granularity; if M is larger than a first threshold value, a target time baseline is determined through a target machine learning model used for anomaly detection, the target time baseline comprises specified unit time granularity allowing the target user to access the target resource, and the specified unit time granularity is at least one unit time granularity in M unit time granularities; and if M is not greater than the first threshold value, determining a target time baseline based on a sequence fluctuation judgment model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computers, and specifically relates to a method, device, electronic device and readable storage medium for determining a time baseline. Background Art

[0002] With the development of technology, in order to better protect the security of network resources, the concept of "zero trust" of servers has emerged. Each terminal in the zero-trust system must be verified before connecting to the server to ensure that each device is allowed to access. For example, the core idea of ​​the Software-Defined Perimeter (SDP) proposed by the Cloud Security Alliance (CSA) is to hide core network assets and facilities through the SDP architecture so that they are not directly exposed to the Internet, thereby protecting network assets and facilities from external security threats. In the zero-trust architecture, the terminal needs to establish a certain level of trust before logging into the corresponding website or asset. The process of establishing trust involves dozens of rule configurations, such as login time, login address (IP), login frequency, etc. If the login time or address (IP) is inconsistent with the commonly used login time (i.e., time baseline) and address (IP), then it will be considered that the login is not trusted and the corresponding asset cannot be logged in.

[0003] In the related art, the method of obtaining the time baseline mainly relies on working hours, that is, the time baseline is indirectly generated based on working hours. For example, if the user's working hours are 8:00-18:00, then the time baseline is usually consistent with this time period. However, the usual working hours of some users may not cover the entire working time period or this working time period may not cover the user's usual working hours. The time baseline determined in this way has low accuracy. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and readable storage medium for determining a time baseline, which can to a certain extent solve the problem in the related art that the time baseline is generated by working time, resulting in low accuracy of the time baseline.

[0005] In a first aspect, an embodiment of the present application provides a method for determining a time baseline, characterized by comprising:

[0006] Acquire login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins;

[0007] Based on the login information, a target sequence of the target user is obtained, where the target sequence includes M target values, where the M target values ​​correspond to M unit time granularities one by one, and the target value represents the number of logins of the target user in one unit time granularity, where M is a positive integer;

[0008] If M is greater than a first threshold, determining a target time baseline by using a target machine learning model for anomaly detection, wherein the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities;

[0009] If M is not greater than the first threshold, the target time baseline is determined based on the sequence fluctuation judgment model.

[0010] In a second aspect, an embodiment of the present application provides a device for determining a time baseline, characterized by comprising:

[0011] An acquisition module, used to acquire login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins;

[0012] A processing module, configured to obtain a target sequence of the target user based on the login information, wherein the target sequence includes M target values, the M target values ​​correspond to M unit time granularities one by one, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer;

[0013] a determination module, configured to determine a target time baseline by using a target machine learning model for anomaly detection if M is greater than a first threshold, wherein the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities;

[0014] The determination module is further used to determine the target time baseline based on the sequence fluctuation judgment model if M is not greater than the first threshold.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed, the steps of the method described in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0018] In an embodiment of the present application, login information of a target user within a target time period is obtained, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; based on the login information, a target sequence of the target user is obtained, the target sequence includes M target values, the M target values ​​correspond one-to-one to the M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer; if M is greater than a first threshold, a target time baseline is determined by a target machine learning model for anomaly detection, the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities; if M is not greater than the first threshold, the target time baseline is determined based on a sequence fluctuation judgment model. In this way, in view of the diversity of target values, different models are used to generate target time baselines including specified unit time granularity. Compared with the use of the entire working time as the target time baseline in the related art, the target time baseline provided by the embodiment of the present application can be more flexible and dispersed, and the accuracy of the target time baseline can be improved. To a certain extent, the problem of low accuracy of the time baseline caused by generating the time baseline through working time in the related art can be solved. At the same time, since the target value can represent the number of logins of the target user within the target time period, accordingly, the target sequence can represent the number of logins of the target user at different unit time granularities. The target time baseline is obtained based on the target sequence, so that the target time baseline has a higher correlation with the target user, and the accuracy of the target time baseline is further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flowchart of a method for determining a time baseline provided in an embodiment of the present application;

[0020] Figure 2 A flowchart of a method for determining a time baseline provided in an embodiment of the present application;

[0021] Figure 3 A flowchart of a method for determining a time baseline provided in an embodiment of the present application;

[0022] Figure 4 A flowchart of a method for determining a time baseline provided in an embodiment of the present application;

[0023] Figure 5 An architectural diagram of a method for determining a time baseline provided in an embodiment of the present application;

[0024] Figure 6 A structural block diagram of a device for determining a time baseline provided in an embodiment of the present application;

[0025] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] As described in the background technology, with the development of technology, in order to better protect the security of network resources, the concept of "zero trust" of servers has emerged. The zero trust model means that each terminal must be verified before connecting to the server to ensure that each device is allowed to access. For example, the software-defined perimeter (SDP) proposed by the Cloud Security Alliance (CSA) has the core idea of ​​hiding core network assets and facilities through the software-defined perimeter SDP architecture so that they are not directly exposed to the Internet, thereby protecting network assets and facilities from external security threats. In the zero trust architecture, the terminal needs to establish a certain level of trust before logging into the corresponding website or asset. In the process of establishing trust, dozens of rule configurations are involved, such as login time, login address (IP), login frequency, etc. If the login time or address (IP) is inconsistent with the commonly used login time (i.e., time baseline) and address (IP), then it will be considered that the login is not trusted, and the corresponding asset cannot be logged in.

[0030] In the related art, the method of obtaining the time baseline mainly relies on working hours, that is, the time baseline is indirectly generated based on working hours. For example, if the user's working hours are 8:00-18:00, then the time baseline is usually consistent with this time period. However, the usual working hours of some users may not cover the entire working time period or this working time period may not cover the user's usual working hours. The time baseline determined in this way has low accuracy.

[0031] The embodiment of the present application provides a method for determining a time baseline, which can solve the problem of low accuracy of the time baseline caused by generating the time baseline through working hours in the related art to a certain extent. Specifically, the login information of the target user in the target time period is obtained, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; based on the login information, the target sequence of the target user is obtained, the target sequence includes M target values, the M target values ​​correspond one-to-one to the M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer; if M is greater than the first threshold, the target time baseline is determined by the target machine learning model for anomaly detection, the target time baseline includes the specified unit time granularity that allows the target user to access the target resource, and the specified unit time granularity is at least one unit time granularity of the M unit time granularities; if M is not greater than the first threshold, the target time baseline is determined based on the sequence fluctuation judgment model. In this way, in view of the diversity of target values, different models are used to generate target time baselines including specified unit time granularity. Compared with the use of the entire working time as the target time baseline in the related art, the target time baseline provided by the embodiment of the present application can be more flexible and dispersed, and the accuracy of the target time baseline can be improved. To a certain extent, the problem of low accuracy of the time baseline caused by generating the time baseline through working time in the related art can be solved. At the same time, since the target value can represent the number of logins of the target user within the target time period, accordingly, the target sequence can represent the number of logins of the target user at different unit time granularities. The target time baseline is obtained based on the target sequence, so that the target time baseline has a higher correlation with the target user, and the accuracy of the target time baseline is further improved.

[0032] In the related art, the time baseline is indirectly generated based on the working time, which easily causes the time granularity to be too large, resulting in the time baseline being a whole large time interval. However, in an embodiment of the present application, the target sequence includes M target values ​​corresponding to the unit time granularity one by one, and further based on different unit time granularities, a target sequence including different numbers of target values ​​is obtained, so that the process of obtaining the target time baseline based on the target sequence has higher flexibility and meets more needs. Compared with the related art, the time granularity is too large, resulting in the time baseline being a whole large time. The method for determining the time baseline provided in the embodiment of the present application has selectivity and diversity in the selection of the unit time granularity, and can set the appropriate unit time granularity according to the minimum time window required by the actual situation.

[0033] In an embodiment of the present application, the target machine learning model includes N anomaly detection modules, and the target time baseline is determined by the N anomaly detection modules. In this way, the adaptability and generalization ability of the target machine learning model can be improved, so that the target machine learning model can handle more complex target sequences, and further make the generated target time series more accurate. At the same time, the target machine learning model has advantages in processing large-scale data and new threats through deep learning, can meet the ever-changing needs of enterprises, can meet the growing scale and complexity of enterprise data, and has scalability and adaptability.

[0034] It should be understood that a method for determining a time baseline provided in an embodiment of the present application can be executed by a target device. The target device can be one electronic device or multiple electronic devices that cooperate with each other. The electronic device can be, for example, a server, such as an independent physical server, a server cluster composed of multiple servers, and a cloud server capable of cloud computing.

[0035] The method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0036] Figure 1 A flowchart of a method for determining a time baseline provided in an embodiment of the present application. Figure 1 As shown, the method for determining the time baseline provided in the embodiment of the present application includes the following steps:

[0037] Step 110, obtaining login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins.

[0038] In an embodiment of the present application, the target user can be any user, and the target user can be one user or multiple users. The embodiment of the present application does not specifically limit the number and / or identity of the target users. The target time period can be any specified time period, such as an hour, a day, a week, and other time periods. The unit time granularity can also be any specified unit time, such as a second, a minute, and other unit time. The target time period includes M unit time granularities, which can be understood as including M unit time granularities within the target time period. For example, when the target time period is one day and the unit time granularity is one hour, the target time period includes 24 unit time granularities.

[0039] The login information may be any information that can represent the target user performing a login operation, such as the target user's login time, the length of time the target user stays on the page, and other information. The login information may include the number of logins, and further the login information may be the number of logins of the target user within the target time period, for example, the target user logged in 124 times within the target time period. The format of the login information may be a data exchange format (such as json), or a standard format for representing time, such as the YYYY-MM-DD HH:MM:SS format, or a table format, which is not specifically limited in the embodiments of the present application.

[0040] In the embodiment of the present application, the target device can obtain the login information of the target user in the target time period from the inside of the device. For example, the target device can further obtain the login information of the target user through the system operation log, network device log, application log and other logs inside the device. The target device can also obtain the login information of the target user through the database inside the device (such as ES, ORACLE, Gbase and other databases), and the embodiment of the present application does not specifically limit this.

[0041] In the embodiment of the present application, the target device can also obtain the login information of the target user in the target time period from the outside of the device through communication technology. For example, the target device can obtain the login information of the target user in the target time period through a data acquisition device (such as a distributed system), and the target device and the data acquisition device can be connected through a wired technology, such as optical fiber, or through a wireless technology, such as Bluetooth technology.

[0042] After acquiring the target user's login information within the target time period, the target device may standardize the format of the login information, and unify the login information acquired by the target device into a standard format, such as the YYYY-MM-DDHH:MM:SS format. The target device may also perform data cleaning on the acquired login information, which may include format content cleaning, logic error cleaning, and missing value cleaning. Format content cleaning may include converting data with inconsistent display formats such as time, date, and numerical values, data with characters that should not exist in the content, and data that does not match the content of the field. Logic error cleaning may include removing / replacing unreasonable data; missing value cleaning may include replacing / deleting data with missing values ​​or empty (NULL) values ​​in required fields.

[0043] After the target device obtains the login information of the target user within the target time period, it can not only perform the above-mentioned format standardization processing, but also execute step 120 to further process the login information of the target user within the target time period.

[0044] Step 120, based on the login information, obtain the target sequence of the target user, the target sequence includes M target values, the M target values ​​correspond one-to-one to M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer.

[0045] In an embodiment of the present application, the target value represents the number of logins of the target user in a unit time granularity. For example, when the unit time granularity is one hour, the target value may represent the number of logins of the target user in one hour, for example, 5 times.

[0046] The target sequence can represent the number of logins of the target user in M ​​unit time granularities through M target values ​​corresponding one to one with the M unit time granularities. Further, the target sequence can represent the data distribution of the number of logins of the target user in the target time period. For example, if the target time period is one day and the unit time granularity is eight hours, the target sequence can be 2 5 6, which respectively represent that the target user logged in twice in the first eight hours of the day, the target user logged in five times in the second eight hours of the day, and the target user logged in six times in the third eight hours of the day. In an embodiment of the present application, the unit time granularity can also select a finer time interval, such as one hour. When the target time period is still one day, the target sequence includes 24 target values ​​accordingly, each of which represents the number of logins of the target user in each hour.

[0047] In the process of obtaining a target sequence provided in the embodiment of the present application, a target sequence may correspond to an account, and a target sequence may also correspond to an account and an address (IP), and the embodiment of the present application does not specifically limit this. If a target sequence corresponds to a user account and an address (IP), the login information of the same user account and the same address (IP) within the target time period may be used as a target sequence.

[0048] The target sequence represents the login information of the target user within the target time period, making the login information more intuitive, so as to perform the following steps to obtain the target time baseline. In the embodiment of the present application, the target time baseline can be determined by different methods according to the number of target values ​​in the target sequence, that is, the size of M. If M is greater than the first threshold, step 130 can be performed; if M is not greater than the first threshold, step 140 can be performed.

[0049] Step 130: If M is greater than a first threshold, a target time baseline is determined by a target machine learning model for anomaly detection, wherein the target time baseline includes a specified unit time granularity that allows the target user to access the target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities.

[0050] In an embodiment of the present application, the target time baseline may be a time standard baseline for determining whether the target user has passed the verification. The target time baseline may be used in a zero-trust system to determine whether the target user can access the target resource. If the target user's access time falls within the time period included in the target time baseline that allows the target user to pass, the target user may be considered to have passed the verification. The specified unit time granularity may be any one of the M unit time granularities. For example, in the example in step 120, the second eight hours in a day is specified as the specified unit time granularity, and the target time baseline may be the second eight hours in a day.

[0051] In an embodiment of the present application, the first threshold represents the number threshold of the target values ​​in the target sequence, and the first threshold can be any integer, such as 30, 50, etc. If M is greater than the first threshold, it means that the number of target values ​​in the target sequence can reach the number of target machine learning models input for anomaly detection. The target machine learning model for anomaly detection can be any machine learning model that can detect abnormal conditions in data, such as a local outlier factor model (Local Outlier Factor, referred to as LOF), a K-nearest neighbor model (K Near Neighbor, referred to as KNN) and an isolated forest machine learning model. The target machine learning model for anomaly detection may include one target machine learning model, and may also include multiple target machine learning models, which is not specifically limited in the embodiment of the present application. If the target machine learning model for anomaly detection includes one target machine learning model, the target time baseline can be determined based on the output result of the target machine learning model. If the target machine learning model for anomaly detection includes multiple target machine learning models, one of the target machine learning models can be selected through the evaluation criteria to determine the target time baseline, and the output results of multiple target machine learning models can also be used to jointly determine the target time baseline.

[0052] In the process of determining the target time baseline by the target machine learning model for anomaly detection provided in the embodiment of the present application, the target value of the anomaly in the target sequence can be determined by the target machine learning model for anomaly detection, and the unit time granularity corresponding to the normal target value other than the abnormal target value is used as the specified unit time granularity. For example, in the example of step 120, the target machine learning model for anomaly detection determines that 2 and 6 in the target sequence are abnormal target values, then the unit time granularity corresponding to the target value 5 (i.e., the second eight hours in a day) is the specified unit time granularity, and the target time baseline can be the second eight hours in a day.

[0053] In an embodiment of the present application, if M is greater than the first threshold, the target time baseline is determined by the target machine learning model for anomaly detection. In order for the target machine learning model for anomaly detection to more accurately determine the target time baseline, the number of target values ​​input to the target machine learning model for anomaly detection may be increased. If M is not greater than the first threshold, the target sequence may be processed by step 140.

[0054] Step 140: If M is not greater than the first threshold, determine the target time baseline based on the sequence fluctuation judgment model.

[0055] In an embodiment of the present application, the sequence fluctuation judgment model can be used to judge the data situation of the target value in the target sequence, such as the phase difference value and the average value of the target value. The sequence fluctuation judgment model may include a machine learning model with learning ability, and may also include a statistical method. If M is not greater than the first threshold, it is considered that the number of target values ​​in the target sequence is less than the first threshold, and the method provided in step 140 can be used more specifically.

[0056] In the embodiment of the present application, the specified unit time granularity can be obtained through the sequence fluctuation judgment model, and the target time baseline includes the specified unit time granularity. For example, the average value of the target values ​​included in the target sequence is obtained through the sequence fluctuation judgment model, and the unit time granularity corresponding to the target value greater than the average value in the target sequence is used as the specified unit time granularity.

[0057] In an embodiment of the present application, login information of a target user within a target time period is obtained, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; based on the login information, a target sequence of the target user is obtained, the target sequence includes M target values, the M target values ​​correspond one-to-one to the M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer; if M is greater than a first threshold, a target time baseline is determined by a target machine learning model for anomaly detection, the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities; if M is not greater than the first threshold, the target time baseline is determined based on a sequence fluctuation judgment model. In this way, in view of the diversity of target values, different models are used to generate target time baselines including specified unit time granularity. Compared with the use of the entire working time as the target time baseline in the related art, the target time baseline provided by the embodiment of the present application can be more flexible and dispersed, and the accuracy of the target time baseline can be improved. To a certain extent, the problem of low accuracy of the time baseline caused by generating the time baseline through working time in the related art can be solved. At the same time, since the target value can represent the number of logins of the target user within the target time period, accordingly, the target sequence can represent the number of logins of the target user at different unit time granularities. The target time baseline is obtained based on the target sequence, so that the target time baseline has a higher correlation with the target user, and the accuracy of the target time baseline is further improved.

[0058] In the embodiment of the present application, the target sequence includes M target values ​​corresponding to the unit time granularity one by one, and further based on different unit time granularities, a target sequence including different numbers of target values ​​is obtained, so that the process of obtaining the target time baseline based on the target sequence has higher flexibility and meets more needs. Compared with the related art, the time granularity is too large, resulting in the time baseline being a whole long period of time. The method for determining the time baseline provided in the embodiment of the present application has selectivity and diversity in the selection of the unit time granularity, and can set the appropriate unit time granularity according to the minimum time window required by the actual situation.

[0059] Figure 2 A flowchart of a method for determining a time baseline provided in an embodiment of the present application. Figure 2 As shown, the method for determining the time baseline provided in the embodiment of the present application includes the following steps:

[0060] Step 210, obtaining login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins.

[0061] Step 220, based on the login information, obtain the target sequence of the target user, the target sequence includes M target values, the M target values ​​correspond one-to-one to M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer.

[0062] In the embodiment of the present application, the target time baseline can be determined by different methods according to the number of target values ​​in the target sequence, that is, the size of M. If M is greater than the first threshold, steps 230 to 250 can be performed; if M is not greater than the first threshold, step 260 can be performed.

[0063] In an embodiment of the present application, if M is greater than the first threshold, the target time baseline can be determined by a target machine learning model for anomaly detection, wherein the target machine learning model includes N anomaly detection modules, where N is a natural number. In an embodiment of the present application, the anomaly detection module may include a machine learning model for detecting whether a target value has abnormal data, for example, the anomaly detection module may include the target machine learning model for anomaly detection exemplified in step 130.

[0064] For the kth anomaly detection module among the N anomaly detection modules, where k is an integer less than N, perform the following operations:

[0065] Step 230: If M is greater than the first threshold, the target sequence is input into the anomaly detection module, and the target machine learning model includes N anomaly detection modules, where N is a natural number.

[0066] In an embodiment of the present application, the target device where the target sequence is located can be the same target device as the target device where the anomaly detection module is located, so that the target sequence can be processed internally by the target device and input into the anomaly detection module. The target device where the target sequence is located can be a different target device from the target device where the anomaly detection module is located, so that the anomaly detection module can obtain the target sequence through communication technology.

[0067] In an embodiment of the present application, if N is 1, the target machine learning model includes one anomaly detection module. After the target sequence is input into the anomaly detection module, the target time baseline can be determined by processing through the target machine learning model based on the result of the anomaly detection module. If the target machine learning model includes at least one anomaly detection module, the target time baseline can be jointly determined by the processing results of multiple anomaly detection modules. It is also possible to select the processing result of an anomaly detection module based on the processing results of multiple anomaly detection modules and determine the target time baseline.

[0068] In the process of determining the target time baseline based on the output result of the anomaly detection module, steps 240 to 250 may be performed.

[0069] Step 240: outputting M data labels of the M target values ​​through the anomaly detection module, wherein the M data labels correspond one-to-one to the M target values, and the data labels are used to indicate whether the target value is an anomaly value.

[0070] In the embodiment of the present application, the anomaly detection module can output M data labels corresponding to the M target values ​​one by one, the content of the data label can be normal or abnormal, and the form of the data label can be a pseudo label. For example, when the target sequence is 2, 5, 6, the output result of the anomaly detection module can be abnormal, normal, normal.

[0071] In an embodiment of the present application, the target machine learning model includes N anomaly detection modules, and accordingly, each target value in the target sequence corresponds to N data labels. The target time baseline can be determined based on the output results of the N anomaly detection modules.

[0072] Step 250: Generate a target time baseline based on the output results of the N anomaly detection modules.

[0073] In an embodiment of the present application, the output results of the N anomaly detection modules include N data labels corresponding to each target value in the target sequence. Based on the output results of the N anomaly detection modules, the output result of one of the anomaly detection modules can be selected to generate a target time baseline. For example, if the output result of an anomaly detection module is selected as abnormal, normal, or abnormal, then the unit time granularity corresponding to the target value with the data label normal can be used as the specified unit time granularity, and the specified unit time granularity can be further used as the target time baseline.

[0074] Step 260: If M is not greater than the first threshold, determine the target time baseline based on the sequence fluctuation judgment model.

[0075] In an embodiment of the present application, the target machine learning model includes N anomaly detection modules, and the target time baseline is determined by the N anomaly detection modules. In this way, the adaptability and generalization ability of the target machine learning model can be improved, so that the target machine learning model can handle more complex target sequences, and further make the generated target time series more accurate. At the same time, the target machine learning model has advantages in processing large-scale data and new threats through deep learning, can meet the ever-changing needs of enterprises, can meet the growing scale and complexity of enterprise data, and has scalability and adaptability.

[0076] In the embodiment of the present application, in the process of generating the target time baseline based on the output results of N anomaly detection modules, the target time baseline can also be jointly determined based on N data tags. For example, for the i-th target value among the M target values, the following operations are performed: obtain N data tags corresponding to the i-th target value, the N data tags are output by N anomaly detection modules, and one anomaly detection module outputs one data tag for the i-th target value; based on the N data tags corresponding to the i-th target value, jointly determine whether the i-th target value is an abnormal value; if the i-th target value is a normal value, obtain the unit time granularity corresponding to the i-th target value; based on the unit time granularity corresponding to the i-th target value, generate the target time baseline.

[0077] In an embodiment of the present application, based on the N data labels corresponding to the i-th target value, in the process of jointly judging whether the i-th target value is an abnormal value, one abnormality detection module can be selected from the N data labels output by the N abnormality detection modules through certain evaluation criteria, and whether the target value is an abnormal value is determined based on the output result of that abnormality detection module.

[0078] In an embodiment of the present application, based on the N data labels corresponding to the ith target value, in the process of jointly judging whether the ith target value is an abnormal value, the number of labels as normal values ​​can also be compared with the number of labels as abnormal values. If the number of labels as normal values ​​is greater than the number of labels as abnormal values, the target value can be considered to be a normal value; if the number of labels as normal values ​​is less than the number of labels as abnormal values, the target value can be considered to be an abnormal value. In an embodiment of the present application, if N is an even number, the target machine learning model includes an even number of abnormality detection modules, and an odd number of abnormality detection modules can be selected through the evaluation criteria through the aforementioned comparison process to jointly judge whether the ith target value is an abnormal value.

[0079] In an embodiment of the present application, after obtaining N data labels corresponding to the ith target value, in order to improve the accuracy of the data labels of the target value, it is also possible to choose whether to perform manual secondary modification according to the size of the ith target value. For example, in the target sequence, if the value of the target value is greater than the third digit of the quartile, and the data label corresponding to the target value is represented as an abnormal value, the label of this target value can be modified to normal. The reason is that the target value in the target sequence corresponds to the number of operations within different unit time granularities within the target time period. The larger the number of operations, the more frequent the target user's operations are in this unit granularity time period. At this time, it should be the user's commonly used time interval, so it should be retained.

[0080] In an embodiment of the present application, after determining that the target value is a normal value, if the i-th target value is a normal value, the unit time granularity corresponding to the i-th target value can be obtained, and the unit time granularity corresponding to the i-th target value can be used as the specified unit time granularity. Based on the unit time granularity corresponding to the i-th target value (i.e., the specified unit time granularity), a target time baseline is generated.

[0081] In an embodiment of the present application, the data labels output by N anomaly detection modules are used to jointly determine whether the i-th target value is an anomaly, making the process of confirming whether the target value is a normal value more accurate, further improving the accuracy of the target time baseline.

[0082] Figure 3 A flowchart of a method for determining a time baseline provided in an embodiment of the present application. Figure 3 As shown, the method for determining the time baseline provided in the embodiment of the present application includes the following steps:

[0083] Step 310, obtaining login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins.

[0084] Step 320, based on the login information, obtain the target sequence of the target user, the target sequence includes M target values, the M target values ​​correspond one-to-one to M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer.

[0085] If M is greater than the first threshold, step 330 may be executed; if M is not greater than the first threshold, steps 340 to 360 may be executed.

[0086] Step 330, if M is greater than the first threshold, determine the target time baseline using the target machine learning model for anomaly detection.

[0087] Step 340: If M is not greater than the first threshold, determine whether the target sequence is a fluctuation sequence, where the fluctuation sequence represents a sequence of discrete distribution of target values.

[0088] In the embodiment of the present application, if M is not greater than the first threshold, the sequence fluctuation judgment model can be used to determine whether the target sequence is a fluctuation sequence. The fluctuation sequence represents a discrete distribution of target values ​​in the target sequence, and there is a certain gap range between the target values. In the embodiment of the present application, the sequence fluctuation judgment model can be a machine learning model with learning ability, or it can be a statistical calculation method, and the embodiment of the present application does not make specific restrictions on this.

[0089] In the process of determining whether the target sequence is a fluctuating sequence provided in the embodiment of the present application, a specific implementation method may be: performing statistical counting on the target sequence, calculating the number of occurrences of different values ​​respectively, and if the number of occurrences of the mode accounts for 80% or more of the total number of target values, then the data sequence is considered to be a stationary sequence (i.e., not a fluctuating sequence), otherwise it is a fluctuating sequence.

[0090] In the process of determining whether the target sequence is a fluctuating sequence provided in the embodiments of the present application, a specific implementation method may also be: calculating the variance and / or mean of the target sequence, and based on the variance and / or mean of the target sequence, calculating the coefficient of variation of the target sequence. If the coefficient of variation is less than a preset threshold, the data sequence is considered to be a stationary sequence, otherwise it is a fluctuating sequence. The coefficient of variation, also known as the "coefficient of variation", is a normalized measure of the degree of discreteness of a probability distribution.

[0091] If the target sequence is determined to be a fluctuating sequence through the sequence fluctuation judgment model, step 350 can be executed; if the target sequence is determined not to be a fluctuating sequence (ie, a stationary sequence) through the sequence fluctuation judgment model, step 360 can be executed.

[0092] Step 350: If the target sequence is a fluctuation sequence, the target sequence is processed using a fluctuation sequence processing model to obtain a target time baseline. The sequence fluctuation judgment model includes a fluctuation sequence processing model and / or a stationary sequence processing model.

[0093] In an embodiment of the present application, if the target sequence is a fluctuation sequence, it means that the target value distribution of the target sequence is relatively discrete. Considering that the target value distribution is relatively discrete, in the process of processing the target sequence using a fluctuation sequence processing model, the fluctuation sequence processing model can be a machine learning model for processing discrete data, or a statistical method for processing discrete data. For example, the fluctuation sequence model can be a clustering algorithm, which divides the target sequence into multiple categories, selects one category as the target class, and uses the unit time granularity corresponding to the target class as the specified unit time granularity to further determine the target time baseline.

[0094] Step 360: If the target sequence is not a fluctuating sequence, the target sequence is processed using a stationary sequence processing model to obtain a target time baseline.

[0095] In an embodiment of the present application, if the target sequence is not a fluctuating sequence, the target sequence can be considered to be a stationary sequence, indicating that the target value distribution of the target sequence is relatively continuous. Considering that the target value distribution is relatively continuous, in the process of processing the target sequence using a stationary sequence processing model, the stationary sequence processing model can be a machine learning model for processing continuous data, or a statistical method for processing continuous data. For example, the stationary sequence model can be a box plot processing method, in which a confidence interval is obtained by presetting the confidence, and the target time baseline is further determined based on the confidence interval.

[0096] In the embodiment of the present application, if M is not greater than the first threshold, it is determined whether the target sequence is a fluctuating sequence, and the fluctuating sequence represents a sequence of discrete distribution of target values. Further based on the distribution characteristics of the target value (a stationary sequence can be considered to have a relatively continuous target value distribution, and a fluctuating sequence can be considered to have a relatively discrete target value distribution), a more targeted processing model is selected to make the generated target time baseline have a higher accuracy.

[0097] In step 350 provided in the embodiment of the present application, the target sequence is processed by using a fluctuation sequence processing model to obtain a target time baseline, including: obtaining X center points, where the center points come from M target values ​​in the target sequence, and X is an integer not less than 2; based on the X center points, clustering the M target values ​​by using the fluctuation sequence processing model to obtain X types of target values; obtaining an average value of each type of target value in the X types of target values; obtaining X average values ​​by using the X types of target values; selecting a maximum average value from the X average values; and using a unit time granularity corresponding to the maximum average value as the target time baseline.

[0098] In an embodiment of the present application, the fluctuation sequence processing model may be a clustering model, for example, it may be a kmeans clustering algorithm or other clustering algorithms. In the process of processing the target sequence using the fluctuation sequence model, X target values ​​may be randomly selected from the M target values ​​in the target sequence as the center point through the fluctuation sequence model. The target value in the target sequence represents the number of logins of the target user in the unit time granularity, so the maximum average value is selected from the X average values, and the unit time granularity corresponding to the maximum average value is used as the designated unit time granularity to further confirm the target time baseline. For example, by manually specifying the clustered categories as two categories, randomly selecting two center points, calculating the distance between the center point and the adjacent points, and selecting the target value closest to the center point, together as a class of target values. And select the unit time granularity corresponding to the class of target values ​​with a larger mean as the final target time baseline.

[0099] In the embodiment of the present application, when M is not greater than the first threshold value and the target sequence is a fluctuation sequence, it means that the number of target values ​​in the target sequence is small and the target value distribution is relatively discrete. Based on the characteristics of the target values ​​in the target sequence and the meanings represented by the target values, a fluctuation sequence processing model is selected to process the target sequence in a targeted manner, so that the target time baseline obtained has higher accuracy.

[0100] In step 360 provided in the embodiment of the present application, the target sequence is processed using a stationary sequence processing model to obtain a target time baseline, including: obtaining a preset confidence, the preset confidence indicating the probability that any target value in the target sequence falls within a confidence interval; generating a confidence interval through the stationary sequence processing model based on the preset confidence; obtaining P target values ​​that fall within the confidence interval from the M target values; and determining the unit time granularity corresponding to the P target values ​​as the target time baseline.

[0101] In an embodiment of the present application, the stationary sequence may be a box plot or a ksigma curve for processing continuous data. The confidence level may be manually set in advance, and the value range of the confidence level may be [0,1]. In the process of generating a confidence interval through a stationary sequence processing model based on a preset confidence level, the mean and / or standard deviation of the target sequence may be obtained, and the confidence interval may be determined based on the mean and / or standard deviation of the target sequence and the preset confidence level. The unit time granularity corresponding to the target point in the confidence interval is used as the specified unit time granularity to further confirm the target time baseline.

[0102] In the process of obtaining the target time baseline through the stationary sequence processing model, the quantile or one-sided confidence lower limit of the target sequence can also be obtained according to the preset confidence level, and the unit time granularity corresponding to the target value in the sequence greater than the quantile / confidence lower limit is used as the specified unit time granularity to further confirm the target time baseline.

[0103] In the embodiments of the present application, based on various situations of the target sequence, different processing methods can be selected according to the data distribution of the target sequence to obtain a suitable target time baseline to adapt to complex and changeable situations and generate an accurate target time baseline.

[0104] Figure 4 A flowchart of a method for determining a time baseline provided in an embodiment of the present application. Figure 4 As shown, the method for determining the time baseline provided in the embodiment of the present application includes the following steps:

[0105] Step 410, obtaining login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins.

[0106] Step 415, based on the login information, obtain the target sequence of the target user, the target sequence includes M target values, the M target values ​​correspond one-to-one to M unit time granularities, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer.

[0107] Step 420: If M is greater than a first threshold, the target sequence is input into the anomaly detection module, and the target machine learning model includes N anomaly detection modules.

[0108] Step 425: output the M data labels of the M target values ​​through the anomaly detection module.

[0109] Step 430, for the ith target value among the M target values, perform the following operations: obtain N data labels corresponding to the ith target value.

[0110] Step 435: if the i-th target value is a normal value, obtain the unit time granularity corresponding to the i-th target value.

[0111] Step 440: Generate a target time baseline based on the unit time granularity corresponding to the i-th target value.

[0112] Step 445: If M is not greater than the first threshold, determine whether the target sequence is a fluctuation sequence.

[0113] Step 450: If the target sequence is a fluctuation sequence, obtain X center points, where the center points come from M target values ​​in the target sequence, and X is an integer not less than 2.

[0114] Step 455: Based on the X center points, the M target values ​​are clustered by the fluctuation sequence processing model to obtain X types of target values.

[0115] Step 460: Obtain the average value of each type of target value in the X types of target values.

[0116] Step 465, obtaining X average values ​​through X types of target values.

[0117] Step 470: Select a maximum average value from the X average values; and use the unit time granularity corresponding to the maximum average value as the target time baseline.

[0118] Step 475: If the target sequence is not a fluctuating sequence, a preset confidence level is obtained, where the preset confidence level represents the probability that any target value in the target sequence falls within a confidence interval.

[0119] Step 480, based on the preset confidence level, generate a confidence interval through the stationary sequence processing model.

[0120] Step 485, obtaining P target values ​​falling within the confidence interval from the M target values.

[0121] Step 490: Determine the unit time granularity corresponding to the P target values ​​as the target time baseline.

[0122] In an embodiment of the present application, the login information of the target user in the target time period is obtained, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; based on the login information, the target sequence of the target user is obtained, the target sequence includes M target values, the M target values ​​correspond to the M unit time granularities one by one, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer; if M is greater than a first threshold, the target time baseline is determined by a target machine learning model for anomaly detection, the target time baseline includes a specified unit time granularity that allows the target user to access the target resource, and the specified unit time granularity is at least one unit time granularity of the M unit time granularities; if M is not greater than the first threshold, the target time baseline is determined based on the sequence fluctuation judgment model. In this way, the target value can represent the number of logins of the target user in the target time period, and accordingly, the target sequence can represent the number of logins of the target user at different unit time granularities. In view of the diversity of target values, different models are used to generate target time baselines including specified unit time granularity. Compared with the use of the entire working time as the target time baseline in the related art, the target time baseline provided by the embodiment of the present application can be more flexible and dispersed, improving the accuracy of the target time baseline, and to a certain extent can solve the problem of low accuracy of the time baseline caused by generating the time baseline through working time in the related art. At the same time, since the target sequence can represent the number of logins of the target user at different unit time granularities, the target time baseline is obtained based on the target sequence, so that the target time baseline has a higher correlation with the target user, further improving the accuracy of the target time baseline.

[0123] In order to better understand the method for determining the time baseline provided in the embodiments of the present application, an example is given. It should be understood that the example is not limiting. Figure 5 The architecture diagram of the method for determining the time baseline provided in the embodiment of the present application is as follows: Figure 5 As shown, the method for determining the time baseline provided in the embodiment of the present application can be divided into four steps, namely data collection, data preprocessing, data sequence fluctuation discrimination / abnormal detection module, and time baseline generation:

[0124] Step S1: Data Collection

[0125] 1. Data source: The required data can be collected through different data sources; such as ES, ORACLE, Gbase and other databases.

[0126] 2. Log type: Determine the log sources that need to be collected. This may include operating system logs, network device logs, application logs, etc. You can select data of different log types to ensure the accuracy of the results.

[0127] Step S2: Data preprocessing

[0128] 1. Time format conversion: Since different data acquisition devices have different collection methods and rules, the formats of time fields may vary greatly. Before subsequent operations, the time field format of the training data needs to be standardized, for example, converted to YYYY-MM-DD HH:MM:SS format.

[0129] 2. Data cleaning: The collected data needs to be cleaned, including format content cleaning, logical error cleaning, and missing value cleaning. Format content cleaning includes converting data with inconsistent display formats such as time, date, and numerical values, data with characters that should not exist, and data that does not match the content of the field; logical error cleaning includes removing / replacing unreasonable data; missing value cleaning includes replacing / deleting data that is missing or NULL in required fields;

[0130] 3. Data grouping: Group data according to the grouping field. The grouping field is the minimum granularity of the generated time baseline, indicating that subsequent calculations are based on this category of data. For example, grouping data according to the account field means that the final generated time baseline is based on the account number as the dimension, and one account number corresponds to one time baseline.

[0131] 4. Generate data sequence (i.e., target sequence): Recombine the data according to the period of baseline generation to generate the data sequence required for calculation. For example, to generate a time baseline for one day, divide the original data according to the twenty-four hours of the day. You can also choose a finer-grained time interval as needed, such as ten minutes / half an hour, etc. Take the frequency of occurrence in each small interval as the value in the sequence to prepare for subsequent calculations.

[0132] After completing data preprocessing, different modules are entered according to the data volume of the data sequence. When the data volume of the data sequence is less than the preset threshold (i.e., the first threshold, for example 30), step S31-data sequence fluctuation judgment is entered; if the data volume of the data sequence is greater than the preset threshold, step S32-data sequence anomaly detection module is entered.

[0133] Step S31: Data sequence fluctuation determination

[0134] This part uses the sequence fluctuation judgment model to judge the fluctuation of the data sequence, and then uses different methods to obtain the time baseline for different types of sequences, making the final result more accurate. The specific judgment process is as follows:

[0135] 1. Perform statistical counting on the data sequence and calculate the number of occurrences of different values. If the number of occurrences of the mode accounts for 80% or more of the total, the data sequence is considered to be a stable sequence, otherwise it is a fluctuating sequence;

[0136] 2. Calculate the variance and mean of the data sequence, and then calculate the coefficient of variation of the sequence. If the coefficient of variation is less than the preset threshold, the data sequence is considered to be a stationary sequence, otherwise it is a fluctuating sequence.

[0137] When solving the problem in practice, you can choose one of them according to the data situation, as long as one of the conditions is met.

[0138] Step S41: Generate a time baseline module

[0139] 1. Enter different algorithm processes according to whether the data sequence obtained in step S31 is stable or fluctuating;

[0140] 2. If the sequence is a fluctuation sequence, the data sequence needs to be placed in a fluctuation sequence processing model (for example, a clustering model), and the category with a larger mean is selected as the frequently used time category. The clustering model here can be kmeans or other clustering algorithms, specifying that the clusters are two clusters, and clustering the target values ​​into two clusters of target values ​​through the clustering model. At this time, the unit time granularity corresponding to the target value of the cluster with a larger mean is selected as the final target time baseline. Since the value of the data series is the number of logins in a certain time window, if a cluster with a larger mean is selected, it means that the category with a larger average number of logins is selected, because the target time baseline represents the time period when the target user frequently operates. By using the unit time granularity corresponding to the cluster with a larger mean as the final target time baseline, it meets the definition of the target time baseline;

[0141] 3. If the sequence is a stationary sequence, the data sequence needs to be placed in a stationary sequence processing model (such as a box plot or ksigma). The quantile or one-sided confidence lower limit of the data sequence can be obtained according to the preset confidence level, and the unit time granularity corresponding to the target value in the data sequence that is greater than the quantile / confidence lower limit is the time baseline.

[0142] Step S32: Data sequence anomaly detection module

[0143] If the amount of data is greater than the threshold, the time baseline is obtained through the target machine learning model for anomaly detection, and the target machine learning model includes N anomaly detection modules. The specific steps are as follows:

[0144] 1. Calculate the quartile or median of a data series;

[0145] 2. Train multiple basic anomaly detectors (ie, anomaly detection modules), feed the data sequence into the anomaly detection module, and the anomaly detection algorithms that can be selected in the embodiment of the present application are: LOF, KNN, and isolation forest.

[0146] 3. Generate a pseudo label (i.e., data label) indicating whether the target value is an abnormal value for evaluation. After this process, the abnormal labels obtained in various anomaly detectors can be screened. The screening process can modify the abnormal data labels whose median values ​​of the data sequence are greater than the third digit of the quartile to normal. The reason is that the target value in the data sequence corresponds to the number of operations of the target user in different unit time granularities, and the larger the number of operations, the more frequent the user's operations in this time period. This should be the user's commonly used time interval, so it should be retained;

[0147] 4. Obtain a set of pseudo labels for each time point;

[0148] 5. Merge the labels to get the final result. For each target value, select the label with the largest number as the final label of each target value. The time period corresponding to the target value with the final label being normal is the required time baseline.

[0149] Step S42: Generate a time baseline module

[0150] The unit time granularity corresponding to the data of the normal label output in the S32 model is the required time baseline.

[0151] In the method for determining the time baseline provided in the embodiment of the present application, first, according to the length of the data sequence, it is selected whether to first perform data sequence stationarity judgment or directly perform anomaly detection. If data stationarity judgment is performed first, a clustering algorithm is used for the fluctuation sequence, and a box plot / ksigma is used for the stationary sequence to obtain the final time baseline; if anomaly detection is used directly to obtain a comprehensive model, the final time baseline is obtained according to the output result of the target machine learning model. The adaptability and generalization ability of the target machine learning model can be improved. At the same time, through data collection, data preprocessing, data sequence fluctuation judgment / anomaly detection module, and time baseline generation, the log data is fully and effectively characterized. By improving the accuracy of the data sequence input to the anomaly module and the method of jointly processing by multiple anomaly detection modules, the accuracy and reliability of the anomaly detection module are improved.

[0152] In addition, the method for determining the time baseline provided in the embodiment of the present application also has the following advantages:

[0153] 1. Select different machine learning algorithms according to the amount of data in the data sequence to obtain a suitable time baseline to adapt to complex and changing situations and generate an accurate time baseline.

[0154] 2. The selection of time interval granularity (i.e., unit time granularity) is selective and diverse, and the appropriate granularity can be set according to the minimum time window required by the actual situation.

[0155] 3. Improve security: As network threats continue to increase, enterprises face increasing security risks. The method of generating time baselines based on machine learning can effectively detect abnormal behaviors and security threats in zero-trust architectures, helping enterprises to promptly discover and respond to potential attacks and improve overall security.

[0156] 4. Automation and efficiency improvement: The method of generating time baselines in related technologies requires manual writing of rules and manual analysis of log data, which is time-consuming, labor-intensive and error-prone. The method of generating time baselines based on machine learning greatly reduces the need for manual intervention and improves the efficiency and accuracy of audits.

[0157] 5. Real-time monitoring and response: The machine learning-based time baseline generation method can process a large amount of log data in real time and quickly detect abnormal behavior, thus achieving timely monitoring and response to network security conditions. This helps reduce the impact and losses of potential attacks and improves the ability to respond quickly to security incidents.

[0158] 6. Highly scalable and adaptable: The scale and complexity of enterprise data continue to grow, requiring a scalable and adaptable log audit system. Deep learning-based methods have advantages in handling large-scale data and new threats, and can meet the ever-changing needs of enterprises.

[0159] In terms of compliance and risk management, this application implements the time-based approach provided to provide reliable security audit records and help enterprises meet compliance requirements and reduce legal and compliance risks.

[0160] Figure 6 This is a structural block diagram of a device for determining a time baseline provided in an embodiment of the present application. Figure 6 As shown, the time baseline determination device 600 provided in the embodiment of the present application includes: an acquisition module 610, a processing module 620 and a determination module 630.

[0161] An acquisition module 610 is used to acquire login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins;

[0162] A processing module 620 is used to obtain a target sequence of the target user based on the login information, where the target sequence includes M target values, where the M target values ​​correspond to M unit time granularities one by one, and the target value represents the number of logins of the target user in one unit time granularity, where M is a positive integer;

[0163] A determination module 630 is configured to determine a target time baseline by using a target machine learning model for anomaly detection if M is greater than a first threshold, wherein the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities;

[0164] The determination module is further used to determine the target time baseline based on the sequence fluctuation judgment model if M is not greater than the first threshold.

[0165] It should be noted that the embodiment of the device for determining the time baseline in this specification and the embodiment of the method for determining the time baseline in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding method for determining the time baseline in the previous text, and the repeated parts will not be repeated.

[0166] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 provided in the embodiment of the present application may include a processor 710 and a memory 720. The memory stores a computer program, and when the computer program is executed, any of the time baseline determination methods provided in the embodiment of the present application (for example, Figure 1-Figure 4 The steps in the method for determining the time baseline shown in any of the figures.

[0167] The memory is used to store programs or data. The memory can be, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0168] The embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned content distribution network-based caching method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0169] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0170] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0171] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0173] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for determining a time baseline, It is characterized in that include: Acquire login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; Based on the login information, a target sequence of the target user is obtained, where the target sequence includes M target values, where the M target values ​​correspond to M unit time granularities one by one, and the target value represents the number of logins of the target user in one unit time granularity, where M is a positive integer; If M is greater than a first threshold, determining a target time baseline by using a target machine learning model for anomaly detection, wherein the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities; If M is not greater than the first threshold, the target time baseline is determined based on the sequence fluctuation judgment model.

2. The method according to claim 1, It is characterized in that The target machine learning model includes N anomaly detection modules, where N is a natural number; The determining of a target time baseline by a target machine learning model for anomaly detection includes: For the kth anomaly detection module among the N anomaly detection modules, the following operations are performed: inputting the target sequence into the anomaly detection module; outputting M data labels of the M target values ​​through the anomaly detection module, wherein the M data labels correspond to the M target values ​​one by one, and the data labels are used to indicate whether the target value is an anomaly value; Based on the output results of N anomaly detection modules, a target time baseline is generated.

3. The method according to claim 2, It is characterized in that The generating of the target time baseline based on the output results of the N anomaly detection modules includes: For the i-th target value among the M target values, the following operations are performed: obtaining N data labels corresponding to the i-th target value, the N data labels are output by N anomaly detection modules, and one anomaly detection module outputs one data label for the i-th target value; based on the N data labels corresponding to the i-th target value, jointly determining whether the i-th target value is an anomaly value; If the i-th target value is a normal value, obtain the unit time granularity corresponding to the i-th target value; Generate a target time baseline based on the unit time granularity corresponding to the i-th target value.

4. The method according to claim 1, It is characterized in that The sequence fluctuation judgment model includes a fluctuation sequence processing model and / or a stable sequence processing model; The method of determining the target time baseline based on the sequence fluctuation judgment model includes: Determining whether the target sequence is a fluctuation sequence, wherein the fluctuation sequence represents a sequence of discrete distribution of target values; If the target sequence is a fluctuation sequence, the target sequence is processed using a fluctuation sequence processing model to obtain a target time baseline; If the target sequence is not a fluctuating sequence, the target sequence is processed using a stationary sequence processing model to obtain a target time baseline.

5. The method according to claim 4, It is characterized in that The target sequence is processed using a stationary sequence processing model to obtain a target time baseline, including: Obtaining a preset confidence level, wherein the preset confidence level represents the probability that any target value in the target sequence falls within a confidence interval; Generate confidence intervals based on preset confidence levels using a stationary series processing model; Obtaining P target values ​​falling within the confidence interval from the M target values; The unit time granularity corresponding to the P target values ​​is determined as the target time baseline.

6. The method according to claim 4, It is characterized in that The target sequence is processed using a fluctuation sequence processing model to obtain a target time baseline, including: Obtain X center points, where the center points are from M target values ​​in the target sequence, and X is an integer not less than 2; Based on X center points, M target values ​​are clustered through the fluctuation sequence processing model to obtain X types of target values; Get the average value of each target value in the X target values; Through X types of target values, X average values ​​are obtained; Selecting a maximum average value from the X average values; The unit time granularity corresponding to the maximum average value is used as the target time baseline.

7. A device for determining a time baseline, It is characterized in that include: An acquisition module, used to acquire login information of a target user within a target time period, wherein the target time period includes M unit time granularities, and the login information includes the number of logins; A processing module, configured to obtain a target sequence of the target user based on the login information, wherein the target sequence includes M target values, the M target values ​​correspond to M unit time granularities one by one, the target value represents the number of logins of the target user in one unit time granularity, and M is a positive integer; a determination module, configured to determine a target time baseline by using a target machine learning model for anomaly detection if M is greater than a first threshold, wherein the target time baseline includes a specified unit time granularity for allowing the target user to access a target resource, and the specified unit time granularity is at least one unit time granularity among the M unit time granularities; The determination module is further used to determine the target time baseline based on the sequence fluctuation judgment model if M is not greater than the first threshold.

8. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, It is characterized in that The medium stores a program or an instruction, and when the program or the instruction is executed, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, It is characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Career monitoring method, device and equipment and computer readable storage medium

    CN110083575A

  • Lost account detection method and system based on kernel density estimation

    CN114050941A

  • Method and device for detecting equipment abnormity based on equipment log quantity

    CN115348079A

  • Population-based learning with deep belief networks

    WO2016033247A2