Log analysis method and device, electronic equipment and computer readable storage medium

By collecting, extracting, and inputting log data into a log neural network model during log analysis, the problems of difficult log screening and inefficient manual analysis are solved, enabling fast and accurate log analysis and root cause identification.

CN114357057BActive Publication Date: 2026-01-16HAINING ESWIN IC DESIGN CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111664052.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2026-01-16
Estimated Expiration
2042-01-16

AI Technical Summary

Technical Problem

In the large number of logs generated in the test environment, it is difficult to accurately filter out logs related to specific issues. Manual analysis is inefficient and prone to omissions.

Method used

By collecting and reading log information, key information is extracted according to the pre-determined problem type, and then input into the log analysis neural network model for analysis to generate a problem report.

Benefits of technology

Quickly filter out effective content for problem analysis, avoid omissions, automatically identify the root cause of the problem, and free up manual analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357057B_ABST
    Figure CN114357057B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a log analysis method and device, electronic equipment and computer readable storage medium, and relate to the field of data analysis. The method comprises: collecting and reading logs to obtain log information; according to a pre-determined problem type, extracting key information corresponding to each problem type in the log information; inputting the key information into a pre-determined log analysis neural network model to obtain a problem report output by the log analysis neural network model. Embodiments of the present application can quickly filter out effective content related to problem analysis, ensure that the extracted key information is convenient for analyzing problems, and avoid omissions; the problem root cause can also be determined conveniently and quickly, freeing up manual analysis, and problems can be automatically analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data analysis, in particular, the present application relates to a log analysis method and device, electronic equipment and computer readable storage medium. BACKGROUND

[0002] In a computer system, network equipment, system and service program, etc. will generate log event records when operating, and each line of log records the date, time, user and description of related operations such as action.

[0003] At present, in the test environment of system development and software development, the problems and deficiencies can be analyzed based on the generated log, however, the amount of log generated in the test environment is very large, and the types are also very many, so the log screening is difficult, such as when a specific problem such as screen fixation problem occurs, the log related to the screen fixation problem cannot be accurately screened out, which is not enough to support the analysis of the problem, and the screened log needs to be analyzed manually one by one, which is easy to produce errors or omissions. SUMMARY

[0004] The present application provides a log analysis method, device, electronic equipment and computer readable storage medium, which can solve the above problems. The technical solution is as follows:

[0005] According to an aspect of an embodiment of the present application, a log analysis method is provided, which comprises:

[0006] Collecting and reading the log to obtain log information;

[0007] According to the pre-determined problem type, the key information corresponding to each problem type in the log information is extracted;

[0008] The key information is input into the pre-determined log analysis neural network model to obtain the problem report output by the log analysis neural network model.

[0009] In one possible implementation, the log to be processed is collected and read to obtain log information, which comprises:

[0010] According to the pre-set log collection script, the log is collected and obtained;

[0011] According to the pre-set log reading process, the log is read to obtain the log information.

[0012] In another possible implementation, according to the pre-determined problem type, the key information corresponding to each problem type in the log information is extracted, which comprises:

[0013] The log type of the log is determined, and the log object for storing the key information is constructed according to the log type;

[0014] Add log objects to a preset log collection, and determine the key information for each problem type in the log collection based on the pre-defined problem types.

[0015] In yet another possible implementation, after determining the key information for each problem type in the log set based on the pre-determined problem types, it also includes:

[0016] Based on the question type and the key information corresponding to each question type, construct a question type object to store the key information.

[0017] In another possible implementation, key information is input into a pre-defined log analysis neural network model to obtain a problem report output by the model. This also includes:

[0018] Based on the problem type, identify and obtain the auxiliary analysis information corresponding to each problem type.

[0019] In another possible implementation, key information is input into a pre-defined log analysis neural network model to obtain a problem report output by the model, including:

[0020] The problem type set is input into the log analysis neural network, and the problem type set is analyzed in conjunction with auxiliary analysis information to obtain the problem report output by the log analysis neural network model.

