Abnormal log identification method and device, electronic equipment and storage medium

By template processing and recognition model identification of real-time log data related to cutover events, abnormal cutover logs are accurately identified, which solves the problem of fault identification during the cutover process and improves network stability.

CN118796586APending Publication Date: 2024-10-18CHINA MOBILE GROUP SHANDONG +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311182312.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology lacks an effective method to accurately identify network faults caused by temporary negligence during the cutover process, resulting in frequent major faults.

Method used

By obtaining real-time log data related to the cutover event, template processing is performed to extract common and non-shared data features, and the data is input to the abnormal log identification model for identification, and the abnormal log data is determined and sent to the target terminal.

Benefits of technology

It achieves high-accuracy identification of cutover abnormal logs in cutover event logs and reduces the occurrence of network failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796586A_ABST
    Figure CN118796586A_ABST
Patent Text Reader

Abstract

The invention discloses an abnormal log recognition method, belongs to the field of communication, is used for recognizing abnormal logs in logs related to cutover events, and is high in accuracy. The method comprises the following steps: acquiring real-time log data related to a cutover event; templating the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data; the first template sequence and the first parameter sequence are input into an abnormal log recognition model for recognition, a first recognition result of the real-time log data is obtained, the abnormal log recognition model comprises a first module and a second module, the first module is used for determining an abnormal log template in the first parameter sequence, and the second module is used for determining the abnormal log template in the second parameter sequence; the second module is used for determining an abnormal log parameter in the second parameter sequence, wherein the first identification result is an abnormal log template or the abnormal log parameter; and determining abnormal log data based on the first identification result, and sending the abnormal log data to the target terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and specifically to an abnormal log identification method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of Internet technology, the continuous increase in the number of Internet users and the continuous increase in the types of services, operators often cut over equipment networks in order to improve the quality of communication services. However, many major network failures are caused by the operation and maintenance personnel making mistakes during the cutover process due to negligence and failing to find the problem in time, resulting in major failures. Therefore, there is currently a lack of a method for accurately identifying cutover anomalies, thereby reducing the occurrence of network failures. Summary of the invention

[0003] The embodiment of the present application provides an abnormal log identification method, which is used to identify abnormal logs in logs related to cutover events with high accuracy.

[0004] In a first aspect, an embodiment of the present application provides a method for identifying abnormal logs, the method comprising: acquiring real-time log data related to a cutover event; performing template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, the first template sequence being composed of a first template, the first template being used to characterize data features common to a plurality of the real-time log data, the first parameter sequence being composed of a first parameter, the first parameter being used to characterize data features not common to the real-time log data; inputting the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition to obtain a first recognition result of the real-time log data, wherein the abnormal log recognition model comprises a first module and a second module, the first module being used to determine an abnormal log template in the first parameter sequence, the second module being used to determine an abnormal log parameter in the second parameter sequence, the first recognition result being the abnormal log template or the abnormal log parameter; determining abnormal log data based on the first recognition result, and sending the abnormal log data to a target terminal.

[0005] In a second aspect, an embodiment of the present application provides an abnormal log identification device, which includes: a first acquisition module, used to acquire real-time log data related to a cutover event; a first processing module, used to perform template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature that is not common to the real-time log data; a second processing module, used to input the first template sequence and the first parameter sequence into an abnormal log identification model for identification, to obtain a first identification result of the real-time log data, wherein the abnormal log identification model includes a first module and a second module, the first module is used to determine an abnormal log template in the first parameter sequence, and the second module is used to determine an abnormal log parameter in the second parameter sequence, and the first identification result is the abnormal log template or the abnormal log parameter; a first sending module, used to determine the abnormal log data based on the first identification result, and send the abnormal log data to a target terminal.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

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

[0008] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0009] In an embodiment of the present application, real-time log data related to a cutover event is obtained; the real-time log data is templated to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, the first template is used to characterize a data feature common to a plurality of the real-time log data, and the first parameter sequence is composed of a first parameter, the first parameter is used to characterize a data feature not common to the real-time log data; the first template sequence and the first parameter sequence are input into an abnormal log recognition model for recognition, and a first recognition result of the real-time log data is obtained, wherein the abnormal log recognition model includes a first module and a second module, the first module is used to determine an abnormal log template in the first parameter sequence, the second module is used to determine an abnormal log parameter in the second parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter; the abnormal log data is determined based on the first recognition result, and the abnormal log data is sent to a target terminal. In this way, the cutover abnormal log can be identified in the log related to the cutover event with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 This is one of the flow charts of an abnormal log identification method provided in an embodiment of the present application;

[0011] Figure 2 This is a second flow chart of an abnormal log identification method provided in an embodiment of the present application;

[0012] Figure 3 This is a flowchart of a method for identifying abnormal logs provided in an embodiment of the present application;

[0013] Figure 4 It is a schematic diagram of the module composition of an abnormal log identification device provided in an embodiment of the present application;

[0014] Figure 5 It is a structural diagram of an abnormal log identification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] 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.

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

[0017] The following is a detailed description of the abnormal log identification method provided by the embodiment of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0018] Figure 1 One of the abnormal log identification methods provided by an embodiment of the present invention is shown. The method can be executed by an electronic device, and the electronic device may include: a server and / or a terminal device, wherein the terminal device may be, for example, a vehicle-mounted terminal or a mobile phone terminal. In other words, the method can be executed by software or hardware installed in the abnormal log identification device, and the method includes the following steps:

[0019] Step 102: Acquire real-time log data related to the cutover event;

[0020] Acquire real-time log data related to the cutover event, wherein the real-time log data is log data occurring in real time, and the real-time log data may be real-time log data generated before the cutover event, may be real-time log data generated during the cutover event, or may be real-time log data generated after the cutover event.

[0021] Step 104: performing template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data;

[0022] The first template sequence is composed of a first template, and the first template is used to characterize data features common to multiple real-time log data. The first parameter sequence is composed of a first parameter, and the first parameter is used to characterize data features not common to the real-time log data.

