Log information detection method and device, electronic equipment and computer readable medium

By acquiring historical log information sets and extracting entity relationship chains, a training sample set is constructed, and a log information detection model is trained. This solves the problem of low detection accuracy caused by the reliance on datasets in clustering algorithms, and achieves more efficient log information detection.

CN119166818BActive Publication Date: 2026-11-27SHENZHEN ADDX INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411322257.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2026-11-27
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

In existing technologies, when using clustering algorithms to detect log anomalies, the results are highly dependent on the dataset, resulting in low accuracy in log detection.

Method used

By acquiring historical log information sets, extracting entity relationship chains, constructing log information training sample sets, training the initial log information detection model, generating a trained log information detection model, and identifying and sending abnormal log information.

Benefits of technology

It improves the accuracy and efficiency of log information detection and reduces the differences in detection results caused by dataset dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166818B_ABST
    Figure CN119166818B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose log information detection methods and apparatuses, electronic devices and computer readable media. A specific implementation of the method includes: extracting an entity relationship chain of each historical log information in a historical log information set to obtain an entity relationship chain set; constructing a log information training sample set according to the historical log information set and the entity relationship chain set, wherein a log information training sample in the log information training sample set includes a historical log information, an entity relationship chain and a sample label; performing model training on an initial log information detection model according to the log information training sample set to obtain a log information detection model; and in response to receiving at least one target log information, inputting the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result. The implementation improves the accuracy and detection efficiency of log information detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the field of computers, and more specifically to log information detection methods, apparatus, electronic devices, and computer-readable media. Background Technology

[0002] Logs are valuable information representing the operational status of a system. Currently, a common method for detecting log anomalies involves acquiring a large amount of historical logs beforehand, then processing these logs using clustering algorithms to build a log detection model, which is then used to detect log anomalies. However, the clustering results are highly dependent on the dataset, which can lead to different clustering results for the same log text, resulting in lower accuracy in log detection.

[0003] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.

[0005] Some embodiments of this disclosure provide log information detection methods, apparatuses, electronic devices, and computer-readable media to address one or more of the technical problems mentioned in the background section above.

[0006] In a first aspect, some embodiments of this disclosure provide a log information detection method. The method includes: acquiring a historical log information set; extracting the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set; constructing a log information training sample set based on the historical log information set and the entity relationship chain set, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains, and sample tags; training an initial log information detection model based on the log information training sample set to obtain a trained log information detection model; in response to receiving at least one target log information, inputting the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; in response to the presence of a log information detection result that satisfies an abnormal condition among the at least one log information detection results, determining the target log information corresponding to that log information detection result as abnormal log information, and sending the abnormal log information to an associated abnormal log processing terminal.

[0007] Secondly, some embodiments of this disclosure provide a log information detection device, which includes: an acquisition unit configured to acquire a historical log information set; an extraction unit configured to extract the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set; a construction unit configured to construct a log information training sample set based on the historical log information set and the entity relationship chain set, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains, and sample tags; a training unit configured to train an initial log information detection model based on the log information training sample set to obtain a trained log information detection model; an input unit configured to, in response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; and a sending unit configured to, in response to the existence of a log information detection result that satisfies an abnormal condition among the at least one log information detection results, determine the target log information corresponding to the log information detection result as abnormal log information, and send the abnormal log information to an associated abnormal log processing terminal.

[0008] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.

[0009] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.

[0010] The above embodiments of this disclosure have the following beneficial effects: the log information detection method of some embodiments of this disclosure improves the accuracy and efficiency of log information detection. Specifically, the reason for the low accuracy of log detection is that during the clustering process using clustering algorithms, the clustering results are strongly dependent on the dataset, which may lead to different results when the same log text is clustered using the clustering algorithm, resulting in low accuracy of log detection. Based on this, the log information detection method of some embodiments of this disclosure first obtains a historical log information set. Second, it extracts the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set. This facilitates the identification of the relationships between various entities in the log. Next, based on the historical log information set and the entity relationship chain set, a log information training sample set is constructed, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains, and sample labels. Then, based on the log information training sample set, the initial log information detection model is trained to obtain a trained log information detection model. Thus, log information can be detected using the trained log information detection model. Then, in response to receiving at least one target log information, the at least one target log information is input into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result. Finally, in response to the presence of a log information detection result that meets the abnormal conditions among the at least one log information detection results, the target log information corresponding to that log information detection result is identified as abnormal log information, and the abnormal log information is sent to the associated abnormal log processing terminal. This improves the accuracy and efficiency of log information detection. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.

