Log matching method, device, equipment, storage medium and product

By matching the key text logs and target text logs numerically, the problem of inefficient matching in the existing technology is solved, and a more efficient log matching process is achieved.

CN114840485BActive Publication Date: 2024-12-31ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210265602.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-17
Publication Date
2024-12-31
Estimated Expiration
2042-03-17

AI Technical Summary

Technical Problem

In the prior art, the efficiency of matching the key text logs with the target text log is low, mainly because the time complexity of the keyword combination matching algorithm is high and the preprocessing is not performed.

Method used

By numerically numbering words in the key text log and the target text log and using these numeral numbers to filter out the key text logs to be matched, reducing time complexity and improving matching efficiency.

Benefits of technology

Through numerical number matching, the matching efficiency between key text logs and target text logs is significantly improved, mismatches are reduced, and the speed of the log matching process is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840485B_ABST
    Figure CN114840485B_ABST
Patent Text Reader

Abstract

The present application provides a log matching method, device, equipment, storage medium and product. The method includes: obtaining a key text log and a target text log corresponding to a target object; determining a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log; using the first digital number and the second digital number to filter the key text log to filter out the key text log to be matched; matching the key text log to be matched with the target text log to obtain a target text log that matches the key text log to be matched. By filtering the key text log, the matching efficiency can be improved; by numbering each word in the log and filtering the key text log according to the first digital number and the second digital number, the efficiency of filtering the key text log can be improved, thereby improving the matching efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to data processing technology, and in particular to a log matching method, device, equipment, storage medium and product. Background Art

[0002] Network devices, systems, service programs and other target objects will generate corresponding text logs when they are in operation. Each line of text log records the date, time, action and other related operation descriptions. Therefore, text logs are widely used in daily monitoring, fault location, health analysis and other scenarios of target objects.

[0003] The target object generates a large number of text logs every day, which are target text logs. In order to perform daily monitoring, fault location, health analysis and other operations, it is necessary to pre-configure a large number of key text logs that are important for the above operations, match the key text logs with the target text logs, and then perform the above operations based on the matched target text logs.

[0004] Currently, when matching key text logs with target text logs, a keyword combination matching algorithm is generally used for matching. However, since no preprocessing is performed on the key text logs, the number of key text logs is large, and the time complexity of the keyword combination matching algorithm is high, the matching efficiency is low. Summary of the invention

[0005] The present application provides a log matching method, apparatus, device, storage medium and product, which are used to solve the technical problem of low matching efficiency when matching key text logs with target text logs in the prior art.

[0006] In a first aspect, the present application provides a log matching method, comprising:

[0007] Obtaining a key text log and a target text log corresponding to the target object; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object or log search answer data of the target object, and the target text log is a log generated by running the target object;

[0008] Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log;

[0009] Using the first digital number and the second digital number to screen the key text logs to be matched;

[0010] The key text log to be matched is matched with the target text log to obtain the target text log that matches the key text log to be matched.

[0011] In a second aspect, the present application provides a log matching method, comprising:

[0012] Receiving a monitoring request for a target object triggered by a user; the target object includes a plurality of target sub-objects;

[0013] Obtaining a key text log and a target text log corresponding to the target object according to the monitoring request; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object; the target text log is a log generated by running the target object;

[0014] Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log;

[0015] Using the first digital number and the second digital number to screen the key text logs to be matched;

[0016] Matching the key text log to be matched with the target text log to obtain the target text log that matches the key text log to be matched;

[0017] Determine the target sub-object corresponding to the matching target text log.

[0018] In a third aspect, the present application provides a log matching method, comprising:

[0019] Receive a log search request corresponding to a target object triggered by a user, wherein the log search request includes a target text log;

[0020] Acquire a pre-stored key text log; the key text log is a pre-configured text log that has a positioning function for log search answer data of a target object;

[0021] Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log;

[0022] Using the first digital number and the second digital number to screen the key text logs to be matched;

[0023] Matching the key text log to be matched with the target text log to obtain the key text log that matches the target log;

[0024] Output the answer data corresponding to the matching key text log to the user.

[0025] In a fourth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0026] The memory stores computer-executable instructions;

[0027] The processor executes the computer-executable instructions stored in the memory to implement the log matching method described in any one of the above aspects.

[0028] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the log matching method described in any one of the above aspects.

[0029] In a sixth aspect, the present application provides a computer program product, including a computer program, which implements the above-mentioned log matching method when executed by a processor.

[0030] The log matching method, apparatus, device, storage medium and product provided by the present application obtain a key text log and a target text log corresponding to a target object; the key text log is a pre-configured text log that has a positioning function for log search answer data of at least one target sub-object or target object in the target object, and the target text log is a log generated by running the target object; a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log are determined; the first digital number and the second digital number are used to screen the key text log to screen out the key text log to be matched; the key text log to be matched is matched with the target text log to obtain a target text log that matches the key text log to be matched. By screening the key text logs, the key text logs that are obviously unmatched can be eliminated, thereby improving the efficiency of matching the key text logs with the target text logs; by numbering each word in the key text logs and the target text logs, the key text logs are screened according to the first digital number and the second digital number. Since the time complexity of matching the digital numbers and then screening the key text logs to be matched is much smaller than the time complexity of matching the words and the characters in the words, the efficiency of screening the key text logs can be improved, thereby improving the efficiency of matching the key text logs with the target text logs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0032] Figure 1A flow chart of the log matching method provided in Example 1 of the present application;

[0033] Figure 2 A schematic diagram for determining the first digital number and the second digital number provided in this application;

[0034] Figure 3 A flow chart of the log matching method provided in Example 4 of the present application;

[0035] Figure 4 Schematic diagram of the first bucket sorting search algorithm provided by this application;

[0036] Figure 5 A schematic diagram of the second bucket sorting search algorithm provided in this application;

[0037] Figure 6 A schematic diagram for matching the fourth digital number with the second digital number provided in the present application;

[0038] Figure 7 Flowchart of the log matching method provided in Example 7 of this application

[0039] Figure 8 Schematic diagram of the target object monitoring operation interface provided for this application;

[0040] Fig. 9 A flow chart of the log matching method provided in Example 8 of the present application;

[0041] Fig.10 Diagram of the conversational robot provided for this application;

[0042] Fig.11 A schematic diagram of the structure of a log matching device provided in Example 9 of the present application;

[0043] Fig.12 This is a schematic diagram of the structure of an electronic device provided in Example 10 of the present application.

[0044] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0046] The terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, "multiple" means more than two, unless otherwise clearly and specifically defined.

[0047] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.

[0048] In the prior art, when a keyword combination matching algorithm is used to match a key text log with a target text log, it is necessary to traverse each key text log in the target text log to determine whether a word in the key text log is in any line of the target text log, thereby matching the key text log with the target text log. Since the number of key text logs can reach an order of 100,000 or more, the number of lines in the target text log can also reach an order of 100,000 or more. When the keyword combination matching algorithm is used, no preprocessing is performed on the key text log, and the number of key text logs is very large, so the efficiency of completing the entire matching process is low. Moreover, the algorithm time complexity of matching the key text log with the target text log using the keyword combination matching algorithm is very high, and the efficiency of matching each key text log with each target text log is also low, further reducing the efficiency of matching.

[0049] Among them, the time complexity of an algorithm refers to the time resources required for the algorithm to run after it is written into an executable program.