[0023] Most of the valuable content in real-time log data is unstructured, and unstructured data is difficult to represent and process, so it is necessary to convert real-time log data into content that is easy to represent and process. Real-time log data can be templated through a template model or other methods to obtain a combination of templates and parameters, where the first template is some data features shared by multiple real-time log data, and the first parameter is some data features that are not shared by the real-time log data. The real-time log data includes several target log data, and the target data is arranged in chronological order, so the template processing of the real-time log data can obtain the sequence of the first template and the sequence of the first parameter.

[0024] Specifically, the specific method of template processing of real-time log data is as follows:

[0025] Log 1: "Receive message CompType=RM, PartnerIN=7415575, DataType=NHPNWK Verify Request"

[0026] Log 2: "Receive message CompType=RM, PartnerID=7415576, DataType=NHPNWK Begin ACK"

[0027] According to some data features shared by log 1 and log 2, the template "Receive messageCompType = RM, PartnerID = <*>, DataType = NHP NWK <*><*>" can be obtained. According to some data features not shared by real-time log data, the first parameter "7415575" and "Verify Request" and the second parameter "7415576" and "Begin ACK" can be obtained. After obtaining the first template of the real-time log data, a template ID can be used to represent the first template. The template ID can be a digital number, a one-hot encoding, or other methods to represent the template ID, which are not specifically limited here.

[0028] By performing template processing on real-time log data, unstructured data that is difficult to represent and process can be converted into templates and parameters that are easy to represent and process, thereby facilitating anomaly identification of real-time log data.

[0029] Step 106: inputting the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition, and obtaining a first recognition result of the real-time log data;

[0030] The abnormal log recognition model includes a first module and a second module, the first module is used to determine the abnormal log template in the first template sequence, the second module is used to determine the abnormal log parameters in the first parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter;

[0031] The first template sequence and the first parameter sequence obtained in step 104 are input into the pre-built abnormal log recognition model for recognition, and the abnormal log recognition model can recognize the first template sequence and the first parameter sequence. After the first template sequence and the first parameter sequence are input into the abnormal log recognition model, the first module in the abnormal log recognition model can recognize the first template sequence, thereby recognizing the abnormal template in the first template sequence, and the second module in the abnormal log model can recognize the first parameter sequence, thereby recognizing the abnormal parameters in the first parameter sequence.

[0032] Specifically, the method for the first module in the abnormal log data to identify the first template sequence can be: the first module selects any first template in the first template sequence as the target template; the first module predicts the next template of the target template in the first template sequence to obtain a template prediction result, wherein the template prediction result can be a prediction template with the highest prediction probability of the next template, or can be three prediction templates with the top three prediction probabilities of the next template; obtain the next template of the target template in the first template sequence; compare the prediction template with the next template of the target template in the first template sequence, and determine whether the target template is an abnormal log template based on the comparison result. For example, when there are three prediction templates, determine whether there is a template in the three prediction templates that is the same as the next template of the target template in the first template sequence. If not, it means that the target template is an abnormal log template. When there is one prediction template, determine whether the prediction template is the same as the next template of the target template. If not, it means that the target template is an abnormal log template.

[0033] Specifically, the method for the second module in the abnormal log data to identify the first parameter sequence can be: the second module selects any first parameter in the first parameter sequence as the target parameter; the second module predicts the next parameter of the target parameter in the first parameter sequence to obtain a parameter prediction result, wherein the parameter prediction result can be a predicted parameter value; obtains the next parameter of the target parameter in the first parameter sequence; calculates the deviation value between the next parameter of the target parameter and the parameter prediction result, and determines whether the target parameter is an abnormal log parameter based on the deviation value. For example, if the deviation value is greater than a preset threshold value, it means that the target parameter is an abnormal log parameter. The deviation value can be obtained by variance or by other methods, which are not specifically limited here.

[0034] After the first module identifies the first template sequence and the second module identifies the first parameter sequence, the identified abnormal log template, abnormal log parameter, or a combination of the abnormal log template and the abnormal log parameter is used as a first identification result.

[0035] Step 108: Determine abnormal log data based on the first recognition result, and send the abnormal log data to a target terminal.

[0036] The abnormal log data is determined based on the abnormal log template or the abnormal log parameter in the first recognition result, and then the determined abnormal log data is sent to the target terminal for display.

[0037] Specifically, if the first recognition result is an abnormal log template, then the parameters corresponding to the abnormal log template are obtained, and the abnormal log data is determined according to the abnormal log template and the corresponding parameters; if the first recognition result is an abnormal log parameter, then the template corresponding to the abnormal log parameter is obtained, and the abnormal log data is determined according to the abnormal log parameter and the corresponding template; if the first recognition result includes an abnormal log parameter and an abnormal log template, then the template corresponding to the abnormal log parameter and the parameters corresponding to the abnormal log template are determined respectively, and then the abnormal log data is determined. Among them, the correspondence between the template and the parameter can be determined according to the first template sequence and the first parameter sequence, for example, the first template in the first template sequence corresponds to the first parameter in the first parameter sequence.

[0038] The abnormal log identification method provided by the embodiment of the present invention obtains real-time log data related to the cutover event; performs template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature not common to the real-time log data; the first template sequence and the first parameter sequence are input into the abnormal log identification model for identification to obtain a first identification result of the real-time log data, wherein the abnormal log identification model includes a first module and a second module, the first module is used to determine an abnormal log template in the first parameter sequence, the second module is used to determine an abnormal log parameter in the second parameter sequence, and the first identification result is an abnormal log template or an abnormal log parameter; the abnormal log data is determined based on the first identification result, and the abnormal log data is sent to the target terminal. In this way, the cutover abnormal log can be identified in the log related to the cutover event with high accuracy.

[0039] In one implementation, the method may further perform the following steps A1-A5:

[0040] Step A1: Obtain sample log data related to the cutover event;

[0041] Sample log data related to the cutover event is obtained, wherein the sample log data may be log data generated during the cutover event, log data generated before the cutover event occurs, or log data generated after the cutover event occurs. The sample log data may include log data with anomalies or log data without anomalies.

