WO2019134341A1 - Log text processing method and apparatus, and storage medium - Google Patents

Log text processing method and apparatus, and storage medium Download PDF

Info

Publication number
WO2019134341A1
WO2019134341A1 PCT/CN2018/089870 CN2018089870W WO2019134341A1 WO 2019134341 A1 WO2019134341 A1 WO 2019134341A1 CN 2018089870 W CN2018089870 W CN 2018089870W WO 2019134341 A1 WO2019134341 A1 WO 2019134341A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
log text
log
cursor
increment
Prior art date
Application number
PCT/CN2018/089870
Other languages
French (fr)
Chinese (zh)
Inventor
乐伟
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019134341A1 publication Critical patent/WO2019134341A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a log text processing method, apparatus, and storage medium.
  • the log can record various information about the running system or software, including request time, Internet Protocol (IP) address, request type, number of data transfer bytes, and status code.
  • IP Internet Protocol
  • request time In actual work, the most critical part of the log is often the newly generated several lines or hundreds of lines of text.
  • the latest generated log text can be used to judge the running status of the system or software, which tracks, queries and extracts the log text increments. A higher requirement was put forward.
  • Flume is the most commonly used log collection technology in the prior art. It generally uses Spooling Directory Source or Exec Source to extract logs. However, Spooling Directory Source does not support appending the extracted log text. When new log content is generated, only The new log content can be extracted by creating a new log file. If this method is used to extract the log text increment, a large number of small files will be generated in the log directory; and the Exec Source extracts the log text increment reliably. The sex is low, and it is prone to the failure of extraction.
  • the present application provides a log text processing method and apparatus, and a computer readable storage medium, which can track and extract log texts by using a cursor to accurately count various statistical items of the log.
  • the present application provides a log text processing method, which is applied to an electronic device, and the method includes:
  • Text positioning step obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
  • Incremental tracking step set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
  • Query extraction step setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
  • Statistical step Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  • the present application further provides an electronic device including a memory and a processor, wherein the memory includes a log text processing program, and when the log text processing program is executed by the processor, the following steps are implemented:
  • Text positioning step obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
  • Incremental tracking step set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
  • Query extraction step setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
  • Statistical step Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  • the present application further provides a computer readable storage medium, which includes a log text processing program, and when the log text processing program is executed by a processor, the following steps are implemented:
  • Text positioning step obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
  • Incremental tracking step set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
  • Query extraction step setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
  • Statistical step Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  • the log text processing method, the electronic device and the computer readable storage medium proposed by the application use a cursor to locate the current log text, track the log text increment, and extract the log text satisfying the query parameter, according to the extracted log text. Statistics are collected for each statistical item of the log. Since the timing execution value of the tracking log text increment can be freely set, the use of the cursor does not affect the content of the log text, so the application can track the log text without intrusion, accurately extract the query result, and realize flexible log text. And handle it efficiently.
  • FIG. 1 is a schematic diagram of an operating environment of a preferred embodiment of an electronic device of the present application
  • FIG. 2 is a program block diagram of the log text processing program of FIG. 1;
  • FIG. 3 is a flowchart of a first preferred embodiment of a log text processing method of the present application
  • FIG. 4 is a flow chart of a second preferred embodiment of a log text processing method of the present application.
  • embodiments of the present application can be implemented as a method, apparatus, device, system, or computer program product. Accordingly, the application can be embodied in a complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
  • FIG. 1 is a schematic diagram of an operating environment of a preferred embodiment of an electronic device of the present application.
  • the electronic device 1 may be a terminal device having a storage and computing function such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
  • the electronic device 1 includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
  • the network interface 13 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the communication bus 14 is used to implement connection communication between the above components.
  • the memory 11 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1.
  • the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC). , Secure Digital (SD) card, Flash Card, etc.
  • SMC smart memory card
  • SD Secure Digital
  • the readable storage medium of the memory 11 is used to store the log text processing program 10, the log file, and other data to which the processor 12 executes the program code of the log text processing program 10 and the last output data. Wait.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing log text processing. Program 10 and so on.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing log text processing. Program 10 and so on.
  • FIG. 1 shows only the electronic device 1 having the components 11-14 and the log text processing program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the electronic device 1 may further include a user interface
  • the user interface may include an input unit such as a keyboard, a voice input device such as a microphone, a device with a voice recognition function, a voice output device such as an audio, a headphone, and the like.
  • the user interface may also include a standard wired interface and a wireless interface.
  • the electronic device 1 may further include a display, which may also be referred to as a display screen or a display unit.
  • a display may also be referred to as a display screen or a display unit.
  • it may be an LED display, a liquid crystal display, a touch liquid crystal display, and an Organic Light-Emitting Diode (OLED) display.
  • the display is used to display information processed in the electronic device 1 and a user interface for displaying visualizations.
  • the electronic device 1 further comprises a touch sensor.
  • the area provided by the touch sensor for the user to perform a touch operation is referred to as a touch area.
  • the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like.
  • the touch sensor includes not only a contact type touch sensor but also a proximity type touch sensor or the like.
  • the touch sensor may be a single sensor or a plurality of sensors arranged, for example, in an array. The user can start the log text processing program 10 by touching the touch area.
  • the area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor.
  • a display is stacked with the touch sensor to form a touch display screen. The device detects a user-triggered touch operation based on a touch screen display.
  • the electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, and the like, and details are not described herein.
  • RF radio frequency
  • the memory 11 including the readable storage medium may include an operating system, a log text processing program 10, a log file, and the like.
  • the processor 12 executes the log text processing program 10 in the memory 11, the following steps are implemented:
  • Text positioning step obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
  • Incremental tracking step set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
  • Query extraction step setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
  • Statistical step Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  • FIG. 2 for a description of the program block diagram of the log text processing program 10 and FIG. 3 and FIG. 4 for a flow chart of the preferred embodiment of the log text processing method.
  • FIG. 2 it is a program block diagram of the log text processing program 10 of FIG.
  • the log text processing program 10 is divided into a plurality of modules, which are stored in the memory 11 and executed by the processor 12 to complete the present application.
  • a module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function.
  • the log text processing program 10 can be divided into: a positioning module 110, a tracking module 120, a query extraction module 130, and a statistics module 140.
  • the positioning module 110 is configured to locate the current log text.
  • the storage path of the log file can be variously selected. Different package managers (Package Manager) will put the log files in different locations, but the configuration files can be used to obtain the storage path of the log files, thereby opening the log file. Many programs do not have the ability to manipulate a collection, and the amount of data in the log is often large, so you need to use a cursor to operate line by line.
  • the positioning module 110 uses the OPEN statement to open the cursor, so that the cursor points to the first line of the current log text, and then uses the FETCH statement to advance the cursor to the last line of the current log text, and records the number of lines of the current log text as a cursor.
  • the minimum value of the cursor reference value that is, the initial value of the cursor reference value, is recorded as 0. It can be understood that the cursor is equivalent to a pointer and has the ability to manipulate multi-line log text, and can process multiple lines of log text one line at a time or multiple lines at a time.
  • the cursor can also be controlled by a cursor FOR loop instead of the OPEN, FETCH, and CLOSE statements.
  • the tracking module 120 is configured to periodically track the log text increments to obtain the number of rows of the log text increment.
  • the log can be updated in real time, and the log text increment may be generated at any time.
  • the timing execution value is set, and the tracking module 120 periodically advances the cursor to the last line of the log text increment, and according to the log text increment.
  • the number of rows updates the cursor reference value.
  • the timing execution value is in seconds. For example, if the timing execution value is 60 seconds, the tracking module 120 advances the cursor to the last line of the log text increment every 60 seconds, and updates according to the number of rows of the log text increment. Cursor reference value. It can be understood that the amount of change of the cursor reference value is equal to the number of rows of the log text increment.
  • the query extraction module 130 is configured to extract log text that satisfies the query parameter by row. Since the log can record operation information such as the request time, and feedback information such as a status code can also be recorded, the query parameter can include a time period and a keyword. When the query parameter is a time segment, the query extraction module 130 controls the cursor to extract the log text generated in the time segment row by row; when the query parameter is a keyword, the query extraction module 130 controls the cursor, and the keyword is included. The log text is extracted line by line; when the query parameter is combined with the time segment and the keyword, the query extraction module 130 controls the cursor, and extracts the log text containing the keyword in the log text generated in the time segment row by line.
  • the cursor is used to locate the current log text, and the log text increment is tracked.
  • the cursor is used as an external tool, and no log is generated. The effect does not change the content of the log text.
  • the statistics module 140 is configured to perform statistics on the extracted log text segments, and output statistical results of the predetermined statistical items.
  • the format of the log can be customized by the user. The user can obtain the record information that is obtained through the customized log format. From the record information, the statistics of the log items can be counted.
  • the record information in the log may include a requester IP address, a data transmission byte number, a status code, a network protocol name and a version, etc.
  • the predetermined statistical item may include a total amount of data transmission and a number of rows of log text increment, and may also Including Unique Visitor (UV), number of request successes, number of request failures, reason for request failure, number of times data transmission was interrupted, and so on.
  • UV Unique Visitor
  • the number of increments of the log text can be counted by the amount of change of the cursor reference value, and the total amount of data transmission in a certain period of time can be counted according to the number of bytes of data transmission.
  • the UV can be counted according to the IP address of the requester, and the status code can be used.
  • the log is a website access log
  • each line of text of the website access log records a status code
  • the status code is also called an error code, which is allocated for each request received by the website server.
  • a three-digit code that indicates whether the request was successful and the type of error encountered.
  • the status code 200, it means that the website server successfully responds to the browser's request, everything is normal; when the status code is 400, it means that the request initiated by the browser is wrong, for example, the request contains a syntax error, etc.; when the status code is 404 When it is displayed, the web server cannot find the web page requested by the browser.
  • the statistics module 140 may use the status code to count the number of times the web server processes the browser request successfully during the time period, the number of failures, and the web server processing the browser. If the query extraction module 130 uses the keyword as the query parameter, for example, the query parameter is 200, and all the logs with the status code of 200 are extracted, the statistics module 140 can use the status code to count the successful response of the website server to the browser. The total number of requests.
  • the above explanation about the use of the status code to count the number of request successes, the number of request failures, and the reason for the failure of the request is only a partial example, and is not exhaustive. The website operation and maintenance personnel can judge whether the running status of the website server is normal according to the statistical result output by the statistics module 140.
  • each line of text of the website access log also records the number of bytes sent by the website server to the client, that is, the amount of data downloaded by the client from the website server, and the statistics module 140 adds the values to count the server.
  • the total amount of data sent by the server during a certain period of time, such as one day, one week, or one month.
  • the statistics module 140 can determine whether the data transmission process is interrupted, and count the number of times the data transmission is interrupted within a certain period of time. .
  • the statistics module 140 may use the information recorded by the log to output statistical results of other predetermined statistical items for reference by developers, operation and maintenance personnel, and the like.
  • FIG. 3 it is a flowchart of a first preferred embodiment of a log text processing method of the present application. The following steps of implementing the log text processing method when the processor 12 of the electronic device 1 executes the log text processing program 10 stored in the memory 11:
  • Step S10 Obtain a log file path, open a log file, and use the positioning module 110 to point the cursor to the last line of the current log text to locate the current log text.
  • the storage path of the log file can be obtained through the configuration file.
  • the positioning module 110 opens the cursor through the OPEN statement, points the cursor to the first line of the current log text, and then advances the cursor to the end of the current log text through the FETCH statement.
  • One line, the number of lines of the current log text is recorded as the cursor reference value, and the positioning of the current log text is completed.
  • the cursor can be controlled by a cursor FOR loop instead of the OPEN statement and the FETCH statement.
  • step S20 the timing execution value is set, and the cursor is advanced to the last line of the log text increment by the tracking module 120, and the log text increment is tracked periodically.
  • the timing execution value is in seconds, and if the timing execution value is 60 seconds, the tracking module 120 advances the cursor to the last row of the log text increment every 60 seconds, and updates according to the number of rows of the log text increment.
  • the cursor reference value that is, the amount of change in the cursor reference value is equal to the number of rows in the log text increment, enabling periodic tracking of log text increments.
  • the value representing the number of rows of log text increments is always displayed on the display and periodically updated with a timing execution value.
  • Step S30 setting a query parameter, and using the query extraction module 130 to extract a log text paragraph that satisfies the query parameter.
  • the query parameter may be a time period or a keyword. Therefore, the query extraction module 130 may be used to extract a log text added to a certain period of time, or may extract a log text line containing certain keywords.
  • the query extraction module 130 controls the cursor to point to the first row of the result set, and extracts the log text of the row from the result set. , then advance the cursor to the next row of the result set until all log text lines that satisfy the query parameters are extracted, the entire result set.
  • step S40 the statistical analysis module 140 performs statistical analysis on the extracted log text paragraphs, and outputs statistical results of the predetermined statistical items.
  • the predetermined statistical items include the total amount of data transmission, the number of rows of the log text increment, the number of independent visitors, the number of successful requests, the number of failed requests, the reason for the failure of the request, the number of times the data transmission is interrupted, and the like.
  • the specific method and function of the statistical analysis please refer to the above detailed description of the statistical analysis module 140.
  • the log text processing method proposed in this embodiment uses a cursor to locate the current log text, tracks the log text increment, accurately extracts the log text that satisfies the query parameter, and performs statistics on the predetermined statistical item according to the extracted log text. Get the statistics of the total amount of data transmission, the number of rows in the log text increment, the number of independent visitors, the number of successful requests, the number of failed requests, the reason for the failure of the request, and the number of times the data transmission was interrupted. Since the timing execution value of the trace log text increment can be freely set, the use of the cursor does not affect the content of the log text.
  • the application can track the log text without intrusion, accurately extract the query result, and realize flexible log text. Processed efficiently.
  • FIG. 4 it is a flowchart of a second preferred embodiment of the log text processing method of the present application.
  • the present embodiment adds a text output control step, and the user can decide whether to output the extracted log text by controlling the text output switch.
  • the steps S10 to S40 are the same as the steps S10 to S40 in the first embodiment, and details are not described herein again.
  • Step S50 setting a text output switch to automatically determine whether the extracted log text meets a preset condition.
  • the text output switch can be understood as a conditional branch instruction, and the preset condition can be various, such as status codes 408, 500, 504, etc., and the status codes indicate request timeout or server error, and the status codes are located. Additional information recorded in the log text line may help the operator to troubleshoot or improve server health.
  • the preset condition may also be a range of data transmission bytes. When the number of data transmission bytes of the log record is within the range, the log text of the line satisfies a preset condition.
  • the preset condition is that the number of data transmission bytes is between 400 and 500 megabytes, and the log text line corresponding to the data transmission amount records information corresponding to the specific request sent by the client. It can be understood that the preset condition may be any condition that can be judged by the information recorded in the log text, and the purpose is to filter out a relatively more valuable part of the log text.
  • step S60 the extracted log texts satisfying the preset condition are serialized and stored in the database. Since the data volume of the log is often very large, the utilization value of the extracted log text is also different. By setting the text output switch, the log text that satisfies the preset condition is automatically output, and serialized and stored in the database to improve the log text data. Security. Log text that does not meet the preset criteria remains in the original log file, but to conserve storage resources, these log text may be deleted after a period of time or overwritten by subsequent log text increments. It can be understood that the reason for serializing and storing the relatively valuable part of the log file, that is, the log text satisfying the preset condition, into the database is various, not only to save storage resources and improve log text data. safety. For example, ordinary files have advantages in sequential access, but they face many difficulties when files are large or randomly accessed, limiting access speed and extraction speed. In summary, the advantages of adding text output control steps during log text processing are conceivable.
  • the embodiment of the present application further provides a computer readable storage medium, which may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read only memory (ROM), and an erasable programmable Any combination or combination of any one or more of read only memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, and the like.
  • the computer readable storage medium includes a log file, a log text processing program 10, and the like, and when the log text processing program 10 is executed by the processor 12, the following operations are implemented:
  • Text positioning step obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
  • Incremental tracking step set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
  • Query extraction step setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
  • Statistical step Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Provided are a log text processing method and apparatus, and a computer-readable storage medium. The method comprises the following steps: acquiring a log file path, opening a log file, and locating a current log text by using a cursor; tracking a log text increment regularly using the cursor; extracting log text paragraphs, that satisfy a query parameter, row by row using the cursor; and compiling statistics on the extracted log text paragraphs and outputting a statistical result of a pre-determined statistical item. By means of the present application, a log text increment can be tracked, a log text satisfying a query parameter can be quickly extracted, and the statistics of statistical items of a log can be compiled in a timely manner.

