Log display method and device, equipment and storage medium

By displaying log scenario options and selecting target options in the user interface, and using scenario regular expressions and macros to parse logs, the problem of low log analysis efficiency in existing technologies is solved, and automated and efficient log analysis is achieved.

CN114168369BActive Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010949336.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-10
Publication Date
2025-11-25
Estimated Expiration
2040-11-12

AI Technical Summary

Technical Problem

Current technologies for analyzing logs are inefficient, rely on human experience, and are relatively slow.

Method used

A log display method is provided, which obtains logs and displays log scenario options in the user interface. After selecting the target log scenario option, the logs are parsed using scenario regular expressions and macros to obtain analysis results.

Benefits of technology

It can automatically analyze logs without manual analysis, improving log analysis efficiency and generating flexible analysis results according to user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168369B_ABST
    Figure CN114168369B_ABST
Patent Text Reader

Abstract

The application discloses a log display method and device, equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring a log; displaying a user interface, wherein at least one log scene option is displayed in the user interface, and the log scene option is used for screening information of a business process corresponding to the log; in response to a selection operation on the log scene option, obtaining a target log scene option from the log scene option; analyzing the log through the target log scene option to obtain a log analysis result; and displaying the log analysis result in the user interface. In the process of displaying the log analysis result, manual analysis of the log is not required, and only the selection of the log scene option corresponding to the log is required, so that the log analysis result can be displayed. That is, only the selection of the log scene option corresponding to the log can realize the analysis of the log, and the efficiency of analyzing the log is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

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

[0002] When a computer device and an application in the computer device are running, a log generation process in the computer device usually generates a log. By analyzing the log, information about the running of the computer device and the application and information about user operations on the computer device and the application can be obtained.

[0003] Usually, a log is opened in a text format by using a text editor in a manual manner. Then, a log keyword is searched in text information of the opened log, and a historical running process of the computer device and the application reflected by the log is sorted according to the time corresponding to the keyword, and finally an analysis result of the log is output. For example, it is analyzed that the application runs normally before 1 o'clock to 3 o'clock, and runs abnormally at 3 o'clock due to network problems.

[0004] However, in order to quickly and effectively determine the analysis result of the log by using the above-mentioned manner, a log analysis personnel needs to master rich log analysis experience and business ability, and the analysis process depends on manual experience, and the efficiency of analyzing the log is low. SUMMARY

[0005] The present application provides a log display method, device, equipment and storage medium, which can improve the efficiency of analyzing the log. The technical solution is as follows:

[0006] According to an aspect of the present application, a log display method is provided, and the method comprises:

[0007] obtaining a log;

[0008] displaying a user interface, wherein at least one log scene option is displayed in the user interface, and the log scene option is used to filter information about a business process corresponding to the log;

[0009] obtaining a target log scene option from the log scene options in response to a selection operation on the log scene option;

[0010] analyzing the log by using the target log scene option to obtain a log analysis result;

[0011] displaying the log analysis result in the user interface.

[0012] According to another aspect of the present application, a log display device is provided, and the device comprises:

[0013] a first obtaining module configured to obtain a log;

[0014] a display module configured to display a user interface, wherein at least one log scenario option is displayed in the user interface, and the log scenario option is used to filter information of a business process corresponding to the log;

[0015] a second obtaining module configured to obtain a target log scenario option from the log scenario options in response to a selection operation on the log scenario option;

[0016] an analyzing module configured to analyze the log through the target log scenario option to obtain a log analysis result;

[0017] the display module is configured to display the log analysis result in the user interface.

[0018] Optionally, the target log scenario option comprises at least one keyword, a scenario regular expression corresponding to the keyword, and a macro corresponding to the keyword; and the analyzing module is configured to:

[0019] filter the log through the scenario regular expression to obtain a scenario field;

[0020] replace a value of the scenario field into the keyword through the macro to obtain a business process description, wherein the business process description is used to reflect a state change time and state change information of the business process corresponding to the log.

[0021] Optionally, the display module is configured to:

[0022] display a type of the keyword, a number of the keyword in the log, the state change time, and the state change information in the user interface.

[0023] Optionally, the display module is configured to:

[0024] display the type of the keyword, the number of the keyword in the log, the state change time, and the state change information in the user interface in a timeline manner.

[0025] The timeline is determined according to the state change time.

[0026] Optionally, the apparatus further comprises:

[0027] the display module is configured to display a log scenario configuration interface, wherein the log scenario configuration interface comprises a scenario configuration option, a keyword configuration option corresponding to the scenario configuration option, and a scenario regular expression configuration option corresponding to the keyword configuration option.

[0028] determining module, configured to determine the log scene option according to a configuration result of at least one of the scene configuration option, the keyword configuration option and the scene regular expression configuration option in response to a configuration operation in the log scene configuration interface.

[0029] Optionally, the apparatus further includes:

[0030] loading module, configured to load log basic information configuration, the log basic information configuration including a basic information regular expression;

[0031] filtering module, configured to filter the log by the basic information regular expression to obtain a basic information field;

[0032] The display module is configured to display a value of the basic information field in the user interface, the value of the basic information field being capable of reflecting information of a computer device that generates the log.

[0033] Optionally, the apparatus further includes:

[0034] sending module, configured to send the log analysis result to a server;