[0012] Figure 1 This is a flowchart of some embodiments of the log information detection method according to this disclosure;

[0013] Figure 2 This is a flowchart of some embodiments of the log information detection device according to the present disclosure;

[0014] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation

[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0016] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.

[0017] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0019] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0020] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] Figure 1 This is a flowchart of some embodiments of the log information detection method according to the present disclosure. A flowchart 100 of some embodiments of the log information detection method according to the present disclosure is shown. The log information detection method includes the following steps:

[0022] Step 101: Obtain the historical log information set.

[0023] In some embodiments, the entity executing the log information detection method (e.g., a computing device) can acquire historical log information sets via wired or wireless connections. Historical log information can refer to log information from a target application system collected over a preset historical time period. For example, the target application system can be an application system or a database system. For example, the log information can be system log information, application log information, security log information, etc.

[0024] Step 102: Extract the entity relationship chain of each historical log information in the above historical log information set to obtain the entity relationship chain set.

[0025] In some embodiments, the aforementioned executing entity can extract the entity relationship chain of each historical log information in the aforementioned historical log information set to obtain an entity relationship chain set. An entity relationship chain can represent the relationship chain between various entities in the log information. An entity relationship chain can also refer to an entity relationship graph. Each entity in the log information can represent a different data object in the record.

[0026] In practice, the aforementioned executing entity can extract the entity relationship chain for each historical log entry in the aforementioned historical log information set through the following steps:

[0027] The first step is to determine the pre-trained entity relationship chain extraction model. This pre-trained model includes a log embedding network and an entity relationship chain feature extraction network. The pre-trained model can refer to a pre-trained entity relationship chain extraction model. For example, it could be a Large Language Model (LLM). The log embedding network is an embedding network used to generate feature vectors corresponding to log information. For example, it could be a RoBERTa model. The entity relationship chain feature extraction network is a feature extraction network used to generate entity relationship chain features corresponding to log information. For example, it could include a bidirectional GRU (Gate Recurrent Unit) gated recurrent unit and an attention mechanism layer. The bidirectional GRU gated recurrent unit is used to obtain the embedding results of each entity relationship in the log information. The attention mechanism layer is used to generate entity relationship chain features from the embedding results.

[0028] The second step is to input the aforementioned historical log information into the aforementioned log embedding network to obtain the log information feature vector.

[0029] The third step is to input the aforementioned historical log information into the aforementioned entity relationship chain feature extraction network to obtain the entity relationship chain features corresponding to the aforementioned historical log information.

[0030] The fourth step is to determine the similarity between the log information feature vector and the entity relationship chain features. This similarity can be determined using the cosine similarity formula.

[0031] Fifth step: In response to determining that the above similarity is greater than or equal to the preset similarity, the above entity relationship chain feature is determined as the entity relationship chain of the above historical log information.

[0032] Step 6: In response to determining that the similarity is greater than or equal to a preset similarity, adjust the entity relationship chain represented by the entity relationship chain features to obtain the adjusted entity relationship chain, which serves as the entity relationship chain for the aforementioned historical log information. For example, technicians can adjust the entity relationships / entities in the entity relationship chain through an operation page.

[0033] Step 103: Construct a log information training sample set based on the above-mentioned historical log information set and the above-mentioned entity relationship chain set.

[0034] In some embodiments, the aforementioned executing entity may construct a log information training sample set based on the aforementioned historical log information set and the aforementioned entity relationship chain set. The log information training samples in the aforementioned log information training sample set include: historical log information, entity relationship chains, and sample tags. Sample tags may be tags indicating whether abnormal entity relationships or abnormal entities exist in the log information or entity relationship chains.

[0035] In practice, the aforementioned executing entity can perform the following processing steps for each historical log entry in the aforementioned historical log information set:

[0036] The first step is to label the aforementioned historical log information with sample tags. For example, technicians can use a mouse to label the aforementioned historical log information with sample tags.

[0037] The second step is to combine the aforementioned historical log information, the corresponding entity relationship chain, and the aforementioned sample labels into log information training samples.