[0042] Step A2: performing template processing on the sample log data to obtain a sample template sequence and a sample parameter sequence of the sample log data;

[0043] The sample template sequence is composed of sample templates, and the sample templates are used to characterize data features common to multiple sample log data; the sample parameter sequence is composed of sample parameters, and the sample parameters are used to characterize data features common to non-real-time log data.

[0044] The sample log data is processed in a template manner to obtain a sample template sequence and a sample parameter sequence of the sample log data. Specifically, the method of processing the log data in a template manner to obtain the template and the parameters has been described above and will not be repeated here.

[0045] Step A3: inputting the sample template sequence and the sample parameter sequence into the model to be trained for iterative training to obtain the abnormal log recognition model;

[0046] The model to be trained includes a first module to be trained and a second module to be trained.

[0047] When iterative training is performed on the model to be trained based on the sample template sequence and the sample parameter sequence, the sample template sequence can be input into the first module to be trained of the model to be trained for iterative training, and the sample template parameters can be input into the second module to be trained of the model to be trained for iterative training.

[0048] The specific implementation methods for each module training are:

[0049] Step A4: the first module to be trained predicts the next sample template for any sample template in the sample template sequence, obtains a first prediction result, and acquires a first actual result; the second module to be trained predicts the next parameter sequence for any parameter sequence in the sample parameter sequence, obtains a second prediction result, and acquires a second actual result;

[0050] When training the first module to be trained, the first module to be trained selects a sample template from the sample template sequence, and then predicts the next sample template of the sample template to obtain the prediction result of the next sample template, that is, the first prediction result, and finally obtains the actual next sample template of the sample template, that is, the first actual result. Among them, the first prediction result is the predicted next sample template and the probability corresponding to it, and the number of the predicted next sample templates can be one or two, which is not specifically limited here.

[0051] When training the second module to be trained, the second module to be trained selects a sample parameter from the sample parameter sequence, and then predicts the next sample parameter of the sample parameter to obtain the prediction result of the next sample parameter, i.e., the second prediction result, and finally obtains the actual next sample parameter of the sample parameter, i.e., the second actual result. Among them, the first prediction result is the predicted next sample parameter and the probability corresponding thereto, and the number of the predicted next sample parameters can be one or two, which is not specifically limited here.

[0052] Step A5: Based on the first prediction result and the first actual result, the parameters of the first module to be trained are updated to obtain a first module; based on the second prediction result and the second actual result, the parameters of the second module to be trained are updated to obtain a second module.

[0053] After determining the first prediction result and the first actual result, determine whether the prediction template with the highest probability in the first prediction result is the same as the actual template (or arrange the probabilities from high to low to determine whether there is a template that is the same as the actual template among the top three templates). If so, it means that the prediction is successful, and there is no need to update the parameters of the first module to be trained. If not, it means that the prediction failed, and the parameters of the first module to be trained need to be updated.

[0054] Specifically, the first module to be trained can be iteratively trained through the LSTM neural network, and the implementation method is as follows: construct X and Y sample sets based on the sample template sequence using a sliding window w (w is a hyperparameter), and the sequence length of each sample template of each sample in X is w; construct w LSTM BLOCK units, take X as input and Y as output, and train the first module to be trained, so as to obtain the first module.

[0055] After determining the second prediction result and the second actual result, the variance of the prediction parameter with the highest probability in the second prediction result and the actual parameter is determined. If the variance value is greater than a preset threshold, it means that the parameter prediction fails, and the parameters of the second module to be trained need to be updated. If it is less than the preset threshold, it means that the parameter prediction is successful, and the second module to be trained does not need to be updated. The preset threshold can be set according to actual conditions and is not specifically limited here.

[0056] Specifically, the second module to be trained can be iteratively trained through the regression prediction model, and the implementation method is as follows: select a parameter sequence with a length of w from the sample parameter sequence, use the regression prediction model to predict the parameter sequence with a length of w, predict the next parameter value subsequently generated by the sequence, and calculate the deviation (mean square error) between the parameter value and the current actual value. If the deviation value exceeds the threshold range, the second module to be trained is judged to be abnormal. If the deviation value predicted by the second module to be trained does not exceed the threshold range, the current parameter detection is normal, and enter the next parameter detection, and repeat the steps to obtain the second module.

[0057] In one implementation, after the sample log data is templated to obtain a sample template sequence and a sample parameter sequence of the sample log data (step A2), the following steps (B1-B5) may be performed:

[0058] Step B1: iteratively training the third module to be trained based on the sample template sequence to obtain a third module, wherein the third module is used to determine whether the abnormal log template is related to the cutover event;

[0059] After determining the sample template sequence, the sample template sequence is input into the third module to be trained for iterative training, thereby obtaining the third module. The third module can judge the correlation between the abnormal sample template and its context, thereby determining whether the abnormal sample template is related to the cutover event. For example, if the correlation between the abnormal log template and its context is high, it means that the abnormal sample template is related to the cutover event.

[0060] Among them, the specific implementation methods of each module training are:

[0061] Step B2: obtaining a target sample template that meets a preset condition in the sample template sequence, wherein the target sample template is an abnormal sample template;

[0062] A target sample template that meets a preset condition in the sample template sequence is obtained, wherein the preset condition may be that there is an abnormal sample template among the sample templates, that is, the obtained target sample template is an abnormal sample template.

[0063] Step B3: acquiring a first sample template and a second sample template in the sample template sequence, wherein the first sample template is located before the target sample template in the sample template sequence, and the second sample template is located after the target sample template in the sample template sequence;

[0064] First, a first sample template that is located before the target sample template in the sample template sequence is obtained, and then a second sample template that is located after the target sample template in the sample template sequence is obtained. The first sample template may be a sample template that is before and adjacent to the target sample template, or may be the third sample template before the target sample template; the second sample template may be a sample template that is after and adjacent to the target sample template, or may be the third sample template after the target sample template. The number of the first sample template and the second sample template may be one or two, which is not specifically limited here.