[0021] In yet another possible implementation, the method also includes the training process of the log analysis neural network, including:

[0022] Obtain training samples and training labels. Training samples are sample log information, and training labels are used to characterize the question types in the corresponding training samples.

[0023] The initial neural network is trained using training samples and training labels to obtain a log analysis neural network model.

[0024] According to another aspect of the embodiments of this application, a log analysis apparatus is provided, the apparatus comprising:

[0025] The data acquisition module is used to collect and read logs to obtain log information;

[0026] The determination module is used to extract key information from the log information corresponding to each problem type based on a pre-determined problem type.

[0027] The analysis module is used to input key information into a pre-defined log analysis neural network model to obtain a problem report output by the log analysis neural network model.

[0028] According to another aspect of the embodiments of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the log analysis method described above.

[0029] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the log analysis method described above.

[0030] The technical scheme provided by the embodiments of the present application has the beneficial effects that:

[0031] The embodiments of the present application can quickly filter out the effective content involved in the problem analysis by extracting the key information corresponding to each problem type from the log information obtained by collecting and reading the log according to the pre-determined problem type, ensuring that the extracted key information is convenient for analyzing the problem and avoiding omission; and the problem report output by the log analysis neural network model can be obtained by inputting the key information into the pre-determined log analysis neural network model, so that the problem root cause can be determined conveniently and quickly, and manual analysis is liberated, and the problem can be automatically analyzed. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the technical scheme in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced.

[0033] Figure 1 A schematic diagram of an implementation environment for the log analysis method provided by the embodiments of the present application;

[0034] Figure 2 A flowchart of a log analysis method provided by the embodiments of the present application;

[0035] Figure 3 A functional full flowchart of a log analysis provided by the embodiments of the present application;

[0036] Figure 4 A structural schematic diagram of a log analysis device provided by the embodiments of the present application;

[0037] Figure 5 A structural schematic diagram of an electronic device for a log analysis method provided by the embodiments of the present application. DETAILED DESCRIPTION

[0038] The embodiments of the present application will be described below in conjunction with the drawings in the present application. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions for explaining the technical scheme of the embodiments of the present application, and do not limit the technical scheme of the embodiments of the present application.

[0039] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein can also include the plural forms unless specifically stated otherwise. It should be further understood that the terms "comprise" and "include" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or their combinations supported by the present technology. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can mean that the element and the other element are connected through an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The term "and / or" used herein means that at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".

[0040] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be described in further detail below with reference to the drawings.

[0041] First, several terms related to the present application are introduced and explained:

[0042] Android operating system is a mobile operating system developed by Google, a U.S. company, which is a free and open source operating system based on Linux kernel, mainly used in mobile devices such as smartphones and tablet computers, etc. The system architecture includes application layer, application framework layer, system runtime library layer and Linux kernel layer, and has developed to Android 12 version.

[0043] Neural network is a complex network system formed by a large number of simple processing units (called neurons) widely connected with each other, which reflects many characteristics of brain function, and is a highly complex nonlinear dynamic learning system. Neural network has large-scale parallelism, distributed storage and processing, self-organization, self-adaptation and self-learning ability, and is particularly suitable for processing information processing problems that need to consider many factors and conditions, and are not accurate and fuzzy.

[0044] In the prior art, the analysis of logs has the following possible problems:

[0045] The amount of logs is large, specifically, in a specific test environment such as 10*24H Monkey running test, the amount of logs generated is very large, up to hundreds of G, which causes great difficulty in log collection and screening.

[0046] The amount of logs required to be analyzed for a specific problem type such as a screen fixation problem can be insufficient, and the effective content filtered out is limited, which is insufficient to support problem analysis.

[0047] Developers need to manually analyze logs one by one, which is inefficient and prone to omissions.

[0048] The log analysis method, device, electronic equipment and computer readable storage medium provided by the present application aim to solve the above technical problems of the prior art.

