Log viewing method and device, equipment and storage medium
Patent Information
- Application Number
- CN202610879100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本申请实施例提供了一种日志查看方法、装置、设备及存储介质,能够解决日志排查效率低的问题
[0020]另一方面,提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使计算机执行上述任一项所述的方法。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a log viewing method, apparatus, device, and storage medium. Background Technology
[0002] As mobile applications become increasingly complex, troubleshooting online issues relies more and more on compressed client-side log files. After receiving these compressed files, developers need to extract log data, browse them chronologically, and filter them using query criteria to identify records relevant to the problem in order to pinpoint the root cause of the anomaly.
[0003] Currently, R&D personnel mainly use locally installed desktop tools for log viewing and analysis, such as system log viewers, which support filtering based on search conditions such as tags and keywords.
[0004] However, existing desktop tools only support single-window display. When troubleshooting complex issues, developers have to repeatedly switch between different filter conditions in the same panel, making it impossible to intuitively compare the correlation between the results of different filter conditions, which seriously restricts the efficiency of troubleshooting. Summary of the Invention
[0005] This application provides a log viewing method, apparatus, device, and storage medium, which can solve the problem of low log review efficiency. The technical solution is as follows: On the one hand, a log viewing method is provided, the method including: Display the log dataset in the first window; In response to a first query condition entered in the first window, a query is performed in the log dataset based on the first query condition to obtain a first result set, and the first result set is displayed on the first window; In response to the split-screen command, a second window is displayed, and the log dataset is displayed in the second window; In response to the second query condition entered in the second window, a query is performed on the log dataset based on the second query condition to obtain a second result set, which is then displayed in the second window.
[0006] In one possible implementation, the split-screen command includes a horizontal split-screen command or a vertical split-screen command; the step of displaying a second window in response to the split-screen command includes: In response to the horizontal split-screen command, the second window and the first window are displayed side-by-side horizontally; or, In response to the vertical split-screen command, the second window and the first window are stacked vertically and displayed side by side.
[0007] In another possible implementation, the method further includes: In response to a time synchronization operation on the target log data in the current result set in the first window or the second window, the target timestamp corresponding to the target log data is obtained, and the display content of the other window is controlled to jump to the position of the log corresponding to the target timestamp; Wherein, when the time synchronization operation occurs in the first window, the current result set is the first result set, and the other window is the second window; when the time synchronization operation occurs in the second window, the current result set is the second result set, and the other window is the first window.
[0008] In another possible implementation, the method further includes: In response to a viewing command for a location dataset in the log dataset, the location dataset and the map area are displayed in the location window; In response to the selection of at least one location data in the location window, the location point corresponding to the at least one location data is marked in the map area.
[0009] In another possible implementation, after marking the location points corresponding to the at least one location data in the map area, the method further includes: In response to a distance measurement command for any two target location points among the location points, the distance between the two target location points is determined and displayed in the map area.
[0010] In another possible implementation, the method further includes: In response to a view command for a target type dataset in the log dataset, the target type dataset and the specified query conditions are displayed in the target type window; In response to the selection of the specified query condition in the target type window, a query is performed in the target type dataset based on the specified query condition to obtain a target result set, which is then displayed in the target type window.
[0011] In another possible implementation, the method further includes: Retrieve query records for the target type dataset within a specified historical time period. The query records include multiple query conditions. The query conditions in the query records with a query count greater than or equal to a specified number are used as the specified query conditions.
[0012] On the other hand, a log viewing device is provided, the device comprising: The first display module is configured to display the log dataset in a first window; A first query module is configured to, in response to a first query condition entered in the first window, perform a query on the log dataset based on the first query condition to obtain a first result set, and display the first result set on the first window; The second display module is configured to display a second window in response to a split-screen command, and to display the log dataset on the second window; The second query module is configured to, in response to a second query condition entered in the second window, perform a query on the log dataset based on the second query condition to obtain a second result set, and display the second result set on the second window.
[0013] In one possible implementation, the split-screen command includes a horizontal split-screen command or a vertical split-screen command; the second display module is used for: In response to the horizontal split-screen command, the second window and the first window are displayed side-by-side horizontally; or, In response to the vertical split-screen command, the second window and the first window are stacked vertically and displayed side by side.
[0014] In another possible implementation, the second display module is used for: In response to a time synchronization operation on the target log data in the current result set in the first window or the second window, the target timestamp corresponding to the target log data is obtained, and the display content of the other window is controlled to jump to the position of the log corresponding to the target timestamp; Wherein, when the time synchronization operation occurs in the first window, the current result set is the first result set, and the other window is the second window; when the time synchronization operation occurs in the second window, the current result set is the second result set, and the other window is the first window.
[0015] In another possible implementation, the second display module is used for: In response to a viewing command for a location dataset in the log dataset, the location dataset and the map area are displayed in the location window; In response to the selection of at least one location data in the location window, the location point corresponding to the at least one location data is marked in the map area.
[0016] In another possible implementation, the second display module is used for: In response to a distance measurement command for any two target location points among the location points, the distance between the two target location points is determined and displayed in the map area.
[0017] In another possible implementation, the second display module is used for: In response to a view command for a target type dataset in the log dataset, the target type dataset and the specified query conditions are displayed in the target type window; In response to the selection of the specified query condition in the target type window, a query is performed in the target type dataset based on the specified query condition to obtain a target result set, which is then displayed in the target type window.
[0018] In another possible implementation, the second query module is used for: Retrieve query records for the target type dataset within a specified historical time period. The query records include multiple query conditions. The query conditions in the query records with a query count greater than or equal to a specified number are used as the specified query conditions.
[0019] On the other hand, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the method described in any of the above.
[0020] On the other hand, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in any of the preceding claims.
[0021] On the other hand, a computer program product is provided, including computer program instructions that, when run on a computer, cause the computer to perform the method described in any of the preceding claims.
[0022] The beneficial effects of the technical solution provided in this application are: by displaying the query results of the same log dataset under different query conditions in the first window and the second window, researchers can directly compare log data under different query conditions in the same interface, and determine the temporal correlation and logical causal relationship between log data without interrupting the current analysis process, which significantly improves the efficiency of log data correlation analysis and the speed of online problem location. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart of the log viewing method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the log viewing method provided in the embodiments of this application. Figure 1 ; Figure 4 This is a schematic diagram of the log viewing method provided in the embodiments of this application. Figure 2 ; Figure 5 This is a schematic diagram of a log viewing method provided in another embodiment of this application; Figure 6 This is a schematic diagram of the log viewing device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0026] With the rapid development of the mobile internet, the business functions carried by mobile applications are becoming increasingly complex, and the types of online issues reported are also becoming more diverse. During troubleshooting, developers heavily rely on compressed client log files reported by the feedback system. A typical troubleshooting process usually includes: obtaining the compressed log file, decompressing it, extracting the log files, integrating the log data from multiple files into a unified log dataset in chronological order, filtering the dataset by setting query conditions to identify log records related to specific issues, and ultimately pinpointing the cause of the anomaly. Therefore, the ease of use and query / comparison capabilities of log viewing and analysis tools directly impact the efficiency of online problem troubleshooting.
[0027] Among related technologies, the mainstream solution is a locally installed desktop log viewing tool, most notably the system log viewer built into an integrated development environment (IDE). These tools typically have comprehensive query syntax, supporting combined query conditions based on tags, process names, log levels, time ranges, message content, etc., and allowing for filtered display of log data. Additionally, some developers utilize general-purpose text editing tools in conjunction with local text processing commands for log retrieval. A common characteristic of these solutions is that they all require the installation of corresponding software on the local computer, enabling log viewing and analysis through a single view interface.
[0028] However, existing locally installed log viewing tools only support a single-window display mode. In real-world, complex troubleshooting scenarios, developers often need to simultaneously observe the relationships between log records that meet different filtering conditions on the same timeline. For example, when analyzing functional anomalies, it's necessary to display logs tagged with the main process on one side and logs tagged with anomaly handling on the other, comparing the results from both sides in parallel to determine temporal correlations and logical causal relationships. However, limited by the single-pane architecture of existing tools, developers can only repeatedly switch between different query conditions inputted in the same view, unable to perform multi-perspective comparative analysis. This severely restricts developers' ability to perform correlation analysis on complex log data and reduces the efficiency of online problem troubleshooting.
[0029] This disclosure provides a method for viewing logs. This method can be applied to a terminal. For example... Figure 1 As shown, the terminal may include a processor 110, a memory 120, and a communication component 130.
[0030] Processor 110 can be a central processing unit (CPU), graphics processing unit (GPU), microcontroller unit (MCU), accelerated processing unit (APU), neural processing unit (NPU), tensor processing unit (TPU), field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), digital signal processor (DSP), etc. Processor 110 can be used to perform queries on a log dataset based on query conditions, and so on.
[0031] Memory 120 may include volatile memory and / or non-volatile memory. Volatile memory may include random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), etc. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, non-volatile random access memory (NVRAM), etc. Memory 120 may be used to store log datasets, etc.
[0032] The communication component 130 can be a wireless communication module (WCM), a subscriber identity module (SIM), a universal subscriber identity module (USIM), an optical network unit (ONU), etc. The communication component 130 can be used for communication between the terminal and a server, or other terminals.
[0033] This application provides a method for viewing logs, such as... Figure 2 As shown, in some embodiments, the method includes: S201. Display the log dataset in the first window.
[0034] The log dataset refers to a unified collection of log records obtained by parsing and extracting from the log compressed package and integrating them in chronological order. It contains multiple log records, each of which must include at least fields such as timestamp, log level, tag, and message content. The first window refers to the log viewing panel initially displayed on the browser page, used to display the log dataset or query results. It has independent filtering conditions, scrolling status, and column display / hiding configuration.
[0035] In practice, the download link for the compressed log file is obtained, and the file is automatically downloaded and decompressed. The multiple log files contained within are then parsed and normalized. Specifically, the main process log file and system log file are filtered out based on a filename whitelist. These are then sorted according to the time sequence corresponding to their filenames. Two regular expressions are used to match the main process log line format and the system log line format respectively. Lines that fail to match are identified as continuations of the previous log line and appended to the end of the message field. A globally incrementing log identifier is assigned to each log line, ultimately forming a unified log dataset. All log records from this dataset are displayed in the first window of the browser page. Each record is arranged from earliest to latest by timestamp, displaying the timestamp column, log level column, tag column, and message content column.
[0036] S202. In response to the first query condition entered in the first window, a query is performed in the log dataset based on the first query condition to obtain a first result set, and the first result set is displayed on the first window.
[0037] The query conditions (i.e., filtering conditions) refer to the filtering expressions used to filter log data. They support combined filtering based on dimensions such as tags, process names, log levels, time ranges, and message content, and can include exact matching, fuzzy matching, negative prefixes, and logical AND, OR, and NOT syntax. The first result set is a subset of log records obtained after filtering the log dataset based on the first query conditions, and is displayed in chronological order.
[0038] In practice, when the first query condition is entered in the filter input box at the top of the first window, such as "tag:AfterCaptureHandler", a filter syntax tree is constructed based on the query condition. Each log record in the log dataset is traversed for matching and judgment. Log records whose tag field contains "AfterCaptureHandler" are filtered out to form the first result set, and the first result set is displayed on the first window.
[0039] S203. In response to the split-screen command, a second window is displayed, and the log dataset is displayed in the second window.
[0040] The split-screen command refers to the operation command that triggers the creation of a new log viewing window, used to display multiple independent log views side by side on the same page. The second window is a log viewing panel added after responding to the split-screen command. It shares the same log dataset as the first window, but has independent query conditions and display status.
[0041] In practice, when the split-screen button in the toolbar of the first window is clicked, a second window is displayed on the right side of the first window in response to the split-screen instruction. When the second window is created, it also loads and displays the complete log dataset, and the second window shares the same parsed log data source as the first window, without data copying.
[0042] S204. In response to the second query condition entered in the second window, a query is performed on the log dataset based on the second query condition to obtain a second result set, and the second result set is displayed on the second window.
[0043] The second result set refers to the subset of log records obtained after filtering the log dataset based on the second query condition, and is displayed in chronological order. When the second query condition is entered in the filter input box at the top of the second window, for example, "tag:WatermarkClearManager", the same log dataset is filtered based on this second query condition, resulting in a second result set whose tag field contains "WatermarkClearManager", which is then displayed in the second window. At this time, the first window displays logs related to the main photo-taking process, and the second window displays logs related to watermark removal. The logs on both sides are naturally aligned based on the same timeline, allowing developers to observe the temporal relationship between the two business links simultaneously.
[0044] In this embodiment, by implementing a multi-window log viewing architecture on the web page, a single log view is expanded into a parallel multi-view mode. Developers no longer need to repeatedly switch between different filter conditions in the same panel; they can simultaneously observe the relationships between log records that meet different query conditions on the same timeline, significantly improving the efficiency of troubleshooting complex problems. At the same time, all windows share the same log data source, avoiding the memory overhead of copying multiple data sets and ensuring the performance of the browser.
[0045] In some embodiments, reference Figure 3 , Figure 4 The split-screen command includes a horizontal split-screen command or a vertical split-screen command; the step of displaying a second window in response to the split-screen command includes: In response to the horizontal split-screen command, the second window and the first window are displayed side by side horizontally; or, in response to the vertical split-screen command, the second window and the first window are stacked vertically.
[0046] In practice, split-screen commands are divided into two types: horizontal split-screen commands and vertical split-screen commands. Different menu items or buttons can trigger the corresponding type of split-screen operation. When the "Horizontal Split-Screen" button is clicked, a second window is created to the right of the current first window in response to this command. The second window and the first window are displayed side-by-side horizontally. The initial width ratio of the two windows is 1:1. The width of each window can be adjusted by dragging the separator between them. For example, the left window can be widened to occupy two-thirds of the screen, and the right window can occupy one-third, allowing for focused viewing of the log content in the left window.
[0047] When the "Split Screen in Portrait" button is clicked, a second window is created below the current first window in response to this command. The second window and the first window are stacked vertically. The initial height ratio of the two windows is 1:1, and their respective heights can be adjusted by dragging the separator between the upper and lower windows.
[0048] In practical applications, when developers need to compare the timing relationship between two business modules, they typically choose horizontal split-screen mode, viewing them side-by-side. When they need to view key log summaries at the top and complete log details at the bottom, they can choose vertical split-screen mode. Both split-screen modes support creating more windows, such as continuing to split horizontally on top of the horizontal split-screen mode to form a layout of three windows side-by-side, or splitting one of the sub-windows vertically to form a hybrid layout.
[0049] In this embodiment, by providing both horizontal and vertical split-screen orientations, the view layout requirements of different troubleshooting scenarios can be met. Developers can flexibly choose the split-screen method according to the problem type and personal habits, thereby improving the applicability and user experience of multi-window log viewing.
[0050] In some embodiments, the method further includes: In response to a time synchronization operation on target log data in the current result set in either the first window or the second window, the target timestamp corresponding to the target log data is obtained, and the display content of the other window is controlled to jump to the position of the log corresponding to the target timestamp; wherein, when the time synchronization operation occurs in the first window, the current result set is the first result set, and the other window is the second window; when the time synchronization operation occurs in the second window, the current result set is the second result set, and the other window is the first window.
[0051] Time synchronization refers to the operation performed by developers on a target log data entry within the result set of the current window, which triggers another window to jump to the corresponding time position. Examples include clicking a log entry, double-clicking a log entry, or selecting "Synchronize to other windows" via the right-click menu. The target timestamp refers to the time field value corresponding to the target log data, used to identify the specific moment the log entry was generated; its format is typically a time string accurate to milliseconds.
[0052] In practice, when the first window displays the first result set and the second window displays the second result set, each window maintains its own independent scrolling position. A time synchronization operation can be performed on a specific log in either window, triggering the other window to jump to the corresponding time position.
[0053] For example, double-clicking a log record with a time of 12:48:22.643 in the first window is identified as a time synchronization operation. The target timestamp 12:48:22.643 corresponding to this target log data is retrieved. Then, the second window searches its second result set for a log record with a timestamp equal to or closest to 12:48:22.643, and scrolls the content of the second window to the location of that log record, centering that line in the visible area. Conversely, if the time synchronization operation occurs in the second window, such as double-clicking a log record with a time of 12:48:22.688 in the second window, the target timestamp is retrieved, and the first window jumps to the log record location corresponding to that timestamp in the first result set.
[0054] In actual troubleshooting scenarios, when developers view the main photo-taking process log in the left window, they may find that a watermark cleanup operation was triggered at a certain moment. By clicking on the log entry to perform a time synchronization operation, the watermark management window on the right will automatically jump to the same time point. Developers can immediately see what the watermark module is doing at that moment, thereby quickly determining the temporal causal relationship between the two modules without having to manually scroll through the right window to find the corresponding time point.
[0055] In this embodiment, by synchronizing and linking windows in time, rapid positioning and comparative analysis based on the time axis is achieved between multiple windows. After discovering a key time point in one window, the R&D personnel can trigger other windows to jump to that time point with one click, avoiding the tedious operation of manual scrolling and searching, and further improving the efficiency of multi-window comparison and investigation.
[0056] In some embodiments, reference Figure 5 The method further includes: In response to a viewing instruction for a location dataset in the log dataset, the location dataset and a map area are displayed in a location window; in response to a selection operation of at least one location data in the location window, the location point corresponding to the at least one location data is marked in the map area.
[0057] The location dataset refers to a structured collection of records containing location information extracted from the log dataset. Each location data entry must contain at least the fields of time, latitude and longitude, address description, and location source.
[0058] The location window is a dedicated business view window for displaying and analyzing location data. Unlike the general log view window, it provides a combined display of location data lists and map visualizations. The map area refers to the map display area embedded within the location window, rendered using a third-party map service, and supports interactive operations such as location labeling, zooming, and panning.
[0059] The selection operation refers to the checkmark operation performed on multiple location data records in the location data list, used to select the location records that need to be marked and displayed on the map. Location points refer to visual markers used to mark the geographical location of location data in the map area, usually displayed as icons at the corresponding coordinates on the map.
[0060] In practice, when you need to analyze location-related issues, click the "Location" tab at the top of the page to display the location window. The location window has a three-column layout: the left side is the location data list, the middle is the details section, and the right side is the map area.
[0061] First, location-related log records are pre-filtered from the log dataset using a set of location-related tags, including tags for coarse address location providers, fine address location providers, location status management, location vendor aggregators, and location service implementations. Then, the filtered logs are structured and parsed to extract information such as time, semantic type, brief description, latitude and longitude, and detailed fields for each record, forming a structured location dataset. Each location data point is categorized based on its semantic source, including watermarked location, real-time SDK (Software Development Kit) location results, calibrated location, user-selected location, and immediate SDK location feedback, with different categories indicated by different colors.
[0062] The left-hand list in the location window displays all location records in the location dataset in chronological order. Each record displays the time, category color block, and a brief message. The map area on the right initially displays the map centered on the most recent valid location.
[0063] When at least one location data point is selected in the left-hand location data list—for example, selecting one record in the "Watermark Display Location" category, one record in the "User Feedback Selected Location" category, and three records in the "SDK Real-Time Location Results" category—five location points corresponding to these five selected location data points are marked in the right-hand map area. Each location point is marked with a different color according to its category. Developers can visually compare the relative positional relationships between location results from different sources on the map to determine the accuracy of the location and the degree of deviation.
[0064] In this embodiment, the multi-source positioning data scattered in the free text log is extracted in a structured manner and visualized through the positioning-specific analysis window. Researchers do not need to search for positioning-related records line by line in massive logs, nor do they need to manually copy latitude and longitude to external map tools for verification. They can simply select the positioning records they are interested in and compare them intuitively on the map, which greatly improves the efficiency and accuracy of troubleshooting positioning problems.
[0065] In some embodiments, after marking the location points corresponding to the at least one location data in the map area, the method further includes: In response to a distance measurement command for any two target location points among the location points, the distance between the two target location points is determined and displayed in the map area.
[0066] In practice, a "distance measurement" button is usually provided in the upper right corner of the map area. Clicking this button enters the distance measurement mode. Users can click on locations on the map in sequence, draw lines between adjacent clicked points, and display the cumulative distance values in real time.
[0067] In practical applications, when developers need to determine the deviation between the watermark display location and the location the user considers correct, they first select the two location data points in the location list, displaying them as two location points on the map. Then, they click the distance measurement button and click the two target location points on the map in sequence. The spherical distance between the two points is calculated based on their latitude and longitude coordinates; for example, if the calculated distance is 150 meters, this distance value is displayed on the map. The distance measurement result helps developers quantitatively assess the severity of the positioning deviation, determining whether it is a minor deviation or a serious error.
[0068] In addition to measuring the distance between marked locations, you can also click on any location on the map to measure distances, such as the total length of a location path or the distance between a location and a landmark. After completing the measurement, you can click the measurement button again to exit the measurement mode, or click the clear button to clear all distance measurement lines and distance markers.
[0069] In this embodiment, by using the map ranging function, researchers can quantitatively assess the deviation distance between different positioning results, transforming the positional differences that could only be qualitatively judged into quantifiable distance values. This facilitates a more accurate analysis of the severity and causes of positioning problems, thereby improving the depth and accuracy of positioning-specific analysis.
[0070] In some embodiments, the method further includes: In response to a viewing instruction for a target type dataset in the log dataset, the target type dataset and specified query conditions are displayed in the target type window; in response to a selection operation of the specified query conditions in the target type window, a query is performed on the target type dataset based on the specified query conditions to obtain a target result set, and the target result set is displayed on the target type window.
[0071] The target type dataset refers to a collection of log records belonging to the same business domain, filtered and extracted from the log dataset according to a specific business type, such as datasets of different business dimensions like location, photo, video, and network types. The target type window is a dedicated view window for displaying and analyzing log data of a specific business type, providing optimized display formats and analysis functions for that business type. Specifying query conditions refers to the preset filtering query conditions commonly used for that business type in the target type window, which can be directly selected and used without manual input.
[0072] In practice, when the "Take Photo" tab in the top navigation bar is clicked, the photo type window is displayed in response to the command to view the photo type dataset in the log dataset. The photo type window is divided into two parts: the upper part displays the area for specifying query conditions, and the lower part displays the log list area. The area for specifying query conditions displays several preset query condition labels, such as "Photo Issues," "Panorama Issues," and "Watermark Processing." These query conditions are preset filtering conditions commonly used in photo-related business scenarios.
[0073] When the "watermark processing" query condition is selected in the specified query condition area, the query is filtered in the photo type dataset based on the query condition to obtain the target result set containing logs related to watermark processing, and the target result set is displayed in the log list area of the photo type window.
[0074] In this embodiment, by using business-specific views and preset query conditions, the general log viewing tool is deeply integrated with specific business scenarios. Developers do not need to memorize complex tag names and query syntax. They can quickly filter out the business logs of interest by simply clicking on the preset query conditions, which lowers the threshold for use and improves the efficiency of troubleshooting specific business issues.
[0075] In some embodiments, the method further includes: Retrieve query records for the target type dataset within a specified historical time period. The query records include multiple query conditions. The query conditions in the query records with a query count greater than or equal to a specified number are used as the specified query conditions.
[0076] Here, "historical duration" refers to the time range used to statistically analyze query records, such as the last 7 days or the last 30 days; it is a configurable time length parameter. "Query record" refers to the historical record of all query operations executed within the target type window; each record contains information such as the query conditions, query time, and the number of query results. "Specified number of times" refers to the threshold for determining whether a query condition is frequently used; it is a configurable integer value, such as 3 times or 5 times.
[0077] In practice, when the target type window is opened, the system retrieves query records for that target type dataset within a specified historical period, such as all queries executed in the photo type window within the last 30 days. These query records are then statistically analyzed, grouped by query condition text, and the frequency of each query condition is counted. Query conditions with a frequency greater than or equal to a specified number of times are designated as frequently used query conditions and added to the specified query condition area of the target type window for developers to directly select.
[0078] For example, if the specified number of times is set to 3, and a developer enters "tag:WatermarkClearManager" multiple times in the photo type window within the last 30 days to query watermark cleanup related logs, accumulating 5 uses, exceeding the specified number of 3 uses, then the query condition "tag:WatermarkClearManager" will be added to the specified query condition list in the photo type window and displayed as a semantic name such as "watermark cleanup," making it convenient for developers to directly click and use it later.
[0079] For automatically generated query conditions, you can sort them from highest to lowest frequency of use, with the most frequently used conditions appearing first. You can also manually manage the list of query conditions, including adding custom conditions, deleting infrequently used conditions, and renaming conditions.
[0080] In this embodiment, by automatically generating commonly used query conditions based on historical query records, it is possible to adapt to the personal usage habits and specific work scenarios of R&D personnel, dynamically optimize the preset query condition list, reduce the operation of repeatedly entering the same query conditions, and further improve the efficiency of log viewing and problem troubleshooting.
[0081] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0082] Based on the same inventive concept, and corresponding to the log viewing method provided in the embodiments of this application, this application also provides a log viewing device.
[0083] refer to Figure 6 The log viewing device includes: The first display module 601 is configured to display the log dataset in a first window; The first query module 602 is configured to, in response to a first query condition entered in the first window, perform a query on the log dataset based on the first query condition to obtain a first result set, and display the first result set on the first window; The second display module 603 is configured to display a second window in response to a split-screen command, and to display the log dataset on the second window; The second query module 604 is configured to, in response to a second query condition entered in the second window, perform a query on the log dataset based on the second query condition to obtain a second result set, and display the second result set on the second window.
[0084] In one possible implementation, the split-screen command includes a horizontal split-screen command or a vertical split-screen command; the second display module 603 is used for: In response to the horizontal split-screen command, the second window and the first window are displayed side-by-side horizontally; or, In response to the vertical split-screen command, the second window and the first window are stacked vertically and displayed side by side.
[0085] In another possible implementation, the second display module 603 is used for: In response to a time synchronization operation on the target log data in the current result set in the first window or the second window, the target timestamp corresponding to the target log data is obtained, and the display content of the other window is controlled to jump to the position of the log corresponding to the target timestamp; Wherein, when the time synchronization operation occurs in the first window, the current result set is the first result set, and the other window is the second window; when the time synchronization operation occurs in the second window, the current result set is the second result set, and the other window is the first window.
[0086] In another possible implementation, the second display module 603 is used for: In response to a viewing command for a location dataset in the log dataset, the location dataset and the map area are displayed in the location window; In response to the selection of at least one location data in the location window, the location point corresponding to the at least one location data is marked in the map area.
[0087] In another possible implementation, the second display module 603 is used for: In response to a distance measurement command for any two target location points among the location points, the distance between the two target location points is determined and displayed in the map area.
[0088] In another possible implementation, the second display module 603 is used for: In response to a view command for a target type dataset in the log dataset, the target type dataset and the specified query conditions are displayed in the target type window; In response to the selection of the specified query condition in the target type window, a query is performed in the target type dataset based on the specified query condition to obtain a target result set, which is then displayed in the target type window.
[0089] In another possible implementation, the second query module 604 is used for: Retrieve query records for the target type dataset within a specified historical time period. The query records include multiple query conditions. The query conditions in the query records with a query count greater than or equal to a specified number are used as the specified query conditions.
[0090] It should be noted that the log viewing device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the log viewing device and the log viewing method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0091] Based on the same inventive concept, corresponding to the log viewing method provided in the embodiments of this application, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the log viewing method described in the above embodiments.
[0092] Figure 7This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0093] The processor 1010 can be implemented using a general-purpose CPU (central processing unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0094] The memory 1020 can be implemented in the form of ROM (read-only memory), RAM (random access memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0095] The input / output interface 1030 is used to connect input / output modules to realize information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0096] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0097] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0098] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0099] The electronic device described above is used to implement the corresponding log viewing method in the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0100] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the log viewing method described above. This computer-readable storage medium can be non-transitory. For example, the computer-readable storage medium can be ROM (read-only memory), RAM (random access memory), CD-ROM (compact disc read-only memory), magnetic tape, floppy disk, and optical data storage devices, etc.
[0101] In an exemplary embodiment, a computer program product is also provided, including computer program instructions that, when executed on a computer, cause the computer to perform the log viewing method described above.
[0102] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices, etc.) involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0103] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0104] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0105] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for viewing logs, characterized in that, include: Display the log dataset in the first window; In response to a first query condition entered in the first window, a query is performed on the log dataset based on the first query condition to obtain a first result set, and the first result set is displayed on the first window; In response to the split-screen command, a second window is displayed, and the log dataset is displayed in the second window; In response to the second query condition entered in the second window, a query is performed on the log dataset based on the second query condition to obtain a second result set, which is then displayed in the second window.
2. The log viewing method according to claim 1, characterized in that, The split-screen command includes a horizontal split-screen command or a vertical split-screen command; the step of displaying a second window in response to the split-screen command includes: In response to the horizontal split-screen command, the second window and the first window are displayed side-by-side horizontally; or, In response to the vertical split-screen command, the second window and the first window are stacked vertically and displayed side by side.
3. The log viewing method according to claim 1, characterized in that, The method further includes: In response to a time synchronization operation on the target log data in the current result set in the first window or the second window, the target timestamp corresponding to the target log data is obtained, and the display content of the other window is controlled to jump to the position of the log corresponding to the target timestamp; Wherein, when the time synchronization operation occurs in the first window, the current result set is the first result set, and the other window is the second window; when the time synchronization operation occurs in the second window, the current result set is the second result set, and the other window is the first window.
4. The log viewing method according to claim 1, characterized in that, The method further includes: In response to a viewing command for a location dataset in the log dataset, the location dataset and the map area are displayed in the location window; In response to the selection of at least one location data in the location window, the location point corresponding to the at least one location data is marked in the map area.
5. The log viewing method according to claim 4, characterized in that, After marking the location points corresponding to the at least one location data in the map area, the method further includes: In response to a distance measurement command for any two target location points among the location points, the distance between the two target location points is determined and displayed in the map area.
6. The log viewing method according to claim 1, characterized in that, The method further includes: In response to a view command for a target type dataset in the log dataset, the target type dataset and the specified query conditions are displayed in the target type window; In response to the selection of the specified query condition in the target type window, a query is performed in the target type dataset based on the specified query condition to obtain a target result set, which is then displayed in the target type window.
7. The log viewing method according to claim 6, characterized in that, The method further includes: Retrieve query records for the target type dataset within a specified historical time period. The query records include multiple query conditions. The query conditions in the query records with a query count greater than or equal to a specified number are used as the specified query conditions.
8. A log viewing device, characterized in that, include: The first display module is configured to display the log dataset in a first window; A first query module is configured to, in response to a first query condition entered in the first window, perform a query on the log dataset based on the first query condition to obtain a first result set, and display the first result set on the first window; The second display module is configured to display a second window in response to a split-screen command, and to display the log dataset on the second window; The second query module is configured to, in response to a second query condition entered in the second window, perform a query on the log dataset based on the second query condition to obtain a second result set, and display the second result set on the second window.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method described in any one of claims 1 to 7.