[0065] Step B4: Calculate the first correlation probability of the first sample template and the second sample template as a whole with the target sample template, and obtain a first relationship between the target sample template and the first sample template and the second sample template, wherein the first correlation probability is used to characterize the probability of the target sample template being correlated with the first sample template and the second sample template, and the first relationship is used to characterize whether the target sample template is correlated with the first sample template and the second sample template;

[0066] Calculate the first correlation probability between the first sample template and the second sample template obtained in step B3 and the target sample template, that is, take the first sample template and the second sample template as a whole, and then calculate the first correlation probability between them and the target sample template, and then obtain the first relationship between the first sample template and the second sample template and the target sample template, wherein the first correlation probability is the probability that there is a correlation between the first sample template and the second sample template and the target sample template after calculation by the third model to be trained, and the first relationship between the first sample template and the second sample template and the target sample template is related or not related. If the first correlation probability is greater than the preset threshold, it means that the predicted first sample template and the second sample template are related, and the preset threshold can be 0.8 or 0.9, which is not specifically limited here.

[0067] Step B5: iteratively updating the third module to be trained based on the first correlation probability and the first relationship to obtain a third module, wherein the third module is used to determine the degree of correlation between the target sample template and the first sample template and the second sample template.

[0068] The prediction result is determined according to the predicted first correlation probability, that is, whether the first sample template and the second sample template are correlated with the target sample template. Then the predicted correlation is compared with the correlation of the actual result. If the predicted result is consistent with the actual result, it means that the prediction is successful, and there is no need to update the parameters of the third module to be trained. If the predicted result is inconsistent with the actual result, it means that the prediction fails, and the parameters of the third module to be trained need to be updated.

[0069] Specifically, the third module to be trained can be iteratively trained according to the self-attention mechanism, and the implementation method is as follows: training is performed based on the abnormal sample template and the previous and next related templates of the abnormal sample template to obtain three matrices, and then the correlation value (V) is calculated according to the current abnormality (Q) and the context query related template (K), and then the first correlation probability is normalized by softmax. If the first correlation probability exceeds the threshold, it is considered that the abnormal sample template and the previous and next related templates of the abnormal sample template are related, that is, the abnormal sample template is considered to be related to the cutover event. Finally, the predicted result and the actual result are compared, and the parameters of the third module to be trained are updated according to the comparison result.

[0070] In one implementation, after obtaining a target sample template that meets a preset condition in the sample template sequence, and the target sample template is an abnormal sample template (step B1), the following steps C1-C4 may be performed:

[0071] Step C1: iteratively training the fourth module to be trained based on the sample template sequence to obtain a fourth module, wherein the fourth module is used to determine the formation cause of the abnormal sample template;

[0072] After determining the sample template sequence, the sample template sequence is input into the fourth module to be trained for iterative training, thereby obtaining the fourth module. The fourth module can obtain the related template of the abnormal sample template in the sample template sequence and use the related template as the cause of the abnormal sample template.

[0073] Among them, the specific implementation methods of each module training are:

[0074] Step C2: acquiring a third sample template and a fourth sample template from the sample template sequence, wherein the third sample template is a sample template of a non-target sample template, and the fourth sample template is a related template of the target sample template.

[0075] A third sample template and a fourth sample template are obtained from the sample template sequence, wherein the third sample template is a sample template of a non-target sample template in the third sample template sequence, and the third sample template may be a sample template with an abnormality or a normal sample template, and the fourth sample template is a pre-set template that is correlated with the target sample template, i.e., a sample template that causes the target sample template to be abnormal.

[0076] Step C3: Calculate the first correlation probability between the first sample template and the second sample template as a whole and the target sample template, and use the third sample template corresponding to the second correlation probability that meets the preset condition as the fifth sample template, wherein the second correlation probability is used to characterize the correlation probability between the third sample template and the target sample template;

[0077] After obtaining the third sample template, the second correlation probability between the third sample template and the target sample template is calculated, wherein the second correlation probability is used to characterize the correlation probability between the third sample template and the target sample template, that is, the second correlation probability is used to characterize the probability that the third sample template is the sample template that causes the target sample template to be abnormal.

[0078] After determining the second relevant probability, the third sample template corresponding to the second relevant probability that meets the preset condition is used as the fifth sample template, wherein the preset condition may be the third template corresponding to the highest probability in the second relevant probability.

[0079] Step C4: iteratively training the fourth module to be trained based on the fifth sample template and the fourth sample template to obtain a fourth module, wherein the fourth module is used to determine a related template of the target sample template in the sample template sequence.

[0080] The fourth module to be trained is iteratively trained based on the fifth sample template and the fourth sample template. For example, it is determined whether the fifth sample template is the same as the fourth sample template. If they are the same, it means that the prediction is successful, and there is no need to update the parameters of the fourth module to be trained. If they are not the same, it means that the prediction fails, and it is necessary to update the parameters of the fourth module to be trained.

[0081] In one implementation, the real-time log data includes first log data, the first log data is log data generated when the cutover event is in progress, the real-time log data is templated to obtain a first template and a first parameter of the real-time log data (step 104), and the following steps D1-D4 may be performed:

[0082] Step D1: performing template processing on the first log data to obtain a second template sequence and a second parameter sequence;

[0083] The real-time log data may be real-time log data generated before the cutover event occurs, real-time log data generated when the cutover event occurs, or real-time log data generated after the cutover event occurs. Specifically, the real-time log data generated when the cutover event occurs is used as the first log data, and the first log data is templated to obtain a second template sequence and a second parameter sequence.

[0084] The step of inputting the first template and the first parameter into an abnormal log recognition model for recognition to obtain a first recognition result of the real-time log data includes:

[0085] Step D2: obtaining time parameters of the second template and the second parameter in the second template sequence and the second parameter sequence;

[0086] After obtaining the second template sequence and the second parameter sequence, the time parameters of the second template and the second parameter are determined by acquiring the time parameters of the first log data, that is, the generation time of the first log data is used as the time parameters of the second template and the second parameter.