[0050] Since it is necessary to traverse each key text log in the target text log to determine whether the words in the key text log are all in a line of the target text log, therefore, eliminating the key text logs that are obviously not matched in advance can greatly reduce the number of key text logs to be matched, thereby improving the efficiency of matching. In addition, in order to improve the efficiency of eliminating the key text logs that are obviously not matched, when matching the key log text with the target log text, the key text logs that are obviously not matched can be screened out by reducing the time complexity of the keyword combination matching algorithm. The inventor found in the research that the words in the key text log and the target text log can be digitally numbered, and the way to match the key text log with the target text log is converted into a way to match by digital numbering. Since the time complexity of matching by digital numbering is much less than the time complexity of matching the characters, words and word combinations in the words, the time complexity of the algorithm can be effectively reduced, further improving the efficiency of matching.

[0051] The following is an introduction to the application scenarios of the log matching method provided in this application.

[0052] This application can be applied to daily monitoring scenarios of target objects such as cloud server clusters, systems and service programs. Specifically, a large number of target text logs will be generated when the target object is running. The target text logs generated by the target object can be scanned in real time. By matching the key text logs that play a key role in locating the fault with the target text logs, it is determined whether the target text log contains the key text log, thereby realizing daily monitoring. Among them, the logs that play a key role in locating the fault can be logs above the warning level.

[0053] The present application can also be applied to the fault auxiliary diagnosis scenario of the above-mentioned target object. Specifically, after determining the target text log that matches the key log, the abnormal information is pushed to the maintenance personnel terminal in a timely manner. The abnormal information may include the target sub-object information corresponding to the target text log above the warning level, and the target sub-object can be auxiliary diagnosed according to the target sub-object information. Among them, if the target object is a cloud server cluster, the target sub-object can be at least one cloud server in the cloud server cluster. If the target object is a system, the target sub-object can be at least one subsystem in the system. If the target object is a service program, the target sub-object can be at least one function in the service program, etc.

[0054] The present application can also be applied to the health analysis scenario of the target object. Specifically, the health analysis of the target object can be performed based on the number and level of key text logs that match the target text log.

[0055] The present application can also be applied to the knowledge base search of text logs. Specifically, the user can select or input the target text log in the input box of the search engine, and by matching the key text log with the target text log, the corresponding problem and treatment method of the matched key text log can be determined, and then more accurate problems and treatment methods can be determined, which can also improve the efficiency of knowledge search.

[0056] It is understandable that the log matching method provided in the present application can also be applied to other related application scenarios, which will not be described in detail here.

[0057] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0058] Embodiment 1

[0059] Figure 1The flow chart of the log matching method provided in the first embodiment of the present application is provided. The embodiment of the present application provides a log matching method to solve the problem that the time complexity of the keyword combination matching algorithm is high and the matching efficiency is low. The method in this embodiment is applied to a log matching device, and the log matching device can be located in an electronic device. Among them, the electronic device can be a digital computer representing various forms. Such as a cellular phone, a smart phone, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers.

[0060] like Figure 1 As shown, the specific steps of this method are as follows:

[0061] Step S101: Obtain key text logs and target text logs corresponding to a target object.

[0062] Among them, the key text log is a pre-configured text log that has a positioning function for log search answer data of at least one target sub-object or target object in the target object, and the target text log is a log generated by running the target object.

[0063] Exemplarily, when performing daily monitoring on a target object, a key text log may be a text log corresponding to at least one target sub-object, which can locate and monitor at least one target sub-object; a key text log may also be a text log above a warning level, which can monitor whether a target object fails and locate at least one target sub-object that fails. When performing a knowledge base search on a target text log, a key text log may be a text log that has a locating effect on the answer data of the target text log.

[0064] The embodiments of the present application do not specifically limit the method of obtaining the key text log and the target text log corresponding to the target object. For example, when obtaining the target text log, a log acquisition request can be initiated to the target object or the device corresponding to the target object, and the target text log is obtained by receiving the target text log sent by the target object or the device corresponding to the target object. When obtaining the key text log corresponding to the target object, the key text log can be obtained from a database storing the key text log.

[0065] Optionally, the key text log and the target text log may be pre-stored in a preset file, and the key text log and the target text log may be obtained by the user inputting the preset file storage path.

[0066] In an embodiment of the present application, the key text log is composed of words or symbols that do not include parameters. Exemplarily, the key text log may be: EXT4-fs error (device) in ::. The target text log includes both parameter words and symbols and non-parameter words and symbols. Exemplarily, the target text log may be: EXT4-fs error (device dm-0) in ext4_ext_truncate:4655:I0 failure. Among them, dm-0, ext4_ext_truncate:4655:I0failure are parameters.

[0067] Step S102: Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log.

[0068] In the key text log and the target text log, the words separated by the preset delimiter are words. The preset delimiter may be a space, a colon, etc.

[0069] Specifically, the correspondence between words and digital numbers is determined, and the first digital number corresponding to each word in the key text log is determined in sequence according to the correspondence between words and digital numbers, and the second digital number corresponding to each word in the target text log is determined in sequence.

[0070] The embodiments of the present application do not specifically limit the method for determining the correspondence between words and digital numbers. For example, the correspondence between words and digital numbers stored in a word library can be obtained, or the correspondence between words and digital numbers can be determined by uniquely numbering the words.

[0071] Among them, the first digital number is the digital number corresponding to the word in the key text log, and the second digital number is the digital number corresponding to the word in the target text log. The digital number is a unique identifier for each non-repeated word. One word corresponds to one digital number, and the same words have the same digital number.

[0072] For example, Figure 2 This is a schematic diagram for determining the first digital number and the second digital number provided in this application. Figure 2As shown, the key text log includes: EXT4-fs error (device) in::; the target text log includes: EXT4-fserror (device dm-0) in ext4_ext_truncate:4655:I0 failure; then the digital number corresponding to EXT4-fs is 1, the digital number corresponding to error is 2, the digital number corresponding to device is 3, the digital number corresponding to in is 4, the digital number corresponding to dm-0 is 5, the digital number corresponding to ext4_ext_truncate is 6, the digital number corresponding to 4655 is 7, and the digital number corresponding to I0-failure is 8. Then the first digital numbers corresponding to each word in the key text log are 1, 2, 3, and 4, respectively, and the second digital numbers corresponding to each word in the target text log are 1, 2, 3, 5, 4, 6, 7, and 8, respectively.

[0073] Step S103: Screen the key text logs using the first digital number and the second digital number to screen out the key text logs to be matched.

[0074] In the implementation of the present application, by judging whether the words in the key text log are all in the target text log, the key text log in which the words are not in the target text log is determined as the key text log that does not match the target text log, and the key text log in which all the words are in the target text log is determined as the key text log to be matched that may match the target text log.

[0075] Specifically, when determining whether the first digital number is included in the second digital number, if the first digital number is included in the second digital number, the key text log corresponding to the first digital number is determined as the key text log to be matched.

[0076] It is understandable that other methods may be used to filter the key text logs using the first digital number and the second digital number to filter out the key text logs to be matched, which is not limited in this embodiment.

[0077] Step S104: Match the key text log to be matched with the target text log to obtain a target text log that matches the key text log to be matched.

[0078] The key text log to be matched is the key text log selected according to the first digital number and the second digital number.

