WO2022036865A1 - Procédé et appareil pour capturer automatiquement un fichier journal, et dispositif informatique - Google Patents

Procédé et appareil pour capturer automatiquement un fichier journal, et dispositif informatique Download PDF

Info

Publication number
WO2022036865A1
WO2022036865A1 PCT/CN2020/125556 CN2020125556W WO2022036865A1 WO 2022036865 A1 WO2022036865 A1 WO 2022036865A1 CN 2020125556 W CN2020125556 W CN 2020125556W WO 2022036865 A1 WO2022036865 A1 WO 2022036865A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
log file
preset
grabbing
file
Prior art date
Application number
PCT/CN2020/125556
Other languages
English (en)
Chinese (zh)
Inventor
孙思凯
Original Assignee
深圳创维-Rgb电子有限公司
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 深圳创维-Rgb电子有限公司 filed Critical 深圳创维-Rgb电子有限公司
Publication of WO2022036865A1 publication Critical patent/WO2022036865A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations

Definitions

  • the present disclosure relates to the field of computers, and in particular, to a method, an apparatus, and a computer device for automatically grabbing log files.
  • a log generation module is set in the computer equipment. , so as to record the time or messages during the running process of the computer equipment operating system.
  • the logs generated after a problem are often not stored well, or it is difficult to locate and analyze the problem after a long time, thus affecting the customer's experience.
  • the present disclosure provides a method, device and computer equipment for automatically grabbing log files, so as to obtain the required log files in the computer equipment in time, so as to locate and analyze problems in time and improve user experience.
  • a method for automatically grabbing log files including:
  • the preset type of logs includes at least one of error logs, access logs, message logs, warning logs, and debug logs.
  • the log file of the preset type written into the preset storage space by the log grabbing script includes:
  • the size of the log file is greater than or equal to the preset value, a new log file is created in the preset storage space, and subsequent logs of the preset type are written into the new log file.
  • the method for automatically grabbing log files further includes:
  • the number of log files in the preset storage space is greater than the preset number, and if it is greater than the preset number, the log file with the earliest creation date is deleted.
  • the preset storage space includes a preset partition of the internal storage space of the device and/or an external storage space pre-connected to the device.
  • the method for automatically grabbing log files further includes:
  • the method for automatically grabbing log files further includes:
  • the method for automatically grabbing log files further includes:
  • the method for automatically grabbing log files further includes:
  • the present disclosure also provides an automatic grabbing device for log files, including:
  • the crawling script startup module is configured to start the corresponding log crawling script when a preset type of log crawling instruction is received;
  • a log file writing module configured to write the preset type log into the log file of the preset storage space through the log grab script whenever the preset type log is generated;
  • the crawling script closing module is configured to close the log crawling script after receiving the stop crawling instruction.
  • the present disclosure also provides a computer device including a memory and a processor, the memory stores a computer program, and the processor runs the computer program to make the computer device execute the method for automatically grabbing log files.
  • the log file writing module is further configured to obtain size information of the log file, and if the size of the log file is lower than a preset value, continue writing to the log file into the preset type log;
  • the log file writing module is further configured to create a new log file in the preset storage space if the size of the log file is greater than or equal to the preset value, and assign the subsequent preset type to the log file. The log is written to a new log file.
  • the apparatus further includes a log file processing module
  • the log file processing module is configured to determine whether the number of log files in the preset storage space is greater than a preset number before creating a new log file in the preset storage space, and if it is greater than the preset number, delete the creation date The oldest log file.
  • the apparatus further includes a log file processing module
  • the log file processing module is also configured to transmit the log file to the after-sales service terminal;
  • the log file processing module is further configured to receive an upgrade package based on the log file sent by the after-sale service terminal, and run the upgrade package.
  • the apparatus further includes a log file processing module
  • the log file processing module is further configured to close the log capture script after the preset problem log is reproduced.
  • the apparatus further includes a log file processing module
  • the log file processing module is further configured to upload the corresponding date file to the after-sales service terminal after the preset problem log is reproduced.
  • the apparatus further includes a log file processing module
  • the log file processing module is further configured to notify service personnel to obtain the corresponding log file through a remote network after the preset problem log is reproduced.
  • the present disclosure also provides a readable storage medium, which stores a computer program, and when the computer program runs on a processor, executes the method for automatically grabbing log files.
  • the present disclosure provides a method for automatically grabbing log files.
  • the method for automatically grabbing log files includes: when receiving a log grabbing instruction of a preset type, starting a corresponding log grabbing script; whenever a log of the preset type is generated When the log grabbing script is used, the log of the preset type is written into the log file of the preset storage space; after receiving the stop grabbing instruction, the log grabbing script is closed.
  • the method for automatically grabbing log files of the present disclosure can obtain the required log files in a computer device in time, so as to locate and analyze problems in time and improve user experience.
  • FIG. 1 is a flowchart of a method for automatically grabbing log files provided by an embodiment of the present disclosure
  • FIG. 2 is a flowchart of writing a log file provided by an embodiment of the present disclosure
  • FIG. 5 is a flowchart of another method for automatically grabbing log files provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of an apparatus for automatically grabbing log files according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a method for automatically grabbing log files shown in the present disclosure, and the method includes the following steps:
  • Step S11 when a preset type log grabbing instruction is received, start a corresponding log grabbing script.
  • a log generation module is set in the computer equipment. , so as to record the time or messages during the running process of the computer equipment operating system, so as to diagnose, track and deal with various problems generated by the computer equipment subsequently.
  • log grabbing scripts of various preset types of logs may be pre-stored in the computer device, and the user may input preset types of log grabbing instructions to the computer device according to requirements to enable corresponding log grabbing instructions.
  • Log grabbing script use the log grabbing script to grab the corresponding logs.
  • a computer device often reproduces the same error. In order to solve this error, the corresponding error log needs to be used.
  • the user can input the error log capture command to the computer device to start the corresponding error log capture script to capture the error log in real time.
  • the preset type of logs includes at least one of an error log, an access log, a message log, a warning log, and a debug log.
  • Step S12 Whenever the log of the preset type is generated, the log of the preset type is written into the log file of the preset storage space through the log capture script.
  • the log of the preset type can be written into the log file of the preset storage space through the log capture script, so that the user can Set the storage space to query the corresponding log.
  • the user can start the capture script of the corresponding log, upload the corresponding log file to the after-sales service after the problem recurs, or notify the service personnel to obtain the corresponding log file from the preset space through the remote network. log file in order to troubleshoot problems.
  • Step S13 After receiving the stop scraping instruction, close the log scraping script.
  • the above-mentioned computer equipment includes a mobile terminal, a tablet computer, and a smart display device, etc., which are not limited here.
  • the user can use the above method and steps to open the log capture script corresponding to the problem, then run the TV normally and wait for the problem to recur, and then obtain the corresponding log file of the problem, so that the log file can be used to analyze the problem. and problem solving.
  • the user can obtain the required log file in the computer device in time, so as to locate and analyze the problem in time, and improve the user's experience.
  • FIG. 2 is a flow chart of writing a log file provided by the present disclosure, including the following steps:
  • Step S21 Obtain the size information of the log file, and if the size of the log file is lower than a preset value, continue to write the preset type of log to the log file.
  • the size information of the log file to be written can also be obtained, and it is determined whether the size of the log file is lower than the preset size. If the value is lower than the preset value, the log of the preset type can continue to be written to the log file.
  • Step S22 If the size of the log file is greater than or equal to the preset value, create a new log file in the preset storage space, and write subsequent logs of the preset type into the new log file.
  • the size of the log file to be written is greater than or equal to the preset value, a new log file is created in the preset storage space, and the preset type of log is written into the new log file . That is, the size of the log file is limited, and the size can be set by the user.
  • FIG. 3 is another flowchart of writing a log file provided by the present disclosure, further comprising the following steps:
  • Step S23 Before establishing a new log file in the preset storage space, determine whether the number of log files in the preset storage space is greater than the preset number, and if greater than the preset number, delete the log file with the earliest creation date.
  • the number of log files in the preset storage space may also be limited.
  • the log file with the earliest creation date will be deleted after a new log file is created.
  • the size of the preset storage space can be limited, so as to prevent the preset storage space from occupying the resources of the computer device.
  • FIG. 4 is a flowchart of another method for automatically grabbing log files provided by the present disclosure, and the method includes the following steps:
  • Step S41 when a preset type log grabbing instruction is received, start a corresponding log grabbing script.
  • This step is the same as the above-mentioned step S11, and is not repeated here.
  • Step S42 Whenever the preset type of log is generated, write the preset type of log into a log file of a preset storage space through the log capture script.
  • This step is the same as the above-mentioned step S12, and is not repeated here.
  • Step S43 After receiving the stop scraping instruction, close the log scraping script.
  • This step is the same as the above-mentioned step S13, and is not repeated here.
  • Step S44 Transmit the log file to the after-sale service terminal.
  • Step S45 Receive an upgrade package based on the log file sent by the after-sale service terminal, and run the upgrade package.
  • the log file after the log file is generated, the log file can also be sent to the after-sales service terminal, so that the staff of the after-sales service terminal can monitor the operation of the computer equipment according to the log file. You can analyze the problem and generate the corresponding upgrade package based on the log file.
  • the computer equipment can also accept an upgrade package based on the log file from the after-sale service, and perform corresponding upgrades to solve the problem that the computer equipment recurs during operation.
  • FIG. 5 is a flowchart of another method for automatically grabbing log files provided by the present disclosure, and the method includes the following steps:
  • Step S51 when a preset type log grabbing instruction is received, start a corresponding log grabbing script.
  • This step is the same as the above-mentioned step S11, and is not repeated here.
  • Step S52 Whenever the preset type of log is generated, write the preset type of log into a log file of a preset storage space through the log capture script.
  • This step is the same as the above-mentioned step S12, and is not repeated here.
  • Step S53 After receiving the stop scraping instruction, close the log scraping script.
  • This step is the same as the above-mentioned step S13, and is not repeated here.
  • Step S54 After the preset problem log is reproduced, the log grabbing script is closed.
  • the user can set a preset problem log correspondingly after a problem occurs in the computer device.
  • the log generated by the error can be set as the preset problem log.
  • the preset problem log is captured and written to the log file, and the log capture script is closed, so as to avoid the long-term operation of the log capture script from occupying computer equipment resources.
  • FIG. 6 is a schematic structural diagram of an automatic log file grabbing device provided by the present disclosure.
  • the log file automatic grabbing device 600 includes:
  • a crawling script startup module 610 configured to start a corresponding log crawling script when a preset type of log crawling instruction is received
  • the log file writing module 620 is configured to write the preset type log into the log file of the preset storage space through the log grab script whenever the preset type log is generated;
  • the crawling script closing module 630 is configured to close the log crawling script after receiving the stop crawling instruction.
  • the log file writing module 620 is further configured to obtain the size information of the log file, and if the size of the log file is lower than a preset value, continue to write a preset type of log to the log file;
  • the file writing module 620 is further configured to create a new log file in the preset storage space if the size of the log file is greater than or equal to the preset value, and write subsequent logs of the preset type into the new log file.
  • the log file automatic grabbing device 600 further includes a log file processing module:
  • the log file processing module is configured to determine whether the number of log files in the preset storage space is greater than the preset number before creating a new log file in the preset storage space, and if it is greater than the preset number, delete the log file with the earliest creation date.
  • the log file processing module is further configured to transmit the log file to the after-sales service terminal; the log file processing module is further configured to receive the log file-based upgrade package sent by the after-sales service terminal, and run the upgrade package.
  • the log file processing module is also configured to close the log capture script after the preset problem log recurs.
  • the log file processing module is also configured to upload the corresponding date file to the after-sales service terminal after the preset problem log is reproduced.
  • the log file processing module is further configured to notify the service personnel to obtain the corresponding log file through the remote network after the preset problem log recurs.
  • the present disclosure also provides a computer device, the computer device includes a memory and a processor, the memory can be configured to store a computer program, and the processor runs the computer program, so that the computer device executes the above method or the above log file automatically Function of the individual modules in the gripper.
  • the memory may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like; data (such as audio data, phone book, etc.) Additionally, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • This embodiment also provides a readable storage medium configured to store the computer program used in the above-mentioned computer device.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more functions configured to implement the specified logical function(s) executable instructions. It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures.
  • each block of the block diagrams and/or flow diagrams, and combinations of blocks in the block diagrams and/or flow diagrams can be implemented using dedicated hardware-based systems that perform the specified functions or actions. be implemented, or may be implemented in a combination of special purpose hardware and computer instructions.
  • each functional module or unit in each embodiment of the present disclosure may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of software products in essence, or the parts that contribute to the prior art or the parts of the technical solutions.
  • the computer software products are stored in a storage medium, including Several instructions are used to cause a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various implementations of the present disclosure.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • the present disclosure provides a method for automatically grabbing log files.
  • the method for automatically grabbing log files includes: when receiving a log grabbing instruction of a preset type, starting a corresponding log grabbing script; whenever a log of the preset type is generated When the log grabbing script is used, the log of the preset type is written into the log file of the preset storage space; after receiving the stop grabbing instruction, the log grabbing script is closed.
  • the method for automatically grabbing log files of the present disclosure can obtain the required log files in a computer device in time, so as to locate and analyze problems in time and improve user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Un procédé et un appareil de capture automatique d'un fichier journal, et un dispositif informatique. Le procédé de capture automatique d'un fichier journal consiste : lorsqu'une instruction de capture concernant un journal de type prédéfini est reçue, à activer un script de capture de journal correspondant (S11); chaque fois que le journal de type prédéfini est généré, à écrire le journal de type prédéfini dans un fichier journal d'un espace de stockage prédéfini au moyen du script de capture de journal (S12); et après réception d'une instruction d'arrêt de capture, à désactiver le script de capture de journal (S13). Au moyen du procédé, un fichier journal requis dans un dispositif informatique peut être acquis en temps opportun, de telle sorte qu'un problème est localisé et analysé de manière opportune, et l'expérience d'utilisateur est améliorée.