[0087] Step D3: Obtain the number of the second templates or the number of the second parameters within a preset time, and compare the number of the second templates or the number of the second parameters within the preset time with the preset number of historical templates or the number of historical parameters to obtain a comparison result, which is used to characterize whether the number of the second templates or the number of the second parameters is abnormal.

[0088] Obtain the number of second templates or second parameters within a period of time, such as the number of second templates or second parameters from 1:00 a.m. to 2:00 a.m., and then compare the number of second templates or second parameters with the preset number of historical templates or historical parameters, wherein the number of historical templates stores the number of standard templates within the preset time, and the number of historical parameters stores the number of standard parameters within the preset time, the number of standard templates is the number of templates within a period of time under normal circumstances, and the number of standard parameters is the number of parameters within a period of time under normal circumstances. For example, the number of historical templates stores the number of templates for each time period in a day under normal circumstances, and the number of historical parameters stores the number of parameters for each time period in a day under normal circumstances.

[0089] Specifically, when performing the comparison, the number of templates or parameters within the preset time is first obtained from the number of historical templates or the number of historical parameters, and then it is determined whether the number of second templates or second parameters within the preset time is the same as the number of historical templates or the number of historical parameters within the preset time. If they are the same, it means that there is no abnormality in the number of second templates or the number of second parameters in the time period, and if they are not the same, it means that there is an abnormality in the number of second templates or the number of second parameters in the time period. If there is an abnormality in the number of second templates or second parameters, it means that there is an abnormality in the cutover event.

[0090] In one implementation, before determining abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal (step 108), the following steps E1-E2 may be performed:

[0091] Step E1: inputting the abnormal log template into the third module of the abnormal log recognition model and obtaining a third recognition result, wherein the third module is used to determine a first correlation probability between the abnormal log template and a target template that meets a preset condition in the first template sequence;

[0092] After determining the abnormal log template, the abnormal log template is input into the third block of the abnormal log recognition model for recognition. The third module can recognize the abnormal log template and the target template that meets the preset conditions, and the recognition result is the correlation probability of the abnormal log template and the target template. Among them, the preset condition can be a template located before the abnormal log template in the first template sequence and a template located after the abnormal log template in the first template sequence. More specifically, it can be a template located before and adjacent to the abnormal log template and a template located after and adjacent to the abnormal log template. The number of selected templates can be one or more.

[0093] Step E2: If the first correlation probability is greater than a preset threshold, it indicates that the abnormal log template is related to the cutover event.

[0094] After obtaining the first correlation probability between the abnormal log template and the target template, if the first correlation probability is greater than a preset threshold, it means that the abnormal log template is related to the cutover event, wherein the preset threshold may be 80% or 90%, which is not specifically limited here.

[0095] In one implementation, before determining the abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal (step 108), the following steps F1 to F2 may be performed:

[0096] Step F1: input the abnormal log template into the fourth module of the abnormal log recognition model and obtain a third recognition result, wherein the fourth module is used to determine the related template of the abnormal log template in the first template sequence;

[0097] After determining the abnormal log template, the abnormal log template can also be input into the fourth module of the abnormal log recognition model for recognition. The fourth module can perform recognition based on the abnormal log template, thereby outputting the log template with the highest correlation with the abnormal log template in the first template sequence.

[0098] Specifically, the fourth module can determine the correlation between each first template and the abnormal log template in the first template sequence, and use the first template with the highest correlation as the third recognition result.

[0099] Step F2: Using the third recognition result as the reason for forming the abnormal log template.

[0100] The third recognition result output by the fourth module is used as the reason for the formation of the abnormal log template, that is, the log template output by the fourth module with the highest correlation with the abnormal log template is used as the reason for the formation of the abnormal log template. After determining the third recognition result, the log data with the highest correlation can also be determined through the log template with the highest correlation, that is, the log data with the highest correlation is determined based on the correspondence between the log template with the highest correlation and the first template and the first sequence.

[0101] In one implementation, before inputting the first template sequence and the first parameter sequence into the abnormal log recognition model for recognition to obtain the first recognition result of the real-time log data (step 106), the following steps G1-G may be performed:

[0102] Step G1: Determine whether there is a preset keyword in the first template sequence;

[0103] After obtaining the first template sequence, it can also be determined whether there is a preset keyword in the first template sequence. The preset keyword is a key exception field, that is, the template containing the keyword is an exception log template. For example, the preset keyword can be a keyword such as "Fatal" or "Error".

[0104] Step G2: If it exists, obtain the target first template containing the preset keyword, and determine the target first template as the abnormal log template.

[0105] If there is a preset keyword in the first template sequence, it means that there is an abnormal log template in the first template sequence, then the first template with the preset keyword in the first template sequence is obtained, that is, the target first template, and finally the target first template is determined as the abnormal log template.

[0106] Specifically, in order to understand the method provided by the embodiment of this specification, the following will take the real-time log data generated after the cutover event is completed as an example to introduce the method provided by the embodiment of this specification. Figure 2 The second flowchart of the abnormal log identification method provided in the embodiment of this specification is as follows: Figure 2 The method shown comprises at least the following steps:

[0107] Step 202: Acquire real-time log data after the cutover event is completed;

[0108] Step 204: performing template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data;

[0109] Among them, the first template sequence is composed of the first template, and the first template is used to characterize the data features common to multiple real-time log data; the first parameter sequence is composed of the first parameter, and the first parameter is used to characterize the data features that are not common to the real-time log data.

[0110] Step 206: Determine whether there is a preset keyword in the first template sequence;

[0111] Step 208: If it exists, obtain the target first template containing the preset keyword, and determine the target first template as the abnormal log template; if it does not exist, do not process it;

[0112] Step 210: inputting the first template sequence and the first parameter sequence into the abnormal log recognition model for recognition, and obtaining a first recognition result of the real-time log data;

[0113] Among them, the abnormal log recognition model includes a first module and a second module, the first module is used to determine the abnormal log template in the first template sequence, the second module is used to determine the abnormal log parameters in the first parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter.

[0114] Step 212: inputting the abnormal log template into the third module of the abnormal log recognition model, and obtaining a third recognition result;