[0035] receiving module, configured to receive a log analysis link sent by the server, the log analysis link being used to obtain the log analysis result.

[0036] Optionally, the display module is configured to:

[0037] display the log in the user interface.

[0038] According to another aspect of the present application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the log display method according to the above aspect.

[0039] According to another aspect of the present application, a computer readable storage medium is provided, the readable storage medium storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by a processor to implement the log display method according to the above aspect.

[0040] According to another aspect of the present application, a computer program product or computer program is provided, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the log display method provided in various optional implementations of the above aspect.

[0041] The technical solutions provided by the present application have at least the following beneficial effects:

[0042] By analyzing the log according to the target log scene option, the log analysis result of the log can be obtained and displayed. In the process of displaying the log analysis result, manual analysis of the log is not required, and only the log scene option corresponding to the log needs to be selected to display the analysis result of the log. That is, only by selecting the log scene option corresponding to the log, the log can be analyzed, and the efficiency of analyzing the log is improved. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0044] Figure 1 is a structural schematic diagram of a log display system provided by an illustrative embodiment of the present application;

[0045] Figure 2 is a schematic diagram of the principle of implementing log display provided by an embodiment of the present application;

[0046] Figure 3 is a flowchart of a log display method provided by an embodiment of the present application;

[0047] Figure 4 is a flowchart of another log display method provided by an embodiment of the present application;

[0048] Figure 5 is a schematic diagram of displaying log scene options provided by an embodiment of the present application;

[0049] Figure 6 is a schematic diagram of the implementation process of analyzing the log provided by an embodiment of the present application;

[0050] Figure 7 is a schematic diagram of a log scene configuration interface provided by an embodiment of the present application;

[0051] Figure 8 is a schematic diagram provided by an embodiment of the present application to display the value of the basic information field;

[0052] Figure 9 is a schematic diagram provided by an embodiment of the present application to configure the interface of the basic information of the log;

[0053] Figure 10 is a schematic diagram provided by an embodiment of the present application to analyze the flow of the log;

[0054] Figure 11 is a structural diagram of a log display device provided by an embodiment of the present application;

[0055] Figure 12 is a structural diagram of another log display device provided by an embodiment of the present application;

[0056] Figure 13 is a structural diagram of still another log display device provided by an embodiment of the present application;

[0057] Figure 14 is a structural diagram of still another log display device provided by an embodiment of the present application;

[0058] Figure 15 is a structural diagram of a terminal provided by an embodiment of the present application.

[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the principles of the present application, together with the description. DETAILED DESCRIPTION

[0060] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0061] For the convenience of understanding, first, the terms involved in the method provided by the embodiments of the present application are explained:

[0062] Log keyword: the key information word in the log file, through the keyword, the log can be retrieved to the key process point.

[0063] Scene analysis: some log keywords are combined into a scene, and then the analysis is carried out based on these log keywords. The analysis result is presented in the form of online user interface (which can be remotely accessed).

[0064] Keyword configuration: the keywords of the log scene option are configured in the log analysis service, thereby forming a log process analysis.

[0065] Figure 1 is a structural diagram of a log display system provided by an embodiment of the present application, asFigure 1 As shown, the system includes: a server 110 and at least one terminal 120.

[0066] Server 110 can be a single server, a server cluster consisting of several servers, or a virtual server in a cloud computing service center, etc., without limitation. Terminal 120 can be a smartphone, computer, television, multimedia player, e-reader, etc. The connection between server 110 and terminal 120 can be established through a wired network or a wireless network.

[0067] It should be noted that a log analysis client is installed on terminal 120, and terminal 120 connects to server 110 through the log analysis client. Server 110 corresponds to the log analysis client. Alternatively, a browser is installed on the terminal, and terminal 120 accesses the Uniform Resource Locator (URL) link corresponding to server 110 through the browser to achieve communication with server 110.

[0068] Terminal 120 is used to acquire logs and parse the logs by loading log scenario options from server 110, thereby obtaining log analysis results. Optionally, the above method can also be executed by server 110, that is, after acquiring the logs, terminal 120 sends the logs to the server, and the server parses the logs based on the log scenario options, obtains the log analysis results, and sends them to terminal 120. This application embodiment mainly describes the method of parsing logs executed by terminal 120.

[0069] Figure 2 This is a schematic diagram illustrating the principle of log display provided in the embodiments of this application. For example... Figure 2 As shown, computer device 201 obtains logs through user-uploaded logs in a log analysis client, or through a user-uploaded log displayed in the user interface of the log analysis service provided by server 202 via a browser. When computer device 202 obtains the logs through the log analysis client, it analyzes the logs using the client. When computer device 202 obtains the logs through a browser, it analyzes the logs using the log analysis service provided by the server accessed by the browser. The computer device can be, for example,... Figure 1The terminal in the system shown. Then the computer device 201 selects a target log scene option from the log scene options sent by the server 202 according to the selection operation of the user. The log is filtered according to the scene regular expression corresponding to the keyword in the target log scene option to obtain a scene field. The value of the scene field is replaced into the keyword through a macro to obtain a log analysis result. For example, the keyword is "join meeting result $1", the corresponding scene regular expression is " / on join complete ret\[(?<$1>\S*)\] / ", the computer device can obtain the value of the scene field "on join complete ret" in the log through the scene regular expression, and then the value of the scene field is replaced into the keyword through a macro to obtain "join meeting result 0". Wherein, "0" indicates that the result is failure, and "join meeting result 0" indicates that the result of joining the meeting is failure. Then the computer device 201 displays the log analysis result in the user interface.