[0079] In the implementation of this application, a keyword combination matching algorithm can be used to match the key text log to be matched with the target text log, or the key text log to be matched with the target text log can be matched by using the digital number corresponding to the key text log to be matched and the second digital number corresponding to the target text log.

[0080] Exemplarily, the key text log to be matched can also be matched with the target text log by using a string matching method. Specifically, the string in each key text log to be matched and the string in each target text log are traversed from left to right using the string matching method. If the string in a key text log to be matched can be matched with the string in at least one target text log in sequence, it is determined that the at least one target text log matches the key text log to be matched.

[0081] In the embodiment of the present application, the key text log and the target text log corresponding to the target object are obtained; the first digital number corresponding to each word in the key text log and the second digital number corresponding to each word in the target text log are determined; the key text log is screened by the first digital number and the second digital number to screen out the key text log to be matched; the key text log to be matched is matched with the target text log to obtain the target text log that matches the key text log to be matched. By screening the key text log, the key text log that is obviously unmatched can be eliminated, thereby improving the efficiency of matching the key text log with the target text log; by numbering each word in the key text log and the target text log, the key text log is screened according to the first digital number and the second digital number. Since the time complexity of matching the digital number and then screening out the key text log to be matched is much less than the time complexity of matching the words and the characters in the words, the efficiency of screening the key text log can be improved, thereby improving the efficiency of matching the key text log with the target text log.

[0082] Embodiment 2

[0083] On the basis of the above embodiment, this embodiment involves a specific process of establishing a word library before step S102 determines the first digital number corresponding to each word in the key text log and the second digital number corresponding to each word in the target text log, and the word library is used to store the digital number corresponding to each word. The specific steps of the method are as follows:

[0084] Step S201: Obtain source code processing logs in a source code processing log library.

[0085] The source code processing log is a log after non-parameter word extraction from the source code printing log. The source code printing log is a log that records the corresponding sub-object information, log level, log text and other information. For example, the source code printing log is printk(KERN_CRIT"EXT4-fs error(device%s)in%s:%d:%s\n"), and the corresponding source code processing log is EXT4-fs error(device)in::, and the %s, %d, and %s\n in the source code printing log are parameters. The target sub-object information can be the name of the target sub-object, a unique identifier, etc.

[0086] In an embodiment of the present application, the source code processing log is stored in a source code processing log library. The source code processing log library can also store sub-object information, log level and other information corresponding to the source code processing log, and the source code processing log can be obtained from the source code processing log library.

[0087] Step S202: uniquely number each non-repeated word in the source code processing log, and store each non-repeated word and the corresponding digital number in a word library.

[0088] The word library is a database that stores words, unique digital numbers corresponding to the words, and their associations.

[0089] Specifically, a word library can be established to determine whether a word in the source code processing log is in the word library in turn. If not in the word library, the word is uniquely numbered, and the word and the corresponding digital number are stored in the word library. Exemplarily, the words can be numbered in the order in which the words appear in the source code processing log, and when the words are numbered, the words can be uniquely numbered in the numerical order.

[0090] In an embodiment of the present application, by digitally numbering the source code processing log, each non-repetitive word and the corresponding digital number can be obtained, and each non-repetitive word and the corresponding digital number can be stored in a word library. The digital number corresponding to the word in the key text log and the target text log can be searched from the word library, thereby improving the efficiency of determining the first digital number and the second digital number.

[0091] Embodiment 3

[0092] Based on the second embodiment, this embodiment involves an implementation method of determining the first digital number corresponding to each word in the key text log and the second digital number corresponding to each word in the target text log in step S102. The specific steps of the method are as follows:

[0093] Step S301: for each word in the key text log, search for the digital number corresponding to each word in the word library, and determine the searched digital number as the first digital number of the same word in the key text log.

[0094] Specifically, each word in the key text log is searched in the word library in turn, and the digital number corresponding to the word is determined, and the searched digital number is determined as the first digital number of the word.

[0095] Step S302: for each word in the target text log, search for a digital number corresponding to each word in the word library, and determine the searched digital number as the second digital number of the same word in the target text log.

[0096] Specifically, each word in the target text log is searched in the word library in turn, and the digital number corresponding to the word is determined, and the searched digital number is determined as the second digital number of the word.

[0097] Optionally, if the digital number corresponding to the word of the key text log and / or the target text log is not found in the word library, a unique digital number is configured for the unfound word; and the configured digital number is determined as the digital number of the unfound word.

[0098] Specifically, when executing step S301, if any word of the key text log is not found in the word library, the digital number corresponding to the word cannot be found, and a unique digital number is configured for the word in the digital numbering order, and the digital number is determined as the first digital number; when executing step S302, if any word in the target text log is not found in the word library, the digital number corresponding to the word cannot be found, and a unique digital number is configured for the word in the digital numbering order, and the digital number is determined as the second digital number. For example, the maximum digital number in the word library is increased by one, and the number after the maximum digital number is increased by one is configured as the unique digital number of the word. It is also possible to store the unfinished word and the configured digital number in the word library after configuring a unique digital number for the unfinished word.

[0099] Exemplarily, the association between the words and the digital numbers stored in the word library only includes: EXT4-fs corresponds to digital number 1, error corresponds to digital number 2, device corresponds to digital number 3, and in corresponds to digital number 4. If the target text log includes the word dm-0, the corresponding digital number cannot be found in the word library, then dm-0 is configured with a unique digital number 5 in the digital number sequence, and 5 is determined as the second digital number.

[0100] In the embodiment of the present application, by searching for the digital number corresponding to each word in the word library, the efficiency of determining the first digital number and the second digital number can be improved, and the efficiency of screening the key text logs can be further improved.

[0101] Embodiment 4

[0102] Figure 3 A flow chart of the log matching method provided for Embodiment 4 of the present application, based on any one of the above embodiments, involves a specific implementation method of step S103 using the first digital number and the second digital number to filter the key text logs to be matched.

[0103] like Figure 3 As shown, the specific steps of this method are as follows:

[0104] Step S401: Preliminary screening of key text logs is performed using the first digital number and the second digital number to obtain the preliminarily screened key text logs.

[0105] In an embodiment of the present application, a primary screening is performed on the key text log, and the digital number corresponding to the key text log after the primary screening is determined as the third digital number. The key text log after the primary screening is secondary screened according to the third digital number and the second digital number, and the digital number corresponding to the key text log after the secondary screening is determined as the fourth digital number. The key text log after the secondary screening is determined as the key text log to be matched.

[0106] Optionally, an implementation method for preliminarily screening key text logs may include the following steps:

[0107] Step S4011: for each key text log, determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs.

[0108] The embodiment of the present application does not specifically limit the method for determining whether the first digital number exists in the second digital number. For example, the first digital number can be searched in the second digital number in sequence. If the first digital number cannot be found in the second digital number, then the first digital number does not exist in the second digital number.

[0109] Optionally, step S4011 specifically includes:

[0110] For each key text log, a first bucket sorting search algorithm is used to determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs.

[0111] Among them, the first bucket sort search algorithm is the bucket sort search algorithm used in the initial screening of key text logs. Since the bucket sort search algorithm is the fastest and simplest sort search algorithm among all sort search algorithms, this search algorithm is used in the initial screening of key text logs.