PCT/CN2020/125556 2020-08-20 2020-10-30 Procédé et appareil pour capturer automatiquement un fichier journal, et dispositif informatique WO2022036865A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010844710.8A CN111930703A (zh) 2020-08-20 2020-08-20 日志文件自动抓取方法、装置和计算机设备
CN202010844710.8 2020-08-20

Publications (1)

Publication Number Publication Date
WO2022036865A1 true WO2022036865A1 (fr) 2022-02-24

Family

ID=73304919

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125556 WO2022036865A1 (fr) 2020-08-20 2020-10-30 Procédé et appareil pour capturer automatiquement un fichier journal, et dispositif informatique

Country Status (2)

Country Link
CN (1) CN111930703A (fr)
WO (1) WO2022036865A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190009B (zh) * 2021-03-22 2024-03-19 广州汽车集团股份有限公司 一种车载多媒体部品日志导出方法及系统、存储介质
CN113900903B (zh) * 2021-10-27 2023-06-16 深圳星火半导体科技有限公司 日志存储装置、日志撷取方法及存储介质
CN115190189A (zh) * 2022-07-08 2022-10-14 中国银行股份有限公司 一种报文信息处理方法及装置
CN117130808A (zh) * 2023-02-22 2023-11-28 荣耀终端有限公司 一种日志采集方法及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678089A (zh) * 2012-09-20 2014-03-26 北京南车时代信息技术有限公司 一种分布式软件系统的日志输出方法及系统
CN103778049A (zh) * 2012-10-19 2014-05-07 北京市三希电子科技开发公司 一种嵌入式设备开发日志系统
CN107766219A (zh) * 2017-10-30 2018-03-06 郑州云海信息技术有限公司 自动化测试日志收集方法、系统、设备及计算机存储设备
CN110457258A (zh) * 2019-08-06 2019-11-15 北京字节跳动网络技术有限公司 一种日志管理方法、装置、设备及介质
CN111475379A (zh) * 2020-03-27 2020-07-31 苏州浪潮智能科技有限公司 一种日志处理方法、装置、电子设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678089A (zh) * 2012-09-20 2014-03-26 北京南车时代信息技术有限公司 一种分布式软件系统的日志输出方法及系统
CN103778049A (zh) * 2012-10-19 2014-05-07 北京市三希电子科技开发公司 一种嵌入式设备开发日志系统
CN107766219A (zh) * 2017-10-30 2018-03-06 郑州云海信息技术有限公司 自动化测试日志收集方法、系统、设备及计算机存储设备
CN110457258A (zh) * 2019-08-06 2019-11-15 北京字节跳动网络技术有限公司 一种日志管理方法、装置、设备及介质
CN111475379A (zh) * 2020-03-27 2020-07-31 苏州浪潮智能科技有限公司 一种日志处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN111930703A (zh) 2020-11-13

