Data detection method, device, electronic device and storage medium
By generating a behavioral layer set and training an anomaly detection model, the problem of low accuracy in identifying abnormal user operations in the existing technology is solved, and the ability to identify malware theft is improved.
Patent Information
- Application Number
- CN202111527451.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-12-14
AI Technical Summary
When existing technology identifies whether a user has been misappropriated by malware to access the system, it can only analyze patterns in a single dimension, resulting in low accuracy in identifying abnormal user operations and inability to discover the user's potential behavioral patterns.
By obtaining the target behavior data of the target user, determine the statistical dimension values in multiple target time periods according to the operation time, generate a set of behavioral layers, and train an anomaly detection model to identify abnormal operations.
It improves the detection accuracy of abnormal operations, can discover potential patterns of user behavior, and enhances the ability to identify malware theft.
Smart Images

Figure CN114218574B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data detection method, device, electronic device and storage medium. Background Art
[0002] We are currently in the era of Internet innovation and big data. A large amount of personal privacy, property information and behavioral trajectory data are stored and transmitted on the Internet. Some people may access the systems of enterprises or companies through malicious software (such as crawler software) to obtain data, causing significant losses to the company. At present, in order to be able to identify whether users with system access rights are stolen by malicious software to obtain system data, it is usually based on statistics to count the rules between the operations performed by users in various time periods, such as calculating the variance and mean of the time difference between two adjacent requests of the same user in a certain time period. If an operation that does not conform to the normal rules of the user is detected, that is, when the user is detected to have abnormal operations, it is determined that the user may be stolen by malicious software to access the system. Then the inventor found in the process of practice that the identification of abnormal operations of user operations can only be analyzed by analyzing the rules of a single dimension, and the potential behavioral rules of the user cannot be discovered, resulting in low accuracy in the identification of abnormal operations of the user. Summary of the invention
[0003] The embodiments of the present application provide a data detection method, device, electronic device, and storage medium, which help to improve the accuracy of abnormal operation detection.
[0004] On the one hand, an embodiment of the present application discloses a data detection method, the method comprising:
[0005] Acquire target behavior data of a target user, where the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, where the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0006] Determine first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, where the M target time periods are M consecutive time periods within the first time range;
[0007] Determine, according to the first statistical dimension values of the K target operation interfaces within the M target time periods, first behavior layers corresponding to the K target operation interfaces respectively, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0008] Training the initial anomaly detection model according to the set of behavior layers to obtain an anomaly detection model;
[0009] When a behavior detection instruction for the target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0010] On the other hand, an embodiment of the present application discloses a data detection device, the device comprising:
[0011] an acquisition unit, configured to acquire target behavior data of a target user, wherein the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, wherein the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0012] A processing unit, configured to determine first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, wherein the M target time periods are M consecutive time periods within the first time range;
[0013] The processing unit is further used to determine the first behavior layers corresponding to the K target operation interfaces respectively according to the first statistical dimension values within the M target time periods for the K target operation interfaces, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0014] The processing unit is further used to train the initial anomaly detection model according to the behavior layer set to obtain the anomaly detection model;
[0015] The processing unit is also used to obtain the behavior data to be detected corresponding to the target user when a behavior detection instruction for the target user is detected, and call the anomaly detection model to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0016] In another aspect, an embodiment of the present application provides an electronic device, the electronic device comprising a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to perform the following steps:
[0017] Acquire target behavior data of a target user, where the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, where the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0018] Determine first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, where the M target time periods are M consecutive time periods within the first time range;
[0019] Determine, according to the first statistical dimension values of the K target operation interfaces within the M target time periods, first behavior layers corresponding to the K target operation interfaces respectively, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0020] Training the initial anomaly detection model according to the set of behavior layers to obtain an anomaly detection model;
[0021] When a behavior detection instruction for the target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0022] In another aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the computer program instructions are used to perform the following steps:
[0023] Acquire target behavior data of a target user, where the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, where the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0024] Determine first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, where the M target time periods are M consecutive time periods within the first time range;
[0025] Determine, according to the first statistical dimension values of the K target operation interfaces within the M target time periods, first behavior layers corresponding to the K target operation interfaces respectively, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0026] Training the initial anomaly detection model according to the set of behavior layers to obtain an anomaly detection model;
[0027] When a behavior detection instruction for the target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0028] In another aspect, the present application discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned data detection method.
[0029] The present application provides a data detection scheme, which can obtain the target behavior data of the target user, and determine the first statistical dimension values within multiple target time periods according to the operation time when performing operations on each target operation interface in the target behavior data, and then generate a first behavior layer according to the first statistical dimension values within multiple target time periods for each target operation interface, thereby generating a corresponding behavior layer according to the operation behavior data of each operation performed by the target user, so as to facilitate the subsequent training of anomaly detection models according to the behavior layer set, and then when a behavior detection instruction is detected, the anomaly detection model is called to detect the behavior of the target user to determine whether the target user has abnormal operations. The above method can realize the conversion of user behavior data into layer data, and then through the detection of the layer, the abnormal operation of the user is discovered, so that the potential rules of user behavior can be discovered, and the accuracy of the detection of abnormal operations can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 It is a structural diagram of a data detection system provided in an embodiment of the present application;
[0032] Figure 2 It is a flow chart of a data detection method provided in an embodiment of the present application;
[0033] Figure 3 This is a schematic diagram of the effect of a first behavior layer provided in an embodiment of the present application;
[0034] Figure 4 It is a flow chart of a data detection method provided in an embodiment of the present application;
[0035] Figure 5 It is a flow chart of a model training process of an anomaly detection model provided in an embodiment of the present application;
[0036] Figure 6 is a structural schematic diagram of a data detection device provided in an embodiment of the present application;
[0037] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] The present application provides a data detection scheme, which can obtain the target behavior data of the target user, and determine the first statistical dimension values within multiple target time periods according to the operation time when performing operations on each target operation interface in the target behavior data, and then generate a first behavior layer according to the first statistical dimension values within multiple target time periods for each target operation interface, thereby generating a corresponding behavior layer according to the operation behavior data of each operation performed by the target user, so as to facilitate the subsequent training of anomaly detection models according to the behavior layer set, and then when a behavior detection instruction is detected, the anomaly detection model is called to detect the behavior of the target user to determine whether the target user has abnormal operations. The above method can realize the conversion of user behavior data into layer data, and then through the detection of the layer, the abnormal operation of the user is discovered, so that the potential rules of user behavior can be discovered, and the accuracy of the detection of abnormal operations can be improved.
[0040] In a possible implementation manner, the present application may be applied to a data detection system, see Figure 1 , Figure 1: is a structural diagram of a data detection system provided by an embodiment of the present application, and the data detection system may include a data detection device and a log platform. Among them, the data detection device can be used to execute the above data detection scheme. The log platform can be used to store the corresponding operation behavior data when each user performs an operation, and each operation performed by the user can correspond to an operation behavior data. The log platform can be a database, a log cloud server, etc. for storing log data, which is not limited here. In a possible implementation, when the data detection device obtains the behavior data to be detected of the target user, it can be obtained from the log platform. For example, in some scenarios, each operation behavior data in the log platform can include the user name of the user for performing the operation, the operating system information corresponding to the operation performed, the operation interface information, and the operation time and other information. When a behavior detection instruction for detecting whether the target user has an abnormal operation is detected, such as detecting the behavior detection instruction of the administrator for all users of the system; for example, detecting the behavior detection instruction for the target user generated regularly, which is not limited here. Then, in response to the behavior detection instruction, the operation behavior data of the target user for K target operation interfaces within the second time range can be screened out based on the operation time, user name, and operation interface information included in the operation behavior data as the behavior data to be detected. For example, according to the user name of the target user, G operation behavior data corresponding to the target user are obtained from the log platform, and then H operation behavior data with operation time within a first time range are determined from the G operation behavior data according to the operation time, and then the H operation behavior data are classified according to the operation interface information to determine that the H operation behavior data describing the target user for K target operation interfaces within a second time range are the behavior data to be detected, and the K target operation interfaces can be the operation interfaces indicated by the interface information in the above H operation behavior data. Therefore, the target user's behavior data to be detected can be quickly obtained from the log platform, and then the data detection device can convert the behavior data to be detected into a behavior layer, and call the anomaly detection model to detect the behavior data to be detected to determine whether the target user has abnormal operations, and the operation time of the abnormal operation, wherein the anomaly detection model is obtained by training the initial anomaly detection model according to the behavior layer set converted from the operation behavior data within the first time range, and the anomaly detection model can be a target detection model in the field of artificial intelligence. The target detection model can be used to detect targets in multi-channel or single-channel images. Here, the behavior layer set converted from the operation behavior data is equivalent to a multi-channel or single-channel image (each behavior layer in the behavior layer set is equivalent to a channel of the image), and the target is equivalent to the location of the abnormal operation in the behavior layer set, thereby accurately detecting the abnormal operation through the anomaly detection model.
[0041] It should be noted that since the acquired target behavior data is used to record the user's operation behavior data, in order to protect the information privacy and security of the object, the embodiments of the present application will be submitted to the object for authorization, and the subsequent process of obtaining operation record data will be executed only after obtaining the object's authorization; unless otherwise specified, in the specific implementation of the present application, related data such as user information and operation behavior data are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0042] In a possible implementation, the technical solution of the present application can be used in an electronic device, which can also be referred to as the above-mentioned data detection device. The electronic device can be a terminal, a server, or other devices for data detection, which is not limited in the present application. Optional. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, middleware services, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.
[0043] In one possible implementation, the embodiments of the present application may be applied to the field of artificial intelligence. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and the like. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning. Specifically, the embodiments of the present application can detect the behavior layer set generated by the operation behavior data through artificial intelligence technology to determine whether the user has abnormal operations. For specific descriptions, please refer to Figure 2 or Figure 4 Description of the illustrated embodiment.
[0044] Based on the above description, the present application embodiment proposes a data detection method. Figure 2 , Figure 2 1 is a flow chart of a data detection method provided in an embodiment of the present application. The method can be executed by the electronic device mentioned above. The method can include the following steps.
[0045] S201. Obtain target behavior data of target users.
[0046] The target behavior data is used to describe the L operation behavior data of the target user for K target operation interfaces within the first time range, where K and L are positive integers, and L is greater than or equal to K. Each target operation interface corresponds to one or more operation behavior data, because the user may perform one or more operations for each target operation interface. As mentioned above, the operation behavior data may include the operation time of performing the operation on the target operation interface.
[0047] S202: Determine first statistical dimension values within M target time periods for K target operation interfaces according to the operation time in each operation behavior data.
[0048] Among them, the M target time periods are M consecutive time periods within the first time range. It can be understood that the time length of each target time period in the M target time periods is the same, and the time starting point of the first time range is the same as the time starting point of the first target time period. For example, if the first time range is t1-tn, then the M target time periods included in the first time range can be {t1-t2, t2-t3........t(n-1)-tn}, where t1-t2, t2-t3 and t(n-1)-tn can all represent a target time period, and the time starting point t1 of the first target time period t1-t2 is the same as the time starting point t1 of the first time range. In a specific scenario, the first time range can be one year, and the above-mentioned M target time periods can be every minute in one year, that is, there can be 24×60×365 minutes in one year, and each minute can be a target time period, so there can be 24×60×365 consecutive target time periods of the same time length in one year.
[0049] The first statistical dimension value can be used to represent the value of the first statistical dimension obtained after counting the operations performed in each target time period. In a possible implementation, the first statistical dimension value can be the number of operations performed in each target time period, the first statistical dimension value can also be the standard value of the time difference of the operation time of the operation performed in each target time period, the first statistical dimension value can also be the average value of the time difference of the operation time of the operation performed in each target time period, and the first statistical dimension value can also be the variance of the time difference of the operation time of the operation performed in each target time period, which is not limited here. For example, within the first time range, after statistical calculation, it is found that the first statistical dimension value for interface A in the first target time period is 10, and the first statistical dimension value for interface B in the first target time period is 20; the first statistical dimension value for interface A in the second target time period is 15, and the first statistical dimension value for interface B in the first target time period is 25, and so on, the first statistical dimension value for interface A and interface B in each target time period can be obtained. It can be understood that if the first statistical dimension values of K interfaces in M target time periods are obtained, K×M first statistical dimension values can be obtained.
[0050] For example, in a possible scenario, the first statistical dimension value may be the number of operations, and step S202 may specifically include the following steps: for each target operation interface among the K target operation interfaces, determine the number of operations of the operation time in each target time period according to the operation time in each operation behavior data; determine the number of operations of the operation in each target time period as the first statistical dimension value. For example, within the first time range, 10 operations are performed on interface A in the first target time period, and 12 operations are performed on interface B in the first target time period; 11 operations are performed on interface A in the second target time period, and 14 operations are performed on interface B in the second target time period, and so on, the number of operations performed on each target operation interface in each time period can be obtained as the first statistical dimension value.
[0051] For example, in a possible scenario, the first statistical dimension value may be a standard value of the time difference of the operation time of the operation performed within each target time period, and step S202 may specifically include the following steps: for each of the K target operation interfaces, determine the time difference between the operation time within each target time period and the operation time of the previous operation according to the operation time in each operation behavior data; calculate the average value of the time difference according to the operation time difference of the operation within each target time period, so as to calculate the variance and standard deviation of the operation time difference of the operation within each target time period. Among them, the previous operation of an operation may be an operation whose operation time is before the operation and adjacent to the operation, for example, operation A. For ease of processing, the time difference of the first operation within the first time range may be recorded as 0.
[0052] Here, an example is used to illustrate how to obtain the average, variance or standard deviation of the operation time difference of the operations performed within the target time period as the first statistical dimension value. For the target operation interface A among the K target operation interfaces, the operation time of the operation performed within the first time range is {1, 5, 14, 16, 19, 23, 36, 45}, and the time difference between the operation time of the operation performed in the first time range and the operation time of the previous operation can be calculated by 5-1, 14-5, 16-2... and so on, to obtain the time difference of the operation time of each operation {0, 4, 9, 2, 3, 4, 13, 9}. The time length of each target time period in the first time range is 10. It can be understood that the time difference of the operations in the first target time period is 0 and 4 respectively, the time difference of the operations in the second target time period is 9, 2 and 3 respectively, the time difference of the operations in the third target time period is 4, the time difference of the operations in the fourth target time period is 14, and the time difference of the operations in the fifth target time period is 9 respectively. After calculation, it can be obtained that the average value of the time difference of the operation in the second target time period is 2, the average value of the time difference of the operation in the second target period is 4.66, the average value of the time difference of the operation in the third target period is 4, and so on. If there is no operation in the target time period, the average value of the time difference of the operation in the target time period is recorded as 0. Then, the variance of the time difference of the operation in each target time period can be calculated according to the average value of the time difference of the operation in each target time period, such as according to the formula Calculate, where s 2 represents the standard deviation of the operation time of operations within a target time period, n represents the number of operations within a target time period, i can take a value between 1 and n, and x i represents the time difference of the ith operation within the target time period, Represents the average value of the time differences of n operations within the target time period. The variance of the time difference can be used to measure the fluctuation of the time difference of operations within a target time period. Furthermore, after obtaining the variance of the time difference within each target time period, the variance of the time difference within each target time period can be squared, that is, the standard deviation of the time difference within each target time period can be obtained. In a possible implementation, if the value of the first statistical dimension is a variance or a standard deviation, in order to distinguish between situations where the fluctuation between the time differences of multiple operations within the target time period is very small, or there is only one operation or no operation within the target time period, the variance or standard deviation corresponding to the target time period where there is only one operation or no operation within the target time period can be determined as a preset value, and the preset value can be a preset variance or standard deviation that is difficult to obtain by calculating between the operations within the first time range, and there is no limitation here. For example, by assuming that the time difference of performing the operation at the starting point of the first time range and the time difference of performing the operation at the end point are calculated, the variance s equivalent to the two time differences with the largest fluctuations within the first time range can be obtained. 2 Or standard deviation a, and then we can determine a value greater than variance s 2 Or a value greater than the standard deviation a is used as the above preset value.
[0053] S203. Determine first behavior layers corresponding to the K target operation interfaces respectively according to first statistical dimension values within M target time periods for the K target operation interfaces, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively.
[0054] Among them, the first behavior layer describes the behavior of the target user for the corresponding target operation interface within the first time range. The first behavior layer is equivalent to converting the first statistical dimension value within M target time periods for K target operation interfaces into pixel values in an image. Then, the image detection method can be used to detect whether the user's operation is abnormal, so as to detect more potential rules in the user's operation behavior data and accurately identify abnormal operations in user behavior operations.
[0055] In a possible implementation, the first time range includes N time periods, each of the N time periods includes P target time periods, N and P are positive integers, and P is less than or equal to M. For example, the first time range is t1-tn, then the M target time periods included in the first time range can be {t1-t2, t2-t3........t(n-1)-tn}, where t1-t2, t2-t3 and t(n-1)-tn can all represent a target time period. If a time period can include 3 target time periods (i.e., P=3), then t1-t2, t2-t3 and t3-t4 can be a time period, i.e., the first time period of the first time range. The time starting point t1 of the first time period is the same as the time starting point t1 of the first time range. Similarly, t4-t5, t5-t6 and t6-t7 are a time period. t(n-3)-t(n-2), t(n-2)-t(n-1), t(n-1)-tn can also be called a time period. In a specific scenario, the first time range can be one year, and the above-mentioned M target time periods can be every minute of the year, that is, there can be 24×60×365 minutes in a year, and each minute can be a target time period. Then, there can be 24×60×365 consecutive target time periods of the same length in a year, and each day can be a time cycle, and there can be 24×60 minutes in a time cycle.
[0056] Then, the first behavior layer corresponding to each target operation interface in the K target operation interfaces includes N rows of data and P columns of data, the i-th row of data in the N rows of data corresponds to the first statistical dimension value in the i-th time period in the N time periods, and the j-th column of data in the P columns of data corresponds to the first statistical dimension value of the j-th target time period in each time period, and i and j are positive integers. It can be understood that the first statistical dimension values of the P target time periods in each time period can be arranged in chronological order as a row of data in the first behavior layer, and the first statistical dimension values of the target time periods with the same time period order in each time period can be arranged as a column of data, and the time period order can indicate the target time period number of a target time period in the time period.
[0057] Here, the acquisition and generation method of the first behavior layer for a specific target operation interface A is described. For example, the first time range can be one year, each minute can be a target time period, and each day can be a time period. If the first dimension value corresponding to each minute in a year (the first dimension value is used as an example here) can be {3, 5, 4, 6, 1...5}, a total of 24×60×365 minutes (24×60×365 target time periods), then the 24×60 target time periods corresponding to each day are used as the first statistical dimension value under a time period, and then when generating the first behavior layer, the first statistical dimension values corresponding to the 24×60 minutes of the first day are used as the first row of pixel values of the first behavior layer, and the first statistical dimension values corresponding to the 24×60 minutes of the second day are used as the second row of pixel values of the first behavior layer, and so on, until the first statistical dimension values corresponding to the 24×60 minutes of the last day of the year are used as the last row of pixel values of the first behavior layer, the first behavior layer thus obtained has a total of 365 rows and 24×60 columns, as shown in Figure 3 As shown, Figure 3 This is a schematic diagram of the effect of a first behavior layer provided in an embodiment of the present application. The area shown in 301 can represent the first statistical dimension value of the second time period and the third target time period within the time period, that is, the number of operations within the fourth minute of the third day of a year; the area shown in 302 is the first statistical dimension value of each target time period within the fourth time period, that is, the number of operations per minute within the fourth day; the area shown in 303 is the first statistical dimension of the fifth target time period in each time period, that is, the number of operations within the fifth minute of each day.
[0058] The behavior layer set may be composed of the first behavior layers corresponding to each target operation interface. It is understandable that each target operation interface corresponds to a first behavior layer, and the behavior layer set may include K first behavior layers. The dimensions of the first behavior layers corresponding to each target operation interface are the same (i.e., they all include N rows of data and P columns of data), and the obtained behavior layer set is equivalent to an image with K channels.
[0059] S204: Train the initial anomaly detection model according to the behavior layer set to obtain an anomaly detection model.
[0060] Among them, the initial anomaly detection model can be an untrained model, and the anomaly detection model can be an anomaly detection model obtained by training the initial anomaly detection model through a set of behavior layers. As mentioned above, the initial anomaly detection model can be a model for target detection, such as a Faster-RCNN model, an R-CNN detection model, etc., which are not limited here. Then, the anomaly detection model can identify the target (the area of the target time period where the abnormal operation exists in this application) in the input image (the set of behavior layers in this application).
[0061] S205. When a behavior detection instruction for a target user is detected, the behavior data to be detected corresponding to the target user is obtained, and an anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0062] As mentioned above, the behavior detection instruction is used to instruct to detect the behavior of the target user.
[0063] The behavior data to be detected may be operation behavior data to be detected obtained from a log platform, and the behavior data to be detected is used to describe the operation behavior data of the target user for K target operation interfaces within a second time range, and the second time range includes S target time periods. It can be understood that each of the S target time periods has the same time length as each of the M target time periods.
[0064] The behavior detection result can be used to indicate whether the target user has abnormal operations and the time period in which the abnormal operations exist. In a possible implementation, when calling the anomaly detection model to detect the target user's behavior data to be detected, the behavior data to be detected can be converted into a corresponding detection behavior layer set, and then the detection behavior layer set is input into the anomaly detection model to obtain the behavior detection result. It can be understood that when the behavior data to be detected is detected by the anomaly detection model, it can be determined whether there is an abnormal area in the detection behavior layer set corresponding to the behavior data to be detected, and the location of the abnormal area. If it is detected that the detection behavior layer set has an abnormal area, the target time period corresponding to the value of the location of the abnormal area can be determined as the time period in which the abnormal operation exists.
[0065] The present application provides a data detection scheme, which can obtain the target behavior data of the target user, and determine the first statistical dimension values within multiple target time periods according to the operation time when performing operations on each target operation interface in the target behavior data, and then generate a first behavior layer according to the first statistical dimension values within multiple target time periods for each target operation interface, thereby generating a corresponding behavior layer according to the operation behavior data of each operation performed by the target user, so as to facilitate the subsequent training of anomaly detection models according to the behavior layer set, and then when a behavior detection instruction is detected, the anomaly detection model is called to detect the behavior of the target user to determine whether the target user has abnormal operations. The above method can realize the conversion of user behavior data into layer data, and then through the detection of the layer, the abnormal operation of the user is discovered, so that the potential rules of user behavior can be discovered, and the accuracy of the detection of abnormal operations can be improved.
[0066] See also Figure 4 , Figure 4 1 is a flow chart of a data detection method provided by an embodiment of the present application, which can be executed by the above-mentioned electronic device. The data detection method can include the following steps.
[0067] S401, obtaining target behavior data of a target user.
[0068] S402: Determine first statistical dimension values within M target time periods for K target operation interfaces according to the operation time in each operation behavior data.
[0069] S403. Determine first behavior layers corresponding to the K target operation interfaces respectively according to first statistical dimension values within M target time periods for the K target operation interfaces, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively.
[0070] Among them, steps S401-S403 can refer to the relevant description of steps S201-S203, and will not be repeated here.
[0071] In a possible implementation, when the embodiment of the present application generates a behavior layer set, it is also possible to construct a behavior layer set according to the behavior layer generated according to the numerical values of more statistical dimensions corresponding to each target operation interface, thereby discovering the potential rules of users in more dimensions and improving the accuracy of abnormal operation detection. Specifically, the following steps may be included: ① According to the operation time in each operation behavior data, the second statistical dimension value for the M target time periods for the K target operation interfaces is determined respectively. Among them, the second statistical dimension value may be the value corresponding to the statistical dimension different from the first statistical dimension mentioned above. For example, if the first statistical dimension is the number of operations, the second statistical dimension may be any statistical dimension different from the number of operations, such as the average value, variance or standard value of the time difference of the operation time of the operation performed in each target time period. ② According to the second statistical dimension value for the M target time periods for the K target operation interfaces, the second behavior layer corresponding to the K target operation interfaces is determined. Among them, the second behavior layer describes the behavior of the target user for the corresponding target operation interface within the first time range, and the second behavior layer and the first behavior layer may both include N rows of data and P columns of data. The method for generating the second behavior layer is the same as the method for generating the first behavior layer, except that the statistical dimensions of the values in the behavior layer are different, which will not be repeated here. ③ Obtain a behavior layer set based on the first behavior layer and the second behavior layer corresponding to the K target operation interfaces. Among them, in the behavior layer set obtained according to the first behavior layer and the second behavior layer, each target operation interface can correspond to two behavior layers (i.e., the first behavior layer and the second behavior layer), respectively, then the behavior layer set can include 2×K behavior layers, which is equivalent to passing through an image with 2×K channels.
[0072] S404: Train the initial anomaly detection model according to the behavior layer set to obtain an anomaly detection model.
[0073] In a possible implementation, before the initial anomaly detection model is trained according to the behavior layer set, sample data can be generated according to the behavior layer set. Specifically, the area corresponding to the target time period with abnormal operation or the area corresponding to the target time period with normal operation is marked in the behavior layer set to obtain sample data; the sample data is input into the initial anomaly detection model for training to obtain the anomaly detection model. Among them, the sample data may include the behavior layer set after the behavior layer set is marked. In a possible implementation, the marked behavior layer set may include one or more marked areas corresponding to the target time period with abnormal operation, or may also include one or more marked areas corresponding to the target time period with normal operation, so that when the sample data is subsequently trained, the model parameters of the initial detection model can be adjusted through the marked areas of the target time period, so that the final anomaly detection model can be obtained.
[0074] In a possible implementation, the embodiment of the present application may use the Faster-RCNN model as the initial detection model. The Faster-RCNN model is an image detection model that recognizes the target image and automatically selects the location of the target. Faster-RCNN can automatically generate the superiority of check box detection, which can effectively improve the accuracy of abnormal operation detection. Specifically, the use of the Faster-RCNN model as the initial detection model for training may include the following steps: ① Input the sample data into the initial anomaly detection model, call the initial anomaly detection model to extract features from the sample data, and obtain the first layer feature. Among them, the first layer feature can be the feature map corresponding to the sample data (feature maps), and the feature extraction of the sample data can be performed through a convolutional neural network, such as feature extraction through a VGG16 network. ② Call the initial anomaly detection model to determine multiple candidate areas in the sample behavior layer, and determine the second layer features corresponding to each candidate area based on the first layer feature. Among them, the candidate area can also be called a detection box, a basic box, etc., and the multiple candidate areas can be generated by an RPN network (Region Proposal Network). The second layer feature can be to convert the data in the first layer feature where the candidate area is located into a fixed-length output through RoI pooling. ③ According to each second layer feature, the corresponding prediction classification result and the predicted target position are determined respectively. The prediction classification result is used to indicate whether there is an abnormal operation in the operation of the candidate area corresponding to the predicted second layer feature, that is, whether there is a target. It can be understood that if the prediction classification result indicates that there is an abnormal operation in the candidate area, the specific location where the abnormal operation exists (that is, the predicted target location) can be specifically determined by the regressor. ④ According to each prediction classification result, each abnormal operation location, and the area corresponding to the target time period marked with abnormal operation in the candidate area corresponding to the prediction classification result, the model parameters of the initial abnormal detection model are adjusted to obtain the abnormal detection model. Among them, the first loss function can be called to calculate the first loss value for each prediction classification result and the area of the target time period marked in the sample data, and the model parameters of the initial abnormal detection model are adjusted according to the first loss value, so that the abnormal detection model correctly identifies whether there is an abnormal operation in the generated candidate area. The second loss function can be called to calculate the second loss value of the area of the predicted target position and the marked target time period, and the model parameters of the initial abnormal detection model are adjusted according to the second loss value, so that the abnormal detection model can accurately locate the location of the abnormal operation after determining that there is an abnormal operation in the candidate area. In a possible implementation, the above training process can be entirely run on a graphics processing unit (GPU), which greatly improves the operating efficiency.
[0075] For example, see Figure 5 , Figure 5 1 is a flow chart of a model training process of an anomaly detection model provided in an embodiment of the present application. Specifically, the sample data is input into the initial anomaly detection model. For example, the sample data may be a behavior layer set having K behavior layers (e.g. Figure 5 The first layer features can be obtained through a convolutional neural network (such as Figure 5 ), for example, the convolutional neural network may include 13 convolutional layers, 13 activation layers, and 4 pooling layers. Then, multiple candidate regions are generated (such as Figure 5 As shown in 503 in FIG. 1 , multiple candidate regions can be generated through the RPN network. Then, based on the first layer features and the candidate regions, the second layer features corresponding to each candidate region are obtained (eg, Figure 5 ), which is equivalent to converting the first layer features mapped to each candidate area into an output of the same length. Then, by means of classification and regression, it is predicted whether there is an abnormal operation in each candidate area and the area of the target time period where the abnormal operation exists, that is, the predicted classification result and the predicted target position (such as Figure 5 Then, the model parameters of the initial anomaly detection model can be adjusted by obtaining the region of the target time period marked in the sample data, the predicted classification result, and the predicted target position.
[0076] S405. When a behavior detection instruction for a target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the first statistical dimension values within S target time periods for K target operation interfaces are determined according to the operation time in each operation behavior data in the behavior data to be detected.
[0077] Among them, the method for determining the first statistical dimension value within S target time periods for K target operation interfaces can refer to the relevant description of step S201, that is, replacing each operation behavior data in the target behavior data in step S201 with each operation behavior data in the behavior data to be detected. It can be understood that the first statistical dimension in reference step S201 is the same as the first statistical dimension obtained in this step. For example, if the first statistical dimension in reference step S201 is the number of operations, the first statistical dimension obtained in this step is also the number of operations.
[0078] S406. According to the first statistical dimension values within the S target time periods for the K target operation interfaces, respectively determine the detection behavior layers corresponding to the K target operation interfaces, and obtain a detection behavior layer set according to the detection behavior layers respectively corresponding to the K target operation interfaces.
[0079] Among them, the relevant description of step S406 can refer to the relevant description of step S203, that is, for each target operation interface of K target operation interfaces, the corresponding detection behavior layer may include Q rows of data and P columns of data, where Q indicates that the second time range includes Q time periods, and each time period includes P target time periods, which is equivalent to Q×P equals S.
[0080] S407: Input the detection behavior layer set into the anomaly detection model to obtain the behavior detection result.
[0081] In one possible implementation, after the detection behavior layer set is input into the anomaly detection model, the detection behavior layer can be feature extracted through a convolutional neural network to obtain a first layer feature, and then multiple candidate areas are generated. The second layer feature corresponding to each candidate area is determined based on the first layer feature, thereby identifying the candidate areas where abnormal operations exist, and determining the areas where abnormal operations exist in the target time period, and obtaining behavior detection results.
[0082] In a possible implementation, after outputting the behavior detection result, the present application may receive result feedback, which may be used to indicate whether the output behavior detection result is accurate. If the output behavior detection result is inaccurate, sample data may be generated based on the detection behavior layer set corresponding to the behavior data to be detected to train the anomaly detection model again, and when annotating the newly generated sample data, the target time period indicating the presence of abnormal operation in the behavior detection result may be annotated as the target time period of normal operation.
[0083] In a possible implementation, the present application can also periodically obtain the operation behavior data within the latest time range as the above target behavior data, and generate corresponding sample data based on the operation behavior data within the latest time range to train the anomaly detection model again. For example, at intervals of one month, the operation behavior data of the most recent year is obtained as the above target behavior data. This ensures that the anomaly detection model can grasp the latest operation rules of the target user and improve the accuracy of the anomaly detection model in detecting abnormal operations.
[0084] In a possible implementation, when the behavior detection result is obtained, the behavior detection result can be sent to a target client, which can be a client for receiving the behavior detection result of the target user. In one scenario, the target client can be a client that initiates a behavior detection instruction for the target user, or it can be a client preset specifically for receiving the behavior detection result of the target user. For example, in an internal system of an enterprise, the system can periodically initiate abnormal behavior detection requests for personnel within the enterprise, and then after the electronic device generates a behavior detection instruction for the target user, the behavior detection result of the person performing the detection can be sent to the client corresponding to the administrator within the enterprise, without limitation here.
[0085] The present application provides a data detection scheme, which can obtain the target behavior data of the target user, and determine the first statistical dimension values within multiple target time periods according to the operation time when performing operations on each target operation interface in the target behavior data, and then generate a first behavior layer according to the first statistical dimension values within multiple target time periods for each target operation interface, thereby generating a corresponding behavior layer according to the operation behavior data of each operation performed by the target user, so as to facilitate the subsequent training of anomaly detection models according to the behavior layer set, and then when a behavior detection instruction is detected, the anomaly detection model is called to detect the behavior of the target user to determine whether the target user has abnormal operations. The above method can realize the conversion of user behavior data into layer data, and then through the detection of the layer, the abnormal operation of the user is discovered, so that the potential rules of user behavior can be discovered, and the accuracy of the detection of abnormal operations can be improved.
[0086] See also Figure 6 , Figure 6 is a structural diagram of a data detection device provided in an embodiment of the present application. Optionally, the data detection device may be provided in the above-mentioned electronic device. Figure 6 As shown, the data detection device described in this embodiment may include:
[0087] An acquisition unit 601 is used to acquire target behavior data of a target user, where the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, where the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0088] The processing unit 602 is used to determine the first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, where the M target time periods are M consecutive time periods within the first time range;
[0089] The processing unit 602 is further configured to determine first behavior layers corresponding to the K target operation interfaces respectively according to the first statistical dimension values within the M target time periods for the K target operation interfaces, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0090] The processing unit 602 is further configured to train the initial anomaly detection model according to the behavior layer set to obtain an anomaly detection model;
[0091] The processing unit 602 is further configured to, when a behavior detection instruction for the target user is detected, obtain the behavior data to be detected corresponding to the target user, and call the anomaly detection model to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0092] In one implementation, the first time range includes N time periods, each of the N time periods includes P target time periods, N and P are positive integers, and P is less than or equal to M;
[0093] The first behavior layer corresponding to each target operation interface among the K target operation interfaces includes N rows of data and P columns of data, the i-th row of data among the N rows of data corresponds to the first statistical dimension value within the i-th time period among the N time periods, the j-th column of data among the P columns of data corresponds to the first statistical dimension value of the j-th target time period in each time period, and i and j are positive integers.
[0094] In one implementation, the processing unit 602 is specifically configured to:
[0095] For each of the K target operation interfaces, determine the number of operations of the operation time within each target time period according to the operation time in each operation behavior data;
[0096] The number of operations within each target time period is determined as a first statistical dimension value.
[0097] In one implementation, the processing unit 602 is further configured to:
[0098] Determine the second statistical dimension values within M target time periods for the K target operation interfaces according to the operation time in each operation behavior data;
[0099] Determine, according to the second statistical dimension values of the K target operation interfaces within the M target time periods, second behavior layers corresponding to the K target operation interfaces respectively; the second behavior layers describe the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0100] The processing unit 602 is specifically configured to:
[0101] A behavior layer set is obtained according to the first behavior layers and the second behavior layers respectively corresponding to the K target operation interfaces.
[0102] In one implementation, the processing unit 602 is specifically configured to:
[0103] Marking the area corresponding to the target time period with abnormal operation and the area corresponding to the target time period with normal operation in the behavior layer set to obtain sample data;
[0104] The sample data is input into the initial anomaly detection model for training to obtain an anomaly detection model.
[0105] In one implementation, the processing unit 602 is specifically configured to:
[0106] Inputting the sample data into an initial anomaly detection model, calling the initial anomaly detection model to perform feature extraction on the sample data to obtain first layer features;
[0107] Calling the initial anomaly detection model to determine a plurality of candidate regions in the sample behavior layer, and determining second layer features corresponding to each candidate region based on the first layer;
[0108] Determine a corresponding prediction classification result and a predicted target position according to each second layer feature, wherein the prediction classification result is used to indicate whether an operation in the area corresponding to the predicted second layer feature is abnormal;
[0109] According to each prediction classification result, each prediction target position and the area corresponding to the target time period marked in the sample data, the model parameters of the initial anomaly detection model are adjusted to obtain the anomaly detection model.
[0110] In one implementation, the behavior data to be detected is used to describe the operation behavior data of the target user for K target operation interfaces within a second time range; the second time range includes S target time periods; the processing unit 602 is specifically used to:
[0111] Determine first statistical dimension values within the S target time periods for the K target operation interfaces according to the operation time in each operation behavior data in the behavior data to be detected;
[0112] Determine, according to the first statistical dimension values within the S target time periods for the K target operation interfaces, the detection behavior layers corresponding to the K target operation interfaces, respectively, and obtain a detection behavior layer set according to the detection behavior layers respectively corresponding to the K target operation interfaces;
[0113] The detection behavior layer set is input into the anomaly detection model to obtain the behavior detection result, and the behavior detection result is used to indicate whether the target user has abnormal operations and the time period of the abnormal operations.
[0114] See also Figure 7 , Figure 7 701 and 702. The electronic device described in this embodiment includes: a processor 701 and a memory 702. Optionally, the electronic device may also include a network interface 703 or a power supply module. The processor 701, the memory 702 and the network interface 703 may exchange data.
[0115] The processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0116] The network interface 703 may include an input device and / or an output device, for example, the input device may be a control panel, a microphone, a receiver, etc., and the output device may be a display screen, a transmitter, etc., which are not listed here. For example, in an embodiment of the application, the network interface may include a receiver and a transmitter.
[0117] The memory 702 may include a read-only memory and a random access memory, and provide program instructions and data to the processor 701. A portion of the memory 702 may also include a non-volatile random access memory. When the processor 701 calls the program instructions, it is used to execute:
[0118] Acquire target behavior data of a target user, where the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, where the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K;
[0119] Determine first statistical dimension values in the M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, where the M target time periods are M consecutive time periods within the first time range;
[0120] Determine, according to the first statistical dimension values of the K target operation interfaces within the M target time periods, first behavior layers corresponding to the K target operation interfaces respectively, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0121] Training the initial anomaly detection model according to the set of behavior layers to obtain an anomaly detection model;
[0122] When a behavior detection instruction for the target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
[0123] In one implementation, the first time range includes N time periods, each of the N time periods includes P target time periods, N and P are positive integers, and P is less than or equal to M;
[0124] The first behavior layer corresponding to each target operation interface among the K target operation interfaces includes N rows of data and P columns of data, the i-th row of data among the N rows of data corresponds to the first statistical dimension value within the i-th time period among the N time periods, the j-th column of data among the P columns of data corresponds to the first statistical dimension value of the j-th target time period in each time period, and i and j are positive integers.
[0125] In one implementation, the processor 701 is specifically configured to:
[0126] For each of the K target operation interfaces, determine the number of operations of the operation time within each target time period according to the operation time in each operation behavior data;
[0127] The number of operations within each target time period is determined as a first statistical dimension value.
[0128] In one implementation, the processor 701 is further configured to:
[0129] Determine the second statistical dimension values within M target time periods for the K target operation interfaces according to the operation time in each operation behavior data;
[0130] Determine, according to the second statistical dimension values of the K target operation interfaces within the M target time periods, second behavior layers corresponding to the K target operation interfaces respectively; the second behavior layers describe the behavior of the target user with respect to the corresponding target operation interface within the first time range;
[0131] The processor 701 is specifically configured to:
[0132] A behavior layer set is obtained according to the first behavior layers and the second behavior layers respectively corresponding to the K target operation interfaces.
[0133] In one implementation, the processor 701 is specifically configured to:
[0134] Marking the area corresponding to the target time period with abnormal operation and the area corresponding to the target time period with normal operation in the behavior layer set to obtain sample data;
[0135] The sample data is input into the initial anomaly detection model for training to obtain an anomaly detection model.
[0136] In one implementation, the processor 701 is specifically configured to:
[0137] Inputting the sample data into an initial anomaly detection model, calling the initial anomaly detection model to perform feature extraction on the sample data to obtain first layer features;
[0138] Calling the initial anomaly detection model to determine a plurality of candidate regions in the sample behavior layer, and determining second layer features corresponding to each candidate region based on the first layer;
[0139] Determine a corresponding prediction classification result and a predicted target position according to each second layer feature, wherein the prediction classification result is used to indicate whether an operation in the area corresponding to the predicted second layer feature is abnormal;
[0140] According to each prediction classification result, each prediction target position and the area corresponding to the target time period marked in the sample data, the model parameters of the initial anomaly detection model are adjusted to obtain the anomaly detection model.
[0141] In one implementation, the behavior data to be detected is used to describe the operation behavior data of the target user for K target operation interfaces within a second time range; the second time range includes S target time periods; the processor 701 is specifically used to:
[0142] Determine first statistical dimension values within the S target time periods for the K target operation interfaces according to the operation time in each operation behavior data in the behavior data to be detected;
[0143] Determine, according to the first statistical dimension values within the S target time periods for the K target operation interfaces, the detection behavior layers corresponding to the K target operation interfaces, respectively, and obtain a detection behavior layer set according to the detection behavior layers respectively corresponding to the K target operation interfaces;
[0144] The detection behavior layer set is input into the anomaly detection model to obtain the behavior detection result, and the behavior detection result is used to indicate whether the target user has abnormal operations and the time period of the abnormal operations.
[0145] Optionally, when the program instructions are executed by the processor, other steps of the method in the above embodiment may also be implemented, which will not be repeated here.
[0146] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the above method, such as executing the method executed by the above electronic device, which is not repeated here.
[0147] Optionally, the storage medium involved in the present application, such as computer-readable storage medium, may be non-volatile or volatile.
[0148] Optionally, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of blockchain nodes, etc. Among them, the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0149] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0150] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0151] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the steps performed in the embodiments of the above methods. For example, the computer device can be a terminal, or can be a server.
[0152] The above is a detailed introduction to a data detection method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data detection method, characterized in that: The method comprises: Obtain target behavior data of a target user, the target behavior data being used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, the operation behavior data including the operation time for performing an operation on the target operation interface, K and L being positive integers, L being greater than or equal to K; the first time range includes N time periods, each of the N time periods includes P target time periods, N and P being positive integers, P being less than or equal to M; the first behavior layer corresponding to each target operation interface of the K target operation interfaces includes N rows of data and P columns of data, the i-th row of data in the N rows of data corresponds to a first statistical dimension value in an i-th time period in the N time periods, the j-th column of data in the P columns of data corresponds to a first statistical dimension value in a j-th target time period in each time period, and i and j are positive integers; For each of the K target operation interfaces, determine the number of operations of the operation time within M target time periods according to the operation time in each operation behavior data; the M target time periods are M consecutive time periods within the first time range; Determine the number of operations within each target time period as a first statistical dimension value; Determine, according to the first statistical dimension values of the K target operation interfaces within the M target time periods, first behavior layers corresponding to the K target operation interfaces respectively, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range; Training the initial anomaly detection model according to the set of behavior layers to obtain an anomaly detection model; When a behavior detection instruction for the target user is detected, the behavior data to be detected corresponding to the target user is obtained, and the anomaly detection model is called to detect the behavior data to be detected of the target user to obtain a behavior detection result.
2. The method according to claim 1, characterized in that: The method further comprises: Determine the second statistical dimension values within M target time periods for the K target operation interfaces according to the operation time in each operation behavior data; Determine, according to the second statistical dimension values of the K target operation interfaces within the M target time periods, second behavior layers corresponding to the K target operation interfaces respectively; the second behavior layers describe the behavior of the target user with respect to the corresponding target operation interface within the first time range; The obtaining a behavior layer set according to the first behavior layers respectively corresponding to the K target operation interfaces includes: A behavior layer set is obtained according to the first behavior layers and the second behavior layers respectively corresponding to the K target operation interfaces.
3. The method according to claim 1, characterized in that: The initial anomaly detection model is trained according to the behavior layer set to obtain the anomaly detection model, including: Marking the area corresponding to the target time period where abnormal operation exists or the area corresponding to the target time period where normal operation exists in the behavior layer set to obtain sample data; The sample data is input into the initial anomaly detection model for training to obtain an anomaly detection model.
4. The method according to claim 3, characterized in that: The step of inputting the sample data into the initial anomaly detection model for training to obtain the anomaly detection model comprises: Inputting the sample data into an initial anomaly detection model, calling the initial anomaly detection model to extract features from the sample data, and obtaining first layer features; Calling the initial anomaly detection model to determine a plurality of candidate regions in the sample behavior layer, and determining a second layer feature corresponding to each candidate region based on the first layer feature; Determine a corresponding prediction classification result and a predicted target position according to each second layer feature, wherein the prediction classification result is used to indicate whether an operation in the area corresponding to the predicted second layer feature is abnormal; According to each prediction classification result, each prediction target position and the area corresponding to the target time period marked in the sample data, the model parameters of the initial anomaly detection model are adjusted to obtain the anomaly detection model.
5. The method according to claim 1, characterized in that: The behavior data to be detected is used to describe the operation behavior data of the target user on K target operation interfaces within a second time range; the second time range includes S target time periods; The calling of the anomaly detection model to detect the behavior data to be detected of the target user to obtain the behavior detection result includes: Determine first statistical dimension values within the S target time periods for the K target operation interfaces according to the operation time in each operation behavior data in the behavior data to be detected; Determine, according to the first statistical dimension values within the S target time periods for the K target operation interfaces, the detection behavior layers corresponding to the K target operation interfaces, respectively, and obtain a detection behavior layer set according to the detection behavior layers respectively corresponding to the K target operation interfaces; The detection behavior layer set is input into the anomaly detection model to obtain the behavior detection result, and the behavior detection result is used to indicate whether the target user has abnormal operations and the time period of the abnormal operations.
6. A data detection device, characterized in that: The device is used to implement the method according to any one of claims 1 to 5, and the device comprises: an acquisition unit, configured to acquire target behavior data of a target user, wherein the target behavior data is used to describe L operation behavior data of the target user for K target operation interfaces within a first time range; each target operation interface corresponds to one or more operation behavior data, wherein the operation behavior data includes an operation time for performing an operation on the target operation interface, K and L are positive integers, and L is greater than or equal to K; A processing unit, configured to determine first statistical dimension values in M target time periods for the K target operation interfaces according to the operation time in each operation behavior data, wherein the M target time periods are M consecutive time periods within the first time range; The processing unit is further used to determine the first behavior layers corresponding to the K target operation interfaces respectively according to the first statistical dimension values within the M target time periods for the K target operation interfaces, and obtain a behavior layer set according to the first behavior layers corresponding to the K target operation interfaces respectively; the first behavior layer describes the behavior of the target user with respect to the corresponding target operation interface within the first time range; The processing unit is further used to train the initial anomaly detection model according to the behavior layer set to obtain the anomaly detection model; The processing unit is also used to obtain the behavior data to be detected corresponding to the target user when a behavior detection instruction for the target user is detected, and call the anomaly detection model to detect the behavior data to be detected of the target user to obtain a behavior detection result.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.