[0049] The technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application will be described below through the description of several exemplary embodiments. It should be pointed out that the following embodiments can be mutually referenced, borrowed or combined. For the same terms, similar features and similar implementation steps in different embodiments, they will not be described repeatedly.

[0050] Figure 1 The schematic diagram of the implementation environment for implementing the log analysis method provided by the embodiments of the present application is shown in FIG. 1. The implementation environment 1000 can include one or more of the terminal devices 1100, 1200 and 1300, the network 1400 and the server 1500. The network 1400 is a medium for providing a communication link between the terminal devices 1100, 1200 and 1300 and the server 1500. The network 1400 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0051] It should be understood that Figure 1 The number of terminal devices, networks and servers in the implementation environment 1000 is only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers. For example, the server 1500 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, etc.

[0052] A terminal, in embodiments of the present application, is a device with wireless transceiving function, which can be referred to as a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal device, a vehicle-mounted terminal device, an industrial control terminal device, a UE unit, a UE station, a mobile station, a remote station, a remote terminal device, a mobile device, a UE terminal device, a wireless communication device, a UE agent, or a UE apparatus, etc. The terminal device can be fixed or mobile, for example, the terminal device can be a mobile phone, a pad, a desktop computer, a notebook computer, an all-in-one machine, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a wearable device, a terminal device in future mobile communication network, or a terminal device in future evolved public land mobile network (PLMN), etc., which are not limited in embodiments of the present application.

[0053] A user can use the terminal devices 1100, 1200, and 1300 to interact with the server 150 through the network 140 to complete analysis of the log. The terminal devices 110, 120, and 130 can be various electronic devices supporting resource pushing, including but not limited to a smart phone, a tablet computer, a portable computer, a desktop computer, a wearable device, a virtual reality device, etc.

[0054] The server 1500 can be a server providing various services, in particular, a server providing a log analysis service.

[0055] A log analysis method is provided in the embodiments of the present application, as shown in the method comprises: Figure 2

[0056] S101, collecting and reading logs to obtain log information.

[0057] It should be understood that analyzing logs first of course requires collecting logs, and in the embodiments of the present application, logs generated in the Android operating system are taken as an example for description. In the Android operating system, logs of types such as Main, System, Sysinfo, Crash, Anr, etc. are generated, among which, the common Main log refers to the log of the code layer in the Android operating system; the System log refers to the log of the system component in the Android operating system; the Crash refers to the crash log generated in the Android operating system due to the shortage of system library files, API, third-party library files, system resources, etc. or configuration errors, etc. The embodiments of the present application are not limited specifically.

[0058] In the embodiments of the present application, all logs generated in the Android operating system are collected and read. The way of collecting logs can be based on a pre-written setting script, and the way of reading log information in the logs can be reading logs through a log analysis tool. Specifically, inter-process Socket communication can be called to wake up the log reading process, and the collected logs can be read one by one to obtain log information.

[0059] S102, according to the pre-determined problem type, extracting the key information corresponding to each problem type in the log information.

[0060] The pre-determined problem type refers to the abnormality or problem in the Android operating system, such as anr, crash, watchdog, memory leak, assert, etc., which will be displayed in the form of logs. Therefore, in the embodiments of the present application, the key information corresponding to each problem type in the log information can be extracted according to the pre-determined problem type for subsequent analysis.

[0061] S103, inputting the key information into a pre-determined log analysis neural network model to obtain a problem report output by the log analysis neural network model.

[0062] ​After the key information is determined, the key information can be analyzed to obtain a problem report corresponding to each problem. In the embodiments of the present application, the key information can be input into a pre-determined log analysis neural network model for analysis, or can be analyzed by other machine algorithm models such as random forest, Bayesian, neural network, etc. that have the same function. The embodiments of the present application are not specifically limited.