[0038] Step 104: Based on the above log information training sample set, train the initial log information detection model to obtain the trained log information detection model.

[0039] In some embodiments, the aforementioned execution entity can train the initial log information detection model based on the aforementioned log information training sample set to obtain a trained log information detection model. The initial log information detection model may be an incompletely trained log anomaly detection model. For example, the log anomaly detection model may be: DeepLog model, Template2Vec model, or Log2Vec model.

[0040] In practice, the aforementioned executing entities can train the initial log information detection model using the following steps:

[0041] The first step is to select a target log information training sample from the aforementioned log information training sample set. One log information training sample can be randomly selected from the aforementioned log information training sample set as the target log information training sample.

[0042] The second step involves generating entity alignment loss information and entity alignment information for the corresponding initial entity alignment network based on the training samples of the target log information. The initial log information detection model includes a first initial log information detection network and a second initial log information detection network. The first initial log information detection network includes an initial entity alignment network, an initial log semantic parsing network, and an initial log detection network. The second initial log information detection network includes an initial feature extraction network and an initial information detection network. The initial feature extraction network includes an initial convolutional model sequence, and the initial convolutional models in the initial convolutional model sequence include an initial subconvolutional model and an initial activation model. The initial entity alignment network can refer to an entity alignment network that has not yet finished training; it can be a neural network model that aligns entities between entity relationship chains and log information. The entity alignment network can be a weakly supervised model. For example, the entity alignment network can be a Generative Adversarial Network (GAN) model. The entity alignment loss information can be the loss value output by the loss function of the initial entity alignment network. The initial log semantic parsing network can be a natural language question encoder, which may include two fully connected layers, a ReLU activation function, and a DropOut layer. For example, the initial log detection network could be a CNN (Convolutional Neural Network) or a SLFN (Single-Layer Feedforward Neural Network).

[0043] The initial feature extraction network can be a model that takes historical log information as input and outputs initial log information features. The initial feature extraction network can include an initial convolutional model sequence. The initial convolutional models in the initial convolutional model sequence can include initial convolutional sub-models and initial activation models. Here, the input to the initial convolutional sub-models included in the initial convolutional model sequence can be the output of the initial activation model included in the previous initial convolutional model. The input to the initial convolutional sub-model included in the first initial convolutional model in the initial convolutional model sequence can be historical log information. The input to the initial activation model of the initial convolutional model in the initial convolutional model sequence can be the output of the initial convolutional sub-models included in the initial convolutional model. For example, the number of initial convolutional models in the initial convolutional model sequence can be 22. The initial information detection network can be a Template2Vec model and a Log2Vec model.

[0044] The third step mentioned above may include the following sub-steps:

[0045] The first sub-step involves vectorizing each entity and entity relationship in the target log information training samples to generate entity vectors and entity relationship vectors, resulting in an entity vector set and an entity relationship vector set. Entity relationships represent the association between log information and two entities in an entity relationship chain. For example, an entity relationship can be an entity ownership relationship. One entity corresponds to one entity vector. One entity relationship corresponds to one entity relationship vector. Entity vectors represent the semantic features corresponding to the entity. Entity relationship vectors represent the semantic features corresponding to the entity relationship. Each entity and entity relationship in the target log information training samples can be input into a pre-trained model PTM (Pre-Trained Model, such as BERT) to generate entity vectors and entity relationship vectors, resulting in an entity vector set and an entity relationship vector set.

[0046] The second sub-step involves inputting the aforementioned entity vector set and entity relation vector set into the initial entity alignment network to obtain entity alignment information. The initial entity alignment network includes an initial encoding layer and an initial alignment inference layer. The initial encoding layer includes an initial position encoding layer and an initial attention mechanism layer. The initial encoding layer is an encoding layer that has not yet finished training. It is used to combine the feature semantics of the graph anchor positions, the aforementioned entity vector set, and the aforementioned entity relation vector set. The initial alignment inference layer can also be an alignment inference layer that has not yet finished training. It is a network layer used to determine the probability of alignment between entities based on the feature semantics of each entity, the feature semantics of each entity relation, and the feature semantics of the entity at the anchor position. For example, the alignment inference layer can be a fully connected layer. The initial position encoding layer can also be an untrained network layer used to encode positions. The initial attention mechanism layer can also be an untrained model used to better capture the influence of anchor positions on entity alignment. For example, the initial position encoding layer can be a multi-layer concatenated convolutional neural network. The initial attention mechanism layer can be a multi-head attention mechanism model.