[0070] In the process of displaying the log analysis result, the log does not need to be analyzed manually, and only the log scene option corresponding to the log needs to be selected to display the analysis result of the log. That is, only by selecting the log scene option corresponding to the log, the log can be analyzed, and the efficiency of analyzing the log is improved.

[0071] Figure 3 is a flowchart of a log display method provided by an embodiment of the present application. The method can be used in a computer device or a log analysis client on the computer device, and the computer device can be a terminal in the system shown. Figure 1 As shown in Figure 3 , the method comprises the following steps.

[0072] Step 301, obtaining a log.

[0073] When the computer device obtains the log through the log analysis client, the log is uploaded by the user in the log analysis client. When the computer device obtains the log through the browser, the log is uploaded by the user in the user interface displayed by the log analysis service provided by the server. Optionally, the log is a log generated by a conference program, a log generated by a financial program, a log generated by an instant messaging program, and a log generated by a game.

[0074] Step 302, displaying a user interface, and at least one log scene option is displayed in the user interface.

[0075] The user interface is a log analysis interface in the log analysis client when the computer device obtains the log through the log analysis client. The user interface is a log analysis interface of a log analysis service provided by the server when the computer device obtains the log through the browser. Optionally, the computer device can also display the obtained log in the user interface.

[0076] The log scenario option is used to filter information of a business process corresponding to the log. The displayed log scenario option is obtained by the computer device from the server or the log analysis client. Optionally, the log scenario option is set by the user according to a business type corresponding to the log. For example, the log generated by the conference procedure, and the log scenario option configured by the user includes a conference initiation scenario, a conference joining scenario, and a conference ending scenario.

[0077] Step 303, obtaining a target log scenario option from the log scenario options in response to a selection operation on the log scenario options.

[0078] The selection operation includes a touch operation of the user on at least one log scenario option displayed in the user interface, such as a single-click operation on the log scenario option. The touch operation of the user on at least one log scenario option displayed in the user interface is followed by a confirmation operation on the touch operation, such as selecting a selection box corresponding to the displayed log scenario option and then confirming the selection. In addition, a voice instruction indicating that the target log scenario option is selected from the at least one log scenario option can also be provided.

[0079] Step 304, analyzing the log through the target log scenario option to obtain a log analysis result.

[0080] Optionally, the log scenario option includes at least one keyword, a scenario regular expression corresponding to the keyword, and a macro. The scenario regular expression is used to filter a scenario field in the log, and the macro is used to replace a value of the filtered scenario field into the keyword to obtain the log analysis result. The keyword is set by the user according to a business type corresponding to the log, the scenario regular expression is set by the user according to a field corresponding to the keyword in the log, and the macro is provided by the server or the computer device.

[0081] For example, the log is a log generated by a conference procedure, the keyword of the target log scenario option includes "create conference time" and "create conference result", and the computer device can obtain "create conference time 19:37" and "create conference result 0 (indicating failure)" through the target log scenario option.

[0082] Step 305, displaying the log analysis result in the user interface.

[0083] The computer device can also display acquired logs, and the user interface for displaying the logs may be the same as or different from the user interface used to display the logs. When the user interface is the same as the interface used to display the logs, the computer device can simultaneously display the logs and the corresponding log analysis results within the same user interface. For example, the logs can be displayed on the left side of the user interface, and the corresponding log analysis results can be displayed on the right side of the user interface.

[0084] Computer devices parse logs through target log scenario options, and the resulting log analysis results reflect the time and information of status changes in the corresponding business processes. For example, "creating a meeting" represents status change information for the meeting business. The computer devices can display this log analysis result in a timeline format based on the time of the status changes corresponding to the business process status change information.

[0085] In summary, the log display method provided in this application parses the log according to the target log scenario option, obtains the log analysis results, and displays these results. In displaying the log analysis results, no manual log analysis is required; simply selecting the corresponding log scenario option is sufficient to display the analysis results. That is, log analysis can be performed simply by selecting the corresponding log scenario option, thus improving the efficiency of log analysis.

[0086] Figure 4 This is a flowchart illustrating another log display method provided in an embodiment of this application. This method can be used on a computer device or a log analysis client on a computer device, wherein the computer device can be, for example... Figure 1 The terminal in the system shown. For example... Figure 4 As shown, the method includes:

[0087] Step 401: Obtain the logs.

[0088] Computer devices can obtain the logs through a log analysis client or browser. When a computer device obtains the logs through a browser, the logs are uploaded by the user and displayed in the user interface of the log analysis service provided by the server. Optionally, the log analysis service provided by the server is a cloud service based on cloud computing. Cloud computing refers to the delivery and usage model of IT infrastructure, which means obtaining the required resources in an on-demand and easily scalable manner through the network. That is, by accessing the URL link corresponding to the log analysis service, computer devices can use the computing resources provided by the server for analyzing logs; this server is a cloud server.

[0089] Step 402: Display the user interface, which shows at least one log scenario option.

[0090] When the computer device acquires the log through the log analysis client, the user interface is a log analysis interface in the log analysis client. When the computer device acquires the log through the browser, the user interface is a log analysis interface of a log analysis service provided by the server.

