WO2018076739A1 - 一种数据处理方法以及数据处理设备 - Google Patents

一种数据处理方法以及数据处理设备 Download PDF

Info

Publication number
WO2018076739A1
WO2018076739A1 PCT/CN2017/090054 CN2017090054W WO2018076739A1 WO 2018076739 A1 WO2018076739 A1 WO 2018076739A1 CN 2017090054 W CN2017090054 W CN 2017090054W WO 2018076739 A1 WO2018076739 A1 WO 2018076739A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
data processing
processing device
logs
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/090054
Other languages
English (en)
French (fr)
Inventor
包德伟
谢于明
李世昊
李健
程康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP17865339.0A priority Critical patent/EP3525111A4/en
Publication of WO2018076739A1 publication Critical patent/WO2018076739A1/zh
Priority to US16/396,193 priority patent/US20190251093A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Definitions

  • the present application relates to the field of computers, and in particular, to a data processing method and a data processing device.
  • Log data is one of the important data in system operation and maintenance.
  • the analysis of log data is essential in website user behavior analysis, system operation and maintenance statistics, and so on. It is very difficult to analyze a log type variable directly from a large amount of text logs. For example, in a large amount of text, analyze the state changes recorded in one of the protocol logs; one of the ports recorded in the log that causes the port to oscillate due to the transmission problem.
  • the log can be output in the report format (for example, generating Excel format), and it is easier to statistically analyze each log variable. Therefore, there is often a need for log structuring in the analysis and processing of logs.
  • the database schema definition language (English full name: Data Description Language, DDL for short) is usually configured in the upstream system, and the parsing rules and field definitions of the structured information are defined in the DDL file.
  • the upstream system then provides log and log DDL files to the downstream system, so that the downstream system can automatically extract the structured data of the log according to the log DDL file, and then can be loaded into the target database for subsequent analysis.
  • the DDL file is pre-configured and fixed.
  • the logs corresponding to different products or different versions are different, that is, the DDL files need to be modified according to the changes of the product and the version, which leads to difficulty in maintaining the process of extracting log structured information.
  • the embodiment of the present application provides a data processing method and a data processing device, which are used to determine a log template of a log type corresponding to the multiple logs according to multiple logs of the same type, that is, an analysis rule; and then extract the multiple according to the log template.
  • the log variable generates a structured log. That is, it is no longer necessary to manually set the parsing rules, which eliminates the manual maintenance and update of the parsing rules by the running process.
  • an embodiment of the present application provides a data processing method, including:
  • the data processing device After obtaining the log set, the data processing device determines that the N logs in the log set belong to the type as the first type, where the N is a positive integer; and then the data processing device determines, according to the N logs, the corresponding type of the first type.
  • a log template where the log template corresponding to the first type is used to indicate a variable location of the N logs, that is, a parsing rule of the N logs; and finally the data processing device extracts one or more of the N logs according to the variable location.
  • the log variable generates a structured log file.
  • the log template corresponding to the first type may indicate the number of variables in addition to the location of the variable, and may also indicate other information corresponding to the log template corresponding to the first type, including but not limited to the module name. , severity, process ID and other information.
  • the data processing device determines, according to the plurality of logs of the same type, a log template of the log type corresponding to the multiple logs, that is, a parsing rule, and then extracts the variable of the plurality of logs according to the log template to generate a structured log. file. That is, the data processing device can acquire and update the parsing rules corresponding to the log in the running process, and no need to manually set the parsing rules, thereby eliminating the manual maintenance and update of the parsing rules in the running process.
  • the data processing device may adopt the following manner:
  • the data processing device acquires the Mth log in the N logs, where the M is a positive integer
  • the data processing device may use the Mth log as the log template corresponding to the first type; or the data processing device updates the same log type as the N logs according to the Mth log.
  • the first target template determined by the log is used as a log template corresponding to the first type.
  • the data processing device may update the second target template determined by the M-1th log according to the Mth log as the log template corresponding to the first type.
  • the specific method for the data processing device to update the first target template determined by the other logs of the same log type as the first type of the log template according to the Mth log is as follows:
  • the data processing device compares the Mth log with the first target template
  • the data processing device determines that the first target template has a variable relative to the Mth log, the data processing device uses the wildcard representation of the variable of the first target template relative to the Mth log as the log corresponding to the first type.
  • Template the wildcard is a preset character or string
  • the data processing device determines that the first target template does not have a variable with respect to the Mth log, the data processing device uses the first target template as the log template corresponding to the first type.
  • the specific method for the data processing device to update the second target template determined by the M-1 log as the log template corresponding to the first type according to the Mth log is as follows:
  • the data processing device compares the Mth log with the second target template
  • the data processing device determines that the second target template has a variable relative to the Mth log, uses the wildcard of the second target template with respect to the variable of the Mth log as the log corresponding to the first type.
  • a template the wildcard is a preset character or a string, and the variable is a place where the second target template is different from the Mth log;
  • the data processing device determines that the second target template does not have a variable with respect to the Mth log, the data processing device uses the second target template as the log template corresponding to the first type.
  • the data processing device determines the last log template by using the N log to update the log, so that the log of the same batch adopts the same log template and appears in the log.
  • a new log template also appears, which can instantly obtain and update the log template to improve the accuracy of log data analysis.
  • the data processing device may generate the structured log by extracting the variable in one or more of the N logs according to the variable location in the log template corresponding to the first type:
  • the data processing device compares one or more logs in the N logs with the log template corresponding to the first type, and then determines one or more logs in the N logs. A different log template corresponding to the first type is identified and the different place is identified as a variable; then the data processing device extracts the variable to generate the structured log.
  • the data processing device obtains the variable location from the log template corresponding to the first type; and then the data processing device sequentially selects one or more logs in the N logs according to the variable location. Extracting the variable corresponding to the location of the variable generates the structured log.
  • the data processing device may use a plurality of manners to extract a variable to generate a structured log according to the log template corresponding to the first type, that is, the log can be processed flexibly and quickly.
  • the data processing device may determine, according to the classification algorithm or the clustering algorithm, that the N logs in the log set belong to the first type.
  • the classification algorithm that the data processing device can adopt includes, but is not limited to, an application decision tree classification algorithm, a Bayesian classification algorithm, a BP neural network algorithm, and a K-Means algorithm; the clustering algorithm includes but is not limited to SOM aggregation. Class algorithms, FCM clustering algorithms, etc. There are also other algorithms, such as classifying logs by measuring the distance or correlation between logs.
  • the data processing device can flexibly and quickly classify logs, and effectively speed up the processing of the log.
  • the data processing device establishes a mapping relationship between the log template corresponding to the first type and the N logs, that is, a template can correspond to multiple logs, and the data processing device is structured according to the data processing device.
  • the data processing device can query the log template corresponding to the first type of the log corresponding to the N logs by using the mapping relationship, and then the data processing device is further configured according to the log template corresponding to the first type.
  • the variable location extracts the variables in the N logs to generate the structured log.
  • the data processing device after the data processing device establishes an index mapping relationship between the log template corresponding to the first type and the N logs, the data processing device can be effectively accelerated to generate the structured log. Speed, improve log processing efficiency.
  • the structured log may be sent to the downstream system together with the log template corresponding to the first type.
  • the data processing device sends the structured log and the log template corresponding to the structure log to the downstream system, so that the downstream system can correctly analyze the structured log.
  • the structured log generated by the data processing device includes, but is not limited to, any one or more of a time, a host name, a template name, a severity, and a process ID.
  • the more information the structured log contains the more accurate the result is when the downstream system analyzes the structured log.
  • the embodiment of the present application provides a data processing device, which has the function of implementing the data processing device in the foregoing method.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the data processing device includes:
  • the processing module is configured to determine that the N logs in the log set belong to the first type, and the N is a positive integer.
  • the log template corresponding to the first type is determined according to the N logs, and the log template corresponding to the first type is used.
  • a variable location indicating the N logs; a structured log is generated by extracting variables from one or more of the N logs according to the variable location.
  • the data processing device includes:
  • Transceiver processor and bus
  • the transceiver is coupled to the processor via the bus;
  • the transceiver performs the following steps:
  • the processor performs the following steps:
  • variable location generates a structured log from one or more log extraction variables in the N logs.
  • an embodiment of the present application provides a computer storage medium, where the program storage code is stored in the computer storage medium, and the program code is used to indicate that the method of the foregoing first aspect is performed.
  • the data processing device has the following advantages: the data processing device determines, according to the multiple logs of the same type, the log template of the log type corresponding to the multiple logs, that is, the parsing rule; and then extracts according to the log template.
  • the multiple log variables generate a structured log. That is, it is no longer necessary to manually set the parsing rules, which eliminates the manual maintenance and update of the parsing rules by the running process.
  • 1 is a system framework diagram of log structure in the embodiment of the present application.
  • FIG. 2 is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a data processing device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another embodiment of a data processing device according to an embodiment of the present application.
  • the embodiment of the present application provides a data processing method and a data processing device, which are used to determine a log template, that is, an analysis rule, of a log type corresponding to the multiple logs according to multiple logs of the same type. Then, according to the log template, the variables of the plurality of logs are extracted to generate a structured log. That is, it is no longer necessary to manually set the parsing rules, which eliminates the manual maintenance and update of the parsing rules by the running process.
  • Log data is one of the important data in system operation and maintenance.
  • the analysis of log data is essential in website user behavior analysis, system operation and maintenance statistics, and so on. It is very difficult to analyze a log type variable directly from a large amount of text logs. Please refer to FIG. 1 .
  • the structured log is output in a report format, and it is relatively easy to statistically analyze each log variable. Therefore, there is often a need for log structuring in the analysis and processing of logs.
  • a DDL file is usually configured in an upstream system, and a parsing rule and a field definition of the structured information are defined in the DDL file.
  • the upstream system then provides log and log DDL files to the downstream system so that the downstream system can automatically extract logs based on the log DDL files.
  • Structured data which can be subsequently loaded into the target database for subsequent analysis.
  • the DDL file is pre-configured and fixed.
  • the logs corresponding to different products or different versions are different, that is, the DDL files need to be modified according to the changes of the product or the version, which leads to difficulty in maintaining the process of extracting log structured information.
  • the data processing device determines that the N logs in the log set belong to the type as the first type, where the N is a positive integer;
  • the data processing device determines, according to the N logs, a log template corresponding to the first type, where the log template corresponding to the first type is used to indicate a variable position of the N logs, that is, a parsing rule of the N logs; and finally the data
  • the processing device generates a structured log file by extracting one or more log variables of the N logs according to the variable location.
  • FIG. 2 is an embodiment of the data processing method in the embodiment of the present application, including:
  • the data processing device acquires a log set.
  • the data processing device obtains a log collection.
  • the data processing device may obtain the first log file in a plurality of manners, including but not limited to the interface import, the interface transmission, and the like, and the specific manner is not limited herein.
  • the log collection includes but is not limited to the system log (English name: System Log, Syslog for short).
  • the log obtained by the data processing device is usually a large number.
  • the data processing device usually processes the log in batch process during the log structure.
  • the data processing device classifies the obtained log into a log set, and then logs the log, when the length of the log that the data processing device obtains reaches the preset duration or the number of logs acquired by the data processing device meets the preset threshold.
  • Each log in the set is classified according to the type and determines a template of the log type corresponding to each log, that is, an analysis rule.
  • the preset duration and the preset threshold are determined in advance, and the specific values are not limited herein.
  • the data processing device determines that the N logs in the log set belong to the first type.
  • the data processing device parses each log in the log set, and attributes the N logs of the same type to one type, that is, the first type.
  • the data processing device can determine the types of logs in the log set in various ways.
  • the data processing device may determine the type of the first log file by using a classification algorithm or a clustering algorithm, or determine the type of the first log file by obtaining the source code of the first log file.
  • the classification algorithm that the data processing device can adopt includes, but is not limited to, an application decision tree classification algorithm, a Bayesian classification algorithm, a BP neural network algorithm, and a K-Means algorithm;
  • the clustering algorithm includes but is not limited to the SOM clustering algorithm, FCM Clustering algorithms, etc.
  • the data processing device determines, according to the N logs, a log template corresponding to the first type, where the log template corresponding to the first type is used to indicate a variable location of the N logs.
  • the data processing device determines, according to the N logs, a log template corresponding to the first type, and the log template corresponding to the first type is used to indicate a variable location of the N logs.
  • the data processing device acquires the Mth log in the N logs, where the M is a positive integer
  • the data processing device may use the Mth log as the log template; or the data processing device updates the first log determined by using the other logs of the same N log type according to the Mth log.
  • the target template is used as the log template. If the M is greater than or equal to 2, the data processing device may update the second target template determined by the M-1th log according to the Mth log as the log template.
  • the specific processing of the first target template determined by the data processing device according to the Mth log to update the log with the same log type as the log template is as follows: the data processing device uses the Mth log and the first Performing an alignment on a target template; if the data processing device determines that the first target template has a variable relative to the Mth log, the data processing device uses the wildcard representation of the variable of the first target template relative to the Mth log as The log template, the wildcard is a preset character or a string; if the data processing device determines that the first target template does not have a variable relative to the Mth log, the data processing device uses the first target template as the log template.
  • the data processing device may update the second target template determined by the M-1th log as the log template according to the Mth log: the data processing device performs the Mth log with the second target template. If the data processing device determines that the second target template has a variable relative to the Mth log, the data processing device uses the wildcard representation of the variable of the second target template with respect to the Mth log as the log template.
  • the wildcard is a preset character or a string; if the data processing device determines that the second target template does not have a variable with respect to the Mth log, the data processing device uses the second target template as the log template.
  • the wildcard may be a character or a string, such as an asterisk "*", an exclamation point "!, a hash number "#”, a multi-aster number "***”, etc., in the embodiment of the present application, an asterisk " *" for example.
  • the log set includes four logs, as shown in Table 1, wherein the second row and the log shown in the third row are the same type of logs according to an algorithm, and the fourth row and the fifth row are The log shown in the third row and the log shown in the third row are taken as an example in the embodiment of the present application.
  • the specific manner of the data processing device determining the log template corresponding to the type of the two logs is as follows: the data processing device obtains the first log from the two logs, that is, the log shown in the second row of the table 1. When the data is processed The device can use the first log as the log template.
  • the log template at this time is shown in Table 2:
  • the data processing device When the data processing device obtains the second log from the two logs, that is, the log shown in the third row of the table 1, the data processing device needs to update the log determined by the first log according to the second log. Template, which is the log template shown in Table 2. At this time, the data processing device compares the second log with the log template shown in Table 2, and the log template shown in Table 2 is represented by a wildcard* with respect to a different place of the second log, thereby generating The log template shown in Table 3, in which the first type of log template corresponding to the two logs is the log template shown in Table 3.
  • the data processing device may also generate the log template in the following manner, as follows: the data processing device acquires the log processing in the previous batch. According to the first target template determined by the same log as the first type in the embodiment of the present application, if the first target template is as shown in Table 3, the data processing device may use the first log and the first target template. Performing an alignment to determine whether the first target template has a variable relative to the first log. If a variable exists, the data processing device generates a word in the first target template that is a variable relative to the first date as a wildcard* The log template is as shown in Table 4. If no variable exists, the data processing device uses the first target template, that is, Table 3, as the log template.
  • the data processing device compares the second log with the log template shown in the table 4, and if there is a variable, the data processing device
  • the word in the first target template that is a variable relative to the first log is represented by a wildcard *, as shown in Table 4; if there is no variable, the data processing device uses the first target template, that is, Table 3 The log template.
  • the data processing device updates the table 3 according to the first log.
  • the first target template is shown, and the log template of the first type obtained by the data processing device is as shown in Table 5.
  • the data processing device may also establish a mapping relationship between the N logs and the log template corresponding to the first type.
  • the data processing device structs the one or more logs in the N logs according to the log template corresponding to the first type to generate the structured log, the data processing device can quickly query according to the mapping relationship.
  • the log in the N logs may also establish a mapping relationship between the N logs and the log template corresponding to the first type.
  • the data processing device determines, according to the N logs, the first type determined by the N logs.
  • the data processing device can directly traverse the log set according to the type labeling process, and all logs are simultaneously generated into a log template.
  • the log collection includes five logs, wherein log 1, log 3 and log 4 are the first type of log, and log 2 and log 5 are the second type of log, when the data processing device traverses the log set, There may be a case where the first log obtained by the data processing device is log 1, and the data processing device uses the log 1 as the first type of log template; then the second piece obtained by the data processing device The log is log 2, and the data processing device knows that the second log is different from the first log according to the type label, and the data processing device uses the log 2 as the first type of the second type.
  • the data processing device uses the log 2 as a second type of log template; again, the third log obtained by the data processing device is the log 3, and the data processing device knows the number according to the type label.
  • the three logs are of the same type as the first log, and the data processing device updates the log template determined by the first log according to the third log.
  • the template is used as the first type of log template; the fourth log obtained by the data processing device is the log 4, and the data processing device knows the fourth log and the third log according to the type label. If the first log is of the same type, the data processing device updates the log template determined by the third log according to the fourth log to obtain the final log template as the first type of log template.
  • the fifth log obtained by the processing device is the log 5, and the data processing device learns that the fifth log is the same type as the second log according to the type label, and the data processing device is based on the fifth
  • the log updates the log template determined by the first log to obtain the final log template as the second type of log template.
  • the data processing device may traverse the logs in each type to obtain a log template corresponding to each type of log.
  • the log collection is as shown in Table 1, when the data processing device traverses different log types respectively, there may be a case where the data processing device first traverses the second row and the third row in the table 1.
  • the specific situation is as follows: the data processing device acquires the first log of the first type, that is, the log shown in the second row in the table 1, and the data processing device uses the first log as the first type.
  • the data processing device acquires the second log of the first type, that is, the log shown in the third row in the table 1, and the data processing device updates the first log according to the second log.
  • the determined log template generates the final log template of the first type; and the data processing device acquires the first log in the second type, that is, the log shown in the fourth row of the table 1, the data processing device will The first log in the second type is used as the log template of the second type.
  • the data processing device obtains the second log of the second type, that is, the log shown in the fifth row of the table 1.
  • the data processing device generates the final log template of the second type according to the second template of the second type of log to update the log template determined by the first log of the second type.
  • the case exemplified in the embodiment of the present application is only one of the possible situations, and the specific case is not limited herein.
  • the data processing device may further separate the N logs by using a statement separator to generate a word vector.
  • the statement separator here is a preset character or a preset string, such as an asterisk "*", a space "", a comma ",”, etc., and the specific selection is not limited herein.
  • the data processing device generates a structured log by extracting one or more log variables of the N logs according to the variable location.
  • the data processing device extracts the variables of the N logs according to the variable position to generate a structured log.
  • the data processing device may structure the N logs in the following manner:
  • the data processing device directly compares the N logs with the log template, and then the data processing device identifies the different graves of the N logs with respect to the log template as variables, and the The variables are extracted to generate the structured log.
  • the data processing device compares the log template shown in Table 3 with the two logs in the table 1 to determine different locations of the two logs and the log template. The data processing device then extracts the different places to generate a structured log as shown in Table 6.
  • the data processing device parses the log template to obtain information about a variable position in the log template; and then the data processing device extracts the variable corresponding to the variable position from the N logs one by one to generate the structure.
  • Log For example, the template shown in Table 3 of the embodiment of the present application, if the data processing device uses the punctuation mark and the word as a unit, the data processing device can know that the variable position of the log template is the eighth word position and the eleventh When the word position is a variable, the data processing device can directly extract the variables from the 8th word position of the 2 logs and the 11 word positions when traversing the two logs shown in Table 1 as shown in Table 5. Structured log shown.
  • Variable 1 Variable 2 26585-tdm GE1/1/0 26586-tdm GE1/2/0
  • the structured log may include information such as time, host name, and module. If the structured log shown in Table 6 is used as an example, the structured log is as shown in Table 7:
  • the data processing device may send the structured log to the downstream system together with the log template, so that the downstream system can parse the structured log according to the log template.
  • the data processing device determines according to multiple logs of the same type.
  • a log template of the log type corresponding to the multiple logs that is, a parsing rule; and then extracting the variable of the plurality of logs according to the log template to generate a structured log. That is, the data processing device can acquire and update the parsing rules corresponding to the log in the running process, and no need to manually set the parsing rules, thereby eliminating the manual maintenance and update of the parsing rules in the running process.
  • the data processing device includes:
  • An obtaining module 301 configured to acquire a log collection
  • the processing module 302 is configured to determine that the N logs in the log set belong to the first type, and the N is a positive integer.
  • the log template corresponding to the first type is determined according to the N logs, and the log template corresponding to the first type is used.
  • the variable position indicating the N logs; extracting variables from one or more logs in the N logs according to the variable position to generate a structured log.
  • the processing module 302 is configured to obtain the Mth log in the N logs, where the M is a positive integer;
  • the Mth log is used as the log template corresponding to the first type
  • the first target template is updated as the log template corresponding to the first type, and the first target template is a log template determined by other logs of the same N log type.
  • the processing module 302 is configured to: update the second target template according to the Mth log as a log template corresponding to the first type, where the second target template is The log template determined by the data processing device according to the log of the M-1th.
  • the processing module 302 is configured to compare the Mth log with the second target template.
  • variable of the second target template relative to the Mth log is represented by a wildcard as a log template corresponding to the first type, and the wildcard is preset. Character or string;
  • the second target template is used as a log template corresponding to the first type.
  • the processing module 302 is configured to: identify, by using a comparison, one or more logs of the N logs that are different from the log template corresponding to the first type as a variable; extract the variable Generate this structured log.
  • the processing module 302 is configured to: obtain the variable location recorded by the log template corresponding to the first type, and extract a variable corresponding to the variable location from one or more logs in the N logs.
  • the structured log is configured to: obtain the variable location recorded by the log template corresponding to the first type, and extract a variable corresponding to the variable location from one or more logs in the N logs. The structured log.
  • the processing module 302 is configured to determine, according to the classification algorithm or the clustering algorithm, that the N logs in the log set belong to the first type.
  • processing module 302 is further configured to: establish a mapping relationship between the log template corresponding to the first type and the N logs;
  • the processing module 302 is configured to query one or more logs in the N logs corresponding to the log template corresponding to the first type according to the mapping relationship;
  • the structured log is generated from the N log extraction variables according to the variable position in the log template corresponding to the first type.
  • the data processing device further includes a sending module 303, configured to send the structured log and the log template corresponding to the first type to the downstream system.
  • a sending module 303 configured to send the structured log and the log template corresponding to the first type to the downstream system.
  • the structured log further includes any one or more of time, host name, module name, severity, and process ID.
  • the data processing device of FIG. 3 can also be used to perform any of the steps performed by the data processing device of FIG. 2 to implement any of the functions that the data processing device of FIG. 2 can implement.
  • the processing module 302 determines, according to the multiple logs of the same type, the log template of the log type corresponding to the multiple logs, that is, the parsing rule; and then the processing module 302 extracts the variables of the multiple logs according to the log template. Generate a structured log. That is, the data processing device can acquire and update the parsing rules corresponding to the log in the running process, and no need to manually set the parsing rules, thereby eliminating the manual maintenance and update of the parsing rules in the running process.
  • the data processing device includes:
  • Transceiver 401 Transceiver 401, processor 402, bus 403; the transceiver 401 is coupled to the processor 402 via the bus 403.
  • the bus 403 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • the processor 402 can be a central processing unit (CPU), a network processor (NP) or a combination of a CPU and an NP.
  • CPU central processing unit
  • NP network processor
  • Processor 402 can also further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination.
  • the data processing device may further include a memory 404; the memory 404 may also be used to store a log set; the memory 404 may include a volatile memory, such as a random access memory (random-access) Memory, referred to as RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (referred to as solid-state drive, referred to as SSD); memory 404 may also include a combination of the above types of memory.
  • RAM random access memory
  • SSD solid-state drive
  • the memory 404 can also be used to store program instructions, the processor 402 calls the program instructions stored in the memory 404, can perform one or more steps in the embodiment shown in FIG. 2, or an alternative embodiment thereof The function of implementing the behavior of the data processing device in the above method.
  • the processor executes steps 202 through 204 shown in FIG.
  • the processor 402 determines, according to the multiple logs of the same type, a log template of the log type corresponding to the multiple logs, that is, an analysis rule; and then the processor 402 extracts the variables of the multiple logs according to the log template. Generate a structured log. That is, the data processing device can acquire and update the parsing rules corresponding to the log in the running process, and no need to manually set the parsing rules, thereby eliminating the manual maintenance and update of the parsing rules in the running process.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium includes: a U disk, a mobile hard disk, and a read only memory (ROM,

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Debugging And Monitoring (AREA)
  • Document Processing Apparatus (AREA)

Abstract

本申请实施例公开了一种数据处理方法以及数据处理设备,用于根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志。即不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。本申请实施例方法包括:数据处理设备获取日志集合;所述数据处理设备确定所述日志集合中N条日志属于第一类型,所述N为正整数;所述数据处理设备根据所述N条日志确定与所述第一类型对应的日志模板,所述第一类型对应的日志模板用于指示所述N条日志的变量位置;所述数据处理设备根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志。

Description

一种数据处理方法以及数据处理设备 技术领域
本申请涉及计算机领域,尤其涉及一种数据处理方法以及数据处理设备。
背景技术
日志数据是系统运维中的重要数据之一。日志数据的分析在网站用户行为分析、系统运维统计等方面都是必不可少的。而直接从海量的文本日志中,分析一种日志类型的变量是非常困难的。比如在海量文本中分析其中一种协议日志中记录的状态变化;一种传输问题引起端口震荡的日志中记录的端口有哪些等。通过日志的结构化处理后,可以按报表格式输出日志(例如,生成Excel格式),就比较容易统计分析各个日志变量。因此在日志的分析和处理中常常有日志结构化的需求。
目前日志结构化信息提取方法中,通常是在上游系统配置数据库模式定义语言(英文全称:Data Description Language,简称:DDL)文件,DDL文件中定义好了结构化信息的解析规则和字段定义。然后该上游系统向下游系统提供日志和日志DDL文件,这样下游系统可根据日志DDL文件自动提取日志的结构化数据,后续可加载到目标数据库供后续分析。
这种方法中,DDL文件为事先配置好且固定不变。而在实际应用中,不同的产品或不同的版本对应的日志是不同的,即导致DDL文件需要根据产品和版本的改变进行修改,进而导致日志结构化信息提取的过程中维护困难。
申请内容
本申请实施例提供了一种数据处理方法以及数据处理设备,用于根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志。即不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
第一方面,本申请实施例提供一种数据处理方法,包括:
该数据处理设备在获取到日志集合之后,确定该日志集合中N条日志属于类型作为第一类型,其中该N为正整数;然后该数据处理设备根据该N条日志确定该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置,即该N条日志的解析规则;最后该数据处理设备根据该变量位置提取该N条日志中的一条或多条日志的变量生成结构化日志文件。
本申请实施例中,该第一类型对应的日志模板除了指示该变量位置之外,还可以指示变量数量,也可以指示该第一类型对应的日志模板对应的其他信息,包括但不限于模块名称、严重性、进程ID等信息。
本申请实施例中,该数据处理设备根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志文件。即该数据处理设备在运行的过程可以即时的获取和更新日志对应的解析规则,不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
可选的,该数据处理设备在根据该N条日志确定该第一类型对应的日志模板时,可以采用如下方式:
该数据处理设备获取该N条日志中的第M条日志,其中该M为正整数;
若该M等于1,则该数据处理设备可以将该第M条日志作为该第一类型对应的日志模板;或者,该数据处理设备根据该第M条日志更新与该N条日志类型相同的其他日志确定的第一目标模板作为该第一类型对应的日志模板。
若该M大于或等于2,则该数据处理设备可以根据该第M条日志更新该第M-1条日志确定的第二目标模板作为该第一类型对应的日志模板。
其中,该数据处理设备根据该第M条日志更新与该N条日志类型相同的其他日志确定的第一目标模板作为该第一类型对应的日志模板的具体做法如下:
该数据处理设备将第M条日志与该第一目标模板进行比对;
若该数据处理设备确定该第一目标模板相对该第M条日志存在变量,则该数据处理设备将该第一目标模板相对该第M条日志的变量用通配符表示作为该第一类型对应的日志模板,该通配符为预先设置的字符或字符串;
若该数据处理设备确定该第一目标模板相对该第M条日志不存在变量,则该数据处理设备将该第一目标模板作为该第一类型对应的日志模板。
该数据处理设备可以根据该第M条日志更新该第M-1条日志确定的第二目标模板作为该第一类型对应的日志模板的具体做法如下:
该数据处理设备将第M条日志与该第二目标模板进行比对;
若该数据处理设备确定该第二目标模板相对该第M条日志存在变量,则该数据处理设备将该第二目标模板相对该第M条日志的变量用通配符表示作为该第一类型对应的日志模板,该通配符为预先设置的字符或字符串,该变量为该第二目标模板相对该第M条日志不同的地方;
若该数据处理设备确定该第二目标模板相对该第M条日志不存在变量,则该数据处理设备将该第二目标模板作为该第一类型对应的日志模板。
本申请实施例提供的技术方案中,该数据处理设备将该N条日志通过循环比对更新的方式确定最后的日志模板,这样可以保证同一批次的日志采用相同的日志模板,且在日志出现新的类型时,同样出现新日志模板,可以即时获取和更新日志模板,提高日志数据分析的准确度。
可选的,该数据处理设备在根据该第一类型对应的日志模板中的变量位置提取该N条日志中的一条或多条日志中的变量生成结构化日志时可以采用如下方式:
一种可能实现方式中,该数据处理设备将该N条日志中的一条或多条日志逐一与该第一类型对应的日志模板进行比对,进而确定该N条日志中的一条或多条日志相对该第一类型对应的日志模板不同的地方并将该不同的地方识别为变量;然后该数据处理设备提取该变量生成该结构化日志。
另一种可能实现方式中,该数据处理设备从该第一类型对应的日志模板中获取该变量位置;然后该数据处理设备根据该变量位置逐一从该N条日志中的一条或多条日志中提取该变量位置对应的变量生成该结构化日志。
本申请实施例提供的技术方案中,该数据处理设备可以根据该第一类型对应的日志模板采用多种方式提取变量生成结构化日志,即可以灵活快速的处理日志。
可选的,该数据处理设备可以根据分类算法或聚类算法确定该日志集合中该N条日志属于该第一类型。在实际应用中,该数据处理设备可以采用的分类算法包括但不限于应用决策树分类算法、贝叶斯分类算法、BP神经网络算法和K-Means算法等;聚类算法包括但不限于SOM聚类算法、FCM聚类算法等。其中也有一些其他的算法,比如通过测量日志之间的距离或者相关度,对日志进行分类等。
本申请实施例提供的技术方案中,该数据处理设备可以灵活快速的进行日志的分类,有效的加快日志的处理速度。
可选的,该数据处理设备为该第一类型对应的日志模板与该N条日志通过该索引建立映射关系,即一个模板可以对应多条日志,在此基础上该数据处理设备在结构化该N条日志时,该数据处理设备可以通过该映射关系和该索引查询该N条日志对应的该第一类型对应的日志模板,然后该数据处理设备再根据该第一类型对应的日志模板中的该变量位置提取该N条日志中的变量生成该结构化日志。
本申请实施例提供的技术方案中,该数据处理设备建立了该第一类型对应的日志模板与该N条日志之间的索引映射关系之后,可以有效的加快该数据处理设备生成该结构化日志的速度,提高日志处理效率。
可选的,该数据处理设备在生成结构化日志之后,还可以将该结构化日志与该第一类型对应的日志模板一起发送给下游系统。
本申请实施例提供的技术方案中,该数据处理设备将结构化日志和与该结构日志相对应的日志模板一起发送给下游系统可以使得该下游系统可以正确的分析该结构化日志。
可选的,该数据处理设备生成的结构化日志中还包括但不限于时间、主机名、模板名、严重性和进程标识ID中任意一个或多个。
本申请实施例提供的技术方案中,该结构化日志包含的信息越多,该下游系统进行分析该结构化日志时的结果越正确。
第二方面,本申请实施例提供一种数据处理设备,该数据处理设备具有实现上述方法中数据处理设备的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
一种可能实现方式中,该数据处理设备包括:
获取模块,用于获取日志集合;
处理模块,用于确定该日志集合中N条日志属于第一类型,该N为正整数;根据该N条日志确定与该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置;根据该变量位置从该N条日志中的一条或多条日志提取变量生成结构化日志。
另一种可能实现方式中,该数据处理设备包括:
收发器,处理器和总线;
该收发器与该处理器通过该总线相连;
该收发器,执行如下步骤:
获取日志集合;
该处理器,执行如下步骤:
确定该日志集合中N条日志属于第一类型,该N大于或等于1;
根据该N条日志确定与该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置;
该变量位置从该N条日志中的一条或多条日志提取变量生成结构化日志。
第三方面,本申请实施例提供一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码用于指示执行上述第一方面的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:该数据处理设备根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志。即不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
附图说明
图1为本申请实施例中日志结构化的系统框架图;
图2为本申请实施例中数据处理方法的一个实施例示意图;
图3为本申请实施例中数据处理设备的一个实施例示意图;
图4为本申请实施例中数据处理设备的另一个实施例示意图。
具体实施方式
本申请实施例提供了一种本申请实施例提供了一种数据处理方法以及数据处理设备,用于根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志。即不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
日志数据是系统运维中的重要数据之一。日志数据的分析在网站用户行为分析、系统运维统计等方面都是必不可少的。而直接从海量的文本日志中,分析一种日志类型的变量是非常困难的。请参阅图1所示,目前通常是通过日志的结构化处理后,将该结构化日志按报表格式输出,就比较容易统计分析各个日志变量。因此在日志的分析和处理中常常有日志结构化的需求。目前日志结构化信息提取方法中,通常是在上游系统配置DDL文件,DDL文件中定义好了结构化信息的解析规则和字段定义。然后该上游系统向下游系统提供日志和日志DDL文件,这样下游系统可根据日志DDL文件自动提取日志的 结构化数据,后续可加载到目标数据库供后续分析。这种方法中,DDL文件为事先配置好且固定不变。而在实际应用中,不同的产品或不同的版本对应的日志是不同的,即导致DDL文件需要根据产品或版本的改变进行修改,进而导致日志结构化信息提取的过程中维护困难。
为解决这一问题,本申请实施例中提供了如下方案:该数据处理设备在获取到日志集合之后,确定该日志集合中N条日志属于类型作为第一类型,其中该N为正整数;然后该数据处理设备根据该N条日志确定该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置,即该N条日志的解析规则;最后该数据处理设备根据该变量位置提取该N条日志中的一条或多条日志的变量生成结构化日志文件。
具体请参阅图2所示,本申请实施例中数据处理方法中的一个实施例,包括:
201、数据处理设备获取日志集合。
该数据处理设备获取日志集合。
在实际应用中,该数据处理设备可以采用多种方式获取该第一日志文件,包含但不限于通过界面导入、接口传输等,具体的方式此处不做限定。其中该日志集合包括但不限定于系统日志(英文全称:System Log,简称:Syslog)。同时该数据处理设备获取到的日志通常会是大量的,这时,该数据处理设备在进行日志结构化的过程中通常是将日志进行批量处理。即该数据处理设备获取日志的时长满足预设时长或该数据处理设备获取的日志的数量满足预设阈值时,该数据处理设备才将获取到的日志归类为一个日志集合,然后将该日志集合中的各日志按照类型分类并确定该各日志对应的日志类型的模板,即解析规则。其中,该预设时长和该预设阈值为事先确定,具体数值此处不做限定。
202、数据处理设备确定该日志集合中N条日志属于第一类型。
该数据处理设备将该日志集合中的各日志进行解析,并将相同类型的N条日志归属于一类,即该第一类型。
在实际应用中,该数据处理设备可以通过多种方式来确定该日志集合中各日志的类型。比如,该数据处理设备可以通过分类算法或聚类算法确定该第一日志文件的类型也可以通过获取该第一日志文件的源代码确定该第一日志文件的类型。其中该数据处理设备可以采用的分类算法包括但不限于应用决策树分类算法、贝叶斯分类算法、BP神经网络算法和K-Means算法等;聚类算法包括但不限于SOM聚类算法、FCM聚类算法等。其中也有一些其他的算法,比如通过测量日志之间的距离或者相关度,对日志进行分类等。
203、数据处理设备根据该N条日志确定与该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置。
该数据处理设备根据该N条日志确定与该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置。
在实际应用中,该数据处理设备根据该N条日志确定与该第一类型对应的日志模板时,可以采用如下方式:
该数据处理设备获取该N条日志中的第M条日志,其中该M为正整数;
若该M等于1,则该数据处理设备可以将该第M条日志作为该日志模板;或者,该数据处理设备根据该第M条日志更新与该N条日志类型相同的其他日志确定的第一目标模板作为该日志模板。若该M大于或等于2,则该数据处理设备可以根据该第M条日志更新该第M-1条日志确定的第二目标模板作为该日志模板。其中,该数据处理设备根据该第M条日志更新与该N条日志类型相同的其他日志确定的第一目标模板作为该日志模板的具体做法如下:该数据处理设备将第M条日志与该第一目标模板进行比对;若该数据处理设备确定该第一目标模板相对该第M条日志存在变量,则该数据处理设备将该第一目标模板相对该第M条日志的变量用通配符表示作为该日志模板,该通配符为预先设置的字符或字符串;若该数据处理设备确定该第一目标模板相对该第M条日志不存在变量,则该数据处理设备将该第一目标模板作为该日志模板。该数据处理设备可以根据该第M条日志更新该第M-1条日志确定的第二目标模板作为该日志模板的具体做法如下:该数据处理设备将第M条日志与该第二目标模板进行比对;若该数据处理设备确定该第二目标模板相对该第M条日志存在变量,则该数据处理设备将该第二目标模板相对该第M条日志的变量用通配符表示作为该日志模板,该通配符为预先设置的字符或字符串;若该数据处理设备确定该第二目标模板相对该第M条日志不存在变量,则该数据处理设备将该第二目标模板作为该日志模板。其中该通配符可以为字符,也可以为字符串,比如星号“*”、感叹号“!”、井号“#”、多星号“***”等,本申请实施例中以星号“*”为例。
比如,该日志集合包括四条日志,具体情况如表1所示,其中根据算法得知该第二行与该第三行所示的日志为同一类型的日志,该第四行与该第五行所示的日志为同一类型的日志,本申请实施例中将该第二行与该第三行所示的日志为例。
Figure PCTCN2017090054-appb-000001
表1
则该数据处理设备确定该2条日志的类型对应的日志模板的具体的方式如下:该数据处理设备从该2条日志中获取第一条日志,即该表1中第二行所示的日志时,该数据处理 设备可以将该第一日志作为该日志模板,即此时的日志模板如表2所示:
模板
The BFD session went Down.SessName is 26585-tdm,Interface is GE1/1/0
表2
该数据处理设备从该2条日志中获取第二条日志,即该表1中第三行所示的日志时,该数据处理设备需要根据该第二条日志更新该第一条日志确定的日志模板,即表2所示的日志模板。这时该数据处理设备将该第二条日志与表2所示的日志模板进行比对,将该表2所示的日志模板相对该第二条日志不同的地方用通配符*进行表示,进而生成表3所示的日志模板,这时该2条日志对应的第一类型的日志模板为表3所示的日志模板。
模板
The BFD session went Down.SessName is*,Interface is*
表3
而在实际应用中,该数据处理设备在获取到该第一条日志时,该数据处理设备还可以采用如下方式生成该日志模板,具体如下:该数据处理设备获取在上一批次的日志处理中根据与本申请实施例中第一类型相同的日志确定的第一目标模板,该第一目标模板如表3所示,则该数据处理设备可以将该第一条日志与该第一目标模板进行比对确定该第一目标模板相对该第一条日志是否存在变量,若存在变量,则该数据处理设备将该第一目标模板中相对该第一条日为变量的单词用通配符*表示生成该日志模板,如表4所示;若不存在变量,则该数据处理设备将该第一目标模板即表3作为该日志模板。然后该数据处理设备在获取到该第二条日志时,该数据处理设备则将该第二条日志与该表4所示的日志模板进行比对,若存在变量,则该数据处理设备将该第一目标模板中相对该第一条日志为变量的单词用通配符*表示生成该日志模板,如表4所示;若不存在变量,则该数据处理设备将该第一目标模板即表3作为该日志模板。在实际应用中,若该第一条日志为“The BFD session went Up.SessName is 26585-tdm,Interface is GE1/1/0”,则该数据处理设备根据该第一条日志更新该表3所示的第一目标模板,则该数据处理设备得到的该第一类型的日志模板如表5所示。
模板
The BFD session went Down.SessName is*,Interface is*
表4
模板
The BFD session went*.SessName is*,Interface is*
表5
在实际应用中,该数据处理设备还可以为该N条日志与该第一类型对应的日志模板建立映射关系。这样在该数据处理设备根据该第一类型对应的日志模板将该N条日志中的一条或多条日志进行结构化生成该结构化日志时,该数据处理设备可以根据该映射关系迅速的查询到该N条日志中的日志。
本申请实施例中,该数据处理设备在根据该N条日志确定该N条日志确定的第一类型 对应的该日志模板时,一种可能实现方式中,该数据处理设备可以直接遍历该日志集合根据类型标注一一将所有的日志同时进行生成日志模板的过程。比如,该日志集合中包含五条日志,其中日志1,日志3与日志4为第一类型的日志,日志2与日志5为第二类型的日志,则该数据处理设备在遍历该日志集合时,可能会有如下情况:该数据处理设备获取到的第一条日志为日志1,这时该数据处理设备将该日志1作为第一类型的日志模板;然后该数据处理设备获取到的第二条日志为日志2,这时该数据处理设备根据类型标注得知该第二条日志与该第一条日志为不同类型,则该数据处理设备则将该日志2作为该第二类型的第一条日志,这时该数据处理设备将该日志2作为第二类型的日志模板;再次,该数据处理设备获取到的第三条日志为日志3,这时该数据处理设备根据类型标注得知该第三条日志与该第一条日志为同一类型,则该数据处理设备根据该第三条日志将该第一条日志确定的日志模板进行更新从而得到的日志模板作为该第一类型的日志模板;该数据处理设备获取到的第四条日志为日志4,这时该数据处理设备根据类型标注得知该第四条日志与该第三条日志和该第一条日志为同一类型,则该数据处理设备根据该第四条日志将该第三条日志确定的日志模板进行更新从而得到最终的日志模板作为该第一类型的日志模板;最后,该数据处理设备获取到的第五条日志为该日志5,这时该数据处理设备根据类型标注得知该第五条日志与该第二条日志为同一类型,则该数据处理设备根据该第五条日志将该第一条日志确定的日志模板进行更新从而得到最终的日志模板作为该第二类型的日志模板。当然,本申请实施例中举例的情况仅是其中一种可能情况,具体的情况此处不做限定。另一种可能实现方式中,该数据处理设备可以将每个类型中的日志分别进行遍历先后得到各类型的日志对应的日志模板。比如,该日志集合如表1所示,则该数据处理设备在分别遍历不同的日志类型时,可能会有如下情况:该数据处理设备先遍历该表1中第二行与第三行所示的日志,然后遍历该表1中第四行与第五行所示的日志,其中,该表1中的第二行所示的日志与该第三行所示的日志为第一类型,该表1中的第四行所示的日志与该第五行所示的日志为第二类型。具体情况如下:该数据处理设备获取该第一类型的第一条日志,即该表1中的第二行所示的日志,则该数据处理设备将该第一条日志作为该第一类型的日志模板;然后该数据处理设备获取该第一类型的第二条日志,即该表1中的第三行所示的日志,则该数据处理设备根据该第二条日志更新该第一条日志确定的日志模板生成该第一类型的最终日志模板;再次该数据处理设备获取该第二类型中的第一条日志,即该表1中第四行所示的日志,则该数据处理设备将该第二类型中的第一条日志作为该第二类型的日志模板;最后,该数据处理设备获取到该第二类型的第二条日志,即该表1中第五行所示的日志,则该数据处理设备根据该第二类型的第二条日志更新该第二类型的第一条日志确定的日志模板生成该第二类型的最终日志模板。当然,本申请实施例中举例的情况仅是其中一种可能情况,具体的情况此处不做限定。
在本申请实施例中,该数据处理设备在根据该N条日志确定该第一类型对应的日志模板时,该数据处理设备还可以将该N条日志分别用语句分隔符进行分隔生成单词向量。这里的语句分隔符为预设的字符或预设的字符串,比如星号“*”、空格“”、逗号“,”等,具体的选择此处不做限定。
204、数据处理设备根据该变量位置提取该N条日志中一条或多条日志的变量生成结构化日志。
数据处理设备根据该变量位置提取该N条日志的变量生成结构化日志。
在实际应用中,该数据处理设备可以采用如下方式对该N条日志进行结构化:
一种可能实现方式中,该数据处理设备直接将该N日志逐一与该日志模板进行比对,然后该数据处理设备逐一该N条日志相对该日志模板不同的地坟识别为变量,并将该变量提取出来生成该结构化日志。比如,本申请实施例中,该数据处理设备将该表3所示的日志模板与该表1中的该2条日志进行比对,即可以确定该2条日志与该日志模板的不同的地方,然后该数据处理设备将该不同的地方提取出来生成如表6所示的结构化日志。
另一种可能实现方式中,该数据处理设备解析该日志模板得到该日志模板中变量位置的信息;然后该数据处理设备逐一从该N条日志中将该变量位置对应的变量提取出来生成该结构化日志。比如本申请实施例表3所示的模板,若该数据处理设备将该标点符号与单词作为一个单位,则该数据处理设备可以得知该日志模板的变量位置为第8个单词位置和第11个单词位置为变量,则该数据处理设备在遍历表1所示的该2条日志时,可以直接从该2条日志的第8个单词位置与该11个单词位置提取变量生成如表5所示的结构化日志。
变量1 变量2
26585-tdm GE1/1/0
26586-tdm GE1/2/0
表6
在实际应用中,该结构化日志中还可以包括如时间、主机名、模块等信息,若以表6所示的结构化日志为例,该结构化日志如表7所示:
Figure PCTCN2017090054-appb-000002
表7
该数据处理设备在生成结构化日志之后,还可以将该结构化日志与该日志模板一起发送给下游系统,进而使得该下游系统可以根据该日志模板将该结构化日志进行解析。
本申请实施例中,本申请实施例中,该数据处理设备根据相同类型的多条日志确定 该多条日志对应的日志类型的日志模板,即解析规则;然后根据该日志模板提取该多条日志的变量生成结构化日志。即该数据处理设备在运行的过程可以即时的获取和更新日志对应的解析规则,不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。上面对本申请实施例中的数据处理方法进行了描述,下面对本申请实施例中的数据处理设备进行描述。
具体请参阅图3所示,本申请实施例中,该数据处理设备包括:
获取模块301,用于获取日志集合;
处理模块302,用于确定该日志集合中N条日志属于第一类型,该N为正整数;根据该N条日志确定与该第一类型对应的日志模板,该第一类型对应的日志模板用于指示该N条日志的变量位置;根据该变量位置从该N条日志中的一条或多条日志中提取变量生成结构化日志。
可选的,该处理模块302,具体用于获取该N条日志中的第M条日志,该M为正整数;
当该M等于1时,将该第M条日志作为该第一类型对应的日志模板;
或,
根据该第M条日志更新第一目标模板作为该第一类型对应的日志模板,该第一目标模板为与该N条日志类型相同的其他日志确定的日志模板。
可选的,当该M大于或等于2时,该处理模块302,具体用于,根据该第M条日志更新第二目标模板作为该第一类型对应的日志模板,该第二目标模板为该数据处理设备根据第M-1条日志确定的日志模板。
可选的,该处理模块302,具体用于,将第M条日志与该第二目标模板进行比对;
若确定该第二目标模板相对该第M条日志存在变量,则将该第二目标模板相对该第M条日志的变量用通配符表示作为该第一类型对应的日志模板,该通配符为预先设置的字符或字符串;
若确定该第二目标模板相对该第M条日志不存在变量,则将该第二目标模板作为该第一类型对应的日志模板。
可选的,该处理模块302,具体用于,将通过比对获取到的该N条日志中的一条或多条日志相对该第一类型对应的日志模板不同的地方识别为变量;提取该变量生成该结构化日志。
可选的,该处理模块302,具体用于,获取该第一类型对应的日志模板所记录的该变量位置;从该N条日志中的一条或多条日志中提取该变量位置对应的变量生成该结构化日志。
可选的,该处理模块302,具体用于,根据分类算法或聚类算法确定该日志集合中该N条日志属于该第一类型。
可选的,该处理模块302,还用于,为该第一类型对应的日志模板与该N条日志建立映射关系;
该处理模块302,具体用于,根据该映射关系查询该第一类型对应的日志模板对应的该N条日志中的一条或多条日志;
根据该第一类型对应的日志模板中的该变量位置从该N条日志提取变量生成该结构化日志。
可选的,该数据处理设备还包括发送模块303,用于将该结构化日志和该第一类型对应的日志模板发送给下游系统。
可选的,该结构化日志还包括时间、主机名、模块名、严重性和进程ID中的任意一个或多个。
进一步的,图3中的数据处理设备还可以用于执行图2中的数据处理设备执行的任何步骤,实现图2中的数据处理设备可以实现的任何功能。
本申请实施例中,该处理模块302根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后该处理模块302根据该日志模板提取该多条日志的变量生成结构化日志。即该数据处理设备在运行的过程可以即时的获取和更新日志对应的解析规则,不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
具体请参阅图4所示,本申请实施例中数据处理设备的另一个实施例中,该数据处理设备包括:
收发器401,处理器402,总线403;该收发器401与该处理器402通过该总线403相连。
总线403可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器402可以是中央处理器(central processing unit,简称CPU),网络处理器(network processor,简称NP)或者CPU和NP的组合。
处理器402还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,简称ASIC),可编程逻辑器件(programmable logic device,简称PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,简称CPLD),现场可编程逻辑门阵列(field-programmable gate array,简称FPGA),通用阵列逻辑(generic array logic,简称GAL)或其任意组合。
参见图4所示,该数据处理设备还可以包括存储器404;该存储器404还可以用于存储日志集合;该存储器404可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,简称RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,简称HDD)或固态硬盘(solid-state drive,简称SSD);存储器404还可以包括上述种类的存储器的组合。
可选地,存储器404还可以用于存储程序指令,处理器402调用该存储器404中存储的程序指令,可以执行图2所示实施例中的一个或多个步骤,或其中可选的实施方式,实现上述方法中数据处理设备行为的功能。本申请实施例中,该收发器401,执行图2所示的步骤201;
该处理器,执行图2所示的步骤202至步骤204。
本申请实施例中,该处理器402根据相同类型的多条日志确定该多条日志对应的日志类型的日志模板,即解析规则;然后该处理器402根据该日志模板提取该多条日志的变量生成结构化日志。即该数据处理设备在运行的过程可以即时的获取和更新日志对应的解析规则,不再需要人工设置解析规则,免除了运行过程对解析规则的人工维护与更新。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,
Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (21)

  1. 一种数据处理方法,其特征在于,包括:
    数据处理设备获取日志集合;
    所述数据处理设备确定所述日志集合中N条日志属于第一类型,所述N为正整数;
    所述数据处理设备根据所述N条日志确定与所述第一类型对应的日志模板,所述第一类型对应的日志模板用于指示所述N条日志的变量位置;
    所述数据处理设备根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志。
  2. 根据权利要求1所述的方法,其特征在于,所述数据处理设备根据所述N条日志确定与所述第一类型对应的日志模板包括:
    所述数据处理设备获取所述N条日志中的第M条日志,所述M为正整数;
    当所述M等于1时,所述数据处理设备将所述第M条日志作为所述第一类型对应的日志模板;
    或,
    所述数据处理设备根据所述第M条日志更新第一目标模板作为所述第一类型对应的日志模板,所述第一目标模板为与所述N条日志类型相同的其他日志确定的日志模板。
  3. 根据权利要求2所述的方法,其特征在于,当所述M大于或等于2时,所述数据处理设备根据所述N条日志确定与所述第一类型对应的日志模板包括:
    所述数据处理设备根据所述第M条日志更新第二目标模板作为所述第一类型对应的日志模板,所述第二目标模板为所述数据处理设备根据第M-1条日志确定的日志模板。
  4. 根据权利要求3所述的方法,其特征在于,所述数据处理设备根据所述第M条日志更新第二目标模板作为所述第一类型对应的日志模板包括:
    所述数据处理设备将第M条日志与所述第二目标模板进行比对;
    若所述数据处理设备确定所述第二目标模板相对所述第M条日志存在变量,则所述数据处理设备将所述第二目标模板相对所述第M条日志的变量用通配符表示作为所述第一类型对应的日志模板,所述通配符为预先设置的字符或字符串;
    若所述数据处理设备确定所述第二目标模板相对所述第M条日志不存在变量,则所述数据处理设备将所述第二目标模板作为所述第一类型对应的日志模板。
  5. 根据权利要求1所述的方法,其特征在于,所述数据处理设备根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志包括:
    所述数据处理设备将通过比对获取到的所述N条日志中的一条或多条日志相对所述第一类型对应的日志模板不同的地方识别为变量;
    所述数据处理设备提取所述变量生成所述结构化日志。
  6. 根据权利要求1所述的方法,其特征在于,所述数据处理设备根据所述变量位置从所述N条日志提取变量生成结构化日志包括:
    所述数据处理设备获取所述第一类型对应的日志模板所记录的所述变量位置;
    所述数据处理设备从所述N条日志中的一条或多条日志中提取所述变量位置对应的变量生成所述结构化日志。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述数据处理设备确定 所述日志集合中N条日志属于第一类型包括:
    所述数据处理设备根据分类算法或聚类算法确定所述日志集合中所述N条日志属于所述第一类型。
  8. 根据权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    所述数据处理设备为所述第一类型对应的日志模板与所述N条日志建立映射关系;
    所述数据处理设备根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志包括:
    所述数据处理设备根据所述映射关系查询所述第一类型对应的日志模板对应的所述N条日志中的一条或多条日志;
    所述数据处理设备根据所述第一类型对应的日志模板中的所述变量位置从所述N条日志中的一条或多条日志提取变量生成所述结构化日志。
  9. 根据权利要求1至6中任一项所述的方法,其特征在于,所述数据处理设备根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志之后,所述方法还包括:
    所述数据处理设备将所述结构化日志和所述第一类型对应的日志模板发送给下游系统。
  10. 根据权利要求1至6中任一项所述的方法,其特征在于,所述结构化日志还包括时间、主机名、模块名、严重性和进程标识ID中任意一个或多个。
  11. 一种数据处理设备,其特征在于,包括:
    获取模块,用于获取日志集合;
    处理模块,用于确定所述日志集合中N条日志属于第一类型,所述N为正整数;根据所述N条日志确定与所述第一类型对应的日志模板,所述第一类型对应的日志模板用于指示所述N条日志的变量位置;根据所述变量位置从所述N条日志中的一条或多条日志提取变量生成结构化日志。
  12. 根据权利要求11所述的数据处理设备,其特征在于,所述处理模块,具体用于获取所述N条日志中的第M条日志,所述M为正整数;
    当所述M等于1时,将所述第M条日志作为所述第一类型对应的日志模板;
    或,
    根据所述第M条日志更新第一目标模板作为所述第一类型对应的日志模板,所述第一目标模板为与所述N条日志类型相同的其他日志确定的日志模板。
  13. 根据权利要求12所述的数据处理设备,其特征在于,当所述M大于或等于2时,所述处理模块,具体用于,根据所述第M条日志更新第二目标模板作为所述第一类型对应的日志模板,所述第二目标模板为所述数据处理设备根据第M-1条日志确定的日志模板。
  14. 根据权利要求13所述的数据处理设备,其特征在于,所述处理模块,具体用于,将第M条日志与所述第二目标模板进行比对;
    若确定所述第二目标模板相对所述第M条日志存在变量,则将所述第二目标模板相对所述第M条日志的变量用通配符表示作为所述第一类型对应的日志模板,所述通配符为预先设置的字符或字符串;
    若确定所述第二目标模板相对所述第M条日志不存在变量,则将所述第二目标模板作为所述第一类型对应的日志模板。
  15. 根据权利要求11所述的数据处理设备,其特征在于,所述处理模块,具体用于,将通过比对获取到的所述N条日志中的一条或多条日志相对所述第一类型对应的日志模板不同的地方识别为变量;提取所述变量生成所述结构化日志。
  16. 根据权利要求11所述的数据处理设备,其特征在于,所述处理模块,具体用于,获取所述第一类型对应的日志模板所记录的所述变量位置;从所述N条日志中的一条或多条日志中提取所述变量位置对应的变量生成所述结构化日志。
  17. 根据权利要求11至16中任一项所述的数据处理设备,其特征在于,所述处理模块,具体用于,根据分类算法或聚类算法确定所述日志集合中所述N条日志属于所述第一类型。
  18. 根据权利要求11至16中任一项所述的数据处理设备,其特征在于,所述处理模块,还用于,为所述第一类型对应的日志模板建立索引;利用所述索引为所述第一类型对应的日志模板与所述N条日志建立映射关系;
    所述处理模块,具体用于,根据所述映射关系查询所述第一类型对应的日志模板对应的所述N条日志中的一条或多条日志;
    根据所述第一类型对应的日志模板中的所述变量位置从所述N条日志中的一条或多条日志提取变量生成所述结构化日志。
  19. 根据权利要求11至16中任一项所述的数据处理设备,其特征在于,所述数据处理设备还包括发送模块,用于将所述结构化日志和所述第一类型对应的日志模板发送给下游系统。
  20. 根据权利要求11至16中任一项所述的数据处理设备,其特征在于,所述结构化日志还包括时间、主机名、模块名、严重性和进程ID中的任意一个或多个。
  21. 一种数据处理设备,其特征在于,包括:
    收发器,处理器和总线;
    所述收发器与所述处理器通过所述总线相连;
    所述收发器,执行如下步骤:
    获取日志集合;
    所述处理器,执行如下步骤:
    确定所述日志集合中N条日志属于第一类型,所述N大于或等于1;
    根据所述N条日志确定与所述第一类型对应的日志模板,所述第一类型对应的日志模板用于指示所述N条日志的变量位置;
    所述变量位置从所述N条日志提取变量生成结构化日志。