Description

日志文本处理方法、装置及存储介质Log text processing method, device and storage medium
优先权申明Priority claim
本申请要求于2018年1月5日提交中国专利局、申请号为201810011139.4,发明名称为“日志文本处理方法、装置及存储介质”的中国专利申请的优先权,其内容全部通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201810011139.4, filed on Jan. 5, 2018, entitled "Log Text Processing Method, Apparatus, and Storage Medium", the contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种日志文本处理方法、装置及存储介质。The present application relates to the field of computer technologies, and in particular, to a log text processing method, apparatus, and storage medium.
背景技术Background technique
日志可以记录运行中的系统或软件的各项信息,包括请求时间、请求者网络协议(Internet Protocol,IP)地址、请求类型、数据传输字节数和状态代码等。实际工作中,日志最关键的部分往往是最新生成的几行或几百行文本,利用最新生成的日志文本可以判断系统或软件的运行状况,这就对日志文本增量的追踪、查询和提取提出了较高的要求。The log can record various information about the running system or software, including request time, Internet Protocol (IP) address, request type, number of data transfer bytes, and status code. In actual work, the most critical part of the log is often the newly generated several lines or hundreds of lines of text. The latest generated log text can be used to judge the running status of the system or software, which tracks, queries and extracts the log text increments. A higher requirement was put forward.
Flume是现有技术中最常用的日志采集技术,它一般使用Spooling Directory Source或Exec Source来提取日志,但Spooling Directory Source不支持对提取的日志文本进行追加,在有新的日志内容产生时,只能通过新建日志文件的方式来提取新的日志内容,如果采用这种方式来提取日志文本增量,将会在日志目录下产生非常多的小文件;而Exec Source提取日志文本增量时的可靠性较低,容易出现提取失败的情况。Flume is the most commonly used log collection technology in the prior art. It generally uses Spooling Directory Source or Exec Source to extract logs. However, Spooling Directory Source does not support appending the extracted log text. When new log content is generated, only The new log content can be extracted by creating a new log file. If this method is used to extract the log text increment, a large number of small files will be generated in the log directory; and the Exec Source extracts the log text increment reliably. The sex is low, and it is prone to the failure of extraction.
发明内容Summary of the invention
为解决现有技术存在的不足,本申请提供一种日志文本处理方法、装置及计算机可读存储介质,可以利用游标对日志文本进行追踪和提取,从而准确地统计日志的各个统计项目。To solve the deficiencies of the prior art, the present application provides a log text processing method and apparatus, and a computer readable storage medium, which can track and extract log texts by using a cursor to accurately count various statistical items of the log.
为实现上述目的,本申请提供一种日志文本处理方法,应用于电子装置,该方法包括:To achieve the above objective, the present application provides a log text processing method, which is applied to an electronic device, and the method includes:
文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
为实现上述目的,本申请还提供一种电子装置,该电子装置包括存储器和处理器,所述存储器中包括日志文本处理程序,该日志文本处理程序被所述处理器执行时实现如下步骤:To achieve the above object, the present application further provides an electronic device including a memory and a processor, wherein the memory includes a log text processing program, and when the log text processing program is executed by the processor, the following steps are implemented:
文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中包括日志文本处理程序,该日志文本处理程序被处理器执行时,实现如下步骤:In addition, in order to achieve the above object, the present application further provides a computer readable storage medium, which includes a log text processing program, and when the log text processing program is executed by a processor, the following steps are implemented:
文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
本申请提出的日志文本处理方法、电子装置及计算机可读存储介质,利用游标对当前日志文本进行定位,对日志文本增量进行追踪,对满足查询参数的日志文本进行提取,根据提取的日志文本对日志各统计项目进行统计。由于追踪日志文本增量的定时执行值可以自由设置,游标的使用不会对日志文本的内容产生影响,故本申请能够无侵入地对日志文本进行追踪,精确提取查询结果,实现对日志文本灵活、高效地处理。The log text processing method, the electronic device and the computer readable storage medium proposed by the application use a cursor to locate the current log text, track the log text increment, and extract the log text satisfying the query parameter, according to the extracted log text. Statistics are collected for each statistical item of the log. Since the timing execution value of the tracking log text increment can be freely set, the use of the cursor does not affect the content of the log text, so the application can track the log text without intrusion, accurately extract the query result, and realize flexible log text. And handle it efficiently.
附图说明DRAWINGS
图1为本申请电子装置较佳实施例的运行环境示意图;1 is a schematic diagram of an operating environment of a preferred embodiment of an electronic device of the present application;
图2为图1中日志文本处理程序的程序模块图;2 is a program block diagram of the log text processing program of FIG. 1;
图3为本申请日志文本处理方法第一较佳实施例的流程图;3 is a flowchart of a first preferred embodiment of a log text processing method of the present application;
图4为本申请日志文本处理方法第二较佳实施例的流程图。4 is a flow chart of a second preferred embodiment of a log text processing method of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
本领域的技术人员知道,本申请的实施方式可以实现为一种方法、装置、设备、系统或计算机程序产品。因此,本申请可以具体实现为完全的硬件、完全的软件(包括固件、驻留软件、微代码等),或者硬件和软件结合的形式。Those skilled in the art will appreciate that embodiments of the present application can be implemented as a method, apparatus, device, system, or computer program product. Accordingly, the application can be embodied in a complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
下面将参考若干具体实施例来描述本申请的原理和精神。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。The principles and spirit of the present application are described below with reference to a number of specific embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
参照图1所示,为本申请电子装置较佳实施例的运行环境示意图。1 is a schematic diagram of an operating environment of a preferred embodiment of an electronic device of the present application.
该电子装置1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有存储和运算功能的终端设备。The electronic device 1 may be a terminal device having a storage and computing function such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.
该电子装置1包括存储器11、处理器12、网络接口13及通信总线14。所述网络接口13可选地可以包括标准的有线接口和无线接口(如WI-FI接口)。通信总线14用于实现上述组件之间的连接通信。The electronic device 1 includes a memory 11, a processor 12, a network interface 13, and a communication bus 14. The network interface 13 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The communication bus 14 is used to implement connection communication between the above components.
存储器11包括至少一种类型的可读存储介质。所述至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。 在一些实施例中,所述可读存储介质可以是所述电子装置1的内部存储单元,例如该电子装置1的硬盘。在另一些实施例中,所述可读存储介质也可以是所述电子装置1的外部存储器11,例如所述电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC). , Secure Digital (SD) card, Flash Card, etc.
在本实施例中,所述存储器11的可读存储介质用于存储日志文本处理程序10、日志文件,以及处理器12执行日志文本处理程序10的程序代码应用到的其他数据以及最后输出的数据等。In the present embodiment, the readable storage medium of the memory 11 is used to store the log text processing program 10, the log file, and other data to which the processor 12 executes the program code of the log text processing program 10 and the last output data. Wait.
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行日志文本处理程序10等。The processor 12, in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing log text processing. Program 10 and so on.
图1仅示出了具有组件11-14以及日志文本处理程序10的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。1 shows only the electronic device 1 having the components 11-14 and the log text processing program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
可选地,该电子装置1还可以包括用户接口,用户接口可以包括输入单元比如键盘(Keyboard)、语音输入装置比如麦克风(microphone)等具有语音识别功能的设备、语音输出装置比如音响、耳机等。可选地,用户接口还可以包括标准的有线接口、无线接口。Optionally, the electronic device 1 may further include a user interface, and the user interface may include an input unit such as a keyboard, a voice input device such as a microphone, a device with a voice recognition function, a voice output device such as an audio, a headphone, and the like. . Optionally, the user interface may also include a standard wired interface and a wireless interface.
可选地,该电子装置1还可以包括显示器,显示器也可以称为显示屏或显示单元。在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及有机发光二极管(Organic Light-Emitting Diode,OLED)显示器等。显示器用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch liquid crystal display, and an Organic Light-Emitting Diode (OLED) display. The display is used to display information processed in the electronic device 1 and a user interface for displaying visualizations.
可选地,该电子装置1还包括触摸传感器。所述触摸传感器所提供的供用户进行触摸操作的区域称为触控区域。此外,这里所述的触摸传感器可以为电阻式触摸传感器、电容式触摸传感器等。而且,所述触摸传感器不仅包括接触式的触摸传感器,也可包括接近式的触摸传感器等。此外,所述触摸传感器可以为单个传感器,也可以为例如阵列布置的多个传感器。用户可以通过触摸所述触控区域启动日志文本处理程序10。Optionally, the electronic device 1 further comprises a touch sensor. The area provided by the touch sensor for the user to perform a touch operation is referred to as a touch area. Further, the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like. Moreover, the touch sensor includes not only a contact type touch sensor but also a proximity type touch sensor or the like. Furthermore, the touch sensor may be a single sensor or a plurality of sensors arranged, for example, in an array. The user can start the log text processing program 10 by touching the touch area.
此外,该电子装置1的显示器的面积可以与所述触摸传感器的面积相同,也可以不同。可选地,将显示器与所述触摸传感器层叠设置,以形成触摸显 示屏。该装置基于触摸显示屏侦测用户触发的触控操作。In addition, the area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor. Optionally, a display is stacked with the touch sensor to form a touch display screen. The device detects a user-triggered touch operation based on a touch screen display.
该电子装置1还可以包括射频(Radio Frequency,RF)电路、传感器和音频电路等等,在此不再赘述。The electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, and the like, and details are not described herein.
在图1所示的电子装置1较佳实施例的运行环境示意图中,包含可读存储介质的存储器11中可以包括操作系统、日志文本处理程序10和日志文件等。处理器12执行存储器11中日志文本处理程序10时实现如下步骤:In the operating environment diagram of the preferred embodiment of the electronic device 1 shown in FIG. 1, the memory 11 including the readable storage medium may include an operating system, a log text processing program 10, a log file, and the like. When the processor 12 executes the log text processing program 10 in the memory 11, the following steps are implemented:
文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
具体原理请参照下述图2关于日志文本处理程序10的程序模块图及图3、图4关于日志文本处理方法较佳实施例的流程图的介绍。For details, please refer to the following FIG. 2 for a description of the program block diagram of the log text processing program 10 and FIG. 3 and FIG. 4 for a flow chart of the preferred embodiment of the log text processing method.
参照图2所示,为图1中日志文本处理程序10的程序模块图。在本实施例中,日志文本处理程序10被分割为多个模块,该多个模块被存储于存储器11中,并由处理器12执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。Referring to FIG. 2, it is a program block diagram of the log text processing program 10 of FIG. In the present embodiment, the log text processing program 10 is divided into a plurality of modules, which are stored in the memory 11 and executed by the processor 12 to complete the present application. A module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function.
所述日志文本处理程序10可以被分割为:定位模块110、追踪模块120、查询提取模块130及统计模块140。The log text processing program 10 can be divided into: a positioning module 110, a tracking module 120, a query extraction module 130, and a statistics module 140.
定位模块110,用于对当前日志文本进行定位。日志文件的存放路径可以有多种选择,不同的包管理器(Package Manager)会把日志文件放到不同的位置,但都可以通过配置文件获取日志文件的存放路径,从而打开日志文件。很多程序不具备操作一个集合的能力,而日志的数据量往往很大,因此需要用游标逐行操作。打开日志文件后,定位模块110利用OPEN语句打开游标,使游标指向当前日志文本的第一行,然后利用FETCH语句将游标推进至当前 日志文本的最后一行,将当前日志文本的行数记为游标基准值,最后利用CLOSE语句关闭游标。所述游标基准值的最小值,即游标基准值的初始值,记为0。可以理解的是,所述游标相当于一个指针,具有操作多行日志文本的能力,能将多行日志文本一次一行或一次多行地处理完毕。在另一实施例中,也可以用游标FOR循环代替OPEN、FETCH和CLOSE语句来控制游标。The positioning module 110 is configured to locate the current log text. The storage path of the log file can be variously selected. Different package managers (Package Manager) will put the log files in different locations, but the configuration files can be used to obtain the storage path of the log files, thereby opening the log file. Many programs do not have the ability to manipulate a collection, and the amount of data in the log is often large, so you need to use a cursor to operate line by line. After opening the log file, the positioning module 110 uses the OPEN statement to open the cursor, so that the cursor points to the first line of the current log text, and then uses the FETCH statement to advance the cursor to the last line of the current log text, and records the number of lines of the current log text as a cursor. The benchmark value, and finally use the CLOSE statement to close the cursor. The minimum value of the cursor reference value, that is, the initial value of the cursor reference value, is recorded as 0. It can be understood that the cursor is equivalent to a pointer and has the ability to manipulate multi-line log text, and can process multiple lines of log text one line at a time or multiple lines at a time. In another embodiment, the cursor can also be controlled by a cursor FOR loop instead of the OPEN, FETCH, and CLOSE statements.
追踪模块120,用于定时对日志文本增量进行追踪,得到日志文本增量的行数。日志是可以实时更新的,随时可能生成日志文本增量,对当前日志文本进行定位后,设置定时执行值,追踪模块120定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值。所述定时执行值的单位为秒,例如,假设定时执行值为60秒,则追踪模块120每隔60秒将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值。可以理解的是,所述游标基准值的变化量等于所述日志文本增量的行数。The tracking module 120 is configured to periodically track the log text increments to obtain the number of rows of the log text increment. The log can be updated in real time, and the log text increment may be generated at any time. After the current log text is located, the timing execution value is set, and the tracking module 120 periodically advances the cursor to the last line of the log text increment, and according to the log text increment. The number of rows updates the cursor reference value. The timing execution value is in seconds. For example, if the timing execution value is 60 seconds, the tracking module 120 advances the cursor to the last line of the log text increment every 60 seconds, and updates according to the number of rows of the log text increment. Cursor reference value. It can be understood that the amount of change of the cursor reference value is equal to the number of rows of the log text increment.
查询提取模块130,用于按行提取满足查询参数的日志文本。由于日志可以记录请求时间等操作信息,也可以记录状态代码等反馈信息,故所述查询参数可以包括时间段和关键字。当查询参数为时间段时,查询提取模块130控制游标,将该时间段内生成的日志文本逐行提取出来;当查询参数为关键字时,查询提取模块130控制游标,将包含该关键字的日志文本逐行提取出来;当查询参数为时间段和关键字相结合时,查询提取模块130控制游标,将该时间段内生成的日志文本中包含该关键字的日志文本逐行提取出来。The query extraction module 130 is configured to extract log text that satisfies the query parameter by row. Since the log can record operation information such as the request time, and feedback information such as a status code can also be recorded, the query parameter can include a time period and a keyword. When the query parameter is a time segment, the query extraction module 130 controls the cursor to extract the log text generated in the time segment row by row; when the query parameter is a keyword, the query extraction module 130 controls the cursor, and the keyword is included. The log text is extracted line by line; when the query parameter is combined with the time segment and the keyword, the query extraction module 130 controls the cursor, and extracts the log text containing the keyword in the log text generated in the time segment row by line.
可以理解的是,在使用游标对当前日志文本进行定位,对日志文本增量进行追踪,对满足查询参数的日志文本段落进行提取时,游标作为一种外部工具,并未对日志的生成产生任何影响,也不会改变日志文本的内容。It can be understood that the cursor is used to locate the current log text, and the log text increment is tracked. When the log text segment that satisfies the query parameter is extracted, the cursor is used as an external tool, and no log is generated. The effect does not change the content of the log text.
统计模块140,用于对提取的日志文本段落进行统计,输出预定统计项目的统计结果。日志的格式可由用户自定义,用户通过自定义日志格式获取想要得到的记录信息,从这些记录信息中可以统计出日志各统计项目的统计结果。日志中的记录信息可以包括请求者IP地址、数据传输字节数、状态代码、网络协议名称及版本等,所述预定统计项目可以包括数据传输总量和日志文本增量的行数,还可以包括独立访客数(Unique Visitor,UV)、请求成功数、请求失败数、请求失败原因、数据传输被打断的次数等等。例如,可以通过 游标基准值的变化量统计日志文本增量行数,可以根据数据传输字节数统计某时间段内的数据传输总量,可以根据请求者IP地址统计UV,可以利用状态代码统计出请求成功数、请求失败数及请求失败原因等。可以理解的是,此处的数据传输包括数据上传和数据下载。The statistics module 140 is configured to perform statistics on the extracted log text segments, and output statistical results of the predetermined statistical items. The format of the log can be customized by the user. The user can obtain the record information that is obtained through the customized log format. From the record information, the statistics of the log items can be counted. The record information in the log may include a requester IP address, a data transmission byte number, a status code, a network protocol name and a version, etc., and the predetermined statistical item may include a total amount of data transmission and a number of rows of log text increment, and may also Including Unique Visitor (UV), number of request successes, number of request failures, reason for request failure, number of times data transmission was interrupted, and so on. For example, the number of increments of the log text can be counted by the amount of change of the cursor reference value, and the total amount of data transmission in a certain period of time can be counted according to the number of bytes of data transmission. The UV can be counted according to the IP address of the requester, and the status code can be used. The number of request successes, the number of request failures, and the reason for the request failure. It can be understood that the data transmission here includes data uploading and data downloading.
具体地,在本实施例中,所述日志为网站访问日志,该网站访问日志的每行文本都记录有状态代码,状态代码也叫错误代码,是为网站服务器所接收的每个请求分配的三位数代码,用于表示请求是否成功以及遇到的错误类型。当状态代码为200时,表示网站服务器成功响应了浏览器的请求,一切正常;当状态代码为400时,表示浏览器发起的请求是错误的,例如请求包含语法错误等;当状态代码为404时,表示网站服务器找不到浏览器请求的网页。如果查询提取模块130提取了某时间段内的日志文本增量,那么统计模块140可以利用状态代码统计出该时间段内网站服务器处理浏览器请求成功的次数、失败的次数以及网站服务器处理浏览器请求失败的原因;如果查询提取模块130以关键字为查询参数,例如,查询参数为200,提取出状态代码为200的所有日志,那么统计模块140可以利用状态代码统计出网站服务器成功响应浏览器请求的总次数。上述关于利用状态代码统计请求成功数、请求失败数及请求失败原因的解释仅是提供部分例子,未能穷举。网站运维人员可以根据统计模块140输出的统计结果判断网站服务器的运行状态是否正常。Specifically, in this embodiment, the log is a website access log, and each line of text of the website access log records a status code, and the status code is also called an error code, which is allocated for each request received by the website server. A three-digit code that indicates whether the request was successful and the type of error encountered. When the status code is 200, it means that the website server successfully responds to the browser's request, everything is normal; when the status code is 400, it means that the request initiated by the browser is wrong, for example, the request contains a syntax error, etc.; when the status code is 404 When it is displayed, the web server cannot find the web page requested by the browser. If the query extraction module 130 extracts the log text increments within a certain period of time, the statistics module 140 may use the status code to count the number of times the web server processes the browser request successfully during the time period, the number of failures, and the web server processing the browser. If the query extraction module 130 uses the keyword as the query parameter, for example, the query parameter is 200, and all the logs with the status code of 200 are extracted, the statistics module 140 can use the status code to count the successful response of the website server to the browser. The total number of requests. The above explanation about the use of the status code to count the number of request successes, the number of request failures, and the reason for the failure of the request is only a partial example, and is not exhaustive. The website operation and maintenance personnel can judge whether the running status of the website server is normal according to the statistical result output by the statistics module 140.
在本实施例中,网站访问日志的每行文本还记录了网站服务器发送给客户端的字节数,即客户端从网站服务器下载的数据量,统计模块140将这些值相加即可统计出服务器在某段时间内,例如一天、一周或者一个月内服务器发送数据的总量。另外,通过将网站服务器发送给客户端的字节数与对应文件的大小作对比,统计模块140可以判断出数据传输过程中是否被打断,并统计出某时间段内数据传输被打断的次数。类似地,统计模块140可以利用日志记录的信息输出其他预定统计项目的统计结果,供开发人员、运维人员等参考。In this embodiment, each line of text of the website access log also records the number of bytes sent by the website server to the client, that is, the amount of data downloaded by the client from the website server, and the statistics module 140 adds the values to count the server. The total amount of data sent by the server during a certain period of time, such as one day, one week, or one month. In addition, by comparing the number of bytes sent by the website server to the client and the size of the corresponding file, the statistics module 140 can determine whether the data transmission process is interrupted, and count the number of times the data transmission is interrupted within a certain period of time. . Similarly, the statistics module 140 may use the information recorded by the log to output statistical results of other predetermined statistical items for reference by developers, operation and maintenance personnel, and the like.
参照图3所示,为本申请日志文本处理方法第一较佳实施例的流程图。电子装置1的处理器12执行存储器11中存储的日志文本处理程序10时实现 日志文本处理方法的如下步骤:Referring to FIG. 3, it is a flowchart of a first preferred embodiment of a log text processing method of the present application. The following steps of implementing the log text processing method when the processor 12 of the electronic device 1 executes the log text processing program 10 stored in the memory 11:
步骤S10,获取日志文件路径,打开日志文件,利用定位模块110将游标指向当前日志文本的最后一行,对当前日志文本进行定位。日志文件的存放路径可以通过配置文件来获取,打开日志文件后,定位模块110通过OPEN语句打开游标,将游标指向当前日志文本的第一行,然后通过FETCH语句将游标推进至当前日志文本的最后一行,将当前日志文本的行数记为游标基准值,完成对当前日志文本的定位工作。在另一实施例中,可以通过游标FOR循环来控制游标,代替所述OPEN语句和FETCH语句。Step S10: Obtain a log file path, open a log file, and use the positioning module 110 to point the cursor to the last line of the current log text to locate the current log text. The storage path of the log file can be obtained through the configuration file. After the log file is opened, the positioning module 110 opens the cursor through the OPEN statement, points the cursor to the first line of the current log text, and then advances the cursor to the end of the current log text through the FETCH statement. One line, the number of lines of the current log text is recorded as the cursor reference value, and the positioning of the current log text is completed. In another embodiment, the cursor can be controlled by a cursor FOR loop instead of the OPEN statement and the FETCH statement.
步骤S20,设置定时执行值,利用追踪模块120定时将所述游标推进至日志文本增量的最后一行,定时对日志文本增量进行追踪。所述定时执行值的单位为秒,假设定时执行值为60秒,则追踪模块120每隔60秒将所述游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值,即游标基准值的变化量等于日志文本增量的行数,实现对日志文本增量的定期追踪。在一个实施例中,表示日志文本增量的行数的数值一直显示在显示器上,并以定时执行值为周期,周期性更新该数值。In step S20, the timing execution value is set, and the cursor is advanced to the last line of the log text increment by the tracking module 120, and the log text increment is tracked periodically. The timing execution value is in seconds, and if the timing execution value is 60 seconds, the tracking module 120 advances the cursor to the last row of the log text increment every 60 seconds, and updates according to the number of rows of the log text increment. The cursor reference value, that is, the amount of change in the cursor reference value is equal to the number of rows in the log text increment, enabling periodic tracking of log text increments. In one embodiment, the value representing the number of rows of log text increments is always displayed on the display and periodically updated with a timing execution value.
步骤S30,设置查询参数,利用查询提取模块130按行提取满足查询参数的日志文本段落。所述查询参数可以是时间段,也可以是关键字,因此可以利用查询提取模块130提取到某个时间段的日志文本新增行,也可以提取到含有某些关键字的日志文本行。Step S30, setting a query parameter, and using the query extraction module 130 to extract a log text paragraph that satisfies the query parameter. The query parameter may be a time period or a keyword. Therefore, the query extraction module 130 may be used to extract a log text added to a certain period of time, or may extract a log text line containing certain keywords.
为了便于表述,我们把满足查询参数的日志文本称为结果集(result set).根据用户设置的查询参数,查询提取模块130控制游标指向结果集的第一行,从结果集中提取该行日志文本,然后将游标推进至结果集的下一行,直至提取所有满足查询参数的日志文本行,即整个结果集。For convenience of description, we refer to the log text satisfying the query parameters as a result set. According to the query parameters set by the user, the query extraction module 130 controls the cursor to point to the first row of the result set, and extracts the log text of the row from the result set. , then advance the cursor to the next row of the result set until all log text lines that satisfy the query parameters are extracted, the entire result set.
步骤S40,利用统计分析模块140对提取的日志文本段落进行统计分析,输出预定统计项目的统计结果。所述预定统计项目包括数据传输总量、日志文本增量的行数、独立访客数、请求成功数、请求失败数、请求失败原因、数据传输被打断的次数等等。统计分析的具体方法及作用请参照上述关于统计分析模块140的详细介绍。In step S40, the statistical analysis module 140 performs statistical analysis on the extracted log text paragraphs, and outputs statistical results of the predetermined statistical items. The predetermined statistical items include the total amount of data transmission, the number of rows of the log text increment, the number of independent visitors, the number of successful requests, the number of failed requests, the reason for the failure of the request, the number of times the data transmission is interrupted, and the like. For the specific method and function of the statistical analysis, please refer to the above detailed description of the statistical analysis module 140.
本实施例提出的日志文本处理方法,利用游标对当前日志文本进行定位,对日志文本增量进行追踪,对满足查询参数的日志文本进行精确提取,根据 提取的日志文本对预定统计项目进行统计,得到数据传输总量、日志文本增量的行数、独立访客数、请求成功数、请求失败数、请求失败原因、数据传输被打断的次数等统计结果。由于追踪日志文本增量的定时执行值可以自由设置,游标的使用不会对日志文本的内容造成影响,本申请能够无侵入地对日志文本进行追踪,精确提取查询结果,实现对日志文本灵活、高效地处理。The log text processing method proposed in this embodiment uses a cursor to locate the current log text, tracks the log text increment, accurately extracts the log text that satisfies the query parameter, and performs statistics on the predetermined statistical item according to the extracted log text. Get the statistics of the total amount of data transmission, the number of rows in the log text increment, the number of independent visitors, the number of successful requests, the number of failed requests, the reason for the failure of the request, and the number of times the data transmission was interrupted. Since the timing execution value of the trace log text increment can be freely set, the use of the cursor does not affect the content of the log text. The application can track the log text without intrusion, accurately extract the query result, and realize flexible log text. Processed efficiently.
参照图4所示,为本申请日志文本处理方法第二较佳实施例的流程图。Referring to FIG. 4, it is a flowchart of a second preferred embodiment of the log text processing method of the present application.
与第一较佳实施例相比,本实施例增加了文本输出控制步骤,用户可以通过控制文本输出开关,决定是否输出提取的日志文本。在本实施例中,步骤S10-步骤S40与第一实施例中步骤S10-步骤S40内容相同,在此不再赘述。Compared with the first preferred embodiment, the present embodiment adds a text output control step, and the user can decide whether to output the extracted log text by controlling the text output switch. In this embodiment, the steps S10 to S40 are the same as the steps S10 to S40 in the first embodiment, and details are not described herein again.
步骤S50,设置文本输出开关,自动判断提取的日志文本是否满足预设条件。所述文本输出开关可以理解为一个条件转移指令,所述预设条件可以是多种多样的,例如状态代码为408、500、504等,这些状态代码表示请求超时或者服务器错误,这些状态代码所在的日志文本行中记录的其他信息可能对运维人员排除故障或提高服务器运行状况提供帮助。所述预设条件还可以是数据传输字节数的范围,当日志记录的数据传输字节数在该范围之内时,则该行日志文本满足预设条件。例如,假设所述预设条件为数据传输字节数在400-500兆字节之间,这样的数据传输量对应的日志文本行记录的是客户端发出某些特定请求时对应的信息。可以理解的是,所述预设条件可以是能够通过日志文本记录的信息判断是否满足的任意条件,目的是筛选出日志文本中相对更具价值的部分。Step S50, setting a text output switch to automatically determine whether the extracted log text meets a preset condition. The text output switch can be understood as a conditional branch instruction, and the preset condition can be various, such as status codes 408, 500, 504, etc., and the status codes indicate request timeout or server error, and the status codes are located. Additional information recorded in the log text line may help the operator to troubleshoot or improve server health. The preset condition may also be a range of data transmission bytes. When the number of data transmission bytes of the log record is within the range, the log text of the line satisfies a preset condition. For example, it is assumed that the preset condition is that the number of data transmission bytes is between 400 and 500 megabytes, and the log text line corresponding to the data transmission amount records information corresponding to the specific request sent by the client. It can be understood that the preset condition may be any condition that can be judged by the information recorded in the log text, and the purpose is to filter out a relatively more valuable part of the log text.
步骤S60,将提取的满足预设条件的日志文本序列化并存入数据库。由于日志的数据量往往非常庞大,提取的日志文本的利用价值也不同,通过设置文本输出开关,自动输出满足预设条件的日志文本,并将其序列化和存入数据库,以提高日志文本数据的安全性。不满足预设条件的日志文本仍保留在原始日志文件中,但为了节约存储资源,这些日志文本可能在一段时间后被删除或被后续的日志文本增量所覆盖。可以理解的是,将日志文件中相对更具价值的部分,即满足预设条件的日志文本序列化并存入数据库的原因是多方面的,不仅仅是为了节约存储资源和提高日志文本数据的安全性。例如,普通文件在顺序访问时固然具有优势,但是在文件很大或随机访问数据时面 临很多困难,限制了访问速度和提取速度。综上所述,在日志文本处理过程中增加文本输出控制步骤的优势是可想而知的。In step S60, the extracted log texts satisfying the preset condition are serialized and stored in the database. Since the data volume of the log is often very large, the utilization value of the extracted log text is also different. By setting the text output switch, the log text that satisfies the preset condition is automatically output, and serialized and stored in the database to improve the log text data. Security. Log text that does not meet the preset criteria remains in the original log file, but to conserve storage resources, these log text may be deleted after a period of time or overwritten by subsequent log text increments. It can be understood that the reason for serializing and storing the relatively valuable part of the log file, that is, the log text satisfying the preset condition, into the database is various, not only to save storage resources and improve log text data. safety. For example, ordinary files have advantages in sequential access, but they face many difficulties when files are large or randomly accessed, limiting access speed and extraction speed. In summary, the advantages of adding text output control steps during log text processing are conceivable.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等等中的任意一种或者几种的任意组合。所述计算机可读存储介质中包括日志文件、日志文本处理程序10等,所述日志文本处理程序10被处理器12执行时实现如下操作:In addition, the embodiment of the present application further provides a computer readable storage medium, which may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read only memory (ROM), and an erasable programmable Any combination or combination of any one or more of read only memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, and the like. The computer readable storage medium includes a log file, a log text processing program 10, and the like, and when the log text processing program 10 is executed by the processor 12, the following operations are implemented:
文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
本申请之计算机可读存储介质的具体实施方式与上述日志文本处理方法以及电子装置1的具体实施方式大致相同,在此不再赘述。The specific implementation of the computer readable storage medium of the present application is substantially the same as the above-described log text processing method and the specific embodiment of the electronic device 1, and details are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a series of elements includes those elements. It also includes other elements not explicitly listed, or elements that are inherent to such a process, device, item, or method. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, the device, the item, or the method that comprises the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体 现出来,该计算机软件产品存储在如上所述的一个存储介质中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present application that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium as described above, including a number of instructions. To enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the methods described in the various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种日志文本处理方法,应用于电子装置,其特征在于,该方法包括:A log text processing method is applied to an electronic device, the method comprising:
    文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
    增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
    查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
    统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  2. 如权利要求1所述的日志文本处理方法,其特征在于,所述文本定位步骤中,所述游标在初始时指向当前日志文本的第一行,被逐行推进直至指向当前日志文本的最后一行。The log text processing method according to claim 1, wherein in the text locating step, the cursor points to the first line of the current log text at the initial time, and is advanced line by line until pointing to the last line of the current log text. .
  3. 如权利要求1或2所述的日志文本处理方法,其特征在于,所述文本定位步骤中,利用OPEN语句打开游标,使游标指向当前日志文本的第一行,利用FETCH语句将游标推进至当前日志文本的最后一行,利用CLOSE语句关闭游标。The log text processing method according to claim 1 or 2, wherein in the text locating step, the cursor is opened by using an OPEN statement, so that the cursor points to the first line of the current log text, and the cursor is advanced to the current state by using the FETCH statement. In the last line of the log text, use the CLOSE statement to close the cursor.
  4. 如权利要求1所述的日志文本处理方法,其特征在于,所述游标基准值的变化量等于所述日志文本增量的行数。The log text processing method according to claim 1, wherein the amount of change in the cursor reference value is equal to the number of lines of the log text increment.
  5. 如权利要求1所述的日志文本处理方法,其特征在于,所述查询参数包括时间段和关键字。The log text processing method according to claim 1, wherein the query parameter comprises a time period and a keyword.
  6. 如权利要求1所述的日志文本处理方法,其特征在于,所述统计步骤之后为文本输出控制步骤:设置文本输出开关,将满足预设条件的日志文本序列化并存入数据库。The log text processing method according to claim 1, wherein the statistical step is followed by a text output control step of: setting a text output switch, serializing the log text that satisfies the preset condition, and storing the log text in a database.
  7. 如权利要求1所述的日志文本处理方法,其特征在于,所述预定统计项目包括数据传输总量以及日志文本增量的行数。The log text processing method according to claim 1, wherein said predetermined statistical item comprises a total amount of data transmission and a number of lines of log text increment.
  8. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中包括日志文本处理程序,该日志文本处理程序被所述处理器执行时实现如下步骤:An electronic device includes a memory and a processor, wherein the memory includes a log text processing program, and when the log text processing program is executed by the processor, the following steps are implemented:
    文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
    增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
    查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text;
    统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  9. 如权利要求8所述的电子装置,其特征在于,所述文本定位步骤中,所述游标在初始时指向当前日志文本的第一行,被逐行推进直至指向当前日志文本的最后一行。The electronic device according to claim 8, wherein in the text locating step, the cursor initially points to the first line of the current log text, and is advanced line by line until it points to the last line of the current log text.
  10. 如权利要求8或9所述的电子装置,其特征在于,所述文本定位步骤中,利用OPEN语句打开游标,使游标指向当前日志文本的第一行,利用FETCH语句将游标推进至当前日志文本的最后一行,利用CLOSE语句关闭游标。The electronic device according to claim 8 or 9, wherein in the text locating step, the cursor is opened by the OPEN statement, the cursor is pointed to the first line of the current log text, and the cursor is advanced to the current log text by using the FETCH statement. In the last line, use the CLOSE statement to close the cursor.
  11. 如权利要求8所述的电子装置,其特征在于,所述游标基准值的变化量等于所述日志文本增量的行数。The electronic device of claim 8, wherein the amount of change in the cursor reference value is equal to the number of rows of the log text increment.
  12. 如权利要求8所述的电子装置,其特征在于,所述查询参数包括时间段和关键字。The electronic device of claim 8, wherein the query parameter comprises a time period and a keyword.
  13. 如权利要求8所述的电子装置,其特征在于,所述统计步骤之后为文本输出控制步骤:设置文本输出开关,将满足预设条件的日志文本序列化并存入数据库。The electronic device according to claim 8, wherein the statistical step is followed by a text output control step of: setting a text output switch to serialize and store the log text that satisfies the preset condition in a database.
  14. 如权利要求8所述的电子装置,其特征在于,所述预定统计项目包括数据传输总量以及日志文本增量的行数。The electronic device of claim 8, wherein the predetermined statistical item comprises a total amount of data transmission and a number of lines of log text increments.
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括日志文本处理程序,所述日志文本处理程序被处理器执行时,实现如下步骤:A computer readable storage medium, comprising: a log text processing program, wherein when the log text processing program is executed by a processor, the following steps are implemented:
    文本定位步骤:获取日志文件路径,打开日志文件,将游标指向当前日志文本的最后一行,将当前日志文本的行数记为游标基准值;Text positioning step: obtain the log file path, open the log file, point the cursor to the last line of the current log text, and record the number of lines of the current log text as the cursor reference value;
    增量追踪步骤:设置定时执行值,定时将游标推进至日志文本增量的最后一行,并根据日志文本增量的行数更新游标基准值;Incremental tracking step: set the timing execution value, advance the cursor to the last line of the log text increment, and update the cursor reference value according to the number of rows of the log text increment;
    查询提取步骤:设置查询参数,利用游标从日志文本中按行提取满足查 询参数的日志文本段落;及Query extraction step: setting the query parameters, and using the cursor to extract the log text paragraphs satisfying the query parameters from the log text; and
    统计步骤:对提取的日志文本段落进行统计,输出预定统计项目的统计结果。Statistical step: Statistics are performed on the extracted log text segments, and the statistical results of the predetermined statistical items are output.
  16. 如权利要求15所述的存储介质,其特征在于,所述文本定位步骤中,所述游标在初始时指向当前日志文本的第一行,被逐行推进直至指向当前日志文本的最后一行。The storage medium according to claim 15, wherein in said text locating step, said cursor initially points to a first line of the current log text, and is advanced line by line until it points to the last line of the current log text.
  17. 如权利要求15所述的存储介质,其特征在于,所述游标基准值的变化量等于所述日志文本增量的行数。The storage medium of claim 15, wherein the amount of change in the cursor reference value is equal to the number of rows of the log text increment.
  18. 如权利要求15所述的存储介质,其特征在于,所述查询参数包括时间段和关键字。The storage medium of claim 15 wherein said query parameters comprise time periods and keywords.
  19. 如权利要求15所述的存储介质,其特征在于,所述统计步骤之后为文本输出控制步骤:设置文本输出开关,将满足预设条件的日志文本序列化并存入数据库。The storage medium according to claim 15, wherein said statistical step is followed by a text output control step of: setting a text output switch to serialize and store the log text satisfying the preset condition in a database.
  20. 如权利要求15所述的存储介质,其特征在于,所述预定统计项目包括数据传输总量以及日志文本增量的行数。The storage medium of claim 15, wherein the predetermined statistical item comprises a total amount of data transmission and a number of lines of log text increment.