[0063] The embodiments of the present application can quickly filter out effective content related to problem analysis by extracting key information corresponding to each problem type from log information obtained by collecting and reading logs according to pre-determined problem types, ensuring that the extracted key information is convenient for analyzing problems and avoiding omissions. By inputting the key information into a pre-determined log analysis neural network model, a problem report output by the log analysis neural network model can be obtained to quickly determine the root cause of the problem, freeing up manual analysis and enabling automatic analysis of problems.

[0064] In the embodiments of the present application, a possible implementation is provided, which collects and reads logs to be processed to obtain log information, including:

[0065] The log is collected according to a pre-set log collection script;

[0066] The log is read according to a pre-set log reading process to obtain log information.

[0067] The pre-set log collection script can be a shell script, which can pre-store various commands in a file to form a batch processing program file. In the embodiments of the present application, a developer can write corresponding code commands to construct a log collection script for collecting logs generated in an Android operating system. The embodiments of the present application are not specifically limited, and can access a corresponding log file directory in a system database to collect all logs based on the log file directory. Specific logs include, for example, Android log, Kernel log, Radio log, Crash, ANR, and Tombstones.

[0068] After the collected log files, the log information recorded in the logs needs to be further read. A log reading process can be pre-set, and the log reading process can be woken up after the log collection is completed. The log reading process will automatically read the collected logs one by one. The log reading process is also realized by pre-writing corresponding code commands by a developer, and the embodiments of the present application are not specifically limited.

[0069] The log is acquired according to the pre-set log acquisition script; the log is read according to the pre-set log reading process, and log information is acquired, all logs generated by the system can be efficiently and completely acquired, omission is avoided, and subsequent analysis is facilitated.

[0070] In the embodiment of the application, a possible implementation is provided, according to the pre-determined problem types, the key information corresponding to each problem type in the log information is extracted, including:

[0071] The log type of the log is determined, and a log object for storing the key information is constructed according to the log type;

[0072] The log object is added to a pre-set log collection, and the key information corresponding to each problem type in the log collection is determined according to the pre-determined problem types.

[0073] It should be understood that the amount of logs generated in the Android operating system is very large, all logs are collected in the embodiment of the application, among which, the log information recorded in many logs is the basic running content of the system, and the log information related to design development or testing problems needs to be further processed to obtain the key information related to the problems.

[0074] Firstly, the log object corresponding to the log type can be constructed according to the log type, the log object is used to store the key information related to each problem type, that is, one log type corresponds to one log object, and the log object stores the key information corresponding to each problem type in the log information belonging to the log type.

[0075] Secondly, each log object can be added to a pre-set log collection, in the embodiment of the application, one log collection is constructed, and all log objects are integrated together, which is more convenient for analysis, it should be understood that each log object may include key information related to multiple problem types at this time, and the information corresponding to each problem type needs to be further determined, that is, the key information corresponding to each problem type in the log collection is determined according to the pre-determined problem types.

[0076] In the embodiment of the application, a possible implementation is provided, after the key information corresponding to each problem type in the log collection is determined according to the pre-determined problem types, the implementation further includes:

[0077] According to the problem types and the key information corresponding to each problem type, a problem type object for storing the key information is constructed.

[0078] It should be understood that the determined key information is also multiple, in the embodiment of the application, the key information corresponding to each problem type is taken as a whole, that is, a problem type object, which is convenient for subsequent analysis.

[0079] The log object is constructed based on the log type of the log, and the problem type object is constructed based on the problem type, the content to be analyzed is quantified as an object for analysis, and the performance of log analysis is improved.

[0080] In an embodiment of the present application, a possible implementation is provided, key information is input into a pre-determined log analysis neural network model, and a problem report output by the log analysis neural network model is obtained, which includes the following steps:

[0081] According to the problem type, auxiliary analysis information corresponding to each problem type is determined and obtained.