PCT/CN2017/090054 2016-10-26 2017-06-26 一种数据处理方法以及数据处理设备 Ceased WO2018076739A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17865339.0A EP3525111A4 (en) 2016-10-26 2017-06-26 DATA PROCESSING METHOD AND DATA PROCESSING DEVICE
US16/396,193 US20190251093A1 (en) 2016-10-26 2019-04-26 Data Processing Method and Data Processing Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610948580.6 2016-10-26
CN201610948580.6A CN107992490B (zh) 2016-10-26 2016-10-26 一种数据处理方法以及数据处理设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/396,193 Continuation US20190251093A1 (en) 2016-10-26 2019-04-26 Data Processing Method and Data Processing Device

Publications (1)

Publication Number Publication Date
WO2018076739A1 true WO2018076739A1 (zh) 2018-05-03

Family

ID=62024306

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090054 Ceased WO2018076739A1 (zh) 2016-10-26 2017-06-26 一种数据处理方法以及数据处理设备

Country Status (4)

Country Link
US (1) US20190251093A1 (zh)
EP (1) EP3525111A4 (zh)
CN (2) CN107992490B (zh)
WO (1) WO2018076739A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968500A (zh) * 2018-09-30 2020-04-07 北京国双科技有限公司 一种测试用例的执行方法及装置
CN111353036A (zh) * 2020-02-27 2020-06-30 深信服科技股份有限公司 一种规则文件生成方法、装置、设备及可读存储介质
CN112732759A (zh) * 2020-12-31 2021-04-30 青岛海尔科技有限公司 数据处理方法及装置,存储介质及电子装置
CN114168672A (zh) * 2021-12-13 2022-03-11 明觉科技(北京)有限公司 日志数据的处理方法、装置、系统以及介质
CN117407242A (zh) * 2023-10-10 2024-01-16 浙江大学 基于大语言模型的低成本、零样本的在线日志解析方法

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6978687B2 (ja) * 2018-03-08 2021-12-08 日本電信電話株式会社 監視装置及び監視方法
CN109582650B (zh) * 2018-11-09 2021-05-25 金色熊猫有限公司 模块调用量处理方法、装置、电子设备、存储介质
CN109783459A (zh) * 2019-01-04 2019-05-21 平安科技(深圳)有限公司 从日志中提取数据的方法、装置及计算机可读存储介质
CN111488260B (zh) * 2019-01-29 2023-12-08 华为云计算技术有限公司 数据模板获取方法、装置、计算机设备以及可读存储介质
CN110263009B (zh) * 2019-06-21 2024-01-16 深圳前海微众银行股份有限公司 日志分类规则的生成方法、装置、设备及可读存储介质
CN110377576B (zh) * 2019-07-24 2021-10-29 中国工商银行股份有限公司 创建日志模板的方法和装置、日志分析方法
CN111046012B (zh) * 2019-12-02 2023-09-26 东软集团股份有限公司 巡检日志的抽取方法、装置、存储介质和电子设备
CN111581057B (zh) * 2020-05-08 2022-06-14 厦门服云信息科技有限公司 一种通用日志解析方法、终端设备及存储介质
AT523829B1 (de) * 2020-07-28 2021-12-15 Ait Austrian Inst Tech Gmbh Verfahren zur Detektion von anomalen Betriebszuständen eines Computersystems
CN112565232B (zh) * 2020-11-30 2022-05-13 国网江苏省电力有限公司检修分公司 一种基于模板和流量状态的日志解析方法及系统
US12034731B2 (en) * 2021-01-29 2024-07-09 Paypal, Inc. Evaluating access requests using assigned common actor identifiers
CN112463772B (zh) * 2021-02-02 2022-05-27 北京信安世纪科技股份有限公司 日志处理方法、装置、日志服务器及存储介质
CN113596097B (zh) * 2021-06-30 2023-08-18 联想(北京)有限公司 一种日志的传输方法及电子设备
US20230035274A1 (en) * 2021-08-01 2023-02-02 Authomize Ltd. Methods and Systems for Classification of Sensitive Electronic Resources
CN115237873A (zh) * 2022-07-28 2022-10-25 中国银行股份有限公司 一种日志存储方法、装置、设备及存储介质
CN115470073B (zh) * 2022-09-06 2026-03-31 中信科移动通信技术股份有限公司 设备监控方法及装置
CN116166501B (zh) * 2023-02-03 2024-03-08 上海擎创信息技术有限公司 一种日志校验方法、装置、电子设备及存储介质
CN116610651B (zh) * 2023-05-18 2026-02-13 深蓝汽车科技有限公司 车辆的日志输出方法、装置、车辆及存储介质
CN118626359B (zh) * 2024-08-15 2024-11-15 中电数据产业集团有限公司 一种基于大语言模型的日志分析方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645336A (zh) * 2005-01-20 2005-07-27 上海复旦光华信息科技股份有限公司 基于模板的异构日志信息自动提取与分析方法
CN103412924A (zh) * 2013-08-12 2013-11-27 东软集团股份有限公司 日志多语言查询方法和系统
WO2015181876A1 (ja) * 2014-05-26 2015-12-03 株式会社日立製作所 システム運用支援方法および計算機
CN105808375A (zh) * 2014-12-31 2016-07-27 航天信息软件技术有限公司 导入数据的方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6564171B1 (en) * 2000-09-14 2003-05-13 Advanced Micro Devices Inc. Method and apparatus for parsing event logs to determine tool operability
US8041683B1 (en) * 2006-09-29 2011-10-18 Emc Corporation Methods and apparatus for locating network logs
CN101534580B (zh) * 2009-04-08 2011-09-14 华为技术有限公司 一种数据处理方法以及数据处理系统
RU2536390C2 (ru) * 2012-10-31 2014-12-20 Общество с ограниченной ответственностью "1С" Способ для автоматизированного создания отчетов
KR20160027419A (ko) * 2014-08-29 2016-03-10 삼성전자주식회사 정보에 기반하여 부가기능을 제공하는 방법
CN104281672B (zh) * 2014-09-28 2021-02-12 网神信息技术(北京)股份有限公司 日志数据的处理方法和装置
CN105790967B (zh) * 2014-12-18 2020-04-14 华为技术有限公司 一种网络日志处理方法和装置
US11048608B2 (en) * 2015-03-17 2021-06-29 Vmware, Inc. Probability-distribution-based log-file analysis
US11226975B2 (en) * 2015-04-03 2022-01-18 Oracle International Corporation Method and system for implementing machine learning classifications
WO2016161381A1 (en) * 2015-04-03 2016-10-06 Oracle International Corporation Method and system for implementing a log parser in a log analytics system
CN105447099B (zh) * 2015-11-11 2018-12-14 中国建设银行股份有限公司 日志结构化信息提取方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645336A (zh) * 2005-01-20 2005-07-27 上海复旦光华信息科技股份有限公司 基于模板的异构日志信息自动提取与分析方法
CN103412924A (zh) * 2013-08-12 2013-11-27 东软集团股份有限公司 日志多语言查询方法和系统
WO2015181876A1 (ja) * 2014-05-26 2015-12-03 株式会社日立製作所 システム運用支援方法および計算機
CN105808375A (zh) * 2014-12-31 2016-07-27 航天信息软件技术有限公司 导入数据的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3525111A4 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968500A (zh) * 2018-09-30 2020-04-07 北京国双科技有限公司 一种测试用例的执行方法及装置
CN111353036A (zh) * 2020-02-27 2020-06-30 深信服科技股份有限公司 一种规则文件生成方法、装置、设备及可读存储介质
CN111353036B (zh) * 2020-02-27 2024-04-09 深信服科技股份有限公司 一种规则文件生成方法、装置、设备及可读存储介质
CN112732759A (zh) * 2020-12-31 2021-04-30 青岛海尔科技有限公司 数据处理方法及装置,存储介质及电子装置
CN112732759B (zh) * 2020-12-31 2023-02-03 青岛海尔科技有限公司 数据处理方法及装置,存储介质及电子装置
CN114168672A (zh) * 2021-12-13 2022-03-11 明觉科技(北京)有限公司 日志数据的处理方法、装置、系统以及介质
CN117407242A (zh) * 2023-10-10 2024-01-16 浙江大学 基于大语言模型的低成本、零样本的在线日志解析方法
CN117407242B (zh) * 2023-10-10 2024-04-05 浙江大学 基于大语言模型的低成本、零样本的在线日志解析方法