[0112] Optionally, determine the range of the first digital number and the second digital number, determine the number of non-repeating digital numbers based on the range of the first digital number and the second digital number, configure a corresponding bucket for each non-repeating digital number, mark the bucket corresponding to the second digital number as a first value, and determine whether the bucket corresponding to the first digital number is marked as the first value. If the buckets corresponding to the first digital number are all marked as the first value, it is determined that the first digital number exists in the second digital number corresponding to the target text log.

[0113] Step S4012: If it is determined that the first digital number corresponding to a certain key text log does not exist in the second digital numbers corresponding to all target text logs, the key text log is deleted.

[0114] In the embodiment of the present application, if the first digital number does not exist in all the second digital numbers, it is determined that there are words in the key text log that do not exist in the target text log, then it can be determined that the key text log does not match the target text log, and the key text log is excluded.

[0115] Step S4013: If it is determined that the first digital number corresponding to a certain key text log exists in the second digital numbers corresponding to all target text logs, the key text log is determined as the key text log after the initial screening.

[0116] In an embodiment of the present application, if the first digital numbers exist in all the second digital numbers, it is determined that the words in the key text log exist in the target text log, and there is a possibility that the key text log matches the target text log. The key text log is retained and determined as the key text log after initial screening.

[0117] Step S402: Determine the third digital number corresponding to each word in the key text log after the initial screening.

[0118] The third digital number is the digital number corresponding to the word in the key text log after the initial screening.

[0119] In the embodiment of the present application, the method for determining the third digital number is similar to the method for determining the first digital number in step S301, and will not be described in detail here.

[0120] Step S403: Use the third digital number and the second digital number to perform secondary screening on the key text logs after the primary screening to screen out the key text logs to be matched.

[0121] Optionally, an implementation of secondary screening of key text logs includes the following steps:

[0122] Step S4031: divide the target text log into target text log groups and determine the second digital numbers corresponding to the target text log groups as second digital number groups.

[0123] Each target text log group includes a preset number of target text logs, and the preset number is smaller than the number of target text logs.

[0124] Specifically, the target text log may be equally divided into a plurality of target text log groups including a preset number of target text logs according to a preset number, and the second digital numbers corresponding to the words in the target text log group may be determined as the second digital number group.

[0125] For example, the preset number may be 10, then the 10 target text logs are divided into a target text log group, and the second digital numbers corresponding to the 10 target text logs are determined as a second digital number group.

[0126] Step S4032: for each key text log after the initial screening, determine whether the corresponding third digital number exists in at least one second digital number group.

[0127] In the embodiment of the present application, the method of determining whether the third digital number exists in at least one second digital number group is similar to the method of determining whether all first digital numbers exist in the second digital number groups in step S4011. Exemplarily, the third digital number is searched in each second digital number group, and if the third digital number corresponding to the key text log can be found in any second digital number group, then the third digital number corresponding to the key text log exists in at least one second digital number group.

[0128] Optionally, step S4032 may specifically be:

[0129] For each key text log after the initial screening, the second bucket sorting search algorithm is used to determine whether the corresponding third digital number exists in at least one second digital number group.

[0130] Specifically, determine the range of the third digital number and the second digital number, determine the number of non-repeating digital numbers based on the range of the third digital number and the second digital number, configure corresponding buckets for each non-repeating third digital number and second digital number, mark the bucket corresponding to the second digital number as a first value, and determine whether the bucket corresponding to the third digital number is marked as the first value. If the buckets corresponding to the third digital numbers are all marked as the first value, it is determined that the third digital numbers exist in the second digital number corresponding to the target text log.

[0131] The first numerical value may be 1 or a numerical value different from a numerical value not marked with a second numerical code.

[0132] Step S4033: If it is determined that the third digital number corresponding to a key text log after the initial screening does not exist in any second digital number group, the key text log after the initial screening is deleted.

[0133] In an embodiment of the present application, if the third digital numbering does not exist in all the second digital numbering groups, it is determined that the words in the key text log corresponding to the third digital numbering do not exist in a group of target text logs at the same time, then it can be determined that the key text log does not match the target text log, and the key text log is excluded.

[0134] For example, taking the third digital number corresponding to the key text log as 1, 2, 3, and 4 as an example, if the third digital number 1, 2, and 3 are in a certain second digital number group, and the third digital number 4 is in another second digital number group, then the first digital number corresponding to the key text log is in the second digital number group, and the key text log can pass the initial screening, and the key text log is determined as the key text log after the initial screening; if the third digital number corresponding to the key text log does not exist in any second digital number group, the key text log cannot pass the secondary screening, and the key text log is deleted.

[0135] Step S4034: If it is determined that the third digital number corresponding to a key text log after the initial screening exists in at least one second digital number group, the key text log after the initial screening is determined as the key text log to be matched.

[0136] In an embodiment of the present application, if the third digital numbers corresponding to the key text logs all exist in at least one second digital number group, it is determined that the words in the key text log all exist in a group of target text logs, then there is a possibility that the key text log matches one of the target text logs in this group of target text logs, the key text log is retained and the key text log to be matched is determined.

[0137] In an embodiment of the present application, by screening the key text logs twice, a smaller number of key text logs to be matched can be screened out, and the retained key text logs can be made to be logs that are more likely to match the target text logs, thereby effectively reducing the number of key text logs to be matched with the target text logs, thereby improving the efficiency of matching the key text logs with the target text logs.

[0138] Embodiment 5

[0139] On the basis of the above embodiment, the embodiment of the present application relates to a specific implementation method of using a first bucket sorting search algorithm to respectively determine whether the corresponding first digital number exists in the second digital number corresponding to all target text logs for each key text log, specifically including the following steps:

[0140] Step S501: Place the digital numbers corresponding to each non-repeated word in the word library in the corresponding buckets in order from small to large.

[0141] The word library includes all words and corresponding digital numbers in the target text log and the key text log.

[0142] Figure 4 The schematic diagram of the first bucket sorting search algorithm provided for this application is as follows: Figure 4 As shown, the numbers in the buckets are arranged from small to large in the order of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10...

[0143] Step S502: Place the second digital number corresponding to each word in all target text logs into buckets with the same digital number, mark the buckets with the second digital number as the first value, and mark the buckets without the second digital number as the second value.

[0144] The first value is different from the second value. For example, the first value may be 1, and the second value may be 0.

[0145] like Figure 4 As shown, three target text logs represent all target text logs. The second digital numbers corresponding to the words in all target text logs are: 1, 2, 3, 5, 4, 6, 7, 8; 4, 6, 7, 10; 5, 7, 8, 10. The buckets with the digital numbers 1, 2, 3, 4, 5, 6, 7, 8, 10 are marked as 1, and the remaining buckets are marked as 0.

[0146] Step S503: for each key text log, determine whether the marks corresponding to the buckets with the same first digital number as that corresponding to the key text log are all the first numerical values.

[0147] Specifically, buckets with the same first digital number as the key text log are determined in sequence, and it is determined whether the marks corresponding to the buckets are all the first numerical value. If the marks of the buckets with the same first digital number are all the first numerical value, step S504 is executed; if there is any bucket with the same first digital number and the mark is the second numerical value, step S505 is executed.

[0148] Step S504: If it is determined that they are all the first numerical values, it is determined that the first digital number corresponding to the key text log exists in the second digital numbers corresponding to all the target text logs.