PCT/CN2018/089870 2018-01-05 2018-06-05 Log text processing method and apparatus, and storage medium WO2019134341A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810011139.4 2018-01-05
CN201810011139.4A CN108427626A (en) 2018-01-05 2018-01-05 Daily record text handling method, device and storage medium

Publications (1)

Publication Number Publication Date
WO2019134341A1 true WO2019134341A1 (en) 2019-07-11

Family

ID=63155848

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089870 WO2019134341A1 (en) 2018-01-05 2018-06-05 Log text processing method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN108427626A (en)
WO (1) WO2019134341A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344070A (en) * 2018-10-10 2019-02-15 郑州云海信息技术有限公司 A kind of object localization method, device, system and computer readable storage medium
CN109542890B (en) * 2018-10-11 2024-01-26 平安科技(深圳)有限公司 Data modification method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
US20120284295A1 (en) * 2011-05-02 2012-11-08 Microsoft Corporation Lightweight caching of transaction log for sequential access
CN105590259A (en) * 2015-11-04 2016-05-18 中国银联股份有限公司 Device and method for diagnosis of transaction system
CN106649627A (en) * 2016-12-06 2017-05-10 杭州迪普科技股份有限公司 Log searching method and device
CN107341258A (en) * 2017-07-12 2017-11-10 中国工商银行股份有限公司 A kind of log data acquisition method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100357900C (en) * 2005-01-20 2007-12-26 上海复旦光华信息科技股份有限公司 Automatic extraction and analysis for formwork based on heterogenerous logbook
CN107038162B (en) * 2016-02-03 2021-03-02 北京嘀嘀无限科技发展有限公司 Real-time data query method and system based on database log
US20170288956A1 (en) * 2016-03-29 2017-10-05 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Node configuration assignment using a mobile communication device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
US20120284295A1 (en) * 2011-05-02 2012-11-08 Microsoft Corporation Lightweight caching of transaction log for sequential access
CN105590259A (en) * 2015-11-04 2016-05-18 中国银联股份有限公司 Device and method for diagnosis of transaction system
CN106649627A (en) * 2016-12-06 2017-05-10 杭州迪普科技股份有限公司 Log searching method and device
CN107341258A (en) * 2017-07-12 2017-11-10 中国工商银行股份有限公司 A kind of log data acquisition method and system