Also Published As

Publication number Publication date
CN107992490A (zh) 2018-05-04
CN107992490B (zh) 2021-09-14
EP3525111A1 (en) 2019-08-14
CN114281781A (zh) 2022-04-05
US20190251093A1 (en) 2019-08-15
EP3525111A4 (en) 2019-08-21

Similar Documents

Publication Publication Date Title
CN107992490B (zh) 一种数据处理方法以及数据处理设备
US10262059B2 (en) Method, apparatus, and storage medium for text information processing
WO2021068547A1 (zh) 日志模板提取方法及装置
CN106033416B (zh) 一种字符串处理方法及装置
CN108737406A (zh) 一种异常流量数据的检测方法及系统
WO2019136993A1 (zh) 文本相似度计算方法、装置、计算机设备和存储介质
US12160432B2 (en) Log analysis apparatus, log analysis method, and log analysis program
US20180041500A1 (en) Cross-platform classification of machine-generated textual data
CN109918498B (zh) 一种问题入库方法和装置
CN107659570A (zh) 基于机器学习与动静态分析的Webshell检测方法及系统
CN113128213B (zh) 日志模板提取方法及装置
CN102411563A (zh) 一种识别目标词的方法、装置及系统
WO2021109724A1 (zh) 日志异常检测方法及装置
CN102891852A (zh) 基于报文分析的协议格式自动推断方法
CN106485146B (zh) 一种信息处理方法及服务器
CN109145162B (zh) 用于确定数据相似度的方法、设备和计算机可读存储介质
US10990672B2 (en) Method and apparatus for obtaining virus library, device, server, and system
CN105574156A (zh) 文本聚类方法、装置及计算设备
CN110750984A (zh) 命令行字符串处理方法、终端、装置及可读存储介质
CN116107834A (zh) 日志异常检测方法、装置、设备及存储介质
CN111666101A (zh) 软件同源分析方法及装置
CN113435333A (zh) 一种数据处理方法、装置、计算机设备和存储介质
CN111930545B (zh) Sql脚本处理方法、装置和服务器
CN111431884A (zh) 一种基于dns分析的主机失陷检测方法及装置
US12568144B2 (en) Assurance of user behavioral patterns in software applications with quasi-supervised clustering

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17865339

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017865339

Country of ref document: EP

Effective date: 20190510