[0091] The log scenario option is used to filter information of a business process corresponding to the log. Optionally, the log scenario option is set by the user according to a business type corresponding to the log.

[0092] For example, Figure 5 is a schematic diagram provided by an embodiment of the present application, which shows a user interface displaying a log scenario option. As Figure 5 shown, the user interface 501 is a log analysis interface of a log analysis service provided by the server, and the computer device can access a URL link corresponding to the log analysis service through the browser to display the user interface 501. The user interface 501 displays a log scenario option 502. Through a drop-down list, multiple log scenario options can be displayed. Optionally, the user interface 501 also displays a log 503 acquired by the computer device, and the log 503 is uploaded by the user in the user interface. The user interface 501 also displays a log management control 504, which can filter characters in the log, filter information in the log according to a time of generation, and further upload a new log.

[0093] In step 403, a target log scenario option is acquired from the log scenario options in response to a selection operation on the log scenario options.

[0094] The computer device can acquire one as a target scenario option or multiple as target log scenario options from the displayed log scenario options according to the selection operation.

[0095] The selection operation includes a touch operation of the user on at least one log scenario option displayed in the user interface, such as a single-click operation on the log scenario option. The touch operation of the user on at least one log scenario option displayed in the user interface is followed by a confirmation operation on the touch operation, such as selecting a selection box corresponding to the displayed log scenario option and then confirming the selection. In addition, a voice instruction indicating that a target log scenario option is selected from at least one log scenario option can also be provided. For example, the voice instruction is "select the first scenario", "select all scenarios", and "select the join-meeting scenario".

[0096] For example, continuing to refer to Figure 5When the computer device detects that the user selects at least one log scene option from the drop-down list corresponding to the scene type by a click operation, and detects a click operation on the determination button, the selected at least one log scene option is determined as a target log scene option. For example, the theme switching is obtained as the target log scene option.

[0097] At step 404, the log is parsed through the target log scene option to obtain a log analysis result.

[0098] The computer device can obtain one log analysis result by parsing the log through one log scene option. The computer device can obtain log analysis results in a number same as that of the log scene options by parsing the log through multiple log scene options.

[0099] Optionally, the target log scene option includes at least one keyword, and a scene regular expression and a macro corresponding to the keyword. Figure 6 As shown in FIG. 4, the implementation process of step 404 includes step 4041 and step 4042.

[0100] At step 4041, the log is filtered through the scene regular expression to obtain a scene field.

[0101] The computer device can filter information associated with the keyword from the log through the scene regular expression. The scene regular expression is a regular expression, which can be used to search for characters that meet specified rules. The computer device can filter strings in the log according to the scene regular expression according to rules. That is, the computer device forms a "rule string", i.e., a scene field, according to some specified characters and combinations of the specified characters. The scene field can be used to determine whether the log includes the scene field and the value corresponding to the scene field.

[0102] For example, the keyword is "join meeting result $1", and the corresponding scene regular expression is " / on join complete ret\[(?<$1>\S*)\] / ". The computer device can determine that the log includes the scene field "on join complete ret" and the value of the scene field is 0 through the scene regular expression.

[0103] At step 4042, the value of the scene field is replaced into the keyword through the macro to obtain a business process description. The business process description is used to reflect the state change time and state change information of the business process corresponding to the log.

[0104] The macro is an abstract concept, which refers to a series of instructions organized together to complete a specified task as a single instruction, such as replacing characters according to a series of specified rules. By using the macro, the computer device can replace the specified characters in the keyword with the value of the scenario field determined by the scenario regular expression, so as to obtain the state change information in the business process description. According to the generation time of the scenario field in the log, the computer device can determine the state change time.

[0105] For example, the keyword is "join meeting result $1", the value of the scenario field determined by the scenario regular expression " / on joincomplete ret\[ (?<$1> \S*) \] / " is 0, and the macro can assign the value of the scenario field to "$1", that is, the keyword "join meeting result 0" can be obtained by replacing the value of the scenario field into the keyword by using the macro.

[0106] It should be noted that the keyword is set by the user according to the business type corresponding to the log, the scenario regular expression is set by the user according to the field corresponding to the keyword in the log, and the macro is provided by the server or the computer device. When the user configures the log scenario option, the computer device can display a log scenario configuration interface, which includes a scenario configuration option, a keyword configuration option corresponding to the scenario configuration option, and a scenario regular expression configuration option corresponding to the keyword configuration option. The user can configure the log scenario option by using the scenario configuration option, the keyword configuration option, and the scenario regular expression configuration option. In response to the configuration operation in the log scenario configuration interface, the computer device determines the log scenario option according to the configuration result of at least one of the scenario configuration option, the keyword configuration option, and the scenario regular expression configuration option. For example, the configuration operation refers to that the user has configured the scenario configuration option, the keyword configuration option, and the scenario regular expression configuration option, and then confirmed the configuration.