[0047] The third sub-step involves generating entity alignment loss information based on the target log information training samples and the entity alignment information described above. This entity alignment loss information can be determined using the cross-entropy loss function.

[0048] The third step involves training samples based on the target log information, and the following training steps are performed:

[0049] 1. Generate reconstruction tags based on the entity alignment information mentioned above. The reconstruction tag set can be a set of tags representing entity alignment relationships with higher probabilities, reselected based on the entity alignment information. For example, firstly, the executing entity can filter elements with corresponding element values ​​greater than the target probability value from the probability matrix corresponding to the entity alignment information, obtaining at least one element. The entity alignment information can be matrix-form information with corresponding element values ​​between 0 and 1. The element value represents the entity content matching relationship between multiple corresponding entities. The larger the element value, the stronger the match between the corresponding entities. Next, determine at least one entity pair corresponding to the at least one element. Generate reconstruction tags based on the at least one entity pair.

[0050] 2. In response to determining that the reconstructed label is consistent with the corresponding sample label, the historical log information included in the target log information training sample is input into the initial log semantic parsing network included in the first initial log information detection network to obtain the initial log semantic vector.

[0051] 3. Input the above initial log semantic vector into the initial log detection network included in the first initial log information detection network to obtain the initial log detection result.

[0052] 4. Determine the loss value between the initial log detection results and the corresponding sample labels. For example, a preset loss function can be used to determine the loss value between the initial log detection results and the corresponding sample labels. The preset loss function could be a hinge loss function.

[0053] 5. In response to determining that the above loss value is less than or equal to the preset loss value, the first initial log information detection network is determined as the first log information detection network that has been trained.

[0054] 6. Input the historical log information included in the target log information training samples into the initial feature extraction network to obtain the initial log information features.

[0055] 7. Input the initial log information features into the initial information detection network to obtain the initial log information detection results.

[0056] 8. Based on a preset loss function, determine the difference between the initial log information detection results and the corresponding sample labels. For example, the preset loss function could be a hinge loss function or a cross-entropy loss function.

[0057] 9. In response to determining that the difference value is less than or equal to the preset difference value, the second initial log information detection network is determined as the trained second log information detection network.

[0058] 10. In response to the determination that the above loss value is greater than the preset loss value, adjust the model parameters of the first initial log information detection network, and reselect the target log information training sample from the unselected log information training samples to train the adjusted first initial log information detection network.

[0059] Step 105: In response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result.

[0060] In some embodiments, the execution entity may, in response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result. Each target log information corresponds to one log information detection result. For example, the log information detection model may be a pre-trained neural network model that takes log information as input and outputs log information detection results. For example, log information detection models mainly include deep learning models and traditional machine learning models. Deep learning models: DeepLog model: This is a deep learning-based log anomaly detection model that processes and analyzes log data using deep learning methods to detect anomalies. The DeepLog model automatically extracts features from log data using deep learning algorithms, thereby achieving automatic detection and classification of anomalies. Template2Vec model and Log2Vec model: These models are also deep learning-based log anomaly detection models. They learn patterns and features in log data to identify and classify abnormal events. These models can process large amounts of log data and extract useful information from it to support anomaly detection. Traditional machine learning models such as K-Nearest Neighbors (KNN), Support Vector Machines (SVM), and Naive Bayes are also applied to log anomaly detection. The target log information can be recently received log information. The log information detection result can indicate whether there are anomalies in the log information.

[0061] Step 106: In response to the existence of a log information detection result that meets the abnormal conditions in at least one log information detection result, the target log information corresponding to the log information detection result is determined as abnormal log information, and the abnormal log information is sent to the associated abnormal log processing terminal.

[0062] In some embodiments, the execution entity may, in response to the presence of at least one log information detection result that satisfies an anomaly condition, determine the target log information corresponding to that log information detection result as an anomaly log information, and send the anomaly log information to an associated anomaly log processing terminal. The anomaly condition may be that the log information detection result indicates an anomaly. The anomaly log processing terminal may be a terminal that processes anomaly logs.