[0149] In the embodiment of the present application, if it is determined that they are all first numerical values, then there is a second digital number that is the same as the first digital number in the bucket corresponding to the first digital number, and it can be determined that the first digital number corresponding to the key text log exists in the second digital numbers corresponding to all target text logs.

[0150] like Figure 4 As shown, the first digital numbers corresponding to the key text logs are 1, 2, 3, and 4, and the mark of the bucket that is the same as 1, 2, 3, and 4 is 1, which is the first numerical value. Then the key text log exists in the second digital numbers corresponding to all target text logs.

[0151] Step S505: If it is determined that they are not all the first numerical value, then it is determined that the first digital number corresponding to the key text log is not all present in the second digital numbers corresponding to all the target text logs.

[0152] In an embodiment of the present application, if it is determined that they are not all the first numerical values, then there is no second digital number in the bucket corresponding to at least one first digital number, and there is no second digital number in the second digital numbers that is the same as at least one first digital number. It can be determined that at least one first digital number corresponding to the key text log does not exist in the second digital numbers corresponding to all target text logs.

[0153] In an embodiment of the present application, a first bucket sort search algorithm is used to determine whether the first digital numbers corresponding to the key text logs exist in the second digital numbers corresponding to all target text logs. Since the bucket sort search algorithm is the fastest and simplest algorithm to determine whether all elements of an array are in another array, it can improve the efficiency of determining whether the first digital numbers corresponding to the key text logs exist in the second digital numbers corresponding to all target text logs, thereby improving the efficiency of initial screening of key text logs.

[0154] Embodiment 6

[0155] On the basis of the above embodiment, the embodiment of the present application relates to a specific implementation method of using a second bucket sorting search algorithm to determine whether the corresponding third digital number exists in at least one second digital number group for each key text log after the initial screening, which specifically includes the following steps:

[0156] Step S601: Place the digital numbers corresponding to each non-repeated word in the word library in the corresponding buckets in order from small to large.

[0157] In the embodiment of the present application, the manner in which the digital numbers corresponding to each non-repeated word in the word library are placed in the corresponding buckets in order from small to large is similar to that in Embodiment 5, and will not be described one by one here.

[0158] Step S602: For each target text log group, the second digital code in the corresponding second digital number group is placed in the bucket with the same digital number, and the bucket with the second digital number is marked as the first value, and the bucket without the second digital number is marked as the second value.

[0159] Figure 5 The schematic diagram of the second bucket sorting search algorithm provided in this application is as follows: Figure 5 As shown, the second digital code in the second digital number group 1 is placed in the bucket with the same digital number, and subsequent steps are performed to determine whether there is a bucket with the same digital number as the third digital number and the corresponding marks are all the first numerical values. Then, the second digital code in the second digital number group 2 is placed in the bucket with the same digital number until all target text log groups are placed.

[0160] Step S603: for each key text log after the initial screening, determine whether there is a situation where the marks corresponding to the buckets having the same digital number as the third digital number are all the first numerical values ​​after each independent placement of a second digital number group into the bucket.

[0161] Specifically, the second digital codes in a group of second digital numbering groups are placed into buckets with the same digital number, the buckets with the second digital number are marked as the first value, and the buckets without the second digital number are marked as the second value; it is determined whether there is a situation in which the marks corresponding to the buckets with the same digital number as the third digital number are all the first values; after the determination is completed, the second digital codes in all buckets are cleared; the second digital codes in the next group of second digital numbering groups are placed into buckets with the same digital number until all second digital numbering groups are placed.

[0162] Step S604: If it is determined that it does not exist, determine that the third digital number corresponding to the key text log after the initial screening does not exist in any second digital number group.

[0163] Step S605: If it is determined to exist, determine that the third digital number corresponding to the key text log after the initial screening exists in at least one second digital number group.

[0164] In an embodiment of the present application, if it is determined that a situation where all the first numerical values ​​exist occurs, then the buckets corresponding to the first digital numbers all contain second digital numbers that are the same as those in a second digital number group, and it can be determined that the first digital numbers corresponding to the key text logs all exist in the second digital numbers corresponding to a group of target text logs.

[0165] In an embodiment of the present application, a second bucket sort search algorithm is used to determine whether the corresponding third digital number exists in at least one second digital number group. Since the bucket sort search algorithm is the fastest and simplest algorithm to determine whether all elements of an array are in another array, it can improve the efficiency of determining whether the corresponding third digital number exists in at least one second digital number group, thereby improving the efficiency of secondary screening of key text logs.

[0166] Optionally, a specific implementation of matching the key text log to be matched with the target text log to obtain the target text log that matches the key text log to be matched may be:

[0167] The fourth digital number corresponding to each word of the key text log to be matched is matched with the second digital number corresponding to the target text log to obtain a target text log that matches the key text log to be matched.

[0168] Specifically, the fourth digital number is matched with the second digital number in word order. If the fourth digital number is the same as the second digital number, the fourth digital number of the next order is matched with the second digital number of the next order. If the fourth digital number is different from the second digital number, the fourth digital number is matched with the next order. Until all the fourth digital numbers are matched, the number of second digital numbers that are not matched with the fourth digital number is obtained. If the number of second digital numbers that are not matched with the fourth digital number is not greater than the numbering quantity threshold, the target text log corresponding to the second digital number is the target text log that matches the key text log to be matched. The numbering quantity threshold can be a parameter in the source code print log corresponding to the key text log.

[0169] Figure 6 A schematic diagram for matching the fourth digital number with the second digital number provided in this application, such as Figure 6 As shown, the fourth digital number is 1, 2, 3, 4, the second digital number is 1, 2, 3, 5, 4, 6, 7, 8, the number quantity threshold corresponding to the fourth digital number is 5, and there are 4 second digital numbers that do not match the fourth digital number, then the target text log corresponding to the second digital number is the target text log that matches the key text log to be matched.

[0170] In an embodiment of the present application, by matching the fourth digital number with the second digital number, it is determined whether the key text log matches the target text log. Since the matching algorithm in the prior art determines whether each key text log matches the target text log from three dimensions: word combination, each word, and each character of each target text log, and by matching the fourth digital number with the second digital number, it is determined whether each key text log matches the target text log from only two dimensions: each digital number combination and each digital number. Therefore, the time complexity of the matching algorithm can be reduced by an order of magnitude, thereby improving the matching efficiency.

[0171] Embodiment 7

[0172] Figure 7 This is a flow chart of the log matching method provided in Example 7 of the present application. The log matching method provided in Example 7 of the present application can be applied to the monitoring process of the target object. Figure 7 As shown, the method specifically comprises the following steps:

[0173] Step S701: receiving a monitoring request for a target object triggered by a user.

[0174] The target object includes multiple target sub-objects. For example, the target object may be a cloud server cluster, which includes multiple servers, and the servers are target sub-objects.

[0175] In the embodiment of the present application, a target object monitoring operation interface can be provided. Figure 8 The target object monitoring operation interface diagram provided for this application is as follows: Figure 8 As shown, the user can trigger a monitoring request for the target object by clicking a monitoring button provided in the target object monitoring operation interface.

[0176] Step S702: Obtain the key text log and target text log corresponding to the target object according to the monitoring request.

[0177] The key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object; and the target text log is a log generated by running the target object.