[0107] For example, Figure 7 FIG. 1 is a schematic diagram of a log scenario configuration interface provided by an embodiment of the present application. As shown in FIG. 1, the log scenario configuration interface includes a scenario configuration option, a keyword configuration option corresponding to the scenario configuration option, and a scenario regular expression configuration option corresponding to the keyword configuration option. Figure 7As shown, in the log scenario configuration interface 701, the scenario configuration option 702 is included, which includes an input box of the name of the log scenario option, an input box of the type, and an input box of the description of the log scenario option, and the information of the log scenario option can be configured. The log scenario configuration interface 701 further includes the keyword configuration option 703 corresponding to the scenario configuration option 702. The keyword configuration option 703 can display the name of the established keyword, delete the established keyword, and add a new keyword. When a keyword is selected, the display box of the keyword is displayed in bold. In addition, the computer device displays an input box of the name of the keyword, a selection box of the type of the keyword, and the scenario regular expression configuration option 704 including an input box of the scenario regular expression. Optionally, the type of the keyword includes normal information, core information, error information, and running paralysis information.

[0108] Step 405, display the log in the user interface.

[0109] After obtaining the log, the computer device can also display the log in the user interface of the log scenario option. For example, still referring to Figure 5 , the computer device displays the obtained log 503 in the user interface 501.

[0110] Step 406, display the log analysis result in the user interface.

[0111] The log analysis result displayed by the computer device in the user interface includes the type of the keyword, the number of the keyword in the log, the state change time, and the state change information. For example, still referring to Figure 5 , the log analysis result 505 displayed by the computer device includes four types of keywords, which are Info, Core, Error, and Fatal. The type of the keyword is the user in the log scenario configuration interface 701 as Figure 7The user interface 701 shown in the configuration log field scenario option is configured. Among them, the Info type is a keyword reflecting ordinary information, the Core type is a keyword reflecting core information, the Error type is a keyword reflecting error information, and the Fatal type is a keyword reflecting running paralysis information. The number of keywords of the Info type in the log displayed by the computer device is 3, and the number of keywords of the Core type is 2. The computer device can display the type of the keyword and the state change information corresponding to the type of the keyword in the same color. For example, the type of the keyword "theme switching result: $1←End" is Core, and the computer device displays the type in blue. Therefore, the computer device also displays the state change information "theme switching result: true←End" in blue. The computer device can determine the state change time corresponding to the state change information "theme switching result: true←End" according to the recording time of the corresponding scene field in the log, and display the state change time. The state change information "theme switching result: true←End" is the log analysis result corresponding to the log generated by the instant messaging program, indicating that the display theme switching of the instant messaging program is successful, and the corresponding state change time indicates the time point when the display theme switching of the instant messaging program is successful. Alternatively, the computer device can also not replace the value of the scene field into the keyword, but only determine whether the scene field is included in the log. When the scene field is included, the keyword corresponding to the scene field is displayed as the state change information. For example, the displayed state change information is "query theme information", which is displayed by the computer device according to whether the keyword corresponding to the state change information is included in the log.

[0112] The computer device can also display the type of the keyword, the number of keywords in the log, the state change time, and the state change information in the user interface in the form of a timeline. Among them, the timeline is determined according to the state change time. For example, continuing to refer to Figure 5 , the computer device displays the state change information and the state change time corresponding to the state change information in chronological order from top to bottom according to the state change time corresponding to the state change information.

[0113] Step 407, load log basic information configuration.

[0114] The log basic information configuration includes a basic information regular expression. The log basic information configuration is built-in in the log analysis service provided by the log analysis client or server, and can also be configured by the user. The user can configure the log basic information configuration through the interface displayed by the computer device for configuring the log basic information.

[0115] For example, Figure 9This is a schematic diagram of the interface for configuring basic log information provided in an embodiment of this application, such as... Figure 9 As shown, the interface 901 for configuring basic log information includes a prompt message 902, a basic information regular expression configuration option 903, and an OK button 904. The prompt message 902 is used to remind the user of important information when configuring the basic log information, and the basic information regular expression configuration option 903 is used to configure the basic information regular expression. When the user completes the configuration on the interface 901 and clicks the OK button 904, the computer device can obtain the user's configured basic log information.

[0116] Step 408: Filter the logs using basic information regular expressions to obtain the basic information fields.

[0117] The process of filtering logs using basic information regular expressions is the same as the process of filtering logs using scenario regular expressions, and will not be described in detail here.

[0118] Step 409: Display the values ​​of the basic information fields in the user interface. The values ​​of the basic information fields can reflect the information of the computer device that generated the log.

[0119] When a computer device displays the values ​​of its basic information fields in the user interface, it also displays the corresponding name fields. For example, if the basic information field is "device name," the corresponding name field will be "device name."

[0120] For example, the basic information regular expression includes " / device name\[(?<device name>\S*)\] / ". Based on this basic information regular expression, the computer device can filter out the basic information field named "device name" from the log and use the value of this basic information field as the value of the device name.

[0121] For example, Figure 8 This is a schematic diagram illustrating the display of values ​​for basic information fields provided in an embodiment of this application. For example... Figure 8 As shown, when the user clicks... Figure 5 After clicking the "Basic Information" button in the log analysis result 505 of the user interface 501, the computer device can display the log basic information 506 corresponding to the log. This displayed log basic information 506 is determined by the computer device based on the user-configured basic information regular expression. The displayed log basic information 506 includes the operating system version, manufacturer, model, RAM size, and internal storage size of the computer device that generated the log, as well as the version of the underlying operating system.

[0122] Step 410: Send the log analysis results to the server.

[0123] Step 411, receiving the log analysis link sent by the server, the log analysis link is used to obtain the log analysis result.