[0115] The third module is used to determine a first correlation probability between the abnormal log template and the target template that meets the preset conditions in the first template sequence.

[0116] Step 214: If the first correlation probability is greater than a preset threshold, it means that the abnormal log template is related to the cutover event; if the first correlation probability is not greater than the preset threshold, it means that the abnormal log template is not related to the cutover event;

[0117] Step 216: inputting the abnormal log template into the fourth module of the abnormal log recognition model, and obtaining a third recognition result;

[0118] Among them, the fourth module is used to determine the related templates of the abnormal log template in the first template sequence.

[0119] Step 218: determining the third recognition result as the formation reason of the abnormal log template;

[0120] Step 220: determining abnormal log data based on the first recognition result, and determining formation data of the abnormal log data based on the third recognition result;

[0121] The formation data of the abnormal log data is the cause of the abnormal log data, that is, the abnormal log data that appears because of the formation data;

[0122] Step 222: Send the abnormal log data, the judgment result of whether the abnormal log template is related to the cutover event, and the formation data of the abnormal log data to the target terminal.

[0123] In order to further understand the method provided by the embodiment of this specification, the following will take the real-time log data generated in the cutover event as an example to introduce the method provided by the embodiment of this specification. Figure 3 The third flowchart of the abnormal log identification method provided in the embodiment of this specification is as follows: Figure 3 The method shown comprises at least the following steps:

[0124] Step 302: Acquire real-time log data when the cutover event occurs;

[0125] Step 304: performing template processing on the real-time log data to obtain a second template sequence and a second parameter sequence of the real-time log data;

[0126] Among them, the second template sequence is composed of second templates, and the second templates are used to characterize data features common to multiple real-time log data; the second parameter sequence is composed of second parameters, and the second parameters are used to characterize data features that are not common to the real-time log data.

[0127] Step 306: Obtain time parameters of the second template and the second parameter in the second template sequence and the second parameter sequence;

[0128] Step 308: Obtain the number of second templates or the number of second parameters in the preset event, and compare the number of second templates or the number of second parameters within the preset time with the preset number of historical templates or the number of historical parameters to obtain the comparison result;

[0129] The comparison result is used to indicate whether the number of the second template or the number of the second parameter is abnormal.

[0130] Step 310: Determine whether there is a preset keyword in the second template sequence;

[0131] Step 312: if it exists, obtaining the target second template containing the preset keyword, and determining the target second template as the abnormal log template; if it does not exist, no processing is performed;

[0132] Step 314: inputting the second template sequence and the second parameter sequence into the abnormal log recognition model for recognition, and obtaining a first recognition result of the real-time log data;

[0133] Among them, the abnormal log recognition model includes a first module and a second module, the first module is used to determine the abnormal log template in the second template sequence, the second module is used to determine the abnormal log parameters in the second parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter.

[0134] Step 316: inputting the abnormal log template into the third module of the abnormal log recognition model, and obtaining a third recognition result;

[0135] The third module is used to determine a first correlation probability between the abnormal log template and the target template that meets the preset conditions in the second template sequence.

[0136] Step 318: If the first correlation probability is greater than the preset threshold, it means that the abnormal log template is related to the cutover event; if the first correlation probability is not greater than the preset threshold, it means that the abnormal log template is not related to the cutover event;

[0137] Step 320: inputting the abnormal log template into the fourth module of the abnormal log recognition model, and obtaining a third recognition result;

[0138] Among them, the fourth module is used to determine the related templates of the abnormal log template in the second template sequence.

[0139] Step 322: determining the third recognition result as the formation reason of the abnormal log template;

[0140] Step 324: determining abnormal log data based on the first recognition result, and determining formation data of the abnormal log data based on the third recognition result;

[0141] The formation data of the abnormal log data is the cause of the abnormal log data, that is, the abnormal log data that appears because of the formation data;

[0142] Step 326: Send the abnormal log data, the judgment result of whether the abnormal log template is related to the cutover event, and the formation data of the abnormal log data to the target terminal.

[0143] The abnormal log identification method provided by the embodiment of the present invention obtains real-time log data related to the cutover event; performs template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, the first template is used to characterize a data feature common to a plurality of the real-time log data, and the first parameter sequence is composed of a first parameter, the first parameter is used to characterize a data feature not common to the real-time log data; the first template sequence and the first parameter sequence are input into the abnormal log identification model for identification to obtain a first identification result of the real-time log data, wherein the abnormal log identification model includes a first module and a second module, the first module is used to determine an abnormal log template in the first parameter sequence, the second module is used to determine an abnormal log parameter in the second parameter sequence, and the first identification result is the abnormal log template or the abnormal log parameter; the abnormal log data is determined based on the first identification result, and the abnormal log data is sent to the target terminal. In this way, the cutover abnormal log can be identified in the log related to the cutover event with high accuracy.

[0144] It should be noted that the execution subject of the abnormal log identification method provided in the embodiment of the present application may be an abnormal log identification device, or a control module in the abnormal log identification device for executing the abnormal log identification method. In the embodiment of the present application, the abnormal log identification device executing the abnormal log identification method is taken as an example to illustrate the abnormal log identification device provided in the embodiment of the present application.

[0145] Figure 4 Schematic diagram of the structure of an abnormal log identification device according to an embodiment of the present invention. Figure 4 As shown, the abnormal log identification device includes: a first acquisition module 402 , a first processing module 404 , a second processing module 406 , and a first sending module 408 .

[0146] A first acquisition module 402 is used to acquire real-time log data related to the cutover event;

[0147] A first processing module 404 is used to perform template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; and the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature not common to the real-time log data;

[0148] A second processing module 406 is used to input the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition, to obtain a first recognition result of the real-time log data, wherein the abnormal log recognition model includes a first module and a second module, the first module is used to determine the abnormal log template in the first parameter sequence, the second module is used to determine the abnormal log parameter in the second parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter;

[0149] The first sending module 408 is configured to determine abnormal log data based on the first recognition result, and send the abnormal log data to a target terminal.