[0178] The embodiments of the present application do not specifically limit the method of obtaining the key text log and the target text log corresponding to the target object. For example, the identifier of the target object can be entered in the target object monitoring page. If the target object is a cloud server cluster, the IP address of the cloud service cluster can be entered. The target object can be accessed according to the identifier of the target object to obtain the key text log corresponding to the target object.

[0179] For example, Figure 8As shown, the target object monitoring page can also provide a key text log input control and a monitoring log input control. The user inputs the monitoring log and the key text log in the target object monitoring operation interface. After the user triggers a monitoring request for the target object, the monitoring log and the key text log of the target object input by the user can be received, and the monitoring log can be determined as the target text log.

[0180] For example, the user may input the monitoring log and the key text log by inputting text, or may input the monitoring log and the key text log by inputting a file. Figure 8 As shown, the user enters the key text log by entering the text EXT4-fs error(device)in:: and enters the monitoring log by entering file 1.

[0181] Step S703: Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log.

[0182] Step S704: Use the first digital number and the second digital number to filter the key text logs to filter out the key text logs to be matched.

[0183] Step S705: Match the key text log to be matched with the target text log to obtain a target text log that matches the key text log to be matched.

[0184] Step S706: Determine the target sub-object corresponding to the matching target text log.

[0185] Specifically, after obtaining the target text log that matches the key text log to be matched, the source code processing log corresponding to the key text log to be matched and the corresponding target sub-object information can be searched in the source code processing log library, and the target sub-object determined by the target sub-object information is determined as the target sub-object corresponding to the target text log.

[0186] For example, Figure 8 As shown, after determining the target sub-object corresponding to the matching target text log, the matching target text log and the corresponding target sub-object information can be displayed in the target object monitoring page. The target sub-object information can be the name, unique identifier, etc. of the target sub-object information.

[0187] In the embodiment of the present application, in the scenario of monitoring the target object, by screening the key text log, the efficiency of matching the key text log to be matched with the target text log can be reduced, and the efficiency of determining the target sub-object corresponding to the matched target text log can be further improved. It is possible to monitor whether the target object has a target text log that matches the key text log, and locate the target sub-object where the target text log that matches the key text log appears.

[0188] Optionally, the key text log is a log at a warning level or above, and after determining the target sub-object corresponding to the matching target text log, the method further includes:

[0189] Step S707A: Push the abnormal information of the target sub-object to the user.

[0190] Specifically, after obtaining the target text log that matches the key text log to be matched, the log level corresponding to the key text log to be matched can also be searched in the source code processing log library. If it is determined that the key text log is a log above the warning level, the abnormal information of the target sub-object can be pushed to the user.

[0191] The abnormal information of the target sub-object may include the target text log that matches the key text log to be matched, the target sub-object information, the log level corresponding to the key text log to be matched, etc. Pushing the abnormal information of the target sub-object to the user can prompt the user that the target sub-object has an abnormality, so that the user can handle the abnormality of the target sub-object in time.

[0192] Step S708B: calling the fault analysis tool corresponding to the target sub-object to perform fault analysis on the target sub-object.

[0193] In an embodiment of the present application, if the key text log is determined to be a log above the warning level, the target sub-object corresponding to the target text log that matches the key text log may have a fault, and the fault analysis tool that needs to be called can be determined by determining the target sub-object, thereby achieving fault analysis of the target sub-object.

[0194] Optionally, after determining the target sub-object corresponding to the matching target text log, the method further includes:

[0195] Step S707B: determine the number of target text logs that match the same target sub-object when it is running.

[0196] Specifically, the number of target text logs that match the same target sub-object when it is running can be determined by determining the number of target text logs with the same corresponding target sub-object information.

[0197] Step S708B: determine the health level of the target sub-object according to the number.

[0198] The embodiment of the present application does not specifically limit the method of determining the health status of the target sub-objects according to the quantity.

[0199] Exemplarily, if the number of target text logs that match the target sub-object is greater than the first log number threshold, the health of the target sub-object is determined to be poor; if the number of target text logs that match the target sub-object is greater than the second log number threshold and less than or equal to the first log number threshold, the health of the target sub-object is determined to be good; if the number of target text logs that match the target sub-object is less than or equal to the second log number threshold, the health of the target sub-object is determined to be excellent. The first log number threshold is greater than the second log number threshold.

[0200] In an embodiment of the present application, the health of the target sub-object can be determined based on the number of matching target text logs, so that the user can determine whether to perform maintenance, troubleshooting, etc. on the target sub-object based on the health of the target sub-object.

[0201] Embodiment 8

[0202] Fig. 9 This is a flow chart of the log matching method provided in the eighth embodiment of the present application. The log matching method provided in the eighth embodiment of the present application can be applied to the search process of the target text log. Fig. 9 As shown, the method specifically comprises the following steps:

[0203] Step S801: Receive a log search request corresponding to a target object triggered by a user.

[0204] The log search request includes the target text log.

[0205] In the embodiment of the present application, the target text log may be a log generated when the target object fails. The user may obtain the corresponding answer data by triggering a log search request corresponding to the target object, and process the target object failure according to the corresponding answer data.

[0206] Exemplarily, the log matching method provided in Embodiment 8 of the present application can be applied to a conversational robot. Fig.10 The schematic diagram of the conversation robot provided for this application is as follows: Fig.10 As shown, the user can enter the target text log in the text box provided by the dialogue robot and click the send button to trigger the log search request corresponding to the target object.

[0207] Step S802: Obtain pre-stored key text logs.

[0208] Among them, the key text log is a pre-configured text log that has a positioning function for the log search answer data of the target object.

[0209] In the embodiment of the present application, the pre-stored key text log may be a text processing log stored in a knowledge base database, and the pre-stored key text log may be obtained from the knowledge base database. The text processing log is a log after non-parameter word extraction is performed on the knowledge text log in the knowledge base. The knowledge base stores the knowledge text log and the corresponding knowledge and experience summary, such as a troubleshooting method.

[0210] In the embodiment of the present application, the knowledge text log is a log mentioned by the knowledge base user when sharing experiences in the knowledge base. For example, the knowledge base user can share the processing method of the log: EXT4-fs error (device %s) in %s: %d: %s\ in the knowledge base, then EXT4-fserror (device %s) in %s: %d: %s\ can be obtained from the text shared by the knowledge base user, and it can be determined as a knowledge text log, and non-parameter word extraction is performed on it, and the knowledge text log after non-parameter word extraction is determined as a text processing log, that is, a key text log.

[0211] Step S803: Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log.

[0212] Step S804: Use the first digital number and the second digital number to filter the key text logs to filter out the key text logs to be matched.

[0213] Step S805: Match the key text log to be matched with the target text log to obtain a key text log that matches the target log.

[0214] Specifically, the key text log to be matched is matched with the target text log to determine the key text log that matches the target text log. The method of matching the key text log to be matched with the target text log is similar to that in the embodiment. After determining that the target text log matches the key text log to be matched, the key text log to be matched can be determined as the key text log that matches the target log.

[0215] Step S806: Output answer data corresponding to the matching key text log to the user.

[0216] In the implementation of the present application, the output answer data may be a URL including the answer corresponding to the key text log, or may be a text including the answer corresponding to the key text log, and the embodiments of the present application do not specifically limit this.

