WO2020233219A1 - 异常问题的定位方法、装置、设备及计算机可读存储介质 - Google Patents
异常问题的定位方法、装置、设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020233219A1 WO2020233219A1 PCT/CN2020/080696 CN2020080696W WO2020233219A1 WO 2020233219 A1 WO2020233219 A1 WO 2020233219A1 CN 2020080696 W CN2020080696 W CN 2020080696W WO 2020233219 A1 WO2020233219 A1 WO 2020233219A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- log
- running
- local database
- terminal
- storage
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/079—Root cause analysis, i.e. error or fault diagnosis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/366—Software debugging using diagnostics
Definitions
- This application relates to the field of financial technology (Fintech), in particular to methods, devices, equipment and computer-readable storage media for locating abnormal problems.
- the Android system has been widely applied to some medium and large terminals, such as robots or access control tablets. Compared with the mobile smart phones commonly used by users, this type of terminal is not only larger in size, but also has a more secret interface, making it difficult to connect to a computer.
- the android system generally used by this type of terminal is a customized system, such as restricting the network connection and external storage functions of this type of terminal, so that such devices cannot be connected to the network or even external storage devices.
- the main purpose of this application is to propose a method, device, device, and computer-readable storage medium for locating abnormal problems, aiming to solve the technical problem of low debugging efficiency caused by the difficulty of exporting existing log files.
- the present application provides a method for locating abnormal problems, which is applied to medium and large terminals, and the method for locating abnormal problems includes the following steps:
- the log file to be viewed is displayed through the terminal, so that the user can locate the abnormal problem based on the log file to be viewed displayed on the terminal.
- the present application also provides an abnormal problem locating device, the abnormal problem locating device is installed in a medium and large terminal, and the abnormal problem locating device includes:
- the log storage module is configured to store the running log in the local database of the terminal according to a preset storage strategy when it is monitored that the application on the terminal generates the running log;
- the log search module is configured to, when receiving a log viewing instruction triggered by a user operation, obtain the log identification in the log viewing instruction, and search for the corresponding log file to be viewed in the local database according to the log identification;
- the log display module is configured to display the log file to be viewed through the terminal, so that the user can locate the abnormal problem based on the log file to be viewed displayed on the terminal.
- the present application also provides a cache processing device, the cache processing device includes: a memory, a processor, and an abnormal problem location program stored in the memory and running on the processor When the abnormal problem location program is executed by the processor, the steps of the abnormal problem location method described above are implemented.
- the present application also provides a computer-readable storage medium that stores an abnormal problem locating program, and the abnormal problem locating program is executed by the processor to achieve the above The steps of the abnormal problem location method described.
- this application When monitoring the application on the terminal to generate the running log, this application stores the running log in the local database of the terminal according to a preset storage strategy; when receiving a log viewing instruction triggered by a user operation, the log viewing is obtained The log identifier in the instruction, and search for the corresponding log file to be viewed in the local database according to the log identifier; display the log file to be viewed through the terminal, so that the user can proceed based on the log file to be viewed displayed on the terminal Location of abnormal problems.
- this method realizes the quick and convenient view of the running log of the application on the medium and large terminal, that is, for those with a screen but inconvenient to connect to the network or external storage tools
- Medium and large terminals directly provide quick and convenient viewing of application running logs on the terminal, so that relevant users can locate abnormal problems based on the running logs and solve system vulnerabilities.
- This application improves the efficiency of system debugging and solves the technical problem of difficulty in exporting log files.
- FIG. 1 is a schematic diagram of a device structure of a hardware operating environment involved in a solution of an embodiment of the present application
- FIG. 2 is a schematic flowchart of a first embodiment of a method for locating abnormal problems in this application.
- FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present application.
- the cache processing device in the embodiment of the present application may be a PC or a server device, on which a Java virtual machine runs.
- the cache processing device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
- the communication bus 1002 is used to implement connection and communication between these components.
- the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
- the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
- the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
- the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
- FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
- the memory 1005 which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an abnormal problem location program.
- the network interface 1004 is mainly used to connect to a back-end server and communicate with the back-end server;
- the user interface 1003 is mainly used to connect to a client (user side) and communicate with the client;
- the processor 1001 can be used to call the abnormal problem locating program stored in the memory 1005, and perform operations in the following abnormal problem locating method.
- FIG. 2 is a schematic flowchart of a first embodiment of a method for locating abnormal problems according to this application, and the method includes:
- Step S10 when it is monitored that the application on the terminal generates a running log, the running log is stored in the local database of the terminal according to a preset storage strategy;
- the method for locating abnormal problems in this embodiment is applied to a medium and large terminal, which is a terminal with a large screen and inconvenient to connect to the network or other external storage tools, that is, it is inconvenient to export log files.
- a medium and large terminal which is a terminal with a large screen and inconvenient to connect to the network or other external storage tools, that is, it is inconvenient to export log files.
- medium and large terminals such as robots or access control tablets. Due to their large size and hidden interfaces, it is not easy to connect to computers, and to ensure system information security Therefore, the system of the above terminal needs to be customized according to requirements, that is, the wireless network module (WiFi module) or the external storage module is castrated, which makes it difficult or even impossible to export the log file in the terminal.
- WiFi module wireless network module
- the external storage module is castrated, which makes it difficult or even impossible to export the log file in the terminal.
- the access control panel is used as an example for description, that is, the abnormal problem location program (hereinafter referred to as the positioning APP) is installed in the access control panel.
- the program detects that the application on the access control panel starts to run and generates a running log, for example, it starts to perform face recognition for identity verification, and obtains the running log in the access control panel according to a preset storage strategy set in advance, and stores all
- the operation log is stored in the local database of the access control panel.
- the preset storage strategy can be a preset encryption rule.
- a programmer sets log parameters in the positioning APP in advance, including an encryption algorithm and an encryption key, and the encryption algorithm and the encryption key are used to The operation log is encrypted, and then the encrypted operation log is stored in the local database of the access control panel.
- the preset storage strategy may also be a storage rule set by a programmer, such as dividing the running log into blocks and the parameters (time interval or data size) corresponding to the blocks.
- the preset storage strategy may also be the storage frequency set by the programmer, such as writing the running log temporarily stored in the cache to the local database of the access control panel after the application runs or when a user's write instruction is received. . It is also possible to write the running log in the cache to the local database by default when a viewing instruction triggered by a user operation is received.
- the running log with a large amount of data can be compressed, that is, when the running log is monitored, it can first be determined whether the data volume of the running log exceeds the preset If the compression threshold is exceeded, the running log is compressed before being stored. If it is not exceeded, the operation log can be directly stored.
- the step S10 includes:
- the abnormal running log is correspondingly stored in the abnormal log area in the local database according to the preset storage strategy In, easy for users to find.
- step S10 further includes:
- the preset reminder method can be through a bell, a flashing light or sending an abnormal reminder message to the administrator terminal Wait.
- Step S20 when receiving a log viewing instruction triggered by a user operation, obtain a log identifier in the log viewing instruction, and search for a corresponding log file to be viewed in the local database according to the log identifier;
- the function of viewing the operation log on the access control panel can be provided for related users (such as a programmer with debugging authority).
- a log viewing instruction triggered by a user viewing log operation for example, the user clicks a log in the log list to obtain the log identification corresponding to the log viewing instruction, such as the log storage address link or the log name, and locate the APP according to the log identification
- the log identification corresponding to the log viewing instruction such as the log storage address link or the log name
- Step S30 Display the log file to be viewed through the terminal, so that the user can locate the abnormal problem based on the log file to be viewed displayed on the terminal.
- the positioning APP displays the acquired log file to be viewed through the screen interface of the access control tablet, so that the relevant user can view the log file to be viewed, so as to locate the log file to be viewed according to the log file to be viewed. Abnormal problem, and debug the corresponding problem.
- the running log is stored in the local database of the terminal according to a preset storage strategy; the log is obtained when a log viewing instruction triggered by a user operation is received Check the log identifier in the instruction, and search for the corresponding log file to be viewed in the local database according to the log identifier; display the log file to be viewed through the terminal so that the user can base on the log file to be viewed displayed on the terminal Locate the abnormal problem.
- this method realizes the quick and convenient view of the running log of the application on the medium and large terminal, that is, for those with a screen but inconvenient to connect to the network or external storage tools
- Medium and large terminals directly provide quick and convenient viewing of application running logs on the terminal, so that relevant users can locate abnormal problems based on the running logs and solve system vulnerabilities.
- This application improves the efficiency of system debugging and solves the technical problem of difficulty in exporting log files.
- step S10 may specifically include:
- the operation log is divided into blocks according to the log level of the operation log, and the divided operation log is correspondingly stored in a corresponding area in the local database.
- the log file is stored in the form of block storage to store the running log locally on the access control panel.
- the positioning APP detects that the application on the access control panel generates a running log, it stores the running log in a cache area (Cache). Then obtain the log level identifier corresponding to the run log in the cache, and determine the log level corresponding to the run log, such as VERBOSE, DEBUG, INFO, WARNING, ERROR, and FATAL.
- each level log corresponds to The log level identifiers are V, D, I, W, E, and F, that is, the log level identifier corresponding to each log level is the first letter of the log level name.
- the running log is divided into blocks according to the log level, that is, the running logs of the same log level are stored in the same area of the local database, such as different subfolders under the same folder.
- the file The folder name can be named according to the generation time of the log and the log level, and stored in sequence according to the time.
- the above method divides the running log into blocks according to the log level, and the debugger can select the required level log to view, which not only avoids the APP Crash or ANR caused by the large amount of log data at one time, but also improves the log search efficiency .
- This solves the shortcomings of the terminal device in terms of computing capabilities, and ensures that the normal operation of the application program is not affected when the log file is viewed on the terminal device.
- the method for locating the abnormal problem may further include:
- the target log level identifier determine the target area corresponding to the storage target log in the local database
- a comparison is performed among log files in the target area to determine in the local database that the target query instruction corresponds to the target log file.
- the debugger can further provide the function of quickly and conveniently querying the target log based on the log level and log keywords, so as to further improve the log search efficiency. Improve debugging efficiency. Specifically, when a log query instruction triggered by a user operation is received, the target log level identifier and the input interface of the target log keyword can be displayed on the access panel.
- the positioning APP After the positioning APP receives the target log level identifier and the target log keyword, it compares the target log level identifier with the log level stored in the local database, and if it matches, it is determined as the target log
- the level identifier corresponds to the target log level, that is, the target area can be a target log level folder or other storage form. Then, according to the target log keyword, the log file corresponding to the target log level folder is compared and searched, and the log file matching the target log keyword is determined as the target log file.
- step S10 may include:
- the running log is stored in a cache, and the running log is divided into blocks according to a preset time interval to generate a running log block corresponding to each time period;
- each running log block corresponding to each time period is sequentially stored in a corresponding area in the local database.
- the running log is also divided into blocks according to a preset time interval to prevent the problem of APP Crash or ANR caused by the excessive amount of log data in one-time viewing.
- the positioning APP detects that the application on the access control panel generates a running log, it temporarily stores the running log in the cache.
- the preset time interval set by the debugger the running log starting from the preset time point and reaching the preset time interval can be stored as a running log block, such as 8:00 in the morning, 30min is a time interval, 8 :00-8:30
- the running log is stored as a running log block.
- name the run log blocks with the start time point or the end time point and store the run log blocks corresponding to each time period in the corresponding area of the local database in the order of time from farthest to nearest or nearest to farthest.
- each run log block corresponding to each time period may further include:
- the log block to be split is split twice according to the data volume of the preset threshold, so as to divide the log block to be split into smaller than the preset Threshold running log block.
- this embodiment further analyzes the running logs corresponding to each time period.
- the data volume of the block is judged, and the running log block whose data volume exceeds a preset threshold is split. Specifically, the data volume of each running log block in the local database is obtained, and the data volume of each running log block is compared with a preset threshold, such as 10M.
- a preset threshold such as 10M.
- a running log block exceeding 10M means that the amount of log data is too large.
- the log block is the log block to be split.
- the log block to be split is split twice according to the size of the data, that is, the log block to be split is split into log blocks with a data volume less than a preset threshold, so as to avoid checking the log data volume at a time.
- step S10 may also include:
- the log level of the running log is determined according to the log level identifier of the running log, and it is determined whether the log level of the running log is consistent with the storage in the preset storage strategy. Match the log level;
- the running log is correspondingly stored in a corresponding area in the local database.
- the debugger can set the log level that needs to be stored in the positioning app in advance. For example, when level 1 is set, logs of level 1 and above need to be stored, and when level 2 is set, level 1 does not need to be stored. Logs (mainly used in application scenarios where level 1 problems do not occur or where there is no need to locate level 1 problems through logs), store logs of level 2 and above (level 3, level 4, and level 5, etc.). Specifically, when the positioning APP detects that the application on the access control panel generates a running log, it first stores the running log in the cache.
- the log level of the running log is compared with the storage log level set by the user in the preset storage policy to determine whether the log level of the running log reaches the storage log level, and if it reaches the storage log level, the running log is Correspondingly stored in the corresponding area in the local database. If it does not, it is determined that the running log has not reached the storage level, and there is no need to write the running log to the local database. This prevents the storage space of the terminal's local database from being occupied by running logs that do not need to be stored.
- step S10 may also include:
- the operation log is encrypted according to the encryption rule and the encryption key corresponding to the preset storage mode, and the encrypted operation log is stored in the local database .
- the user can set log storage parameters in the positioning APP in advance, including encryption mode (ellipse encryption or key encryption) and encryption key (or encryption public key, etc.). If the encryption method and encryption key in the log storage parameters are empty, the running log to be stored is not encrypted by default.
- the positioning APP detects that the application on the access control panel generates a running log, it obtains the preset storage mode corresponding to the running log, that is, the log storage parameter preset by the user, and then determines whether the storage mode of the running log is It is encrypted storage, that is, it is judged whether the encryption mode and the encryption key in the log storage parameters are empty. If it is empty, it is determined that the operation log does not need to be encrypted. If it is not empty, the operation log is encrypted according to the user's pre-encryption method and encryption key, and then correspondingly stored in the local database.
- the encryption rule in this embodiment can be implemented in combination with block storage in other embodiments, that is, the running log is first divided into blocks and then encrypted and stored in a local database.
- step S20 may also include:
- the log identification in the log viewing instruction is obtained, and the corresponding log file to be viewed is searched in the local database according to the log identification.
- the identity of the operating user is verified, that is, when the debugger is viewing the log data, it is verified whether the verification key entered by the debugger matches the encryption key stored in the terminal, and if it matches, the verification is performed.
- the positioning APP detects that the application on the access control panel generates a running log, it displays an interface for inputting the verification key, so that the user can input the verification key to be verified.
- the verification key is compared with the encryption key corresponding to the running log, where the match may be that the verification key may be the same as the encryption key, or It may be a key obtained by calculating the verification key and the stored public key through a preset algorithm, which is the same as the key obtained by calculating the encryption key and the public key through a preset algorithm. If it is determined that the verification key matches the encryption key, the verification is passed, and the corresponding log file to be viewed is searched and displayed in the local database according to the log viewing instruction. If it does not match, a reminder message that the key does not match will be displayed so that the user can re-enter the key.
- the present application also provides a device for locating abnormal problems.
- the device for locating abnormal problems is installed in medium and large terminals, and the device for locating abnormal problems includes:
- the log storage module is configured to store the running log in the local database of the terminal according to a preset storage strategy when it is monitored that the application on the terminal generates the running log;
- the log search module is configured to, when receiving a log viewing instruction triggered by a user operation, obtain the log identification in the log viewing instruction, and search for the corresponding log file to be viewed in the local database according to the log identification;
- the log display module is configured to display the log file to be viewed through the terminal, so that the user can locate the abnormal problem based on the log file to be viewed displayed on the terminal.
- log storage module specifically includes:
- the first determining unit is configured to store the running log in a cache when it is monitored that the application on the terminal generates a running log, and determine the log level of the running log according to the log level identifier of the running log;
- the block storage unit is configured to block the running log according to the log level of the running log, and store the divided running log in a corresponding area in the local database.
- the device for locating the abnormal problem further includes:
- the log query module is used to obtain the target log level identifier and the target log keyword in the log query instruction when a log query instruction triggered by a user operation is received;
- An area determination module configured to determine, in the local database, a target area corresponding to the storage target log according to the target log level identifier
- the log determination module is configured to compare the log files in the target area according to the target log keywords to determine the target log file corresponding to the target query instruction in the local database.
- log storage module specifically includes:
- the first blocking unit is used to store the operation log in the cache when it is monitored that the application on the terminal generates the operation log, and according to the preset time interval, divide the operation log into blocks to generate corresponding time periods The running log block;
- the first storage unit is configured to sequentially store each running log block corresponding to each time period to a corresponding area in the local database according to the time sequence.
- log storage module is also used for:
- the log block to be split is split twice according to the data volume of the preset threshold, so as to divide the log block to be split into smaller than the preset Threshold running log block.
- log storage module specifically includes:
- the second determining unit is configured to determine the log level of the running log according to the log level identifier of the running log when it is monitored that the application on the terminal generates the running log, and determine whether the log level of the running log is the same as the log level of the running log. Match the storage log level in the preset storage strategy;
- the second storage unit is configured to store the operation log in a corresponding area in the local database if the log level of the operation log matches the storage log level.
- log storage module is also used for:
- the operation log is encrypted according to the encryption rule and the encryption key corresponding to the preset storage mode, and the encrypted operation log is stored in the local database .
- log search module is also used for:
- the log identification in the log viewing instruction is obtained, and the corresponding log file to be viewed is searched in the local database according to the log identification.
- the application also provides a computer-readable storage medium.
- the computer-readable storage medium of the present application stores an abnormal problem location program, and when the abnormal problem location program is executed by a processor, the steps of the abnormal problem location method described above are realized.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请公开了一种异常问题的定位方法,该方法包括:在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。本申请实现了金融科技领域下,中大型终端上快速便捷地查看应用的运行日志,即对于具有屏幕但不方便连接网络或外部存储工具的中大型终端,直接提供在终端上快速便捷查看应用的运行日志,以便基于运行日志定位异常问题,解决***漏洞。
Description
本申请要求于2019年5月17日提交中国专利局、申请号为201910421811.1、发明名称为“异常问题的定位方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
本申请涉及金融科技(Fintech)技术领域,尤其涉及异常问题的定位方法、装置、设备及计算机可读存储介质。
随着计算机技术的发展,越来越多的技术(大数据、分布式、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,与此同时,随着人工智能和物联网的发展,安卓(android)***被大量应用到一些中大型终端上,例如机器人或门禁平板等终端。这类终端与用户常用的移动智能手机相比,不仅体积更大,而且接口更加隐秘,从而不易连接电脑。另外,这类终端一般使用的android***为定制***,比如限制这类终端的网络连接和外接存储等方面的功能,以使这类设备不能连接网络甚至不能外接存储设备。因此,当运行在上述设备上的应用出现漏洞(bug)时,难以甚至无法通过网络或者外接存储工具导出上述设备内的日志文件,由此导致调试人员无法根据日志文件定位异常问题、调试程序以及解决bug,降低了调试效率。
发明概述
问题的解决方案
本申请的主要目的在于提出一种异常问题的定位方法、装置、设备及计算机可读存储介质,旨在解决现有日志文件难以导出而导致调试效率低下的技术问题 。
为实现上述目的,本申请提供一种异常问题的定位方法,所述异常问题的定位方法应用于中大型终端,所述异常问题的定位方法包括如下步骤:
在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;
在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;
通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
此外,为实现上述目的,本申请还提供一种异常问题的定位装置,所述异常问题的定位装置安装于中大型终端,所述异常问题的定位装置包括:
日志存储模块,用于在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;
日志查找模块,用于在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;
日志显示模块,用于通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
此外,为实现上述目的,本申请还提供一种缓存处理设备,所述缓存处理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的异常问题的定位程序,所述异常问题的定位程序被所述处理器执行时实现如上所述的异常问题的定位方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有异常问题的定位程序,所述异常问题的定位程序被处理器执行时实现如上所述的异常问题的定位方法的步骤。
本申请在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据 库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。这种方式相比于现有技术中将日志导出终端的方法相比,实现了在中大型终端上快速便捷地查看应用的运行日志,即,对于具有屏幕但不方便连接网络或外部存储工具的中大型终端,直接提供在终端上快速便捷查看应用的运行日志,以便相关用户基于运行日志定位异常问题,解决***漏洞,从而本申请提高了***调试效率,解决了难以导出日志文件的技术问题。
发明的有益效果
对附图的简要说明
图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图;
图2为本申请异常问题的定位方法第一实施例的流程示意图。
发明实施例
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
本申请实施例缓存处理设备可以是PC机或服务器设备,其上运行有Java虚拟机。
如图1所示,该缓存处理设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器100 1的存储装置。
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及异常问题的定位程序。
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的异常问题的定位程序,并执行下述异常问题的定位方法中的操作。
基于上述硬件结构,提出本申请异常问题的定位方法实施例。
参照图2,图2为本申请异常问题的定位方法第一实施例的流程示意图,所述方法包括:
步骤S10,在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;
本实施例异常问题的定位方法应用于中大型终端,该中大型终端为具有较大屏幕,且不方便连接网络或者其他外部存储工具,即不方便导出日志文件的终端。比如在金融领域的金融机构(如银行、保险、证券机构)中,通常设置有机器人或者门禁平板等中大型终端,由于其体积较大、接口隐蔽,从而不易连接电脑,而且为了保证***信息安全性,上述终端的***需要按需求定制,即***无线网络模块(WiFi模块)或者外部存储模块,由此导致上述终端中的日志文件难以被导出甚至不能导出。
在本实施例中,以采用门禁平板为例进行说明,即异常问题的定位程序(以下简称定位APP)安装在门禁平板中。该程序在检测到门禁平板上的应用开始运行并产生运行日志时,如开始进行人脸识别进行身份验证,根据预先设置的预设存储策略,获取所述门禁平板中的运行日志,并将所述运行日志存储到门禁平板的本地数据库中。其中,所述预设存储策略可以是预先设置的加密规则,如程序员预先在所述定位APP中设置日志参数,包括加密算法以及加密密钥,通过所述加密算法以及加密密钥将所述运行日志进行加密,然后将加密后的运行日 志存储至门禁平板的本地数据库。所述预设存储策略还可以是程序员设置的存储规则,如将所述运行日志进行分块以及对应分块的参数(时间间隔或者数据量大小)等。所述预设存储策略还可以是程序员设置的存储频率,如在应用运行结束后或者是在接收到用户的写入指令时,将暂存在缓存中的运行日志写入到门禁平板的本地数据库。还可以默认在接收到用户操作触发的查看指令时,将缓存中的运行日志写入本地数据库。
需要进行说明的是,为了减小门禁平板的数据处理量,可将数据量大的运行日志进行压缩处理,即在监测到运行日志时,可首先判断所述运行日志的数据量是否超过预设压缩阈值,若超过,则将所述运行日志压缩之后再进行存储。若并未超过,可直接将所述运行日志直接存储。
进一步地,为了提高日志定位的准确性和效率,所述步骤S10包括:
在监测到终端上的应用生成运行日志,并且通过异常问题的定位程序监测到该运行日志发生异常时,根据预设存储策略将发生异常的运行日志对应存储至所述本地数据库中的异常日志区域中,便于用户查找。
为了便于用户及时处理异常日志,通过异常问题的定位程序监测到该运行日志发生异常时,所述步骤S10还包括:
根据异常日志生成异常提醒消息,并通过预设提醒方式显示所述异常提醒消息,由此进行异常预警,其中,预设提醒方式可以是通过响铃、灯光闪烁或者发送异常提示信息至管理员终端等。
步骤S20,在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;
本实施例中,在将应用的运行日志存储到门禁平板的本地数据库之后,即可提供相关用户(如具有调试权限的程序员)在门禁平板上查看所述运行日志的功能。在接收到用户查看日志操作触发的日志查看指令时,如用户点击日志列表中的某一日志,获取所述日志查看指令对应的日志标识,如日志存储地址链接或者日志名称,定位APP根据日志标识,在所述门禁平板的本地数据库中获取该相关用户选中的待查看日志文件,以便显示所述待查看日志文件,供相关用户 查看。
步骤S30,通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
本实施例中,该定位APP将获取到的待查看日志文件通过所述门禁平板的屏幕界面进行显示,以便相关用户查看所述待查看日志文件,以根据所述待查看日志文件定位应用发生的异常问题,由此进行对应的问题调试。
本实施例在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。这种方式相比于现有技术中将日志导出终端的方法相比,实现了在中大型终端上快速便捷地查看应用的运行日志,即,对于具有屏幕但不方便连接网络或外部存储工具的中大型终端,直接提供在终端上快速便捷查看应用的运行日志,以便相关用户基于运行日志定位异常问题,解决***漏洞,从而本申请提高了***调试效率,解决了难以导出日志文件的技术问题。
进一步地,基于本申请异常问题的定位方法第一实施例,提出本申请异常问题的定位方法第二实施例。
在本实施例中,上述步骤S10具体可以包括:
在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;
根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
为了避免日志文件体积较大而导致定位APP停止工作(Crash)或者无响应(Application Not Responding,ANR),本实施例中,采用按块存储日志的形式将所述运行日志存储至门禁平板的本地数据库中。具体地,该定位APP在监测到门禁平板上的应用产生了运行日志时,将所述运行日志存储至缓存区域(Cache)。然后获取缓存中的运行日志对应的日志级别标识,确定所述运行日志对应的日 志级别,如VERBOSE、DEBUG、INFO、WARNING、ERROR以及FATAL,其中,上述日志级别依次增高,且各个级别日记对应的日志级别标识分别为V、D、I、W、E和F,即各个日志级别对应的日志级别标识即为日志级别名称首字母。在确定运行日志的日志级别后,将所述运行日志按照日志级别进行分块,即相同日志级别的运行日志存储到本地数据库的同一区域,如同一文件夹下的不同子文件夹,其中,文件夹名称可以根据日志的产生时间以及日志级别进行命名,并依据时间的先后依次存储。
上述方式通过将运行日志按日志级别拆分为块,调试者可以选择需要的级别日志进行查看,不仅避免了一次性查看日志数据量过大而造成的APP Crash或者ANR,而且提高了日志查找效率。由此解决了终端设备在计算能力上的短板,保证了在终端设备上查看日志文件时不影响应用程序的正常运行。
进一步地,所述异常问题的定位方法还可以包括:
在接收到用户操作触发的日志查询指令时,获取所述日志查询指令中的目标日志级别标识以及目标日志关键字;
根据所述目标日志级别标识,在所述本地数据库中确定存储目标日志对应的目标区域;
根据所述目标日志关键字,在所述目标区域中的日志文件中进行比对,以在所述本地数据库中确定所述目标查询指令对应目标日志文件。
在本实施例中,在上述实施例中将运行日志按日志级别进行分块存储后,可进一步提供调试者基于日志级别以及日志关键字快速便捷查询目标日志的功能,以进一步提高日志查找效率,提升调试效率。具体地,在接收到用户操作触发的日志查询指令时,可通过门禁平板显示目标日志级别标识以及目标日志关键字的输入界面。该定位APP在接收到所述目标日志级别标识以及目标日志关键字后,将所述目标日志级别标识与本地数据库中已存储的日志级别进行比对,相匹配的,则确定为所述目标日志级别标识对应的目标日志级别,即目标区域可以是目标日志级别文件夹或者其他存储形式。然后根据目标日志关键字在所述目标日志级别文件夹对应的日志文件中进行比对查找,将与所述目标日志关键字相匹配的日志文件确定为目标日志文件。
进一步地,基于本申请异常问题的定位方法第一实施例,提出本申请异常问题的定位方法第三实施例。
在本实施例中,上述步骤S10可以包括:
在监测到终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据预设时间间隔,将所述运行日志进行分块,生成各个时间段对应的运行日志块;
根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域。
除了上述实施例中按日志级别进行分块之外,本实施例中,还根据预设时间间隔将运行日志进行分块,防止一次性查看日志数据量过大而造成APP Crash或者ANR的问题。具体地,该定位APP在监测到门禁平板上的应用产生运行日志时,将所述运行日志暂存至缓存中。根据调试者预先设置的预设时间间隔,可以从预设时间点开始且达到预设时间间隔之间的运行日志存储为一个运行日志块,如早上8:00开始,30min为一个时间间隔,8:00-8:30之间的运行日志存储为一个运行日志块。然后以开始时间点或者结束时间点为运行日志块命名,并按照时间由远到近或者由近到远的顺序,依次将各个时间段对应的各个运行日志块存储至本地数据库的相应区域中。
进一步地,上述根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域的步骤之前还可以包括:
获取所述各个运行日志块的数据量,并判断所述各个运行日志块中是否存在数据量大于预设阈值的待拆分日志块;
若存在所述待拆分日志块,则根据所述预设阈值的数据量,将所述待拆分日志块进行二次拆分,以将所述待拆分日志块分成小于所述预设阈值的运行日志块。
由于应用可能在不同时间段产生的日志数据量不同,为了防止应用在某个时间段产生日志数据量过大而造成APP Crash或者ANR的问题,本实施例中进一步对各个时间段对应的运行日志块的数据量进行判断,并将数据量超过预设阈值的运行日志块进行拆分。具体地,获取本地数据库中各个运行日志块的数据量, 并将所述各个运行日志块的数据量与预设阈值进行比对,如10M,超过10M的运行日志块即为日志数据量过大的日志块,即为待拆分日志块。将所述待拆分日志块按照数据量大小进行二次拆分,即将所述待拆分日志块拆分为数据量小于预设阈值的日志块,从而避免一次性查看日志数据量过大而造成的APP Crash或者ANR的问题。
进一步地,上述步骤S10还可以包括:
在监测到终端上的应用生成运行日志时,根据所述运行日志的日志级别标识确定所述运行日志的日志级别,并判断所述运行日志的日志级别是否与所述预设存储策略中的存储日志级别相匹配;
若所述运行日志的日志级别与所述存储日志级别相匹配,则将所述运行日志对应存储至所述本地数据库中的相应区域。
为了减少本地存储的日志数据量,可提供用户设置需要存储的日志级别,以便过滤掉无需存储的级别日志。在本实施例中,调试者可预先在该定位APP中设置需要存储的日志级别,如设置1级时,即需要存储1级以及以上级别的日志,设置2级时,即无需存储1级级别的日志(主要应用于不会发生1级问题或者是无需通过日志定位1级问题的应用场景),存储2级以及以上级别的日志(3级、4级以及5级等)。具体地,该定位APP在监测到门禁平板上的应用产生运行日志时,首先将所述运行日志存储至缓存中。获取所述运行日志的日志级别标识,然后确定所述运行日志的日志级别。将所述运行日志的日志级别与预设存储策略中用户设定的存储日志级别相比对,判断所述运行日志的日志级别是否达到所述存储日志级别,若达到,则将所述运行日志对应存储至本地数据库中的相应区域。若未达到,则判定该运行日志未达到存储级别,无需将该运行日志写入本地数据库。避免了终端本地数据库的存储空间被无需存储的运行日志所占用。
进一步地,上述步骤S10还可以包括:
在监测到终端上的应用生成运行日志时,获取所述运行日志对应的预设存储方式,并判断所述运行日志的存储方式是否为加密存储;
若所述运行日志的存储方式为加密存储,则根据所述预设存储方式对应的加密 规则以及加密密钥,将所述运行日志进行加密,并将加密后的运行日志存储至所述本地数据库。
为了提升日志数据的安全性,可提供用户设置是否需要将日志数据进行加密。在本实施例中,用户可预先在该定位APP中设置日志存储参数,包括加密方式(椭圆加密或者是密钥加密)以及加密密钥(或者是加密公钥等)。若所述日志存储参数中加密方式以及加密密钥为空,则默认不对待存储的运行日志进行加密。具体地,该定位APP在监测到门禁平板上的应用产生运行日志时,获取所述运行日志对应的预设存储方式,即用户预设的日志存储参数,然后判断所述运行日志的存储方式是否为加密存储,即判断所述日志存储参数中是否加密方式与加密密钥是否为空。若为空,即判定所述运行日志无需加密,若不为空,则根据用户预先的加密方式以及加密密钥将所述运行日志进行加密,然后对应存储至本地数据库中。
需要说明的是,本实施例中的加密规则可以和其他实施例中的分块存储结合实施,即先将运行日志进行分块然后加密存储至本地数据库中。
进一步地,上述步骤S20还可以包括:
在接收到用户操作触发的日志查看指令时,接收用户输入的验证密钥,并判断所述验证密钥与对应预存的加密密钥是否匹配;
若所述验证密钥与所述加密密钥相匹配,则获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件。
为了进一步保证日志数据的安全性,对操作用户的身份进行验证,即在调试者查看日志数据时,验证调试者输入的验证密钥是否与终端预存的加密密钥相匹配,若匹配,则验证通过。具体地,该定位APP在监测到门禁平板上的应用产生运行日志时,显示输入验证密钥的界面,以便用户输入待验证的验证密钥。在接收到用户输入的验证密钥时,将所述验证密钥与运行日志对应的加密密钥进行比对,其中,匹配可以是所述验证密钥可以是与所述加密密钥相同,也可以是将验证密钥与存储的公钥通过预设算法计算得到的密钥,同加密密钥与公钥通过预设算法计算得到的密钥相同。若判定所述验证密钥与加密密钥相匹配,则验证通过,根据日志查看指令在本地数据库中查找并显示对应的待查看日志 文件。若不匹配,则显示密钥不匹配的提醒消息,以便用户重新输入密钥。
本申请还提供一种异常问题的定位装置,所述异常问题的定位装置安装于中大型终端,所述异常问题的定位装置包括:
日志存储模块,用于在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;
日志查找模块,用于在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;
日志显示模块,用于通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
进一步地,所述日志存储模块具体包括:
第一确定单元,用于在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;
分块存储单元,用于根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
进一步地,所述异常问题的定位装置还包括:
日志查询模块,用于在接收到用户操作触发的日志查询指令时,获取所述日志查询指令中的目标日志级别标识以及目标日志关键字;
区域确定模块,用于根据所述目标日志级别标识,在所述本地数据库中确定存储目标日志对应的目标区域;
日志确定模块,用于根据所述目标日志关键字,在所述目标区域中的日志文件中进行比对,以在所述本地数据库中确定所述目标查询指令对应目标日志文件。
进一步地,所述日志存储模块具体包括:
第一分块单元,用于在监测到终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据预设时间间隔,将所述运行日志进行分块,生成各个时间段对应的运行日志块;
第一存储单元,用于根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域。
进一步地,所述日志存储模块还用于:
获取所述各个运行日志块的数据量,并判断所述各个运行日志块中是否存在数据量大于预设阈值的待拆分日志块;
若存在所述待拆分日志块,则根据所述预设阈值的数据量,将所述待拆分日志块进行二次拆分,以将所述待拆分日志块分成小于所述预设阈值的运行日志块。
进一步地,所述日志存储模块具体包括:
第二确定单元,用于在监测到终端上的应用生成运行日志时,根据所述运行日志的日志级别标识确定所述运行日志的日志级别,并判断所述运行日志的日志级别是否与所述预设存储策略中的存储日志级别相匹配;
第二存储单元,用于若所述运行日志的日志级别与所述存储日志级别相匹配,则将所述运行日志对应存储至所述本地数据库中的相应区域。
进一步地,所述日志存储模块还用于:
在监测到终端上的应用生成运行日志时,获取所述运行日志对应的预设存储方式,并判断所述运行日志的存储方式是否为加密存储;
若所述运行日志的存储方式为加密存储,则根据所述预设存储方式对应的加密规则以及加密密钥,将所述运行日志进行加密,并将加密后的运行日志存储至所述本地数据库。
进一步地,所述日志查找模块还用于:
在接收到用户操作触发的日志查看指令时,接收用户输入的验证密钥,并判断所述验证密钥与对应预存的加密密钥是否匹配;
若所述验证密钥与所述加密密钥相匹配,则获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件。
上述各程序模块所执行的方法可参照本申请异常问题的定位方法各个实施例,此处不再赘述。
本申请还提供一种计算机可读存储介质。
本申请计算机可读存储介质上存储有异常问题的定位程序,所述异常问题的定位程序被处理器执行时实现如上所述的异常问题的定位方法的步骤。
其中,在所述处理器上运行的异常问题的定位程序被执行时所实现的方法可参照本申请异常问题的定位方法各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者***不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者***所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括该要素的过程、方法、物品或者***中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种异常问题的定位方法,其中,所述异常问题的定位方法应用于中大型终端,所述异常问题的定位方法包括如下步骤:在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
- 如权利要求1所述的异常问题的定位方法,其中,所述在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库的步骤具体包括:在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
- 如权利要求2所述的异常问题的定位方法,其中,所述异常问题的定位方法还包括:在接收到用户操作触发的日志查询指令时,获取所述日志查询指令中的目标日志级别标识以及目标日志关键字;根据所述目标日志级别标识,在所述本地数据库中确定存储目标日志对应的目标区域;根据所述目标日志关键字,在所述目标区域中的日志文件中进行比对,以在所述本地数据库中确定所述目标查询指令对应目标日志文件。
- 如权利要求1所述的异常问题的定位方法,其中,所述在监测到终 端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库的步骤具体包括:在监测到终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据预设时间间隔,将所述运行日志进行分块,生成各个时间段对应的运行日志块;根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域。
- 如权利要求4所述的异常问题的定位方法,其中,所述根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域的步骤之前,还包括:获取所述各个运行日志块的数据量,并判断所述各个运行日志块中是否存在数据量大于预设阈值的待拆分日志块;若存在所述待拆分日志块,则根据所述预设阈值的数据量,将所述待拆分日志块进行二次拆分,以将所述待拆分日志块分成小于所述预设阈值的运行日志块。
- 如权利要求1所述的异常问题的定位方法,其中,所述在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库的步骤具体包括:在监测到终端上的应用生成运行日志时,根据所述运行日志的日志级别标识确定所述运行日志的日志级别,并判断所述运行日志的日志级别是否与所述预设存储策略中的存储日志级别相匹配;若所述运行日志的日志级别与所述存储日志级别相匹配,则将所述运行日志对应存储至所述本地数据库中的相应区域。
- 如权利要求1所述的异常问题的定位方法,其中,所述在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库的步骤具体包括:在监测到终端上的应用生成运行日志时,获取所述运行日志对应的预设存储方式,并判断所述运行日志的存储方式是否为加密存 储;若所述运行日志的存储方式为加密存储,则根据所述预设存储方式对应的加密规则以及加密密钥,将所述运行日志进行加密,并将加密后的运行日志存储至所述本地数据库。
- 如权利要求1所述的异常问题的定位方法,其中,所述在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件的步骤具体包括:在接收到用户操作触发的日志查看指令时,接收用户输入的验证密钥,并判断所述验证密钥与对应预存的加密密钥是否匹配;若所述验证密钥与所述加密密钥相匹配,则获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件。
- 一种异常问题的定位装置,其中,所述异常问题的定位装置安装于中大型终端,所述异常问题的定位装置包括:日志存储模块,用于在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;日志查找模块,用于在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;日志显示模块,用于通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
- 如权利要求9所述的异常问题的定位装置,其中,所述日志存储模块具体包括:第一确定单元,用于在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;分块存储单元,用于根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
- 如权利要求10所述的异常问题的定位装置,其中,所述异常问题的定位装置还包括:日志查询模块,用于在接收到用户操作触发的日志查询指令时,获取所述日志查询指令中的目标日志级别标识以及目标日志关键字;区域确定模块,用于根据所述目标日志级别标识,在所述本地数据库中确定存储目标日志对应的目标区域;日志确定模块,用于根据所述目标日志关键字,在所述目标区域中的日志文件中进行比对,以在所述本地数据库中确定所述目标查询指令对应目标日志文件。
- 如权利要求9所述的异常问题的定位装置,其中,所述日志存储模块具体包括:第一分块单元,用于在监测到终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据预设时间间隔,将所述运行日志进行分块,生成各个时间段对应的运行日志块;第一存储单元,用于根据所述时间的先后顺序,将所述各个时间段对应的各个运行日志块依次存储至所述本地数据库中的相应区域。
- 如权利要求12所述的异常问题的定位装置,其中,所述日志存储模块还用于:获取所述各个运行日志块的数据量,并判断所述各个运行日志块中是否存在数据量大于预设阈值的待拆分日志块;若存在所述待拆分日志块,则根据所述预设阈值的数据量,将所述待拆分日志块进行二次拆分,以将所述待拆分日志块分成小于所述预设阈值的运行日志块。
- 如权利要求9所述的异常问题的定位装置,其中,所述日志存储模块具体包括:第二确定单元,用于在监测到终端上的应用生成运行日志时,根据所述运行日志的日志级别标识确定所述运行日志的日志级别,并判断所述运行日志的日志级别是否与所述预设存储策略中的存储日志级别相匹配;第二存储单元,用于若所述运行日志的日志级别与所述存储日志级别相匹配,则将所述运行日志对应存储至所述本地数据库中的相应区域。
- 如权利要求9所述的异常问题的定位装置,其中,所述日志存储模块还用于:在监测到终端上的应用生成运行日志时,获取所述运行日志对应的预设存储方式,并判断所述运行日志的存储方式是否为加密存储;若所述运行日志的存储方式为加密存储,则根据所述预设存储方式对应的加密规则以及加密密钥,将所述运行日志进行加密,并将加密后的运行日志存储至所述本地数据库。
- 如权利要求9所述的异常问题的定位装置,其中,所述日志查找模块还用于:在接收到用户操作触发的日志查看指令时,接收用户输入的验证密钥,并判断所述验证密钥与对应预存的加密密钥是否匹配;若所述验证密钥与所述加密密钥相匹配,则获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件。
- 一种缓存处理设备,其中,所述缓存处理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的异常问题的定位程序,所述异常问题的定位程序被所述处理器执行时实现如下步骤:在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
- 如权利要求17所述的缓存处理设备,其中,所述缓存处理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的异常问题的定位程序,所述异常问题的定位程序被所述处理器执行时实现如下步骤:在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有异常问题的定位程序,所述异常问题的定位程序被处理器执行时实现如下步骤:在监测到终端上的应用生成运行日志时,根据预设存储策略将所述运行日志存储至所述终端的本地数据库;在接收到用户操作触发的日志查看指令时,获取所述日志查看指令中的日志标识,并根据所述日志标识在所述本地数据库查找对应的待查看日志文件;通过所述终端显示所述待查看日志文件,以便用户基于所述终端显示的待查看日志文件进行异常问题的定位。
- 如权利要求17所述的计算机可读存储介质,其中,所述计算机可读存储介质上存储有异常问题的定位程序,所述异常问题的定位 程序被处理器执行时实现如下步骤:在监测到所述终端上的应用生成运行日志时,将所述运行日志存储至缓存,并根据所述运行日志的日志级别标识,确定所述运行日志的日志级别;根据所述运行日志的日志级别将所述运行日志进行分块,将分块后的运行日志对应存储至所述本地数据库中的相应区域。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910421811.1 | 2019-05-17 | ||
CN201910421811.1A CN110109841A (zh) | 2019-05-17 | 2019-05-17 | 异常问题的定位方法、装置、设备及计算机可读存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020233219A1 true WO2020233219A1 (zh) | 2020-11-26 |
Family
ID=67491246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/080696 WO2020233219A1 (zh) | 2019-05-17 | 2020-03-23 | 异常问题的定位方法、装置、设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110109841A (zh) |
WO (1) | WO2020233219A1 (zh) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112446051A (zh) * | 2020-12-02 | 2021-03-05 | 东莞市盟大塑化科技有限公司 | 一种基于区块链技术的异常追踪方法及其*** |
CN112732473A (zh) * | 2021-01-12 | 2021-04-30 | 平安资产管理有限责任公司 | 基于数据分层的功能问题定位方法、装置、设备和介质 |
CN112905430A (zh) * | 2021-02-24 | 2021-06-04 | 浙江大华技术股份有限公司 | 日志输出方法、装置、存储介质及电子装置 |
CN114002987A (zh) * | 2021-11-03 | 2022-02-01 | 杭州和利时自动化有限公司 | 一种获取日志信息的方法、装置、电子设备及介质 |
CN114817671A (zh) * | 2022-05-09 | 2022-07-29 | 宁波奥克斯电气股份有限公司 | 一种空调物联网的日志分析方法及*** |
CN114866276A (zh) * | 2022-03-21 | 2022-08-05 | 杭州薮猫科技有限公司 | 异常传输文件的终端检测方法、装置、存储介质及设备 |
CN116436668A (zh) * | 2023-04-12 | 2023-07-14 | 广州市点易资讯科技有限公司 | 信息安全管控方法及相关装置 |
CN117407315A (zh) * | 2023-11-13 | 2024-01-16 | 镁佳(北京)科技有限公司 | 一种日志优化测试方法、装置、计算机设备及存储介质 |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110109841A (zh) * | 2019-05-17 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 异常问题的定位方法、装置、设备及计算机可读存储介质 |
CN112953753B (zh) * | 2019-12-24 | 2023-11-28 | 深圳市明源云链互联网科技有限公司 | 一种数据采集方法、装置、终端设备及存储介质 |
CN111258970A (zh) * | 2020-01-09 | 2020-06-09 | 上海米哈游天命科技有限公司 | 一种在客户端显示日志的方法、装置、设备及存储介质 |
CN111355614A (zh) * | 2020-03-10 | 2020-06-30 | 北京意锐新创科技有限公司 | 适用于支付设备日志的异常信息定位方法和装置 |
CN111666491B (zh) * | 2020-04-28 | 2024-05-03 | 平安科技(深圳)有限公司 | 异常数据查询方法、装置、计算机设备及存储介质 |
CN111683051A (zh) * | 2020-05-13 | 2020-09-18 | 深圳市元征科技股份有限公司 | 一种日志处理方法及相关设备 |
CN111652180B (zh) * | 2020-06-16 | 2023-11-17 | 北京梧桐车联科技有限责任公司 | 缺陷定位方法、装置、设备及计算机可读存储介质 |
CN111881052A (zh) * | 2020-07-31 | 2020-11-03 | 平安普惠企业管理有限公司 | 日志内容处理方法、装置、设备以及计算机可读存储介质 |
CN112235638B (zh) * | 2020-10-10 | 2023-04-25 | 深圳创维-Rgb电子有限公司 | 异常信息定位方法、***、服务器及存储介质 |
CN114817187A (zh) * | 2021-01-19 | 2022-07-29 | 成都鼎桥通信技术有限公司 | 日志处理方法及设备 |
CN112910994A (zh) * | 2021-01-29 | 2021-06-04 | 重庆长安汽车股份有限公司 | 一种应用日志远程上传与获取方法 |
CN113157545A (zh) * | 2021-05-20 | 2021-07-23 | 京东方科技集团股份有限公司 | 业务日志的处理方法、装置、设备及存储介质 |
CN113407415A (zh) * | 2021-06-28 | 2021-09-17 | 四川虹美智能科技有限公司 | 智能终端的日志管理方法和装置 |
CN114253927A (zh) * | 2021-12-21 | 2022-03-29 | 京东方数字科技有限公司 | 日志生成方法及装置、日志管理方法及装置 |
CN114500253B (zh) * | 2022-01-13 | 2024-03-12 | 北京特立信电子技术股份有限公司 | 一种日志信息存储方法及存储介质 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101464908A (zh) * | 2009-01-14 | 2009-06-24 | 北京北方微电子基地设备工艺研究中心有限责任公司 | 一种日志记录的方法及装置 |
CN101571827A (zh) * | 2008-04-30 | 2009-11-04 | 国际商业机器公司 | 保存日志的方法和日志*** |
CN103793479A (zh) * | 2014-01-14 | 2014-05-14 | 上海上讯信息技术股份有限公司 | 日志管理方法及*** |
CN108401035A (zh) * | 2018-05-17 | 2018-08-14 | 郑州云海信息技术有限公司 | 一种基于mdc的综合监控装置以及方法 |
CN109144965A (zh) * | 2018-08-30 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | 一种日志处理方法、装置、设备和介质 |
US20190220385A1 (en) * | 2016-08-24 | 2019-07-18 | International Business Machines Corporation | Applying consistent log levels to application log messages |
CN110109841A (zh) * | 2019-05-17 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 异常问题的定位方法、装置、设备及计算机可读存储介质 |
-
2019
- 2019-05-17 CN CN201910421811.1A patent/CN110109841A/zh active Pending
-
2020
- 2020-03-23 WO PCT/CN2020/080696 patent/WO2020233219A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101571827A (zh) * | 2008-04-30 | 2009-11-04 | 国际商业机器公司 | 保存日志的方法和日志*** |
CN101464908A (zh) * | 2009-01-14 | 2009-06-24 | 北京北方微电子基地设备工艺研究中心有限责任公司 | 一种日志记录的方法及装置 |
CN103793479A (zh) * | 2014-01-14 | 2014-05-14 | 上海上讯信息技术股份有限公司 | 日志管理方法及*** |
US20190220385A1 (en) * | 2016-08-24 | 2019-07-18 | International Business Machines Corporation | Applying consistent log levels to application log messages |
CN108401035A (zh) * | 2018-05-17 | 2018-08-14 | 郑州云海信息技术有限公司 | 一种基于mdc的综合监控装置以及方法 |
CN109144965A (zh) * | 2018-08-30 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | 一种日志处理方法、装置、设备和介质 |
CN110109841A (zh) * | 2019-05-17 | 2019-08-09 | 深圳前海微众银行股份有限公司 | 异常问题的定位方法、装置、设备及计算机可读存储介质 |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112446051A (zh) * | 2020-12-02 | 2021-03-05 | 东莞市盟大塑化科技有限公司 | 一种基于区块链技术的异常追踪方法及其*** |
CN112446051B (zh) * | 2020-12-02 | 2023-08-22 | 东莞盟大集团有限公司 | 一种基于区块链技术的异常追踪方法及其*** |
CN112732473A (zh) * | 2021-01-12 | 2021-04-30 | 平安资产管理有限责任公司 | 基于数据分层的功能问题定位方法、装置、设备和介质 |
CN112905430B (zh) * | 2021-02-24 | 2023-06-13 | 浙江大华技术股份有限公司 | 日志输出方法、装置、存储介质及电子装置 |
CN112905430A (zh) * | 2021-02-24 | 2021-06-04 | 浙江大华技术股份有限公司 | 日志输出方法、装置、存储介质及电子装置 |
CN114002987A (zh) * | 2021-11-03 | 2022-02-01 | 杭州和利时自动化有限公司 | 一种获取日志信息的方法、装置、电子设备及介质 |
CN114866276A (zh) * | 2022-03-21 | 2022-08-05 | 杭州薮猫科技有限公司 | 异常传输文件的终端检测方法、装置、存储介质及设备 |
CN114866276B (zh) * | 2022-03-21 | 2024-06-11 | 杭州薮猫科技有限公司 | 异常传输文件的终端检测方法、装置、存储介质及设备 |
CN114817671A (zh) * | 2022-05-09 | 2022-07-29 | 宁波奥克斯电气股份有限公司 | 一种空调物联网的日志分析方法及*** |
CN114817671B (zh) * | 2022-05-09 | 2024-06-04 | 宁波奥克斯电气股份有限公司 | 一种空调物联网的日志分析方法及*** |
CN116436668A (zh) * | 2023-04-12 | 2023-07-14 | 广州市点易资讯科技有限公司 | 信息安全管控方法及相关装置 |
CN116436668B (zh) * | 2023-04-12 | 2023-11-10 | 广州市点易资讯科技有限公司 | 信息安全管控方法、装置,计算机设备,存储介质 |
CN117407315A (zh) * | 2023-11-13 | 2024-01-16 | 镁佳(北京)科技有限公司 | 一种日志优化测试方法、装置、计算机设备及存储介质 |
CN117407315B (zh) * | 2023-11-13 | 2024-04-12 | 镁佳(北京)科技有限公司 | 一种日志优化测试方法、装置、计算机设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110109841A (zh) | 2019-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020233219A1 (zh) | 异常问题的定位方法、装置、设备及计算机可读存储介质 | |
WO2019140828A1 (zh) | 电子装置、分布式***日志查询方法及存储介质 | |
CN109189367B (zh) | 一种数据处理方法、装置、服务器及存储介质 | |
TWI575397B (zh) | 利用運行期代理器及動態安全分析之應用程式逐點保護技術 | |
US10437661B2 (en) | Methods, systems, devices, and products for error correction in computer programs | |
CN111414407A (zh) | 数据库的数据查询方法、装置、计算机设备及存储介质 | |
CN111695156A (zh) | 业务平台的访问方法、装置、设备及存储介质 | |
WO2019134339A1 (zh) | 脱敏方法、程序、应用服务器及计算机可读存储介质 | |
EP3190537A1 (en) | Protection method and device for application data | |
WO2022095518A1 (zh) | 接口自动化测试方法、装置、计算机设备及存储介质 | |
CN109062965B (zh) | 大数据分析***、服务器、数据处理方法和存储介质 | |
CN112558946A (zh) | 一种生成代码的方法、装置、设备和计算机可读存储介质 | |
WO2019144548A1 (zh) | 安全测试方法、装置、计算机设备和存储介质 | |
US20150213272A1 (en) | Conjoint vulnerability identifiers | |
CN111177113A (zh) | 数据迁移方法、装置、计算机设备和存储介质 | |
CN113282628A (zh) | 大数据平台访问方法、装置及大数据平台、电子设备 | |
CN112506481A (zh) | 业务数据交互方法、装置、计算机设备和存储介质 | |
WO2023056727A1 (zh) | 一种访问控制方法、装置、设备及可读存储介质 | |
CN110443039A (zh) | 插件安全性的检测方法、装置以及电子设备 | |
US20210266181A1 (en) | Data security processing method and terminal thereof, and server | |
US12020084B2 (en) | Service instance deployment method and apparatus, electronic device, and storage medium | |
CN111090616B (zh) | 一种文件管理方法、对应装置、设备及存储介质 | |
CN115629940A (zh) | 一种微服务全链路追踪方法、装置、***及介质 | |
US20230185899A1 (en) | Code injection detection using syntactic deviation | |
CN114238273A (zh) | 数据库管理方法、装置、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20809058 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20809058 Country of ref document: EP Kind code of ref document: A1 |