[0150] The abnormal log identification device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0151] The abnormal log identification device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0152] The abnormal log identification device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0153] Based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the above-mentioned abnormal log identification method. Figure 5A schematic diagram of the structure of an electronic device for implementing various embodiments of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include a processor 502, a communications interface 504, a memory 506, and a communication bus 508, wherein the processor 502, the communications interface 504, and the memory 506 communicate with each other via the communication bus 508. The processor 502 can call a computer program stored in the memory 506 and executable on the processor 502 to perform the following steps: obtaining real-time log data related to a cutover event; performing template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature that is not common to the real-time log data; inputting the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition to obtain a first recognition result of the real-time log data, wherein the abnormal log recognition model includes a first module and a second module, the first module is used to determine an abnormal log template in the first parameter sequence, and the second module is used to determine an abnormal log parameter in the second parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter; determining abnormal log data based on the first recognition result, and sending the abnormal log data to a target terminal.

[0154] In one implementation, the method further includes: acquiring sample log data related to the cutover event; performing template processing on the sample log data to obtain a sample template sequence and a sample parameter sequence of the sample log data, wherein the sample template sequence is composed of a template template, and the sample template is used to characterize a data feature common to a plurality of the sample log data; and the sample parameter sequence is composed of sample parameters, and the sample parameters are used to characterize a data feature common to non-real-time log data; inputting the sample template sequence and the sample parameter sequence into a model to be trained for iterative training to obtain the abnormal log recognition model; wherein the model to be trained includes a first module to be trained and a second module to be trained, and a specific implementation method of each module training is as follows: the first module to be trained performs a next sample template prediction on any sample template in the sample template sequence to obtain a first prediction result, and obtains a first actual result; the second module to be trained performs a next parameter sequence prediction on any parameter sequence in the sample parameter sequence to obtain a second prediction result, and obtains a second actual result; based on the first prediction result and the first actual result, the parameters of the first module to be trained are updated to obtain a first module, and based on the second prediction result and the second actual result, the parameters of the second module to be trained are updated to obtain a second module.

[0155] In one implementation, after the sample log data is templated to obtain a sample template sequence and a sample parameter sequence of the sample log data, it also includes: iteratively training a third module to be trained based on the sample template sequence to obtain a third module, wherein the third module is used to determine whether the abnormal sample template is related to a cutover event; wherein the specific implementation method of each module training is: obtaining a target sample template that meets a preset condition in the sample template sequence, wherein the target sample template is an abnormal sample template; obtaining a first sample template and a second sample template in the sample template sequence, wherein the first sample template is located before the target sample template in the sample template sequence, and the second sample template is located before the target sample template in the sample template sequence. After the target sample template is obtained; the first sample template and the second sample template are taken as a whole to calculate the first correlation probability between them and the target sample template, and a first relationship between the target sample template and the first sample template and the second sample template is obtained, the first correlation probability is used to characterize the probability that the target sample template is correlated with the first sample template and the second sample template, and the first relationship is used to characterize whether the target sample template is correlated with the first sample template and the second sample template; the first correlation probability and the first relationship are input into a third module to be trained, and iteratively updated to obtain a third module, and the third module is used to determine the degree of correlation between the target sample template and the first sample template and the second sample template.

[0156] In one implementation, after obtaining a target sample template that meets a preset condition in the sample template sequence, and the target sample template is an abnormal sample template, it also includes: iteratively training a fourth module to be trained based on the sample template sequence to obtain a fourth module, and the fourth module is used to determine the cause of the formation of the abnormal sample template; wherein the specific implementation method of each module training is: obtaining a third sample template and a fourth sample template from the sample template sequence, the third sample template is a sample template of a non-target sample template, and the fourth sample template is a related template of the target sample template; calculating a second correlation probability between the third sample template and the target sample template, and determining a fifth sample template corresponding to the second correlation probability that meets the preset condition, and the second correlation probability is used to characterize the correlation probability between the third sample template and the target sample template; iteratively training the fourth module to be trained based on the fifth sample template and the fourth sample template to obtain a fourth module, and the fourth module is used to determine the related template of the target sample template in the sample template sequence.

[0157] In one implementation, the real-time log data includes first log data, and the first log data is log data generated when the cutover event is in progress. The real-time log data is templated to obtain a first template and a first parameter of the real-time log data, including: templated to obtain a second template sequence and a second parameter sequence; the first template and the first parameter are input into an abnormal log recognition model for recognition to obtain a first recognition result of the real-time log data, including: obtaining the time parameters of the second template and the second parameter in the second template sequence and the second parameter sequence; obtaining the number of the second templates or the number of the second parameters within a preset time, and comparing the number of the second templates or the number of the second parameters within the preset time with the preset number of historical templates or the number of historical parameters to obtain a comparison result, and the comparison result is used to characterize whether the number of the second templates or the number of the second parameters is abnormal.

[0158] In one implementation, before determining the abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal, it also includes: inputting the abnormal log template into the third module of the abnormal log recognition model and obtaining a third recognition result, and the third module is used to determine a first correlation probability between the abnormal log template and the target template that meets the preset conditions in the first template sequence; if the first correlation probability is greater than a preset threshold, it means that the abnormal log template is related to the cutover event.

[0159] In one implementation, before determining the abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal, it also includes: inputting the abnormal log template into the fourth module of the log anomaly detection model and obtaining a third recognition result, the fourth module is used to determine the related template of the abnormal log template in the first template sequence; and using the third recognition result as the reason for the formation of the abnormal log template.

[0160] The specific execution steps can refer to the various steps of the above-mentioned log identification method embodiment, and can achieve the same technical effect. To avoid repetition, they are not repeated here.

[0161] It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals or other devices except terminals.

[0162] The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0163] The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).

[0164] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.

[0165] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned abnormal log identification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0167] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned abnormal log identification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0168] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

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

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

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

Claims

1. A method for identifying abnormal logs, comprising: Get real-time log data related to cutover events; Performing template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; and the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature not common to the real-time log data; Inputting the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition, and obtaining a first recognition result of the real-time log data, wherein the abnormal log recognition model includes a first module and a second module, the first module is used to determine an abnormal log template in the first template sequence, the second module is used to determine an abnormal log parameter in the first parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter; Abnormal log data is determined based on the first recognition result, and the abnormal log data is sent to a target terminal.