[0082] It should be understood that the log information recorded by the log is specifically the system information and the running state information of the Android operating system, the system information records various software and hardware resources in the Android operating system, and the running state information records the running time state of various software and hardware resources in the Android operating system, some of the system common system information and running state information can be used for auxiliary problem analysis, in the embodiment of the present application, according to each problem type, the possible auxiliary analysis information corresponding to each problem type is determined, for example, the running of a process in the current system is suddenly interrupted, the record of the interruption of the process will appear in the log information, and the auxiliary analysis information is the more specific reason for the interruption of the process.

[0083] In the embodiment of the present application, the auxiliary analysis information is collected by a pre-set function script, for example, a Native Process process, a Python or a Shell function script can be used, and a corresponding code program is written by a developer to implement, which is not limited in the embodiment of the present application.

[0084] In an embodiment of the present application, a possible implementation is provided, key information is input into a pre-determined log analysis neural network model, and a problem report output by the log analysis neural network model is obtained, which includes the following steps:

[0085] The problem type object is added to a pre-set problem type combination to obtain a problem type set;

[0086] The problem type set is input into the log analysis neural network, and the problem type set is analyzed in combination with the auxiliary analysis information to obtain a problem report output by the log analysis neural network model.

[0087] In the log analysis in the embodiments of the present application, all problem types are analyzed, therefore, in the embodiments, each problem type object is added to a preset problem type set to obtain a problem type set, the problem type set records all key information about each problem type, and the problem type set is input to a log analysis neural network model for analysis, and the training process of the log analysis neural network model is described in subsequent embodiments.

[0088] The embodiments of the present application provide a possible implementation, and the log analysis method further includes a training process of a log analysis neural network, including:

[0089] A training sample and a training label are obtained, the training sample is sample log information, and the training label is used to represent a problem type in the corresponding training sample.

[0090] The preset initial neural network is trained by using the training sample and the training label to obtain a log analysis neural network model.

[0091] The log analysis neural network model provided by the embodiments of the present application is a machine learning model, and specifically relates to machine learning algorithms such as random forest and Bayesian, and is obtained by training an initial neural network by using a pre-obtained training sample and a training label.

[0092] The training sample of the log analysis neural network model in the embodiments of the present application can be a plurality of sample log information, and the training label can be a corresponding problem type in each sample log information, specifically, the output result is represented in the form of a feature value, and the feature value is used to represent whether the problem type corresponding to the feature value appears and the proportion of the problem type.

[0093] The trained log analysis neural network model extracts feature values corresponding to each problem type in the problem type set according to the current input problem type set, and the feature values can be used to determine which problems appear in the current development or test Android operating system, and determine the problem root cause.

[0094] The embodiments of the present application analyze the problem type set by using the log analysis neural network model, and utilize the characteristics of machine learning, so that the problems of the system can be efficiently and accurately determined.

[0095] The embodiments of the present application provide a possible implementation, and the function full process of log analysis includes the functions of the log analysis neural network model, Figure 3 A function full process diagram of log analysis provided by the embodiments of the present application is shown in Figure 3 The function full process of log analysis includes:

[0096] Log collection tool, i.e. the script tool for collecting logs in the above embodiment, is used to represent the collection of logs;

[0097] Log analysis automation tool, i.e. the process tool for reading logs in the above embodiment, is used to represent the reading of logs;

[0098] Log extraction and analysis, i.e. the processing of log information in the above embodiment, including the steps of constructing a log object, determining the key information corresponding to each problem type, constructing a problem type object, etc.

[0099] Problem type set, i.e. the problem type set constructed by each problem type object in the above embodiment;

[0100] Log automated analysis, i.e. the automated analysis of the problem type set according to the pre-determined log analysis neural network model;

[0101] Log analysis result, i.e. the analysis of the characteristic value corresponding to each problem type in the above embodiment, to determine the problem type and the root cause of the problem type.

[0102] The embodiment of the present application provides a log analysis device, as shown in the figure, which can include: Figure 4 acquisition module 110, determination module 210 and analysis module 310, wherein,