Also Published As

Publication number Publication date
CN108427626A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
US10498842B2 (en) Methods for recording user interactions with a website
WO2019140828A1 (en) Electronic apparatus, method for querying logs in distributed system, and storage medium
US8578010B2 (en) Methods and system for tracking web page analytics
AU2009238294B2 (en) Data transformation based on a technical design document
US9141680B2 (en) Data consistency and rollback for cloud analytics
US20140215495A1 (en) Task-specific application monitoring and analysis
WO2015143865A1 (en) Application scenario identification method, power consumption management method and apparatus and terminal device
US7665098B2 (en) System and method for monitoring interactions between application programs and data stores
KR101569984B1 (en) Setup Method for Web Scraping Data Extraction
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
CN106844181B (en) Method, system and mobile terminal for recording user behavior
US11244025B2 (en) Systems and methods for updating data pipelines
CN111651468A (en) Data updating method and device based on SQL analysis, electronic equipment and storage medium
CN110851681A (en) Crawler processing method and device, server and computer readable storage medium
WO2019134341A1 (en) Log text processing method and apparatus, and storage medium
WO2017107679A1 (en) Historical information display method and apparatus
JP2019114076A (en) Information processing system, information processing method, information processing device, and program
US20150089018A1 (en) Centralized management of webservice resources in an enterprise
CN112835779A (en) Test case determination method and device and computer equipment
CN105446785A (en) Method and system for unloading application program
CN109660587A (en) Data push method, device, storage medium and server based on random number
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
US20190026649A1 (en) System and method for generating a file execution record of address tuples
CN110737642B (en) Database information analysis method, database information analysis device, computer device and storage medium
KR102365434B1 (en) Content search method and content search system

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.10.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18898657

Country of ref document: EP

Kind code of ref document: A1