[0217] For example, Fig.10 As shown, after the user inputs the target text log, the URL of the knowledge text log corresponding to the key text log corresponding to the target text log can be output to the user. The user can obtain knowledge and experience related to the target text log by viewing the URL.

[0218] Specifically, after obtaining the key text log that matches the target log, answer data corresponding to the matched key text log can be obtained from the knowledge base database, and the answer data can be output to the user.

[0219] In an embodiment of the present application, by matching key text logs to obtain answer data corresponding to matching key text logs, the accuracy of obtaining answer data corresponding to the target text log can be improved; by screening key text logs, the matching efficiency can be improved and the response time for outputting answer data to users in response to log search requests can be reduced.

[0220] Embodiment 9

[0221] Fig.11 This is a schematic diagram of the structure of the log matching device provided in the ninth embodiment of the present application. The log matching device provided in the embodiment of the present application can execute the processing flow provided in the first embodiment of the log matching method. Fig.11 As shown, the log matching device 90 includes: an acquisition module 901 , a determination module 902 , a screening module 903 , and a matching module 904 .

[0222] Specifically, acquisition module 901 is used to obtain the key text log and target text log corresponding to the target object; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object or the log search answer data of the target object, and the target text log is the log generated by running the target object.

[0223] The determination module 902 is used to determine the first digital number corresponding to each word in the key text log and the second digital number corresponding to each word in the target text log.

[0224] The screening module 903 is used to screen the key text logs using the first digital number and the second digital number to screen out the key text logs to be matched.

[0225] The matching module 904 is used to match the key text log to be matched with the target text log to obtain a target text log that matches the key text log to be matched.

[0226] The device provided in the embodiment of the present application can be specifically used to execute the method embodiment provided in the above-mentioned embodiment 1, and the specific functions will not be repeated here.

[0227] Optionally, the log matching device 90 also includes: a word library construction module; the word library construction module is used to: obtain the source code processing log in the source code processing log library, the source code processing log is a log after non-parameter word extraction of the source code printing log; each non-repeated word in the source code processing log is uniquely digitally numbered, and each non-repeated word and the corresponding digital number are stored in the word library.

[0228] Optionally, the determination module 902 includes: a first determination unit and a second determination unit; the first determination unit is used to: for each word in the key text log, search for the digital number corresponding to each word in the word library, and determine the found digital number as the first digital number of the same word in the key text log; the second determination unit is used to: for each word in the target text log, search for the digital number corresponding to each word in the word library, and determine the found digital number as the second digital number of the same word in the target text log.

[0229] Optionally, the determination module 902 is specifically used to: if the digital number corresponding to the word of the key text log and / or the target text log is not found in the word library, configure a unique digital number for the unfound word; and determine the configured digital number as the digital number of the unfound word.

[0230] Optionally, the screening module 903 is specifically used to: use the first digital number and the second digital number to perform a preliminary screening of the key text log to obtain the key text log after the preliminary screening; determine the third digital number corresponding to each word in the key text log after the preliminary screening; use the third digital number and the second digital number to perform a secondary screening of the key text log after the preliminary screening to filter out the key text log to be matched.

[0231] Optionally, the screening module 903 includes: a preliminary screening unit; the preliminary screening unit is used to: for each key text log, determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs; if it is determined that the first digital number corresponding to a key text log does not exist in the second digital numbers corresponding to all target text logs, then delete the key text log; if it is determined that the first digital number corresponding to a key text log exists in the second digital numbers corresponding to all target text logs, then determine the key text log as the key text log after preliminary screening.

[0232] Optionally, the initial screening unit is specifically used to: for each key text log, use a first bucket sorting search algorithm to determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs.

[0233] Optionally, the initial screening unit is specifically used to: place the digital numbers corresponding to each non-repeated word in the word library in corresponding buckets in ascending order; place the second digital numbers corresponding to each word in all target text logs into buckets with the same digital numbers, and mark the buckets with the second digital numbers as the first numerical values, and mark the buckets without the second digital numbers as the second numerical values; for each key text log, determine whether the marks corresponding to the buckets with the same first digital numbers corresponding to the key text logs are all first numerical values; if it is determined that they are all the first numerical values, determine that the first digital numbers corresponding to the key text logs all exist in the second digital numbers corresponding to all target text logs; if it is determined that they are not all the first numerical values, determine that the first digital numbers corresponding to the key text logs do not all exist in the second digital numbers corresponding to all target text logs.

[0234] Optionally, the screening module 903 includes: a secondary screening unit; the secondary screening unit is used to: divide the target text log into target text log groups and determine the second digital number corresponding to the target text log group as a second digital number group, each target text log group includes a preset number of target text logs; for each key text log after the initial screening, determine whether the corresponding third digital number exists in at least one second digital number group; if it is determined that the third digital number corresponding to a key text log after the initial screening does not exist in any second digital number group, then delete the key text log after the initial screening; if it is determined that the third digital number corresponding to a key text log after the initial screening exists in at least one second digital number group, then determine the key text log after the initial screening as the key text log to be matched.

[0235] Optionally, the secondary screening unit is specifically used to: for each key text log after the initial screening, use the second bucket sort search algorithm to determine whether the corresponding third digital number exists in at least one second digital number group.

[0236] Optionally, the secondary screening unit is specifically used to: place the digital numbers corresponding to each non-repeated word in the word library in corresponding buckets in order from small to large; for each target text log group, place the second digital code in the corresponding second digital numbering group into the bucket with the same digital number, and mark the bucket with the second digital number as the first value, and mark the bucket without the second digital number as the second value; for each key text log after the initial screening, determine whether there is a situation where the marks corresponding to the bucket with the same digital number as the third digital number are all the first values ​​after each independent placement of a second digital numbering group into the bucket; if it is determined to exist, determine that the third digital number corresponding to the key text log after the initial screening exists in at least one second digital numbering group; if it is determined not to exist, determine that the third digital number corresponding to the key text log after the initial screening does not exist in any second digital numbering group.

[0237] Optionally, the matching module 904 is specifically configured to match the fourth digital number corresponding to each word of the key text log to be matched with the second digital number corresponding to the target text log to obtain a target text log that matches the key text log to be matched.

[0238] The device provided in the embodiment of the present application can be specifically used to execute any method embodiment of the above-mentioned embodiments 2 to 6, and the specific functions will not be repeated here.

[0239] The embodiment of the present application also provides a log matching device, which can execute the processing flow provided in the seventh embodiment of the log matching method. The log matching device includes: a receiving module, a log acquisition module, a number determination module, a screening module, a matching module, and an object determination module.

[0240] Specifically, the receiving module is used to: receive a monitoring request for a target object triggered by a user; the target object includes multiple target sub-objects.

[0241] The log acquisition module is used to: obtain the key text log and target text log corresponding to the target object according to the monitoring request; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object; the target text log is the log generated by running the target object.

[0242] The number determination module is used to determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log.

[0243] The screening module is used to screen the key text logs using the first digital number and the second digital number to screen out the key text logs to be matched.

[0244] The matching module is used to match the key text log to be matched with the target text log to obtain the target text log that matches the key text log to be matched.

[0245] The object determination module is used to determine the target sub-object corresponding to the matched target text log.

[0246] The device provided in the embodiment of the present application can be specifically used to execute the method embodiment provided in the above-mentioned embodiment seven, and the specific functions will not be repeated here.