[0103] The acquisition module 110 is used to collect and read logs to obtain log information.

[0104] The determination module 210 is used to extract the key information corresponding to each problem type in the log information according to the pre-determined problem type.

[0105] The analysis module 310 is used to input the key information into the pre-determined log analysis neural network model to obtain the problem report output by the log analysis neural network model.

[0106] In one possible implementation, the acquisition module 110 includes:

[0107] The script module is used to collect logs according to the pre-set log collection script.

[0108] The log is read according to the pre-set log reading process to obtain log information.

[0109] In another possible implementation, the determination module 210 includes:

[0110] The first construction module is used to determine the log type of the log, and construct a log object storing the key information according to the log type.

[0111] a key information module, configured to add the log object into a preset log set, and determine key information corresponding to each problem type in the log set according to the predetermined problem type.

[0112] In yet another possible implementation, the key information module comprises:

[0113] a second construction module, configured to construct a problem type object for storing the key information according to the problem type and the key information corresponding to each problem type.

[0114] In yet another possible implementation, the analysis module 310 further comprises:

[0115] an auxiliary module, configured to determine and obtain auxiliary analysis information corresponding to each problem type according to the problem type.

[0116] In yet another possible implementation, the analysis module 310 further comprises:

[0117] a report module, configured to add the problem type object into a preset problem type combination, and obtain a problem type set;

[0118] input the problem type set into a log analysis neural network, and analyze the problem type set in combination with the auxiliary analysis information, to obtain a problem report output by the log analysis neural network model.

[0119] In yet another possible implementation, the analysis module 310 further comprises:

[0120] a training module, configured to obtain a training sample and a training label, the training sample being sample log information, and the training label being used to represent a problem type in the corresponding training sample;

[0121] train a preset initial neural network with the training sample and the training label, to obtain the log analysis neural network model.

[0122] The electronic device provided in the embodiments of the present application comprises a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the log analysis method. Compared with related technologies, the embodiments of the present application can quickly filter out effective content related to problem analysis by extracting key information corresponding to each problem type in log information obtained by collecting and reading logs according to predetermined problem types, ensure that the extracted key information is convenient for analyzing problems, and avoid omissions; and the embodiments of the present application can determine problem root causes conveniently and quickly by inputting the key information into a predetermined log analysis neural network model to obtain a problem report output by the log analysis neural network model, and can automatically analyze problems, thereby liberating manual analysis.

[0123] An electronic device is provided in an optional embodiment, which comprises Figure 5 As shown in the figure, Figure 5 The electronic device 4000 shown in the figure comprises a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, through a bus 4002. Optionally, the electronic device 4000 can further comprise a transceiver 4004, which can be used for data interaction, such as data sending and / or data receiving, between the electronic device and other electronic devices. It should be noted that the transceiver 4004 is not limited to one in actual application, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0124] The processor 4001 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure content of the present application. The processor 4001 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.

[0125] The bus 4002 can comprise a channel for transmitting information between the above-mentioned components. The bus 4002 can be a PCI (Peripheral Component Interconnect, peripheral component interconnect) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc. The bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0126] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing computer instructions and capable of being read by a computer, without limitation.

[0127] The memory 4003 is configured to store a computer program for implementing the embodiments of the present application, and the processor 4001 is configured to control the execution of the computer program stored in the memory 4003. The processor 4001 is configured to execute the computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0128] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.

[0129] The terms "first", "second", "third", "fourth", "1", "2", and the like (if any) in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described.

[0130] It should be understood that, although the flowcharts of the embodiments of the present application indicate the respective operation steps by arrows, the implementation order of the steps is not limited to the order indicated by the arrows. Unless otherwise specified herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders as required. In addition, part or all of the steps in each flowchart can include a plurality of sub-steps or a plurality of stages based on the actual implementation scenario. Part or all of the sub-steps or stages can be executed at the same time, and each of the sub-steps or stages can also be executed at different times. In the scenario where the execution times are different, the execution order of the sub-steps or stages can be flexibly configured as required, and the embodiments of the present application do not limit this.