2. The method according to claim 1, further comprising: Obtain sample log data related to the cutover event; Performing template processing on the sample log data to obtain a sample template sequence and a sample parameter sequence of the sample log data, wherein the sample template sequence is composed of a sample template, and the sample template is used to characterize data features common to a plurality of the sample log data; and the sample parameter sequence is composed of sample parameters, and the sample parameters are used to characterize data features common to non-real-time log data; Inputting the sample template sequence and the sample parameter sequence into the model to be trained for iterative training to obtain the abnormal log recognition model; The model to be trained includes a first module to be trained and a second module to be trained. The specific implementation method of each module training is as follows: The first module to be trained predicts the next sample template for any sample template in the sample template sequence, obtains a first prediction result, and acquires a first actual result; the second module to be trained predicts the next parameter sequence for any parameter sequence in the sample parameter sequence, obtains a second prediction result, and acquires a second actual result; Based on the first prediction result and the first actual result, the parameters of the first module to be trained are updated to obtain a first module; based on the second prediction result and the second actual result, the parameters of the second module to be trained are updated to obtain a second module.

3. The method according to claim 2, after performing template processing on the sample log data to obtain a sample template sequence and a sample parameter sequence of the sample log data, further comprises: Iteratively training the third module to be trained based on the sample template sequence to obtain a third module, wherein the third module is used to determine whether the abnormal sample template is related to the cutover event; The iterative training of the third module to be trained includes: Acquire a target sample template that meets a preset condition in the sample template sequence, wherein the target sample template is an abnormal sample template; Acquire a first sample template and a second sample template in the sample template sequence, wherein the first sample template is located before the target sample template in the sample template sequence, and the second sample template is located after the target sample template in the sample template sequence; Calculating a first correlation probability between the first sample template and the second sample template as a whole and the target sample template, and obtaining a first relationship between the target sample template and the first sample template and the second sample template, wherein the first correlation probability is used to characterize the probability that the target sample template is correlated with the first sample template and the second sample template, and the first relationship is used to characterize whether the target sample template is correlated with the first sample template and the second sample template; The third module to be trained is iteratively updated based on the first correlation probability and the first relationship to obtain a third module, and the third module is used to determine the degree of correlation between the target sample template and the first sample template and the second sample template.

4. The method according to claim 3, after obtaining a target sample template that meets a preset condition in the sample template sequence, wherein the target sample template is an abnormal sample template, further comprises: Iteratively training the fourth module to be trained based on the sample template sequence to obtain a fourth module, wherein the fourth module is used to determine the cause of formation of the abnormal sample template; The iterative training of the third module to be trained includes: Acquire a third sample template and a fourth sample template from the sample template sequence, wherein the third sample template is a sample template of a non-target sample template, and the fourth sample template is a related template of the target sample template; Calculating a second correlation probability between the third sample template and the target sample template, and determining a fifth sample template corresponding to the second correlation probability that meets a preset condition, wherein the second correlation probability is used to characterize the correlation probability between the third sample template and the target sample template; The fourth module to be trained is iteratively trained based on the fifth sample template and the fourth sample template to obtain a fourth module, and the fourth module is used to determine a related template of the target sample template in the sample template sequence.

5. The method according to claim 1, wherein the real-time log data includes first log data, the first log data is log data generated when the cutover event is in progress, and the real-time log data is templated to obtain a first template and a first parameter of the real-time log data, comprising: Performing template processing on the first log data to obtain a second template sequence and a second parameter sequence; The step of inputting the first template and the first parameter into an abnormal log recognition model for recognition to obtain a first recognition result of the real-time log data includes: Acquire time parameters of the second template and the second parameter in the second template sequence and the second parameter sequence; Obtain the number of the second templates or the number of the second parameters within a preset time, and compare the number of the second templates or the number of the second parameters within the preset time with the preset number of historical templates or the number of historical parameters to obtain a comparison result, and the comparison result is used to characterize whether the number of the second templates or the number of the second parameters is abnormal.

6. The method according to claim 1, before determining abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal, further comprising: Inputting the abnormal log template into a third module of the abnormal log recognition model and obtaining a third recognition result, wherein the third module is used to determine a first correlation probability between the abnormal log template and a target template that meets a preset condition in the first template sequence; If the first correlation probability is greater than a preset threshold, it indicates that the abnormal log template is related to the cutover event.

7. The method according to claim 1, before determining abnormal log data based on the first recognition result and sending the abnormal log data to the target terminal, further comprising: Inputting the abnormal log template into a fourth module of the abnormal log recognition model and obtaining a third recognition result, wherein the fourth module is used to determine a related template of the abnormal log template in the first template sequence; The third recognition result is used as the reason for forming the abnormal log template.

8. An abnormal log identification device, comprising: A first acquisition module is used to acquire real-time log data related to the cutover event; A first processing module is used to perform template processing on the real-time log data to obtain a first template sequence and a first parameter sequence of the real-time log data, wherein the first template sequence is composed of a first template, and the first template is used to characterize a data feature common to a plurality of the real-time log data; and the first parameter sequence is composed of a first parameter, and the first parameter is used to characterize a data feature not common to the real-time log data; a second processing module, configured to input the first template sequence and the first parameter sequence into an abnormal log recognition model for recognition, and obtain a first recognition result of the real-time log data, wherein the abnormal log recognition model includes a first module and a second module, the first module is configured to determine an abnormal log template in the first parameter sequence, the second module is configured to determine an abnormal log parameter in the second parameter sequence, and the first recognition result is the abnormal log template or the abnormal log parameter; A first sending module is configured to determine abnormal log data based on the first recognition result, and send the abnormal log data to a target terminal.

9. A computer device, characterized in that: The device comprises: Processor; and A memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for performing the steps in the method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is used to store computer-executable instructions, and the executable instructions enable a computer to execute the method according to any one of claims 1 to 7.