Log standardization method and device, equipment, storage medium and product
By classifying and clustering log data, determining its target classification category and selecting a suitable standardization solution, the problem of inapplicability of single regular expression processing is solved and the accuracy and efficiency of log data processing are improved.
Patent Information
- Application Number
- CN202411018800.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing technology, a single regular expression is difficult to apply to multiple types of log data, resulting in low log data processing accuracy.
By classifying the logs to be processed, determining their target classification categories, and determining a standardization plan based on preset correspondence relationships, the log data is standardized. This method includes clustering log data, determining standard subject words, building preset correspondence relationships, and selecting appropriate standardization solutions for processing.
It improves the accuracy of log data processing, ensures that different types of log data can be processed in appropriate standardized ways, and improves processing efficiency and accuracy.
Smart Images

Figure CN118820018A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of log processing technology, and in particular to a log standardization method, device, equipment, storage medium and product. Background Art
[0002] With the rapid development of information technology, a large number of business systems and various types of products generate massive amounts of log data every day. In order to facilitate users to effectively analyze log data, it is first necessary to standardize the log data.
[0003] In the related art, a single regular expression is used to process normalized logs. However, since there are many types of log data, a single regular expression processing method may not be applicable to all types of log data, resulting in low accuracy in processing log data. Summary of the invention
[0004] The main purpose of this application is to provide a log standardization method, aiming to solve the technical problem of low accuracy in processing log data.
[0005] To achieve the above objectives, the present application proposes a log standardization method, which includes:
[0006] Receive logs to be processed;
[0007] Determine the classification category to which the log to be processed belongs, and obtain the target classification category corresponding to the log to be processed;
[0008] Based on the target classification category, a standardized scheme for the log to be processed is determined through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories;
[0009] Based on the standardization scheme, the logs to be processed are standardized.
[0010] In one embodiment, before the step of receiving the log to be processed, the following steps are included:
[0011] Get sample logs;
[0012] Based on the attribute information of the sample logs, clustering the sample logs to obtain a clustering result, wherein the clustering result includes a plurality of classification categories;
[0013] Performing standardization calculation on the sample data in the classification category to determine the standard scheme corresponding to the classification category;
[0014] Based on the standard scheme corresponding to the classification categories, a preset corresponding relationship is constructed.
[0015] In one embodiment, the step of clustering the sample logs based on the attribute information of the sample logs to obtain clustering results includes:
[0016] Based on the attribute information of the sample log, the sample log is classified according to a preset classification condition to obtain a first category;
[0017] Calculating the correlation between the sample logs in the first category to obtain a target negative distribution rate;
[0018] Comparing the target negative allocation rate with a preset negative allocation rate, if the target negative allocation rate is less than the preset negative allocation rate, the sample log is of the second category, and if the target negative allocation rate is greater than or equal to the preset negative allocation rate, the sample log is of the third category;
[0019] Based on the second category, determining a cluster center;
[0020] Based on the cluster center, determining a fourth category;
[0021] A clustering result is obtained based on the third category and the fourth category.
[0022] In one embodiment, the step of performing standardization calculation on the sample logs in the classification category to determine the standard solution corresponding to the classification category includes:
[0023] Obtain all normalization schemes and obtain the target log after the sample log is normalized;
[0024] Based on all the standardization schemes, the sample logs in the classification category are standardized to obtain different sample logs to be tested;
[0025] Based on the target log, comparing the processing accuracy of the sample log to be tested to obtain a comparison result;
[0026] The standardized scheme corresponding to the sample log to be tested with the highest accuracy in the comparison result is determined as the standard scheme.
[0027] In one embodiment, the step of determining the classification category to which the log to be processed belongs and obtaining the target classification category corresponding to the log to be processed includes:
[0028] Determine standard subject terms of different categories in the clustering results and standard subject terms of the log to be processed;
[0029] Connecting the standard subject terms of different categories to obtain category description information;
[0030] The standard keywords of the logs to be processed are spliced to obtain description information to be processed;
[0031] Determine a category semantic vector of the category description information and a to-be-processed semantic vector of the to-be-processed description information;
[0032] Based on the category semantic vector and the to-be-processed semantic vector, determining the distance between the to-be-processed log and the different categories, and judging the distance to obtain a minimum distance;
[0033] Based on the minimum distance, determining the target category to which the log to be processed belongs;
[0034] Based on a preset segmentation field, segment the target category to obtain a first character string;
[0035] Based on a preset segmentation field, the log to be processed is segmented to obtain a second character string;
[0036] Matching the first character string with the second character string to obtain a matching result;
[0037] The classification category with the most matching characters in the matching results is determined as the target classification category corresponding to the log to be processed.
[0038] In one embodiment, the step of determining a standardized solution for performing standardized processing on the log to be processed based on the target classification category through a preset corresponding relationship includes:
[0039] If the target classification category is an operation log category, the standardized scheme corresponding to the operation log category is searched through a preset corresponding relationship to determine a first standardized scheme for performing standardized processing on the log to be processed, wherein the first standardized scheme is a scheme for performing standardized processing on the log to be processed through a preset standardized processing model;
[0040] If the target classification category is a system log category, the standardization scheme corresponding to the system log category is searched through a preset correspondence relationship to determine a second standardization scheme for standardizing the log to be processed, wherein the second standardization scheme is a scheme for standardizing the log to be processed through a preset parsing template.
[0041] In one embodiment, before the step of determining a standardized solution for performing standardized processing on the log to be processed based on the target classification category through a preset corresponding relationship, the following steps are included:
[0042] Obtain sample operation logs and obtain an initial standardized processing model;
[0043] Inputting the sample operation log into the initial standardized processing model to obtain an initial standardized log;
[0044] Performing word segmentation processing on the initial standardized log to obtain a first word segmentation vector;
[0045] Obtain the actual standardized log corresponding to the sample operation log data;
[0046] Performing word segmentation processing on the actual standardized log to obtain a second word segmentation vector;
[0047] Determining a target deviation between the first word segmentation vector and the second word segmentation vector;
[0048] Determining a vector loss function based on the target deviation;
[0049] Based on the vector loss function, the model parameters of the initial standardization processing model are optimized to obtain a preset standardization processing model.
[0050] In one embodiment, the step of performing standardization processing on the log to be processed based on the standardization scheme includes:
[0051] Based on the standardization scheme, the acquired semantic vector is input into the convolution layer in the preset standardization processing model for convolution processing to obtain a convolution feature vector, wherein the standardization scheme is a first standardization scheme;
[0052] Based on the normalization processing layer in the preset normalization processing model, the convolution feature vector is subjected to batch normalization processing to obtain a batch normalized feature vector;
[0053] Based on the activation layer in the preset standardization processing model, the batch normalized feature vector is activated to obtain an activated feature vector;
[0054] Based on the maximum pooling layer in the preset standardization processing model, the activation feature vector is pooled to obtain a pooled feature vector;
[0055] Based on the preset standardized processing model, the pooled feature vector is added to the semantic vector to obtain a fused feature vector;
[0056] Based on the residual network layer in the preset standardization processing model, performing residual processing on the fused feature vector to obtain a residual feature vector;
[0057] Based on the fully connected layer in the preset standardization processing model, the residual feature vector is standardized.
[0058] In one embodiment, before the step of performing standardization processing on the log to be processed based on the standardization scheme, the following steps are included:
[0059] Obtaining environment information and user information of the log to be processed;
[0060] Based on the environment information and the user information, the logs to be processed are classified into standardized levels to obtain a target standardized level corresponding to the logs to be processed;
[0061] Based on the target standardization level, determining a preset parsing template;
[0062] The step of performing standardized processing on the log to be processed based on the standardized solution includes:
[0063] Based on the standardization scheme, the log to be processed is input into the preset parsing template to obtain the title item data corresponding to the log to be processed, wherein the standardization scheme is a second standardization scheme;
[0064] Based on a preset standardized data structure, the title item data is standardized.
[0065] In addition, to achieve the above purpose, the present application also proposes a log standardization device, which includes:
[0066] A receiving module, used for receiving logs to be processed;
[0067] A calculation module, used to determine the classification category to which the log to be processed belongs, and obtain a target classification category corresponding to the log to be processed;
[0068] A standard module, used to determine a standardized scheme for performing standardized processing on the log to be processed based on the target classification category and through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories;
[0069] A processing module is used to perform standardized processing on the log to be processed based on the standardized solution.
[0070] In addition, to achieve the above objectives, the present application also proposes a log standardization device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the log standardization method described above.
[0071] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the log standardization method described above are implemented.
[0072] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the log standardization method described above are implemented.
[0073] One or more technical solutions proposed in this application have at least the following technical effects:
[0074] This application solves the problem that a single processing method cannot be universally applicable to all data by determining a standardized processing method for sample logs under different clustering categories, thereby improving the processing accuracy of log data. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0076] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0077] Figure 1 This is a flowchart of the log standardization method for this application;
[0078] Figure 2 A flow chart of a method for clustering sample historical log data in the log standardization method of this application;
[0079] Figure 3 A flow chart of a method for determining a standard scheme corresponding to the classification category in the log standardization method of the present application;
[0080] Figure 4 A flowchart of the correspondence relationship preset for the construction of the log standardization method of this application;
[0081] Figure 5 A flow chart of a method for classifying logs to be processed according to the log standardization method of this application;
[0082] Figure 6 A method flow chart of a method for finding a standardized solution corresponding to a target classification category of the log standardization method of this application;
[0083] Figure 7 A flow chart of a real-time log standardization method for the log standardization method of this application;
[0084] Figure 8 A flow chart of a method for obtaining a preset standardization model and performing standardization processing for the log standardization method of this application;
[0085] Fig. 9 A flow chart of a method for standardizing logs to be processed using a preset standardization model for use in the log standardization method of this application;
[0086] Fig.10 A flow chart of a method for standardizing logs to be processed using a preset parsing template for the log standardization method of this application;
[0087] Fig.11 This is a schematic diagram of the module structure of the log standardization device according to an embodiment of the present application;
[0088] Fig.12 This is a schematic diagram of the device structure of the hardware operating environment involved in the log standardization method in the embodiment of the present application.
[0089] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0090] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0091] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0092] The main solution of the embodiment of the present application is: receiving the log to be processed; determining the classification category to which the log to be processed belongs, and obtaining the target classification category corresponding to the log to be processed; based on the target classification category, through a preset correspondence relationship, determining a standardized scheme for performing standardized processing on the log to be processed, wherein the preset correspondence relationship includes different standard schemes corresponding to different classification categories; based on the standardized scheme, performing standardized processing on the log to be processed.
[0093] In the related art, a single regular expression is used to process normalized logs. However, since there are many types of log data, a single regular expression processing method may not be applicable to all types of log data, resulting in low accuracy in processing log data.
[0094] This application solves the problem that a single processing method cannot be universally applicable to all data by determining a standardized processing method for sample logs under different clustering categories, thereby improving the processing accuracy of log data.
[0095] It should be noted that the execution subject of this embodiment can be a log standardization device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes the log standardization device as an example to illustrate this embodiment and the following embodiments.
[0096] Based on this, the present application embodiment provides a log standardization method, referring to Figure 1 The log standardization method includes steps S100 to S400:
[0097] Step S100, receiving logs to be processed;
[0098] It is understandable that the log to be processed refers to log data that needs to be standardized. The device receives the log that needs to be standardized.
[0099] In a feasible implementation manner, the following steps may be included before step S100:
[0100] Step S110, obtaining a sample log;
[0101] It should be noted that the sample log refers to a large amount of sample historical log data. The device obtains a large amount of sample historical log data.
[0102] Step S120, clustering the sample logs based on the attribute information of the sample logs to obtain a clustering result, wherein the clustering result includes a plurality of classification categories;
[0103] It is understandable that the attribute information includes various information such as system name, protocol name, operation type, etc. The clustering result includes the first clustering category and the second clustering category. The classification category is a plurality of classification categories respectively included in the first clustering category and the second clustering category. The device clusters the sample historical log data to obtain historical log data under different clustering categories, which lays the foundation for the device to determine the standardized processing method suitable for different types of log data. Figure 2 This is a flow chart of the method for clustering sample historical log data in the log standardization method of this application.
[0104] In a feasible implementation manner, step S120 includes the following steps:
[0105] Based on the attribute information of the sample log, the sample log is classified according to a preset classification condition to obtain a first category;
[0106] It should be noted that the preset classification conditions include a preset maximum number of boxes, a preset minimum number of leaf nodes, and a preset minimum percentage of leaf nodes. The first category refers to a plurality of boxes obtained by boxing the attribute information of the sample historical log data. The device first determines the attribute information of the sample historical log data, where the attribute information includes multiple types, such as system name, protocol name, operation type, etc.; then the device performs decision tree boxing on the attribute information of the sample historical log data according to the preset maximum number of boxes, the preset minimum number of leaf nodes, and the preset minimum percentage of leaf nodes, including obtaining the first category of multiple boxes.
[0107] Calculating the correlation between the sample logs in the first category to obtain a target negative distribution rate;
[0108] It can be understood that the device determines the semantic information vector of each sample historical log data in each bin respectively, and calculates the correlation between each sample historical log data in each bin based on the semantic information vector, so as to determine the evaluation number of sample historical log data in each bin whose correlation is less than a preset threshold. The device divides the evaluation number by the total sample historical log data in the corresponding bin to obtain the negative distribution rate corresponding to the bin, thereby determining the negative distribution rate corresponding to each bin.
[0109] Comparing the target negative allocation rate with a preset negative allocation rate, if the target negative allocation rate is less than the preset negative allocation rate, the sample log is of the second category, and if the target negative allocation rate is greater than or equal to the preset negative allocation rate, the sample log is of the third category;
[0110] It should be noted that the second category refers to the second category obtained by screening the bins in the first category that have a negative distribution rate less than a preset one. The device screens the first category according to the negative distribution rate corresponding to each bin, and screens out the bins with a negative distribution rate less than the preset negative distribution rate; the device unboxes each sample historical log data in the screened bins to obtain each sample historical log data after unboxing, and calculates the data density in the corresponding field of each target sample historical log data after unboxing, and the data density refers to the amount of data in the field corresponding to the target sample historical log data; wherein, the field refers to an area with the target sample historical log data as the dot and r as the radius, and the radius r can be set according to actual needs. Specifically, a few definitions are first determined:
[0111] Core point (target sample historical log data): sample historical log data containing more than the minimum number of neighborhood points MinPts within the radius r;
[0112] Boundary point (boundary sample historical log data): a point where the number of sample historical log data within radius r is less than MinPts, but falls within the neighborhood of the core sample historical log data.
[0113] Based on the second category, determining a cluster center;
[0114] It is understandable that the cluster center refers to the sample historical log data whose number of data in the historical log data set exceeds the preset density threshold. The device calculates the set of data in the neighborhood of each sample historical log data after unpacking, and when the number of data in the set exceeds the preset density threshold, the sample historical log data is determined as the core point (cluster center).
[0115] Based on the cluster center, determining a fourth category;
[0116] It should be noted that the fourth category is the first cluster category. After determining the core point, the device checks whether the remaining points are in the neighborhood of the core point. The points in the same neighborhood are the sample historical log data under the same cluster category. Based on the cluster center, the device clusters the unpacked sample historical log data to obtain the first cluster category.
[0117] A clustering result is obtained based on the third category and the fourth category.
[0118] It should be noted that the third category is the second clustering category. The device determines the bins with a negative distribution rate greater than or equal to the preset negative distribution rate as the second clustering category, and the first clustering category and the second clustering category are collectively referred to as clustering results, wherein the clustering bins obtained by clustering each sample historical log data in the first clustering category and the second clustering category and the bins with a negative distribution rate greater than or equal to the preset negative distribution rate are the classification categories in the clustering results.
[0119] Step S130, performing standardization calculation on the sample data in the classification category to determine the standard solution corresponding to the classification category;
[0120] It is understood that the standard solution refers to the best method for standardization. The device performs various standardization processing methods on the sample logs, obtains each log after standardization corresponding to the standardization, compares all logs with the correctly standardized logs of the sample logs, and obtains the most suitable standardization processing method for the sample logs.
[0121] In a feasible implementation manner, step S130 includes the following steps:
[0122] Obtain all normalization schemes and obtain the target log after the sample log is normalized;
[0123] It should be noted that the target log refers to the correct standardized sample log. The device determines each standardized processing method and determines the correct standardized sample log data corresponding to the sample historical log data under different standard clustering categories.
[0124] Based on all the standardization schemes, the sample logs in the classification category are standardized to obtain different sample logs to be tested;
[0125] It is understandable that the device uses various standardized processing methods to perform standardized processing on the sample historical log data in the classification category, and obtains the sample log data to be tested after being processed using various standardized processing methods.
[0126] Based on the target log, comparing the processing accuracy of the sample log to be tested to obtain a comparison result;
[0127] It should be noted that the device determines the processing accuracy corresponding to different standardized processing methods corresponding to all classification categories based on the correct standardized sample log data corresponding to the same sample historical log data in the classification category and the sample log data to be tested obtained by using different standardized processing methods, and compares the processing accuracy.
[0128] The standardized scheme corresponding to the sample log to be tested with the highest accuracy in the comparison result is determined as the standard scheme.
[0129] It should be noted that the standard solution refers to the optimal method for standardized processing. The device classifies the standardized processing methods in each standardized processing method according to different processing accuracy. Figure 3 A flow chart of a method for determining a standard scheme corresponding to the classification category in the log standardization method of the present application.
[0130] Step S140: constructing a preset corresponding relationship based on the standard scheme corresponding to the classification category.
[0131] It is understandable that the preset correspondence relationship means that by determining the classification category, the standard solution corresponding to the classification category can be determined. The device constructs a correspondence relationship between the classification category and its corresponding standard solution. Figure 4 A flowchart of the preset correspondence relationship for constructing the log standardization method of this application.
[0132] Step S200, respectively determining the classification categories to which the logs to be processed belong, and obtaining target classification categories corresponding to the logs to be processed;
[0133] It should be noted that when the device receives a log to be processed, it first needs to determine the category of the log to be processed, select the most suitable standardized processing method for the log to be processed, and perform standardized processing on the log according to the most suitable standardized processing method. Figure 5 This is a flow chart of a method for classifying logs to be processed in the log standardization method of this application.
[0134] In a feasible implementation manner, step S200 includes the following steps:
[0135] Determine standard subject terms of different categories in the clustering results and standard subject terms of the log to be processed;
[0136] It is understandable that the standard subject words refer to the key terms extracted from the clustering results to represent each cluster category, and these words can summarize the main features or themes shared by the data points in the category. The device first determines the standard subject feature words corresponding to different cluster categories, and determines the subject feature words to be processed corresponding to the log data to be processed.
[0137] The standard subject words of different categories are spliced to obtain category description information; the standard subject words of the logs to be processed are spliced to obtain description information to be processed;
[0138] It should be noted that the category description information refers to information summarizing the common features, attributes or themes of the data points in the category. The device concatenates the standard theme feature words corresponding to different cluster categories to obtain the category description information corresponding to different cluster categories, and concatenates the to-be-processed theme feature words corresponding to the to-be-processed log data to obtain the to-be-processed description information corresponding to the to-be-processed log data.
[0139] Determine a category semantic vector of the category description information and a to-be-processed semantic vector of the to-be-processed description information;
[0140] It is understandable that a semantic vector refers to a method of converting text or words into numerical representations. The device determines a category semantic feature vector corresponding to the category description information, and determines a semantic feature vector to be processed corresponding to the description information to be processed.
[0141] Based on the category semantic vector and the to-be-processed semantic vector, determining the distance between the to-be-processed log and the different categories, and judging the distance to obtain a minimum distance;
[0142] It should be noted that the device calculates the distances between the log data to be processed and different cluster categories based on the category semantic feature vector and the semantic feature vector to be processed, and determines the minimum distance among the different distances.
[0143] Based on the minimum distance, determining the target category to which the log to be processed belongs;
[0144] It can be understood that the device determines the standard clustering category corresponding to the minimum distance as the target clustering category to which the log data to be processed belongs.
[0145] Based on a preset segmentation field, segment the target category to obtain a first character string;
[0146] It should be noted that the device sets the segmentation character length and uses the segmentation character length as a unit to segment the classification categories in the target cluster category to obtain the first character string.
[0147] Based on a preset segmentation field, the log to be processed is segmented to obtain a second character string;
[0148] It is understandable that the device sets the segmentation character length and uses the segmentation character length as a unit to segment the classification categories in the log to be processed respectively to obtain the second character string.
[0149] Matching the first character string with the second character string to obtain a matching result;
[0150] It should be noted that the device matches the segmented character string corresponding to the log to be processed with the segmented character string corresponding to the classification category in the target cluster category to obtain a matching result.
[0151] The classification category with the most matching characters in the matching results is determined as the target classification category corresponding to the log to be processed.
[0152] It is understandable that the device determines the classification category with the most matching characters in the matching results as the target classification category to which the log to be processed belongs.
[0153] Step S300, based on the target classification category, a standardized scheme for performing standardized processing on the log to be processed is determined through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories;
[0154] It should be noted that the device determines the standardized processing method corresponding to the target classification category to which the log to be processed belongs as the standardized solution for the log to be processed. Figure 6 A flow chart of the method for finding the standardized scheme corresponding to the target classification category of the log standardization method of this application.
[0155] Step S400: Based on the standardization scheme, the log to be processed is standardized.
[0156] It is understandable that the device performs standardization processing on the logs to be processed through a determined standardization scheme. Figure 7 This is a flow chart of the real-time log standardization method of the log standardization method of this application.
[0157] In this implementation, by pre-establishing the correspondence between different classification categories and their corresponding standardization schemes, suitable standardized processing methods are determined for different types of logs, and the standardization scheme for log standardization is determined by determining the category corresponding to the log to be processed. Thereafter, log standardization is implemented according to the standardization scheme, thereby improving the accuracy of log standardization.
[0158] In a feasible implementation manner, the log standardization method step S300 further includes the following steps:
[0159] If the target classification category is an operation log category, the standardized scheme corresponding to the operation log category is searched through a preset corresponding relationship to determine a first standardized scheme for performing standardized processing on the log to be processed, wherein the first standardized scheme is a scheme for performing standardized processing on the log to be processed through a preset standardized processing model;
[0160] It should be noted that the operation log category refers to different types of log classifications set to record the history and details of user or system operations. The device searches for the corresponding standardized scheme according to the preset corresponding relationship based on the classification category to which the log to be processed belongs, and determines the corresponding standardized scheme.
[0161] If the target classification category is a system log category, the standardization scheme corresponding to the system log category is searched through a preset correspondence relationship to determine a second standardization scheme for standardizing the log to be processed, wherein the second standardization scheme is a scheme for standardizing the log to be processed through a preset parsing template.
[0162] It is understandable that the system log category refers to the log classification set to record various events, state changes, error information and security-related activities during the operation of the system. The device searches for the corresponding standardized scheme according to the preset corresponding relationship based on the classification category to which the log to be processed belongs, and determines the corresponding standardized scheme.
[0163] In a feasible implementation manner, the following steps are included before step S300:
[0164] Obtain sample operation logs and obtain an initial standardized processing model;
[0165] It should be noted that the initial standardization processing model refers to a model for performing log standardization processing. The device simultaneously obtains the sample operation log and the initial standardization processing model.
[0166] Inputting the sample operation log into the initial standardized processing model to obtain an initial standardized log;
[0167] It can be understood that the device determines the sample semantic information vector corresponding to the sample operation log data, and inputs the sample semantic information vector into the initial convolution layer for convolution processing to obtain an initial convolution feature vector; then the initial convolution feature vector is input into the initial batch normalization processing layer for batch normalization processing to obtain an initial batch normalized feature vector; the device inputs the initial batch normalized feature vector into the initial activation layer for activation processing to obtain an initial activation feature vector; and the initial activation feature vector is input into the initial maximum pooling layer for pooling processing to obtain an initial pooling feature vector; then the initial pooling feature vector is added to the semantic vector to obtain an initial fused feature vector; the device inputs the initial fused feature vector into the initial residual network layer for residual processing to obtain an initial residual feature vector; and the initial residual feature vector is input into the initial fully connected layer for normalization processing to obtain predicted standardized log data corresponding to the sample operation log data.
[0168] Performing word segmentation processing on the initial standardized log to obtain a first word segmentation vector;
[0169] It should be noted that the device performs word segmentation processing on the initial standardized log to obtain a first word segmentation vector.
[0170] Obtain the actual standardized log corresponding to the sample operation log data;
[0171] It should be noted that the actual standardized log is a standardized log obtained by standardizing the sample operation log data. The device obtains the actual standardized log corresponding to the sample operation log data.
[0172] Performing word segmentation processing on the actual standardized log to obtain a second word segmentation vector;
[0173] It is understandable that the device performs word segmentation processing on the actual standardized log to obtain a second word segmentation vector.
[0174] Determining a target deviation between the first word segmentation vector and the second word segmentation vector;
[0175] It should be noted that the target deviation is the difference between the value obtained by the model and the true target value. The device calculates the vector differences at the same position of the first word segmentation vector and the second word segmentation vector, and obtains the target deviation by calculating the sum of the squares of the vector differences.
[0176] Determining a vector loss function based on the target deviation;
[0177] It is understandable that the device determines the vector loss function corresponding to the initial information prediction model based on the target deviation.
[0178] Based on the vector loss function, the model parameters of the initial standardization processing model are optimized to obtain a preset standardization processing model.
[0179] It should be noted that the device optimizes the model parameters of the initial standardized processing model based on the vector loss function to obtain the standardized processing model. Figure 8 This is a flow chart of the method for obtaining a preset standardization model and performing standardization processing in the log standardization method of this application.
[0180] In a feasible implementation manner, step S300 further includes the following steps:
[0181] Based on the standardization scheme, the acquired semantic vector is input into the convolution layer in the preset standardization processing model for convolution processing to obtain a convolution feature vector, wherein the standardization scheme is a first standardization scheme;
[0182] It can be understood that the device extracts the semantic vector of the log to be processed through the deep learning model BERT, and inputs the semantic vector into the convolution layer in the constructed standardized processing model for convolution processing to obtain the convolution feature vector, wherein the standardized processing model includes: convolution layer, batch normalization processing layer, activation layer, maximum pooling layer, residual network layer and fully connected layer.
[0183] Based on the normalization processing layer in the preset normalization processing model, the convolution feature vector is subjected to batch normalization processing to obtain a batch normalized feature vector;
[0184] It is understandable that the preset normalization processing model in the device inputs the convolution feature vector into the batch normalization processing layer in the model for batch normalization processing to obtain a batch normalized feature vector.
[0185] Based on the activation layer in the preset standardization processing model, the batch normalized feature vector is activated to obtain an activated feature vector;
[0186] It should be noted that the preset standardization processing model in the device inputs the batch normalized feature vector into the activation layer in the model for activation processing to obtain the activated feature vector.
[0187] Based on the maximum pooling layer in the preset standardization processing model, the activation feature vector is pooled to obtain a pooled feature vector;
[0188] It is understandable that the preset standardization processing model in the device inputs the activation feature vector into the maximum pooling layer in the model for pooling processing to obtain a pooled feature vector.
[0189] Based on the preset standardized processing model, the pooled feature vector is added to the semantic vector to obtain a fused feature vector;
[0190] It should be noted that after the device obtains the pooled feature vector through the preset standardization processing model, it adds the pooled feature vector to the semantic vector to obtain a fused feature vector.
[0191] Based on the residual network layer in the preset standardization processing model, performing residual processing on the fused feature vector to obtain a residual feature vector;
[0192] It is understandable that the preset standardized processing model in the device inputs the fused feature vector into the residual network layer in the model for residual processing to obtain a residual feature vector.
[0193] Based on the fully connected layer in the preset standardization processing model, the residual feature vector is standardized.
[0194] It should be noted that the preset standardization processing model in the device inputs the residual feature vector into the fully connected layer in the model for standardization processing to obtain standardized log data. Fig. 9 A flow chart of a method for standardizing logs to be processed using a preset standardization model for the log standardization method of this application.
[0195] In a feasible implementation manner, the following steps are also included before step S300:
[0196] Obtaining environment information and user information of the log to be processed;
[0197] It is understandable that the environmental information includes the generation time, location, time, etc. of the log to be standardized. The user information includes the user's browsing record, action record, exposure record, startup record, etc. of the log to be standardized. The device obtains the environmental information and user behavior information of the log to be standardized.
[0198] Based on the environment information and the user information, the logs to be processed are classified into standardization levels to obtain a target standardization level corresponding to the logs to be standardized;
[0199] It should be noted that the device classifies the logs to be standardized into standardization levels according to the environmental information and the user behavior information, and obtains the target standardization level corresponding to the logs to be standardized.
[0200] Based on the target standardization level, determining a preset parsing template;
[0201] It is understandable that the parsing template refers to a template used for log standardization processing. The device determines a preset parsing template corresponding to a target standardization level.
[0202] Step S300 also includes the following steps:
[0203] Based on the standardization scheme, the log to be processed is input into the preset parsing template to obtain the title item data corresponding to the log to be processed, wherein the standardization scheme is a second standardization scheme;
[0204] It should be noted that the title item data refers to the basic information about the log entry. The device uses the preset parsing template to extract data from the log to be standardized to obtain initial data, wherein the preset parsing template contains the title item of the log data to be extracted at the standardization level corresponding to the template, and the log data to be standardized is input into the preset parsing template, and the preset parsing template can automatically extract the initial data corresponding to the title item.
[0205] Based on a preset standardized data structure, the log to be processed is standardized.
[0206] The device converts the initial data according to the preset standardized data structure to achieve standardized processing of the logs to be processed. Fig.10 A flow chart of a method for standardizing logs to be processed using a preset parsing template for the log standardization method of this application.
[0207] In this embodiment, when a log to be processed is obtained, the device directly determines a suitable standardized processing method according to the category to which the log belongs and performs standardized processing, thereby improving the standardization accuracy and standardization efficiency of the log data.
[0208] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the log standardization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0209] This application also provides a log standardization device, please refer to Fig.11 , the log standardization device comprises:
[0210] A receiving module 10, used for receiving logs to be processed;
[0211] The calculation module 20 is used to determine the classification category to which the log to be processed belongs, and obtain the target classification category corresponding to the log to be processed;
[0212] A standard module 30, for determining a standardized scheme for performing standardized processing on the log to be processed based on the target classification category and through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories;
[0213] The processing module 40 is used to perform standardization processing on the log to be processed based on the standardization scheme.
[0214] Optionally, the receiving module includes:
[0215] A scheme module is used to obtain sample logs; cluster the sample logs based on the attribute information of the sample logs to obtain clustering results, wherein the clustering results include multiple classification categories; perform standardized calculations on the sample data in the classification categories to determine the standard schemes corresponding to the classification categories; and construct preset corresponding relationships based on the standard schemes corresponding to the classification categories.
[0216] Optionally, the solution module includes:
[0217] A clustering module is used to classify the sample logs according to preset classification conditions based on the attribute information of the sample logs to obtain a first category; calculate the correlation between the sample logs in the first category to obtain a target negative distribution rate; compare the target negative distribution rate with the preset negative distribution rate, if the target negative distribution rate is less than the preset negative distribution rate, the sample log is a second category, if the target negative distribution rate is greater than or equal to the preset negative distribution rate, the sample log is a third category; based on the second category, determine the cluster center; based on the cluster center, determine the fourth category; based on the third category and the fourth category, obtain a clustering result.
[0218] The verification module is used to obtain all standardization schemes and obtain the target log after the sample log is standardized; based on all the standardization schemes, the sample logs in the classification category are standardized to obtain different sample logs to be verified; based on the target log, the processing accuracy of the sample logs to be verified is compared to obtain a comparison result; the standardization scheme corresponding to the sample log to be verified with the highest accuracy in the comparison result is determined as the standard scheme.
[0219] Optionally, the clustering module includes:
[0220] A classification module is used to determine the standard subject terms of different categories in the clustering results and the standard subject terms of the log to be processed; splice the standard subject terms of the different categories to obtain category description information; splice the standard subject terms of the log to be processed to obtain the description information to be processed; determine the category semantic vector of the category description information and the to-be-processed semantic vector of the to-be-processed description information; based on the category semantic vector and the to-be-processed semantic vector, determine the distance between the log to be processed and the different categories, and judge the distance to obtain the minimum distance; based on the minimum distance, determine the target category to which the log to be processed belongs; based on a preset segmentation field, segment the target category to obtain a first character string; based on a preset segmentation field, segment the log to be processed to obtain a second character string; match the first character string and the second character string to obtain a matching result; determine the classification category with the most matching characters in the matching result as the target classification category corresponding to the log to be processed.
[0221] Optionally, the classification module includes:
[0222] A category module is used for, if the target classification category is an operation log category, searching for the standardized scheme corresponding to the operation log category through a preset correspondence, and determining a first standardized scheme for standardizing the log to be processed, wherein the first standardized scheme is a scheme for standardizing the log to be processed through a preset standardized processing model; if the target classification category is a system log category, searching for the standardized scheme corresponding to the system log category through a preset correspondence, and determining a second standardized scheme for standardizing the log to be processed, wherein the second standardized scheme is a scheme for standardizing the log to be processed through a preset parsing template.
[0223] Optionally, the category module includes:
[0224] An initial module is used to obtain a sample operation log and an initial standardized processing model; input the sample operation log into the initial standardized processing model to obtain an initial standardized log; perform word segmentation processing on the initial standardized log to obtain a first word segmentation vector; obtain an actual standardized log corresponding to the sample operation log data; perform word segmentation processing on the actual standardized log to obtain a second word segmentation vector; determine a target deviation between the first word segmentation vector and the second word segmentation vector; determine a vector loss function based on the target deviation; optimize the model parameters of the initial standardized processing model based on the vector loss function to obtain a preset standardized processing model.
[0225] A template module is used to obtain the environmental information and user information of the log to be processed; based on the environmental information and the user information, the log to be processed is divided into standardization levels to obtain the target standardization level corresponding to the log to be processed; based on the target standardization level, a preset parsing template is determined; based on the standardization scheme, the log to be processed is input into the preset parsing template to obtain the title item data corresponding to the log to be processed, wherein the standardization scheme is a first standardization scheme; based on a preset standardized data structure, the title item data is standardized.
[0226] A preset module is used to input the acquired semantic vector into the convolution layer in the preset standardization processing model for convolution processing based on the standardization scheme to obtain a convolution feature vector, wherein the standardization scheme is a first standardization scheme; based on the normalization processing layer in the preset standardization processing model, the convolution feature vector is batch normalized to obtain a batch normalized feature vector; based on the activation layer in the preset standardization processing model, the batch normalized feature vector is activated to obtain an activated feature vector; based on the maximum pooling layer in the preset standardization processing model, the activated feature vector is pooled to obtain a pooled feature vector; based on the preset standardization processing model, the pooled feature vector is added to the semantic vector to obtain a fused feature vector; based on the residual network layer in the preset standardization processing model, the fused feature vector is residually processed to obtain a residual feature vector; based on the fully connected layer in the preset standardization processing model, the residual feature vector is standardized.
[0227] The log standardization device provided by the present application adopts the log standardization method in the above embodiment to solve the technical problem of log standardization. Compared with the prior art, the beneficial effects of the log standardization device provided by the present application are the same as the beneficial effects of the log standardization method provided by the above embodiment, and the other technical features in the log standardization device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0228] The present application provides a log standardization device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the log standardization method in the above-mentioned embodiment 1.
[0229] Reference below Fig.12, which shows a schematic diagram of the structure of a log standardization device suitable for implementing the embodiment of the present application. The log standardization device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.12 The log standardization device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0230] like Fig.12 As shown, the log standardization device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the log standardization device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the log standardization device to communicate with other devices wirelessly or by wire to exchange data. Although the log standardization device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0231] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0232] The log standardization device provided by the present application adopts the log standardization method in the above embodiment to solve the technical problem of log standardization. Compared with the prior art, the beneficial effects of the log standardization device provided by the present application are the same as the beneficial effects of the log standardization method provided by the above embodiment, and the other technical features in the log standardization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0233] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0234] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0235] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the log standardization method in the above-mentioned embodiment.
[0236] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0237] The computer-readable storage medium may be included in the log standardization device; or may exist independently without being assembled into the log standardization device.
[0238] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the log standardization device, the log standardization device: receives the logs to be processed; determines the classification categories to which the logs to be processed belong respectively, and obtains the target classification categories corresponding to the logs to be processed; based on the target classification categories, through a preset corresponding relationship, determines a standardized scheme for performing standardized processing on the logs to be processed, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories; based on the standardized scheme, performs standardized processing on the logs to be processed.
[0239] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0240] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0241] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0242] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned log standardization method, and can solve the technical problems of log standardization. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the log standardization method provided in the above-mentioned embodiment, and will not be repeated here.
[0243] The present application also provides a computer program product, including a computer program, which implements the steps of the log standardization method as described above when executed by a processor.
[0244] The computer program product provided by the present application can solve the technical problem of log standardization. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the log standardization method provided by the above embodiment, which will not be repeated here.
[0245] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A log standardization method, It is characterized in that The log standardization method includes: Receive logs to be processed; Determine the classification category to which the log to be processed belongs, and obtain the target classification category corresponding to the log to be processed; Based on the target classification category, a standardized scheme for performing standardized processing on the log to be processed is determined through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories; Based on the standardization scheme, the logs to be processed are standardized.
2. The log standardization method according to claim 1, It is characterized in that The step of receiving the logs to be processed includes: Get sample logs; Based on the attribute information of the sample logs, clustering the sample logs to obtain a clustering result, wherein the clustering result includes a plurality of classification categories; Performing standardization calculation on the sample data in the classification category to determine the standard scheme corresponding to the classification category; Based on the standard scheme corresponding to the classification categories, a preset corresponding relationship is constructed.
3. The log standardization method according to claim 2, It is characterized in that The step of clustering the sample logs based on the attribute information of the sample logs to obtain clustering results comprises: Based on the attribute information of the sample log, the sample log is classified according to a preset classification condition to obtain a first category; Calculating the correlation between the sample logs in the first category to obtain a target negative distribution rate; Comparing the target negative allocation rate with a preset negative allocation rate, if the target negative allocation rate is less than the preset negative allocation rate, the sample log is of the second category, and if the target negative allocation rate is greater than or equal to the preset negative allocation rate, the sample log is of the third category; Based on the second category, determining a cluster center; Based on the cluster center, determining a fourth category; A clustering result is obtained based on the third category and the fourth category.
4. The log standardization method according to claim 2, It is characterized in that The step of performing standardized calculation on the sample logs in the classification category to determine the standard solution corresponding to the classification category includes: Obtain all normalization schemes and obtain the target log after the sample log is normalized; Based on all the standardization schemes, the sample logs in the classification category are standardized to obtain different sample logs to be tested; Based on the target log, comparing the processing accuracy of the sample log to be tested to obtain a comparison result; The standardized scheme corresponding to the sample log to be tested with the highest accuracy in the comparison result is determined as the standard scheme.
5. The log standardization method according to claim 2, It is characterized in that The step of determining the classification category to which the log to be processed belongs and obtaining the target classification category corresponding to the log to be processed includes: Determine standard subject terms of different categories in the clustering results and standard subject terms of the log to be processed; Connecting the standard subject terms of different categories to obtain category description information; The standard keywords of the logs to be processed are spliced to obtain description information to be processed; Determine a category semantic vector of the category description information and a to-be-processed semantic vector of the to-be-processed description information; Based on the category semantic vector and the to-be-processed semantic vector, determining the distance between the to-be-processed log and the different categories, and judging the distance to obtain a minimum distance; Based on the minimum distance, determining the target category to which the log to be processed belongs; Based on a preset segmentation field, segment the target category to obtain a first character string; Based on a preset segmentation field, the log to be processed is segmented to obtain a second character string; Matching the first character string with the second character string to obtain a matching result; The classification category with the most matching characters in the matching results is determined as the target classification category corresponding to the log to be processed.
6. The log standardization method according to claim 5, It is characterized in that The standardization scheme includes a first standardization scheme and a second standardization scheme. The step of determining the standardization scheme for standardizing the log to be processed based on the target classification category and through a preset corresponding relationship includes: If the target classification category is an operation log category, the standardized scheme corresponding to the operation log category is searched through a preset corresponding relationship to determine a first standardized scheme for performing standardized processing on the log to be processed, wherein the first standardized scheme is a scheme for performing standardized processing on the log to be processed through a preset standardized processing model; If the target classification category is a system log category, the standardization scheme corresponding to the system log category is searched through a preset correspondence relationship to determine a second standardization scheme for standardizing the log to be processed, wherein the second standardization scheme is a scheme for standardizing the log to be processed through a preset parsing template.
7. The log standardization method according to claim 6, It is characterized in that The step of determining a standardized solution for performing standardized processing on the log to be processed based on the target classification category through a preset corresponding relationship includes: Obtain sample operation logs and obtain an initial standardized processing model; Inputting the sample operation log into the initial standardized processing model to obtain an initial standardized log; Performing word segmentation processing on the initial standardized log to obtain a first word segmentation vector; Obtain the actual standardized log corresponding to the sample operation log data; Performing word segmentation processing on the actual standardized log to obtain a second word segmentation vector; Determining a target deviation between the first word segmentation vector and the second word segmentation vector; Determining a vector loss function based on the target deviation; Based on the vector loss function, the model parameters of the initial standardization processing model are optimized to obtain a preset standardization processing model.
8. The log standardization method according to claim 6, It is characterized in that The log to be processed includes the operation log category, and the step of performing standardized processing on the log to be processed based on the standardized solution includes: Based on the standardization scheme, the acquired semantic vector is input into the convolution layer in the preset standardization processing model for convolution processing to obtain a convolution feature vector, wherein the standardization scheme is a first standardization scheme; Based on the normalization processing layer in the preset normalization processing model, the convolution feature vector is subjected to batch normalization processing to obtain a batch normalized feature vector; Based on the activation layer in the preset standardization processing model, the batch normalized feature vector is activated to obtain an activated feature vector; Based on the maximum pooling layer in the preset standardization processing model, the activation feature vector is pooled to obtain a pooled feature vector; Based on the preset standardized processing model, the pooled feature vector is added to the semantic vector to obtain a fused feature vector; Based on the residual network layer in the preset standardization processing model, performing residual processing on the fused feature vector to obtain a residual feature vector; Based on the fully connected layer in the preset standardization processing model, the residual feature vector is standardized.
9. The log standardization method according to claim 6, It is characterized in that The logs to be processed include system log categories, and the step of performing standardized processing on the logs to be processed based on the standardized solution includes: Obtaining environment information and user information of the log to be processed; Based on the environment information and the user information, the logs to be processed are classified into standardized levels to obtain a target standardized level corresponding to the logs to be processed; Based on the target standardization level, determining a preset parsing template; The step of performing standardized processing on the log to be processed based on the standardized solution includes: Based on the standardization scheme, the log to be processed is input into the preset parsing template to obtain the title item data corresponding to the log to be processed, wherein the standardization scheme is a second standardization scheme; Based on a preset standardized data structure, the title item data is standardized.
10. A log standardization device, It is characterized in that The device comprises: A receiving module, used for receiving logs to be processed; A calculation module, used to determine the classification category to which the log to be processed belongs, and obtain a target classification category corresponding to the log to be processed; A standard module, used to determine a standardized scheme for performing standardized processing on the log to be processed based on the target classification category and through a preset corresponding relationship, wherein the preset corresponding relationship includes different standard schemes corresponding to different classification categories; A processing module is used to perform standardized processing on the log to be processed based on the standardized solution.
11. A log standardization device, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the log standardization method according to any one of claims 1 to 9.
12. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the log standardization method according to any one of claims 1 to 9 are implemented.
13. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the log normalization method according to any one of claims 1 to 9 are implemented.