[0063] Further reference Figure 2 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a log information detection device, which are similar to... Figure 1 Corresponding to the method embodiments shown, this log information detection device can be specifically applied to various electronic devices.

[0064] like Figure 2 As shown, the log information detection device 200 in some embodiments includes: an acquisition unit 201, an extraction unit 202, a construction unit 203, a training unit 204, an input unit 205, and a sending unit 206. The system comprises the following components: an acquisition unit 201, configured to acquire a set of historical log information; an extraction unit 202, configured to extract the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set; a construction unit 203, configured to construct a log information training sample set based on the historical log information set and the entity relationship chain set, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains, and sample labels; a training unit 204, configured to train an initial log information detection model based on the log information training sample set to obtain a trained log information detection model; an input unit 205, configured to, in response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; and a sending unit 206, configured to, in response to the existence of a log information detection result that meets an abnormal condition among at least one log information detection result, determine the target log information corresponding to the log information detection result as abnormal log information and send the abnormal log information to an associated abnormal log processing terminal.

[0065] It is understandable that the units recorded in the log information detection device 200 are related to the reference. Figure 1 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the log information detection device 200 and the units contained therein, and will not be repeated here.

[0066] The following is for reference. Figure 3 This document illustrates a structural schematic of an electronic device (e.g., a computing device) 300 suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0067] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0068] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.

[0069] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 309, or installed from a storage device 308, or installed from a ROM 302. When the computer program is executed by the processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.

[0070] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0071] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0072] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire a set of historical log information; extract the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set; construct a log information training sample set based on the historical log information set and the entity relationship chain set, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains, and sample tags; train an initial log information detection model based on the log information training sample set to obtain a trained log information detection model; in response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; in response to the existence of a log information detection result that satisfies an abnormal condition among the at least one log information detection results, determine the target log information corresponding to the log information detection result as abnormal log information, and send the abnormal log information to an associated abnormal log processing terminal.

[0073] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0074] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0075] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including: an acquisition unit, an extraction unit, a construction unit, a training unit, an input unit, and a transmission unit. The names of these units do not necessarily limit the unit itself; for example, an acquisition unit can also be described as "a unit for acquiring a set of historical log information."

[0076] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0077] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A method for detecting log information, comprising: Retrieve historical log information set; Extract the entity relationship chain of each historical log information in the historical log information set to obtain the entity relationship chain set; Based on the historical log information set and the entity relationship chain set, a log information training sample set is constructed, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chain and sample tags; Based on the log information training sample set, the initial log information detection model is trained to obtain a trained log information detection model, including: Select target log information training samples from the log information training sample set; Based on the target log information training samples, entity alignment loss information and entity alignment information of the corresponding initial entity alignment network are generated. The initial log information detection model includes: a first initial log information detection network and a second initial log information detection network. The first initial log information detection network includes: an initial entity alignment network, an initial log semantic parsing network, and an initial log detection network. The second initial log information detection network includes: an initial feature extraction network and an initial information detection network. The initial feature extraction network includes: an initial convolutional model sequence. The initial convolutional model in the initial convolutional model sequence includes: an initial subconvolutional model and an initial activation model. Based on the target log information, the following training steps are performed on the training samples: Based on the entity alignment information, generate reconstruction tags; In response to determining that the reconstructed label is consistent with the corresponding sample label, the historical log information included in the target log information training sample is input into the initial log semantic parsing network included in the first initial log information detection network to obtain the initial log semantic vector; The initial log semantic vector is input into the initial log detection network included in the first initial log information detection network to obtain the initial log detection result; Determine the loss value between the initial log detection result and the corresponding sample label; In response to determining that the loss value is less than or equal to a preset loss value, the first initial log information detection network is determined as the first log information detection network that has been trained. The historical log information included in the target log information training samples is input into the initial feature extraction network to obtain the initial log information features; The initial log information features are input into the initial information detection network to obtain the initial log information detection results; Based on a preset loss function, the difference between the initial log information detection results and the corresponding sample labels is determined; In response to determining that the difference value is less than or equal to a preset difference value, the second initial log information detection network is identified as the trained second log information detection network. In response to determining that the loss value is greater than the preset loss value, the model parameters of the first initial log information detection network are adjusted, and the target log information training sample is reselected from the unselected log information training samples to train the adjusted first initial log information detection network. In response to receiving at least one target log information, the at least one target log information is input into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; In response to the presence of a log information detection result that meets the abnormal conditions in at least one log information detection result, the target log information corresponding to the log information detection result is identified as abnormal log information, and the abnormal log information is sent to the associated abnormal log processing terminal.