[0124] After the computer device sends the log analysis result to the server, the server can generate a log analysis link for the log analysis result. According to the log analysis link, other users can obtain and view the log analysis result, thereby realizing sharing of the log analysis result. Optionally, the log analysis link is in URL format, short URL format, or Internet Protocol Address format.

[0125] In summary, the log display method provided by the embodiments of the present application can obtain and display the log analysis result according to the target log scene option. In the process of displaying the log analysis result, manual analysis of the log is not required, and only the log scene option corresponding to the log needs to be selected to display the analysis result of the log. That is, only the log scene option corresponding to the log needs to be selected to analyze the log, thereby improving the efficiency of analyzing the log.

[0126] In addition, by configuring the log scene option, the log analysis result can be generated according to the user's demand, and the log can be flexibly analyzed. The state change information is displayed in the form of a timeline, which can directly and simply display the information of the business reflected by the log, thereby facilitating the user to quickly understand. The type and number of keywords are displayed, which can facilitate the user to quickly understand the core information in the business reflected by the log. The scene regular expression and the macro can efficiently analyze the log. The value of the basic information field displayed can facilitate the user to understand the information of the computer device generating the log, thereby improving the user experience. The log analysis link generated by the server can facilitate other users to check the log analysis result, thereby realizing sharing of the log analysis result by the user.

[0127] In a specific example, Figure 10 is a schematic diagram of the log analysis process provided by the embodiments of the present application. As shown in Figure 10As shown, when a user accesses a log analysis service (i.e., a background service) provided by a server through a browser of a computer device, the computer device sends a page request to the server, and receives front-end information sent by the server according to the page request, so as to display a user interface. The user interface displays at least one log scenario option. Then, the computer device analyzes the obtained log according to a target log scenario option selected by the user, so as to obtain a log analysis result, and the log analysis result can be displayed. When the user needs to share the log analysis result, the computer device sends a log sharing request to the server, the log sharing request including the log and the log analysis result of the log. Then, the computer device can obtain a sharing link sent by the server, and the sharing link can be used to obtain the log and the log analysis result of the log. Thus, the user can share the log analysis result with other users.

[0128] It should be noted that the sequence of the method steps provided in the embodiments of the present application can be appropriately adjusted, and the steps can be increased or decreased as appropriate. Any person skilled in the art can easily think of changes within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application, and thus will not be described again.

[0129] Figure 11 FIG. 1 is a structural diagram of a log display device provided by an embodiment of the present application. The device can be used for a log analysis client on a computer device or the computer device, which can be a terminal in the system as shown in FIG. 1. As shown in FIG. 1, the device 110 includes: Figure 1 Figure 11

[0130] A first obtaining module 1101 is configured to obtain a log.

[0131] A display module 1102 is configured to display a user interface. The user interface displays at least one log scenario option, and the log scenario option is used to filter information of a business process corresponding to the log.

[0132] A second obtaining module 1103 is configured to obtain a target log scenario option from the log scenario options in response to a selection operation on the log scenario options.

[0133] An analysis module 1104 is configured to analyze the log through the target log scenario option, so as to obtain a log analysis result.

[0134] The display module 1102 is configured to display the log analysis result in the user interface.

[0135] Optionally, the target log scenario option includes at least one keyword, and a scenario regular expression and a macro corresponding to the keyword. The analysis module 1104 is configured to:

[0136] ​​The logs are filtered using scenario-based regular expressions to obtain the scenario field.

[0137] By replacing the values ​​of the scenario field with keywords using macros, a business process description is obtained. This business process description reflects the time and information of status changes in the corresponding business process as recorded in the logs.

[0138] Optionally, the display module 1102 is used for:

[0139] The user interface displays the keyword type, the number of keywords in the log, the time of status change, and status change information.

[0140] Optionally, the display module 1102 is used for:

[0141] The user interface uses a timeline to display the keyword type, the number of keywords in the log, the time of status change, and status change information. The timeline is determined based on the time of status change.

[0142] Optionally, such as Figure 12 As shown, the device 110 also includes:

[0143] Display module 1102 is used to display the log scenario configuration interface. The log scenario configuration interface includes scenario configuration options, keyword configuration options corresponding to the scenario configuration options, and scenario regular expression configuration options corresponding to the keyword configuration options.

[0144] The determination module 1105 is used to respond to the configuration operation in the log scenario configuration interface and determine the log scenario option based on the configuration result of at least one of the scenario configuration option, keyword configuration option, and scenario regular expression configuration option.

[0145] Optionally, such as Figure 13 As shown, the device 110 also includes:

[0146] Load module 1106, used to load basic log information configuration. Basic log information configuration includes basic information regular expressions.

[0147] The filtering module 1107 is used to filter logs using a basic information regular expression to obtain the basic information field.

[0148] Display module 1102 is used to display the values ​​of basic information fields in the user interface. The values ​​of the basic information fields can reflect the information of the computer device that generated the log.

[0149] Optionally, such as Figure 14 As shown, the device 110 also includes:

[0150] The sending module 1108 is used to send log analysis results to the server.

[0151] The receiving module 1109 is configured to receive a log analysis link sent by the server. The log analysis link is used to obtain the log analysis result.

[0152] Optionally, the display module 1102 is configured to:

[0153] display the log in the user interface.

[0154] It should be noted that the log display apparatus provided in the above embodiments is only exemplified by the division of the above functional modules. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the log display apparatus and the log display method provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be described here.

[0155] Embodiments of the present application also provide a computer device, which comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the log display method provided by each method embodiment.

[0156] Optionally, the computer device is a terminal. For example, Figure 15 is a structural schematic diagram of a terminal provided by an embodiment of the present application.

[0157] Generally, the terminal 1500 comprises a processor 1501 and a memory 1502.

[0158] The processor 1501 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1501 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1501 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 1501 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing of content to be displayed by the display screen. In some embodiments, the processor 1501 can further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.

[0159] The memory 1502 can include one or more computer-readable storage media that can be non-transitory. The memory 1502 can also include high-speed random access memory and nonvolatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 is used to store at least one instruction for being executed by the processor 1501 to implement the log display method provided by the method embodiments in the present application.

[0160] In some embodiments, the terminal 1500 can also optionally include a peripheral device interface 1503 and at least one peripheral device. The processor 1501, the memory 1502, and the peripheral device interface 1503 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1503 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507, a positioning assembly 1508, and a power supply 1509.

[0161] The peripheral interface 1503 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, the memory 1502 and the peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502 and the peripheral interface 1503 can be implemented on a separate chip or circuit board, and the embodiments of the present application do not limit this.

[0162] The radio frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1504 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1504 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 1504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1504 can also include NFC (Near Field Communication) related circuitry, and the present application does not limit this.

[0163] The display screen 1505 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 is further configured to capture touch signals on or above the surface of the display screen 1505. The touch signals can be input to the processor 1501 as control signals for processing. In this case, the display screen 1505 can also be configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the display screen 1505 can be one, arranged on the front panel of the terminal 1500; in other embodiments, the display screen 1505 can be at least two, arranged on different surfaces of the terminal 1500 or in a folding design; in still other embodiments, the display screen 1505 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 1500. Even, the display screen 1505 can also be arranged in an irregular shape other than a rectangle, i.e., a special-shaped screen. The display screen 1505 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0164] The camera assembly 1506 is configured to capture images or videos. Optionally, the camera assembly 1506 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is arranged on the front panel of the terminal 1500, and the rear-facing camera is arranged on the back of the terminal. In some embodiments, the rear-facing camera is at least two, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panoramic shooting and VR (Virtual Reality) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 1506 can further include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0165] The audio circuit 1507 can include a microphone and a speaker. The microphone is used to collect sound waves of a user and an environment, and convert the sound waves into an electrical signal input to the processor 1501 for processing, or input to the radio frequency circuit 1504 to realize voice communication. For the purpose of stereo sound collection or noise reduction, the microphone can be multiple, respectively arranged at different parts of the terminal 1500. The microphone can also be an array microphone or an omnidirectional collection type microphone. The speaker is used to convert the electrical signal from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker can be a traditional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only can the electrical signal be converted into a sound wave that a human can hear, but also can be converted into a sound wave that a human cannot hear for the purpose of ranging, etc. In some embodiments, the audio circuit 1507 can also include a headphone jack.

[0166] The positioning component 1508 is used to position the current geographic position of the terminal 1500 to realize navigation or LBS (Location Based Service). The positioning component 1508 can be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China or the Galileo system of Russia.

[0167] The power supply 1509 is used to supply power to each component in the terminal 1500. The power supply 1509 can be alternating current, direct current, disposable battery or rechargeable battery. When the power supply 1509 includes a rechargeable battery, the rechargeable battery can be a wired charging battery or a wireless charging battery. The wired charging battery is a battery charged through a wired line, and the wireless charging battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0168] In some embodiments, the terminal 1500 further includes one or more sensors 1510. The one or more sensors 1510 include but are not limited to: an acceleration sensor 1511, a gyroscope sensor 1512, a pressure sensor 1513, a fingerprint sensor 1514, an optical sensor 1515 and a proximity sensor 1516.

[0169] The acceleration sensor 1511 can detect the acceleration size in three coordinate axes of the coordinate system established by the terminal 1500. For example, the acceleration sensor 1511 can be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 1501 can control the touch display screen 1505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1511. The acceleration sensor 1511 can also be used for game or user motion data collection.

[0170] The gyroscope sensor 1512 can detect the body direction and rotation angle of the terminal 1500, and can collect 3D motions of a user on the terminal 1500 in cooperation with the acceleration sensor 1511. The processor 1501 can implement the following functions according to data collected by the gyroscope sensor 1512: motion sensing (e.g., changing a UI according to a tilt operation of a user), image stabilization when photographing, game control, and inertial navigation.

[0171] The pressure sensor 1513 can be disposed at a side bezel of the terminal 1500 and / or under the touch display 1505. When the pressure sensor 1513 is disposed at the side bezel of the terminal 1500, a grip signal of a user on the terminal 1500 can be detected, and left / right hand recognition or a shortcut operation can be performed by the processor 1501 according to the grip signal collected by the pressure sensor 1513. When the pressure sensor 1513 is disposed under the touch display 1505, operable controls on a UI can be controlled by the processor 1501 according to a pressure operation of a user on the touch display 1505. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0172] The fingerprint sensor 1514 is used to collect a fingerprint of a user, and the identity of the user can be recognized by the processor 1501 according to the fingerprint collected by the fingerprint sensor 1514 or by the fingerprint sensor 1514 according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 1501 authorizes the user to perform a related sensitive operation, which includes unlocking a screen, viewing encrypted information, downloading software, payment, and changing a setting, etc. The fingerprint sensor 1514 can be disposed at a front surface, a back surface, or a side surface of the terminal 1500. When a physical button or a manufacturer's logo is disposed on the terminal 1500, the fingerprint sensor 1514 can be integrated with the physical button or the manufacturer's logo.