[0131] The above is only optional implementation of part of the implementation scenarios of the present application. It should be noted that, for those skilled in the art, other similar implementation means based on the technical idea of the present application without departing from the technical concept of the present application also belong to the protection scope of the embodiments of the present application.

Claims

1. A log analysis method characterized by, The method comprises the following steps: collecting and reading logs to obtain log information; extracting key information corresponding to each problem type from the log information according to the pre-determined problem types; inputting the key information into a pre-determined log analysis neural network model to obtain a problem report output by the log analysis neural network model; before the step of inputting the key information into the pre-determined log analysis neural network model to obtain a problem report output by the log analysis neural network model, the method further comprises the following steps: determining and obtaining auxiliary analysis information corresponding to each problem type according to the problem types; the auxiliary analysis information comprises information for assisting in problem analysis in system information and running state information, and the system information is used for recording various software and hardware resources in an Android operating system, and the running state information is used for recording states of the various software and hardware resources at runtime; the step of inputting the key information into the pre-determined log analysis neural network model to obtain a problem report output by the log analysis neural network model comprises the following steps: adding a problem type object to a pre-set problem type set to obtain a problem type set; inputting the problem type set into the log analysis neural network, and analyzing the problem type set in combination with the auxiliary analysis information to obtain a problem report output by the log analysis neural network model; the problem type object is composed of key information of each problem type.

2. The log analysis method according to claim 1, characterized by, The step of collecting and reading logs to obtain log information comprises the following steps: collecting the logs according to a pre-set log collection script; reading the logs according to a pre-set log reading process to obtain the log information.

3. The log analysis method according to claim 1, characterized by, The step of extracting key information corresponding to each problem type from the log information according to the pre-determined problem types comprises the following steps: determining a log type of the logs, and constructing a log object for storing the key information according to the log type; adding the log object to a pre-set log set, and determining key information corresponding to each problem type in the log set according to the pre-determined problem types.

4. The log analysis method according to claim 3, characterized by, After the step of determining key information corresponding to each problem type in the log set according to the pre-determined problem types, the method further comprises the following step: constructing a problem type object for storing the key information according to the problem types and the key information corresponding to each problem type.

5. The log analysis method of claim 1, wherein, The method further comprises a training process of the log analysis neural network, comprising the following steps: obtaining training samples and training labels; the training samples are sample log information, and the training labels are used for representing problem types in the corresponding training samples; training a pre-set initial neural network with the training samples and the training labels to obtain the log analysis neural network model.

6. A log analysis apparatus characterized by comprising: The method comprises the following steps: a collecting module configured to collect and read logs to obtain log information; a determining module configured to extract key information corresponding to each problem type from the log information according to pre-determined problem types; The analysis module is configured to input the key information into a predetermined log analysis neural network model, and obtain a problem report output by the log analysis neural network model. Before the step of inputting the key information into the predetermined log analysis neural network model and obtaining a problem report output by the log analysis neural network model, the method further comprises: According to the problem type, auxiliary analysis information corresponding to each problem type is determined and obtained; the auxiliary analysis information comprises system information and running state information used for assisting problem analysis, the system information is used for recording various software and hardware resources in the Android operating system, and the running state information is used for recording states of the various software and hardware resources at runtime; The step of inputting the key information into the predetermined log analysis neural network model and obtaining a problem report output by the log analysis neural network model comprises: A problem type object is added to a preset problem type set to obtain a problem type set; The problem type set is input into the log analysis neural network, and the problem type set is analyzed in combination with the auxiliary analysis information to obtain a problem report output by the log analysis neural network model; The problem type object is composed of key information of each problem type.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-6. The processor executes the computer program to implement the steps of the log analysis method according to any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the log analysis method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Analysis method, electronic equipment, and computer storage medium

    CN113792019A