2. The method according to claim 1, wherein, The step of constructing a log information training sample set based on the historical log information set and the entity relationship chain set includes: For each historical log entry in the historical log information set, perform the following processing steps: Sample tags that annotate the historical log information; The historical log information, the entity relationship chain corresponding to the historical log information, and the sample labels are combined to form log information training samples.

3. The method according to claim 1, wherein, The extraction of the entity relationship chain for each historical log entry in the historical log information set includes: A pre-trained entity relationship chain extraction model is determined, wherein the pre-trained entity relationship chain extraction model includes: a log embedding network and an entity relationship chain feature extraction network; The historical log information is input into the log embedding network to obtain the log information feature vector; The historical log information is input into the entity relationship chain feature extraction network to obtain the entity relationship chain features corresponding to the historical log information; Determine the similarity between the log information feature vector and the entity relationship chain feature; In response to determining that the similarity is greater than or equal to a preset similarity, the entity relationship chain represented by the entity relationship chain feature is determined as the entity relationship chain of the historical log information; In response to determining that the similarity is less than a preset similarity, the entity relationship chain represented by the entity relationship chain feature is adjusted to obtain the adjusted entity relationship chain, which is used as the entity relationship chain of the historical log information.

4. A log information detection device, comprising: The acquisition unit is configured to acquire a set of historical log information. The extraction unit is configured to extract the entity relationship chain of each historical log information in the historical log information set to obtain an entity relationship chain set. The construction unit is configured to construct a log information training sample set based on the historical log information set and the entity relationship chain set, wherein the log information training samples in the log information training sample set include: historical log information, entity relationship chains and sample tags; The training unit is configured to train an initial log information detection model based on the log information training sample set to obtain a trained log information detection model. The training includes: selecting target log information training samples from the log information training sample set; generating entity alignment loss information and entity alignment information for a corresponding initial entity alignment network based on the target log information training samples, wherein the initial log information detection model includes a first initial log information detection network and a second initial log information detection network. The first initial log information detection network includes an initial entity alignment network, an initial log semantic parsing network, and an initial log detection network. The second initial log information detection network includes an initial feature extraction network and an initial information detection network. The initial feature extraction network includes an initial convolutional model sequence, and the initial convolutional model in the initial convolutional model sequence includes an initial sub-convolutional model and an initial activation model. Based on the target log information training samples, the following training steps are performed: generating reconstructed labels based on the entity alignment information; in response to determining that the reconstructed labels match the corresponding sample labels, inputting the historical log information included in the target log information training samples into the initial entity alignment loss information of the first initial log information detection network. In the log semantic parsing network, an initial log semantic vector is obtained; the initial log semantic vector is input into the initial log detection network included in the first initial log information detection network to obtain an initial log detection result; the loss value between the initial log detection result and the corresponding sample label is determined; in response to determining that the loss value is less than or equal to a preset loss value, the first initial log information detection network is determined as the first log information detection network after training; historical log information included in the target log information training samples is input into the initial feature extraction network to obtain initial log information features; the initial log information features are input into the initial information detection network to obtain an initial log information detection result; based on a preset loss function, the difference value between the initial log information detection result and the corresponding sample label is determined; in response to determining that the difference value is less than or equal to a preset difference value, the second initial log information detection network is determined as the second log information detection network after training; in response to determining that the loss value is greater than a preset loss value, the model parameters of the first initial log information detection network are adjusted, and the target log information training samples are reselected from the unselected log information training samples to train the adjusted first initial log information detection network. The input unit is configured to, in response to receiving at least one target log information, input the at least one target log information into the log information detection model to obtain at least one log information detection result, wherein one target log information corresponds to one log information detection result; The sending unit is configured to, in response to the existence of at least one log information detection result that meets the abnormal conditions, determine the target log information corresponding to the log information detection result as abnormal log information, and send the abnormal log information to the associated abnormal log processing terminal.

5. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-3.

6. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • APT attack detection method and system based on traceability graph behavior sequence prediction

    CN118118254A

  • Monitoring and alerting mechanisms

    US20240004861A1