[0173] The optical sensor 1515 is used to collect ambient light intensity. In an embodiment, the processor 1501 can control the display brightness of the touch display 1505 according to the ambient light intensity collected by the optical sensor 1515. Specifically, when the ambient light intensity is high, the display brightness of the touch display 1505 is increased, and when the ambient light intensity is low, the display brightness of the touch display 1505 is decreased. In another embodiment, the processor 1501 can also dynamically adjust the photographing parameters of the camera assembly 1506 according to the ambient light intensity collected by the optical sensor 1515.

[0174] The proximity sensor 1516, also called distance sensor, is usually arranged on the front panel of the terminal 1500. The proximity sensor 1516 is used to collect the distance between the user and the front of the terminal 1500. In one embodiment, when the proximity sensor 1516 detects that the distance between the user and the front of the terminal 1500 gradually becomes smaller, the processor 1501 controls the touch display screen 1505 to switch from the bright screen state to the screen-off state; when the proximity sensor 1516 detects that the distance between the user and the front of the terminal 1500 gradually becomes larger, the processor 1501 controls the touch display screen 1505 to switch from the screen-off state to the bright screen state.

[0175] Those skilled in the art can understand that the structure shown in the foregoing embodiments is not a limitation on the terminal 1500, and the terminal 1500 can include more or fewer components than those shown in the drawings, or combine certain components, or adopt a different component arrangement. Figure 15

[0176] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the log display method provided in the foregoing method embodiments.

[0177] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the log display method provided in the foregoing method embodiments.

[0178] Those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by hardware, or by a program instructing related hardware, and the program can be stored in a computer readable storage medium. The readable storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0179] The above only describes optional embodiments of the present application, and does not limit the present application. Any modification, equivalent switching, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.​

Claims

1. A log display method characterized by, The method comprises: obtaining a log; displaying a user interface, wherein at least one log scene option is displayed in the user interface, and the log scene option is used to filter information of a business process corresponding to the log; in response to a selection operation on the log scene option, obtaining a target log scene option from the log scene option; the target log scene option comprises at least one keyword, a scene regular expression corresponding to the keyword, and a macro; filtering the log through the scene regular expression to obtain a scene field; replacing a value of the scene field into the keyword through the macro to obtain a business process description, wherein the business process description is used to reflect a state change time and state change information of the business process corresponding to the log; displaying a log analysis result in the user interface.

2. The method of claim 1, wherein, The displaying of the log analysis result in the user interface comprises: displaying a type of the keyword, a number of the keyword in the log, the state change time, and the state change information in the user interface.

3. The method of claim 2, wherein, The displaying of the type of the keyword, the number of the keyword in the log, the state change time, and the state change information in the user interface comprises: displaying the type of the keyword, the number of the keyword in the log, the state change time, and the state change information in the user interface in a timeline manner; wherein the timeline is determined according to the state change time.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: displaying a log scene configuration interface, wherein the log scene configuration interface comprises a scene configuration option, a keyword configuration option corresponding to the scene configuration option, and a scene regular expression configuration option corresponding to the keyword configuration option; in response to a configuration operation in the log scene configuration interface, determining the log scene option according to a configuration result of at least one of the scene configuration option, the keyword configuration option, and the scene regular expression configuration option.

5. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: loading a log basic information configuration, wherein the log basic information configuration comprises a basic information regular expression; filtering the log through the basic information regular expression to obtain a basic information field; displaying a value of the basic information field in the user interface, wherein the value of the basic information field can reflect information of a computer device generating the log.

6. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: sending the log analysis result to a server; receiving a log analysis link sent by the server, wherein the log analysis link is used to obtain the log analysis result.

7. A log display device characterized by comprising: The apparatus comprises: a first obtaining module configured to obtain a log; a display module configured to display a user interface, wherein at least one log scene option is displayed in the user interface, and the log scene option is used to filter information of a business process corresponding to the log; a second obtaining module configured to obtain a target log scene option from the log scene option in response to a selection operation on the log scene option; the target log scene option comprises at least one keyword, a scene regular expression corresponding to the keyword, and a macro; The parsing module is configured to filter the log by the scene regular expression to obtain a scene field; and replace a value of the scene field into the keyword by the macro to obtain a business process description, the business process description being configured to reflect a state change time and state change information of the business process corresponding to the log. The display module is configured to display a log analysis result in the user interface.

8. A computer device, comprising: The computer device comprises a processor and a memory, and the memory stores at least one program, which is loaded and executed by the processor to implement the log display method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program, which is loaded and executed by the processor to implement the log display method according to any one of claims 1 to 6.

10. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium, and the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to implement the log display method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Log processing method, device, storage medium and terminal device

    CN108108285A

  • A log management method and system for intelligent electrical equipment

    CN109446042A