[0247] Optionally, the log matching device further includes a push module and an analysis module; the push module is used to push abnormal information of the target sub-object to the user; the analysis module is used to call a fault analysis tool corresponding to the target sub-object to perform fault analysis on the target sub-object.

[0248] Optionally, the log matching device further comprises: a health level determination module; the health level determination module is used to: determine the number of target text logs that match the same target sub-object when it is running; and determine the health level of the target sub-object according to the number.

[0249] The embodiment of the present application also provides a log matching device, which can execute the processing flow provided in the log matching method embodiment 8. The log matching device includes: a receiving module, an acquiring module, a determining module, a screening module, a matching module, and an output module.

[0250] Specifically, the receiving module is used to receive a log search request corresponding to a target object triggered by a user, wherein the log search request includes a target text log.

[0251] The acquisition module is used to: acquire pre-stored key text logs; the key text logs are pre-configured text logs that have a positioning effect on the log search answer data of the target object.

[0252] The determination module is used to determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log.

[0253] The screening module is used to screen the key text logs using the first digital number and the second digital number to screen out the key text logs to be matched.

[0254] The matching module is used to match the key text log to be matched with the target text log to obtain the key text log that matches the target log.

[0255] The output module is used to output answer data corresponding to the matching key text log to the user.

[0256] The device provided in the embodiment of the present application can be specifically used to execute the method embodiment provided in the above-mentioned embodiment 8, and the specific functions will not be repeated here.

[0257] Embodiment 10

[0258] Fig.12 This is a schematic diagram of the structure of an electronic device provided in Embodiment 10 of the present application. Fig.12 As shown, the electronic device 100 includes: a processor 1001 , a memory 1002 , a transceiver 1003 , and computer-executable instructions stored in the memory 1002 and executable on the processor 1001 .

[0259] The processor 1001, the memory 1002 and the transceiver 1003 are interconnected in circuits; the transceiver 1003 is used to send and receive data; and the processor 1001 implements the log matching method provided by any of the above method embodiments when running computer execution instructions.

[0260] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method provided by any of the above method embodiments is implemented.

[0261] An embodiment of the present application also provides a computer program product, which includes: computer execution instructions, which are stored in a readable storage medium. At least one processor of an electronic device can read the computer execution instructions from the readable storage medium, and at least one processor executes the computer execution instructions so that the electronic device executes the method provided by any of the above method embodiments.

[0262] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0263] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A log matching method, characterized in that: include: Obtaining a key text log and a target text log corresponding to the target object; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object or log search answer data of the target object, and the target text log is a log generated by running the target object; Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log; The key text logs are screened by using the first digital number and the second digital number to screen out the key text logs to be matched; the first digital number corresponding to the key text log to be matched exists in the second digital number; The key text log to be matched is matched with the target text log to obtain the target text log that matches the key text log to be matched.

2. The method according to claim 1, characterized in that Before determining the first digital number corresponding to each word in the key text log and the second digital number corresponding to each word in the target text log, the method further includes: Obtain a source code processing log in a source code processing log library, wherein the source code processing log is a log after non-parameter word extraction is performed on the source code printing log; Each non-repeated word in the source code processing log is uniquely numbered, and each non-repeated word and the corresponding digital number are stored in the word library.

3. The method according to claim 2, characterized in that The step of determining a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log includes: For each word in the key text log, searching the word library for a digital number corresponding to each word, and determining the searched digital number as the first digital number of the same word in the key text log; For each word in the target text log, the digital number corresponding to each word is searched in the word library, and the searched digital number is determined as the second digital number of the same word in the target text log.

4. The method according to claim 2, characterized in that: The using the first digital number and the second digital number to screen the key text log to screen out the key text log to be matched includes: Using the first digital number and the second digital number to preliminarily screen the key text log to obtain a preliminarily screened key text log; Determine a third digital number corresponding to each word in the key text log after the initial screening; The key text logs after the primary screening are secondary screened using the third digital number and the second digital number to screen out the key text logs to be matched.

5. The method according to claim 4, characterized in that The using the first digital number and the second digital number to preliminarily screen the key text log to obtain the preliminarily screened key text log includes: For each key text log, determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs; If it is determined that the first digital number corresponding to a certain key text log does not exist in the second digital numbers corresponding to all target text logs, the key text log is deleted; If it is determined that the first digital number corresponding to a certain key text log exists in the second digital numbers corresponding to all target text logs, the key text log is determined as the key text log after the initial screening.

6. The method according to claim 5, characterized in that The step of determining, for each key text log, whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs includes: For each key text log, a first bucket sorting search algorithm is used to determine whether the corresponding first digital number exists in the second digital numbers corresponding to all target text logs.

7. The method according to claim 4, characterized in that The second screening of the key text logs after the primary screening by using the third digital number and the second digital number to screen out the key text logs to be matched includes: Dividing the target text logs into target text log groups and determining the second digital numbers corresponding to the target text log groups as second digital number groups, each target text log group including a preset number of target text logs; For each of the key text logs after the initial screening, determining whether the corresponding third digital number exists in at least one second digital number group; If it is determined that the third digital number corresponding to a key text log after the initial screening does not exist in any second digital number group, the key text log after the initial screening is deleted; If it is determined that the third digital number corresponding to a certain pre-screened key text log exists in at least one second digital number group, the pre-screened key text log is determined as the key text log to be matched.

8. The method according to claim 7, characterized in that The step of determining, for each of the key text logs after the initial screening, whether the corresponding third digital number exists in at least one second digital number group comprises: For each key text log after the initial screening, the second bucket sorting search algorithm is used to determine whether the corresponding third digital number exists in at least one second digital number group.

9. The method according to any one of claims 1 to 8, characterized in that: The step of matching the key text log to be matched with the target text log to obtain the target text log that matches the key text log to be matched includes: The fourth digital number corresponding to each word of the key text log to be matched is matched with the second digital number corresponding to the target text log to obtain a target text log that matches the key text log to be matched.

10. A log matching method, characterized in that: include: Receiving a monitoring request for a target object triggered by a user; the target object includes a plurality of target sub-objects; Obtaining a key text log and a target text log corresponding to the target object according to the monitoring request; the key text log is a pre-configured text log that has a positioning function for at least one target sub-object in the target object; the target text log is a log generated by running the target object; Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log; The key text logs are screened by using the first digital number and the second digital number to screen out the key text logs to be matched; the first digital number corresponding to the key text log to be matched exists in the second digital number; Matching the key text log to be matched with the target text log to obtain the target text log that matches the key text log to be matched; Determine the target sub-object corresponding to the matching target text log.

11. A log matching method, characterized in that: include: Receive a log search request corresponding to a target object triggered by a user, wherein the log search request includes a target text log; Obtain pre-stored key text logs; The key text log is a pre-configured text log that has a positioning effect on the log search answer data of the target object; Determine a first digital number corresponding to each word in the key text log and a second digital number corresponding to each word in the target text log; The key text logs are screened by using the first digital number and the second digital number to screen out the key text logs to be matched; the first digital number corresponding to the key text log to be matched exists in the second digital number; Matching the key text log to be matched with the target text log to obtain the key text log that matches the target log; Output the answer data corresponding to the matching key text log to the user.

12. An electronic device comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • A log processing method based on a message queue and a search engine and related equipment

    CN109815201A

  • Apparatus and method for document collection and filtering

    US20100257141A1