Similar Documents

Publication Publication Date Title
WO2022036865A1 (fr) Procédé et appareil pour capturer automatiquement un fichier journal, et dispositif informatique
US9129058B2 (en) Application monitoring through continuous record and replay
US11188560B2 (en) Synchronizing object in local object storage node
US9124669B2 (en) Cooperative client and server logging
CN104636435A (zh) 云终端录屏方法
KR101590947B1 (ko) 데이터 공유 방법, 장치, 프로그램 및 기록매체
CN110333981B (zh) 一种app异常信息的反馈方法及装置、电子设备
CN109783316B (zh) 系统安全日志篡改行为的识别方法及装置、存储介质、计算机设备
CN109587141B (zh) 一种远程服务器取证的系统和方法
CN112148571A (zh) 一种网页操作过程记录与回放的方法及装置
US10831634B1 (en) Replication of user interface events
US10360089B2 (en) System for monitoring a plurality of distributed devices
CN108647284B (zh) 记录用户行为的方法及装置、介质和计算设备
US11968095B2 (en) Capturing and correlating multiple sources of debugging information relating to a network resource via a browser extension
JP2006277771A (ja) 計算機ネットワーク用の端末装置および操作履歴記録方法
CN111343132B (zh) 文件传输检测方法及装置、存储介质
CN114650236A (zh) 一种日志处理方法、装置及存储介质
US8171345B2 (en) Disablement of an exception generating operation of a client system
WO2023125777A1 (fr) Procédé de reconstitution de données d'enregistrement vidéo, serveur de stockage en nuage, système, et support de stockage
CN109583192A (zh) 一种基于仿真的移动终端应用固定保全系统及方法
CN111311194B (zh) 审讯过程中笔录与录音录像的联动方法、系统及存储介质
US20140156827A1 (en) Method and System for Capturing Expertise of a Knowledge Worker in an Integrated Breadcrumb Trail of Data Transactions and User Interactions
RU2671999C1 (ru) Способ и система для диагностики мобильных вычислительных устройств
Ahmed et al. Analysis of cloud digital evidence
EA036911B1 (ru) Способ и система для диагностики мобильных вычислительных устройств

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: 20950068

Country of ref document: EP

Kind code of ref document: A1

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 29.06.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20950068

Country of ref document: EP

Kind code of ref document: A1