[go: up one dir, main page]

CN113704014B - Log acquisition system, method, electronic device and storage medium - Google Patents

Log acquisition system, method, electronic device and storage medium Download PDF

Info

Publication number
CN113704014B
CN113704014B CN202110977395.0A CN202110977395A CN113704014B CN 113704014 B CN113704014 B CN 113704014B CN 202110977395 A CN202110977395 A CN 202110977395A CN 113704014 B CN113704014 B CN 113704014B
Authority
CN
China
Prior art keywords
log
fault
module
interface
management
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110977395.0A
Other languages
Chinese (zh)
Other versions
CN113704014A (en
Inventor
马恒彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Glory Smart Technology Development Co ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110977395.0A priority Critical patent/CN113704014B/en
Publication of CN113704014A publication Critical patent/CN113704014A/en
Application granted granted Critical
Publication of CN113704014B publication Critical patent/CN113704014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0784Routing of error reports, e.g. with a specific transmission path or data flow

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请提供一种日志获取系统、方法、电子设备及存储介质。所述方法应用在终端设备中。终端设备的日志采集模块响应接收的远程诊断指令,从所述远程诊断指令中获取故障事件信息,及将所述故障事件信息发送给故障管理模块。故障管理模块获取所述终端设备的故障日志,根据故障事件信息从故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志。本申请能够根据异常问题对应的故障事件信息及时获取异常问题发生时间点附近的日志。

Figure 202110977395

The present application provides a log acquisition system, method, electronic device and storage medium. The method is applied in a terminal device. The log collection module of the terminal device responds to the received remote diagnosis instruction, acquires fault event information from the remote diagnosis instruction, and sends the fault event information to the fault management module. The fault management module obtains the fault log of the terminal device, and determines the fault log matching the fault event information from the fault log as the target fault log according to the fault event information. The present application can obtain logs near the time point when the abnormal problem occurs in time according to the fault event information corresponding to the abnormal problem.

Figure 202110977395

Description

日志获取系统、方法、电子设备及存储介质Log acquisition system, method, electronic device and storage medium

技术领域technical field

本申请涉及数据传输技术领域,尤其涉及一种日志获取系统、方法、电子设备及存储介质。The present application relates to the technical field of data transmission, and in particular to a log acquisition system, method, electronic device and storage medium.

背景技术Background technique

目前用户在使用终端设备时,可能会遇到某些稳定性等异常的问题,比如黑屏、卡死后重启等问题。用户对异常的问题进行检查或维修时,需要复现问题。在复现问题后点击抓取日志,并将日志上传到云端。由于日志大小及流量具有一定局限性,不能及时获取到异常问题发生时间点附近的日志,造成获取到的日志晚于故障时间点。At present, when users use terminal devices, they may encounter certain stability and other abnormal problems, such as black screen, restart after freezing and so on. When the user checks or repairs the abnormal problem, he needs to reproduce the problem. After reproducing the problem, click Capture Log and upload the log to the cloud. Due to the limitations of the log size and traffic, the logs near the time when the abnormal problem occurred cannot be obtained in time, resulting in the obtained logs being later than the fault time.

发明内容Contents of the invention

鉴于以上内容,有必要提供一种日志获取系统、方法、电子设备及存储介质以及时获取异常问题发生时间点附近的日志。In view of the above, it is necessary to provide a log acquisition system, method, electronic device and storage medium to timely acquire logs near the time point when the abnormal problem occurs.

第一方面,本申请提供了一种日志获取系统,包括相互通信的第一设备和第二设备,第一设备被配置为:响应抓取日志的指令,第一设备的故障检测模块将远程诊断指令发送给第二设备的日志采集模块,其中远程诊断指令包括故障事件信息。第二设备被配置为:响应远程诊断指令,第二设备的日志采集模块从远程诊断指令中获取故障事件信息,将故障事件信息发送给故障管理模块,并通知故障管理模块获取与故障事件信息对应的日志。第二设备的故障管理模块获取第二设备的故障日志,根据故障事件信息从故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志。本申请的上述技术方案中,日志采集模块将从第一设备接收的与异常问题对应的故障事件信息发送给故障管理模块,故障管理模块根据故障事件信息从获取的故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志,从而及时获取异常问题发生时间点附近的日志。In the first aspect, the present application provides a log acquisition system, including a first device and a second device that communicate with each other, and the first device is configured to: respond to an instruction to capture logs, and the fault detection module of the first device will remotely diagnose The instruction is sent to the log collection module of the second device, wherein the remote diagnosis instruction includes fault event information. The second device is configured as follows: in response to the remote diagnosis command, the log acquisition module of the second device obtains the fault event information from the remote diagnosis command, sends the fault event information to the fault management module, and notifies the fault management module to obtain the fault event information corresponding to the fault event information log. The fault management module of the second device obtains the fault log of the second device, and determines from the fault log according to the fault event information that the fault log matching the fault event information is the target fault log. In the above technical solution of the present application, the log collection module sends the fault event information corresponding to the abnormal problem received from the first device to the fault management module, and the fault management module determines the fault event information from the obtained fault log according to the fault event information. The fault log with matching information is the target fault log, so as to obtain the log near the time point when the abnormal problem occurred in time.

在一种实现方式中,故障管理模块获取第二设备在至少一业务领域中进行故障日志打点得到的故障日志。通过上述技术方案,可以针对至少一业务领域进行打点得到业务领域所对应的故障日志。In an implementation manner, the fault management module obtains fault logs obtained by the second device performing fault log management in at least one business domain. Through the above technical solution, at least one business field can be managed to obtain the fault log corresponding to the business field.

在一种可能的实现方式中,获取第二设备在至少一业务领域中进行故障日志打点得到的故障日志包括:日志打点调用模块在至少一业务领域中进行故障日志打点得到至少一业务领域的打点信息,并将至少一业务领域的打点信息发送到打点接口模块;打点接口模块根据至少一业务领域的打点信息确定出故障日志;故障管理模块从打点接口模块中获取故障日志。通过上述技术方案,故障管理模块从打点接口模块中获取针对业务领域进行打点的故障日志。In a possible implementation manner, obtaining the fault log obtained by the second device performing fault log management in at least one business domain includes: the log management calling module performs fault log management in at least one business domain to obtain the management of at least one business domain information, and send the dot information of at least one business field to the dot interface module; the dot interface module determines the fault log according to the dot information of at least one business field; the fault management module obtains the fault log from the dot interface module. Through the above technical solution, the fault management module obtains the fault log for the management of the business field from the management interface module.

在一种实现方式中,故障事件信息包括故障事件身份标签或应用包名。In an implementation manner, the fault event information includes a fault event ID tag or an application package name.

在一种实现方式中,故障管理模块根据故障事件信息从故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志包括:根据故障事件身份标签从故障日志中确定出与故障事件身份标签相匹配的故障日志为目标故障日志,或根据应用包名从故障日志中确定出与应用包名相匹配的故障日志为目标故障日志。通过上述技术方案,故障管理模块可以确定出故障事件身份标签相匹配的故障日志或与应用包名相匹配的故障日志为目标故障日志。In an implementation manner, the fault management module determines from the fault log according to the fault event information that the fault log that matches the fault event information is the target fault log includes: The fault log whose label matches is the target fault log, or the fault log that matches the application package name is determined from the fault logs according to the application package name as the target fault log. Through the above technical solution, the fault management module can determine the fault log matching the fault event ID tag or the fault log matching the application package name as the target fault log.

在一种实现方式中,第二设备的故障管理模块在确定出目标故障日志后将目标故障日志发送给日志采集模块;日志采集模块将目标故障日志发送给日志上传通道模块;日志上传通道模块将目标故障日志上传给日志服务器。通过上述技术方案,将目标故障日志发送给日志采集模块,日志采集模块通过日志上传通道将目标故障日志上传给日志服务器,从而及时将异常问题发生时间点附近的日志上传给日志服务器。In one implementation, the fault management module of the second device sends the target fault log to the log collection module after determining the target fault log; the log collection module sends the target fault log to the log upload channel module; the log upload channel module sends The target failure log is uploaded to the log server. Through the above technical solution, the target fault log is sent to the log collection module, and the log collection module uploads the target fault log to the log server through the log upload channel, so as to timely upload the log near the time point when the abnormal problem occurs to the log server.

在一种实现方式中,第二设备的日志采集模块将目标故障日志进行打包压缩,并将压缩后的目标故障日志发送给日志上传通道模块;日志上传通道模块将压缩后的目标故障日志上传给日志服务器。通过上述技术方案,可以将目标故障日志进行压缩后上传到日志服务器中。In one implementation, the log collection module of the second device packs and compresses the target fault log, and sends the compressed target fault log to the log upload channel module; the log upload channel module uploads the compressed target fault log to the log server. Through the above technical solution, the target failure log can be compressed and uploaded to the log server.

在一种实现方式中,第二设备的日志上传通道模块将目标故障日志或压缩后的目标故障日志返回给日志采集模块;日志采集模块将返回结果上传给故障检测模块。通过上述技术方案,日志采集模块能够将目标故障日志或压缩后的目标故障日志的上传结果反馈给故障检测模块。In an implementation manner, the log upload channel module of the second device returns the target fault log or the compressed target fault log to the log collection module; the log collection module uploads the returned result to the fault detection module. Through the above technical solution, the log collection module can feed back the upload result of the target fault log or the compressed target fault log to the fault detection module.

在一种实现方式中,第二设备的日志采集模块响应反馈指令,生成诊断关闭指令;日志采集模块将诊断关闭指令发送给故障检测模块以通知故障检测模块退出远程诊断。通过上述技术方案,故障检测模块能够根据日志采集模块发送的诊断关闭指令退出对日志的远程诊断。In an implementation manner, the log collection module of the second device responds to the feedback instruction and generates a diagnosis shutdown instruction; the log collection module sends the diagnosis shutdown instruction to the fault detection module to notify the fault detection module to exit the remote diagnosis. Through the above technical solution, the fault detection module can quit the remote diagnosis of the log according to the diagnosis shutdown instruction sent by the log collection module.

在一种实现方式中,第二设备响应用户的操作,向第一设备发送抓取日志的指令。In an implementation manner, the second device sends an instruction to capture logs to the first device in response to the user's operation.

在一种实现方式中,第二设备响应用户对诊断分析控件的操作,向远程诊断平台发送抓取日志的指令。通过上述技术方案,第二设备可以响应用户点击诊断分析控件的操作,向第一设备发送抓取日志的指令,从而实现日志的抓取。In an implementation manner, the second device sends an instruction to capture logs to the remote diagnosis platform in response to the user's operation on the diagnosis analysis control. Through the above technical solution, the second device can respond to the user's operation of clicking the diagnostic analysis control, and send an instruction to capture logs to the first device, thereby realizing log capture.

在一种实现方式中,第二设备显示包括诊断分析控件的第一界面;响应用户点击诊断分析控件的操作,显示包括验证码栏位的第二界面;及通过验证码栏位接收用户输入的验证码,并在验证码验证通过后向远程诊断平台发送抓取日志的指令。通过上述技术方案,对用户在第二界面上显示的验证码栏位中输入的验证码验证通过后向远程诊断平台发送抓取日志的指令,从而实现日志的抓取。In one implementation, the second device displays the first interface including the diagnostic analysis control; in response to the user's operation of clicking the diagnostic analysis control, displays the second interface including the verification code field; and receives the user input through the verification code field The verification code, and after the verification code is verified, send the instruction of grabbing logs to the remote diagnosis platform. Through the above technical solution, after the verification code entered by the user in the verification code field displayed on the second interface is verified, an instruction to capture logs is sent to the remote diagnosis platform, thereby realizing log capture.

在一种实现方式中,第二设备还响应用户点击第二界面上的查看日志内容控件的操作,显示第三界面,其中第三界面上显示日志内容。通过上述技术方案,通过点击第二界面上的查看日志内容控件可以在第三界面上显示日志内容供用户查看。In an implementation manner, the second device further displays a third interface in response to the user's operation of clicking the view log content control on the second interface, where the log content is displayed on the third interface. Through the above technical solution, by clicking the view log content control on the second interface, the log content can be displayed on the third interface for the user to view.

在一种实现方式中,第一设备还被配置为:若第二设备上传过与故障事件对应的异常日志打点事件,获取的故障事件信息包括故障事件身份标签、应用包名;若第二设备未上传过与故障事件对应的异常日志打点事件,获取的故障事件信息包括故障事件的身份标签的范围、应用包名。通过上述技术方案,在第二设备上传过与故障事件对应的异常日志打点事件时,第一设备获取的故障事件信息包括故障事件身份标签、应用包名;在第二设备未上传过与故障事件对应的异常日志打点事件时,第一设备获取的故障事件信息包括故障事件的身份标签的范围、应用包名。In one implementation, the first device is further configured to: if the second device has uploaded an abnormal log management event corresponding to the fault event, the obtained fault event information includes the fault event identity tag and the application package name; if the second device No exception log management event corresponding to the fault event has been uploaded, and the obtained fault event information includes the scope of the identity tag of the fault event and the name of the application package. Through the above technical solution, when the second device has uploaded the abnormal log management event corresponding to the fault event, the fault event information obtained by the first device includes the fault event identity tag and the application package name; When the corresponding exception log is logged, the fault event information acquired by the first device includes the scope of the identity tag of the fault event and the name of the application package.

在一种实现方式中,第一设备的故障检测模块通过任务界面接收用户在任务界面上输入的包含故障事件信息的日志任务,并将日志任务作为远程诊断指令。上述技术方案能够通过任务界面设置远程诊断指令的内容。In an implementation manner, the fault detection module of the first device receives a log task including fault event information input by a user on the task interface through the task interface, and uses the log task as a remote diagnosis instruction. The above technical solution can set the content of the remote diagnosis instruction through the task interface.

在一种实现方式中,任务界面包括故障事件身份标签栏位、应用包名栏位、故障事件身份标签范围栏位,故障事件身份标签栏位用于获取故障事件的身份标签,故障事件身份标签范围栏位用于获取故障事件的身份标签的范围,应用包名栏位用于获取应用包名。上述技术方案,通过任务界面设置并获取故障事件的身份标签、应用包名或故障事件的身份标签的范围。In one implementation, the task interface includes a failure event identity label field, an application package name field, and a failure event identity label range field. The failure event identity label field is used to obtain the identity label of the failure event. The failure event identity label The scope field is used to obtain the scope of the identity label of the fault event, and the application package name field is used to obtain the application package name. In the above technical solution, the identity tag of the fault event, the application package name, or the range of the identity tag of the fault event are set and acquired through the task interface.

第二方面,本申请实施例提供一种日志获取方法,应用在终端设备中,所述方法包括:日志采集模块响应接收的远程诊断指令,从远程诊断指令中获取故障事件信息;日志采集模块将故障事件信息发送给故障管理模块,并通知故障管理模块获取与故障事件信息对应的日志;故障管理模块获取终端设备的故障日志,根据故障事件信息从故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志。本申请的上述技术方案中,日志采集模块将从第一设备接收的与异常问题对应的故障事件信息发送给故障管理模块,故障管理模块根据故障事件信息从获取的故障日志中确定出与故障事件信息相匹配的故障日志为目标故障日志,从而及时获取异常问题发生时间点附近的日志。In the second aspect, the embodiment of the present application provides a log acquisition method, which is applied in a terminal device. The method includes: the log acquisition module responds to the received remote diagnosis instruction, and obtains fault event information from the remote diagnosis instruction; the log acquisition module will Send the fault event information to the fault management module, and notify the fault management module to obtain the log corresponding to the fault event information; The failure log is the target failure log. In the above technical solution of the present application, the log collection module sends the fault event information corresponding to the abnormal problem received from the first device to the fault management module, and the fault management module determines the fault event information from the obtained fault log according to the fault event information. The fault log with matching information is the target fault log, so as to obtain the log near the time point when the abnormal problem occurred in time.

在一种实现方式中,故障管理模块获取终端设备在至少一业务领域中进行故障日志打点得到的故障日志。通过上述技术方案,可以针对至少一业务领域进行打点得到业务领域所对应的故障日志。In an implementation manner, the fault management module acquires fault logs obtained by terminal equipment in at least one business domain through fault log management. Through the above technical solution, at least one business field can be managed to obtain the fault log corresponding to the business field.

在一种实现方式中,获取终端设备在至少一业务领域中进行故障日志打点得到的故障日志包括:日志打点调用模块在至少一业务领域中进行故障日志打点得到至少一业务领域的打点信息,并将该组业务领域的打点信息发送到打点接口模块;打点接口模块根据至少一业务领域的打点信息确定出故障日志;故障管理模块从打点接口模块中获取故障日志。通过上述技术方案,故障管理模块从打点接口模块中获取针对业务领域进行打点的故障日志。In an implementation manner, obtaining the fault log obtained by the terminal device in at least one business domain through fault log management includes: the log management calling module performs fault log management in at least one business domain to obtain the management information of at least one business domain, and Send the dotting information of the group of business domains to the dotting interface module; the dotting interface module determines the fault log according to the dot information of at least one business field; the fault management module obtains the fault log from the dotting interface module. Through the above technical solution, the fault management module obtains the fault log for the management of the business field from the management interface module.

在一种实现方式中,故障事件信息包括故障事件身份标签或应用包名。In an implementation manner, the fault event information includes a fault event ID tag or an application package name.

在一种实现方式中,故障管理模块根据故障事件身份标签从故障日志中确定出与故障事件身份标签相匹配的故障日志为目标故障日志,或根据应用包名从故障日志中确定出与应用包名相匹配的故障日志为目标故障日志。通过上述技术方案,故障管理模块可以确定出故障事件身份标签相匹配的故障日志或与应用包名相匹配的故障日志为目标故障日志。In one implementation, the fault management module determines from the fault logs the fault log matching the fault event identity tag as the target fault log according to the fault event identity tag, or determines the The fault log whose name matches the target fault log. Through the above technical solution, the fault management module can determine the fault log matching the fault event ID tag or the fault log matching the application package name as the target fault log.

在一种实现方式中,所述方法还包括:故障管理模块在确定出目标故障日志后将目标故障日志发送给日志采集模块;日志采集模块将目标故障日志发送给日志上传通道模块;日志上传通道模块将目标故障日志上传给日志服务器。通过上述技术方案,将目标故障日志发送给日志采集模块,日志采集模块通过日志上传通道将目标故障日志上传给日志服务器,从而及时将异常问题发生时间点附近的日志上传给日志服务器。In one implementation, the method further includes: the fault management module sends the target fault log to the log collection module after determining the target fault log; the log collection module sends the target fault log to the log upload channel module; the log upload channel The module uploads the target failure log to the log server. Through the above technical solution, the target fault log is sent to the log collection module, and the log collection module uploads the target fault log to the log server through the log upload channel, so as to timely upload the log near the time point when the abnormal problem occurs to the log server.

在一种实现方式中,所述方法还包括:日志采集模块将目标故障日志进行打包压缩,并将压缩后的目标故障日志发送给日志上传通道模块;日志上传通道模块将压缩后的目标故障日志上传给日志服务器。通过上述技术方案,可以将目标故障日志进行压缩后上传到日志服务器中。In one implementation, the method further includes: the log collection module packs and compresses the target fault log, and sends the compressed target fault log to the log upload channel module; the log upload channel module compresses the compressed target fault log Upload to the log server. Through the above technical solution, the target failure log can be compressed and uploaded to the log server.

在一种实现方式中,所述方法还包括:日志上传通道模块将目标故障日志或压缩后的目标故障日志返回给日志采集模块;日志采集模块将返回结果上传给故障检测模块。通过上述技术方案,日志采集模块能够将目标故障日志或压缩后的目标故障日志的上传结果反馈给故障检测模块。In an implementation manner, the method further includes: the log upload channel module returns the target fault log or the compressed target fault log to the log collection module; the log collection module uploads the returned result to the fault detection module. Through the above technical solution, the log collection module can feed back the upload result of the target fault log or the compressed target fault log to the fault detection module.

在一种实现方式中,所述方法还包括:日志采集模块响应反馈指令,生成诊断关闭指令;日志采集模块将诊断关闭指令发送给故障检测模块以通知故障检测模块退出远程诊断。通过上述技术方案,故障检测模块能够根据日志采集模块发送的诊断关闭指令退出对日志的远程诊断。In an implementation manner, the method further includes: the log collection module responds to the feedback instruction and generates a diagnosis shutdown instruction; the log collection module sends the diagnosis shutdown instruction to the fault detection module to notify the fault detection module to exit the remote diagnosis. Through the above technical solution, the fault detection module can quit the remote diagnosis of the log according to the diagnosis shutdown instruction sent by the log collection module.

在一种实现方式中,所述方法还包括:响应用户的操作,向远程诊断平台发送抓取日志的指令。In an implementation manner, the method further includes: in response to the user's operation, sending an instruction of grabbing logs to the remote diagnosis platform.

在一种实现方式中,响应用户的操作,向远程诊断平台发送抓取日志的指令包括:响应用户对诊断分析控件的操作,向远程诊断平台发送抓取日志的指令。通过上述技术方案,第二设备可以响应用户点击小程序的诊断分析控件的操作,向第一设备发送抓取日志的指令,从而实现日志的抓取。In an implementation manner, in response to the user's operation, sending the instruction of capturing logs to the remote diagnosis platform includes: in response to the user's operation on the diagnostic analysis control, sending the instruction of capturing logs to the remote diagnosis platform. Through the above technical solution, the second device can respond to the user's operation of clicking the diagnostic analysis control of the applet, and send an instruction to capture logs to the first device, thereby realizing the capture of logs.

在一种实现方式中,响应用户对诊断分析控件的操作,向远程诊断平台发送抓取日志的指令包括:显示第一界面,第一界面上显示诊断分析控件;响应用户点击诊断分析控件的操作,显示第二界面,第二界面上显示验证码栏位;及通过验证码栏位接收用户输入的验证码,并在验证码验证通过后向远程诊断平台发送抓取日志的指令。通过上述技术方案,对用户在第二界面上显示的验证码栏位中输入的验证码验证通过后向远程诊断平台发送抓取日志的指令,从而实现日志的抓取。In one implementation, in response to the user's operation on the diagnostic analysis control, sending an instruction to grab logs to the remote diagnosis platform includes: displaying the first interface, on which the diagnostic analysis control is displayed; responding to the user's operation of clicking the diagnostic analysis control , displaying the second interface, the verification code field is displayed on the second interface; and the verification code input by the user is received through the verification code field, and an instruction to capture logs is sent to the remote diagnosis platform after the verification code is verified. Through the above technical solution, after the verification code entered by the user in the verification code field displayed on the second interface is verified, an instruction to capture logs is sent to the remote diagnosis platform, thereby realizing log capture.

在一种实现方式中,所述方法还包括:响应用户点击第二界面上的查看日志内容控件的操作,显示第三界面,其中第三界面上显示日志内容。通过上述技术方案,通过点击第二界面上的查看日志内容控件可以在第三界面上显示日志内容供用户查看。In an implementation manner, the method further includes: displaying a third interface in response to the user's operation of clicking the view log content control on the second interface, where the log content is displayed on the third interface. Through the above technical solution, by clicking the view log content control on the second interface, the log content can be displayed on the third interface for the user to view.

在一种实现方式中,所述方法还包括:故障管理模块将目标故障日志保存在日志服务目录中。通过上述技术方案,可以将目标故障日志进行保存。In an implementation manner, the method further includes: the fault management module saves the target fault log in a log service directory. Through the above technical solution, the target fault log can be saved.

第三方面,本申请实施例提供一种电子设备,包括处理器、存储器;其中处理器与存储器相耦合;存储器,用于存储程序指令;处理器,用于读取存储器中存储的程序指令,以实现如上的日志获取方法。In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory; wherein the processor is coupled to the memory; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory, To achieve the above log acquisition method.

第四方面,本申请实施例提供一种计算机存储介质,计算机存储介质存储有程序指令,当程序指令在电子设备运行时,使得电子设备执行如上述的日志获取方法。In a fourth aspect, the embodiment of the present application provides a computer storage medium, the computer storage medium stores program instructions, and when the program instructions are run on the electronic device, the electronic device executes the log acquisition method as described above.

另外,第三方面至第四方面所带来的技术效果可参见上述方法部分各设计的方法相关的描述,此处不再赘述。In addition, for the technical effects brought about by the third aspect to the fourth aspect, please refer to the descriptions related to the methods of each design in the above method part, and will not be repeated here.

附图说明Description of drawings

图1为本申请一实施例中电子设备的软件结构框图。FIG. 1 is a block diagram of a software structure of an electronic device in an embodiment of the present application.

图2为本申请一实施例中日志获取系统的架构图。FIG. 2 is an architecture diagram of a log acquisition system in an embodiment of the present application.

图3为本申请一实施例中日志获取方法的流程图。Fig. 3 is a flow chart of a log acquisition method in an embodiment of the present application.

图4a-图4d为本申请另一实施例中终端设备向远程诊断平台发送抓取日志的指令的应用场景图。4a-4d are diagrams of application scenarios in which a terminal device sends an instruction to capture a log to a remote diagnosis platform in another embodiment of the present application.

图5为本申请一实施例中显示诊断分析子界面的应用场景图。FIG. 5 is an application scene diagram showing a diagnostic analysis sub-interface in an embodiment of the present application.

图6为本发明一实施例中任务界面的示意图。Fig. 6 is a schematic diagram of a task interface in an embodiment of the present invention.

图7为本发明一实施例中电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of an electronic device in an embodiment of the present invention.

具体实施方式Detailed ways

以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的一些实施例的描述中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请的一些实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of some embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in some embodiments of the present application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请中的技术领域的技术人员通常理解的含义相同。本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。应理解,本申请中除非另有说明,“/”表示或的意思。例如,A/B可以表示A或B。本申请的一些实施例中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B三种情况。“至少一个”是指一个或者多个。“多个”是指两个或多于两个。例如,a、b或c中的至少一个,可以表示:a,b,c,a和b,a和c,b和c,a、b和c七种情况。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of this application. The terms used in the description of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. It should be understood that unless otherwise stated in this application, "/" means or. For example, A/B can mean either A or B. "And/or" in some embodiments of the present application is only an association relationship describing associated objects, indicating that there may be three relationships. For example, A and/or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. "At least one" means one or more. "A plurality" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.

本申请提供一种日志获取方法。所述日志获取方法应用在电子设备100中。参考图1,所示为本申请一实施例中电子设备100的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将电子设备100的Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。This application provides a log acquisition method. The log acquisition method is applied in the electronic device 100 . Referring to FIG. 1 , it is a block diagram showing a software structure of an electronic device 100 in an embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system of the electronic device 100 is divided into four layers, from top to bottom are application program layer, application program framework layer, Android runtime (Android runtime) and system library, and kernel layer.

应用程序层可以包括一系列应用。如图1所示,应用可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用。The application layer can include a series of applications. As shown in FIG. 1, applications may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

应用程序框架层为应用程序层的应用提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

所示,应用程序程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown, the application program framework layer may include window manager, content provider, view system, phone manager, resource manager, notification manager and so on.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.

内容提供器用来存放和获取数据,并使这些数据可以被应用访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data, and make these data accessible to applications. Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100 . For example, the management of call status (including connected, hung up, etc.).

资源管理器为应用提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.

通知管理器使应用可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,智能终端振动,指示灯闪烁等。The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the download completion, message reminder, etc. The notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is issued, the smart terminal vibrates, and the indicator light flashes, etc.

Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,G.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, G.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.

2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.

参考图2,所示为本申请一实施例中日志获取系统的架构图。日志获取系统10包括远程诊断平台20、终端设备30及日志服务器40。远程诊断平台20与终端设备30通信连接,终端设备30与日志服务器40通信连接。远程诊断平台20用于新增故障事件信息,并把故障事件信息发送给终端设备30。终端设备30用于查找与故障事件信息相匹配的故障日志,并把故障日志发送给日志服务器40。在本申请提供的上述实施例中,远程诊断平台可以被称为第一设备,终端设备30可以被称为第二设备。Referring to FIG. 2 , it is an architecture diagram of a log acquisition system in an embodiment of the present application. The log acquisition system 10 includes a remote diagnosis platform 20 , a terminal device 30 and a log server 40 . The remote diagnosis platform 20 communicates with the terminal device 30 , and the terminal device 30 communicates with the log server 40 . The remote diagnosis platform 20 is used to add fault event information and send the fault event information to the terminal device 30 . The terminal device 30 is used to search for a fault log matching the fault event information, and send the fault log to the log server 40 . In the above embodiments provided in the present application, the remote diagnosis platform may be referred to as a first device, and the terminal device 30 may be referred to as a second device.

本实施例中,远程诊断平台20包括故障检测模块201。终端设备30包括日志采集模块301、故障管理模块302、日志上传通道模块303、日志打点调用模块304、打点接口模块305。需要说明的是,本申请中的模块包括软件模块或硬件模块。本实施例中,日志采集模块301分别与故障管理模块302及日志上传通道模块303连接。日志打点调用模块304与打点接口模块305连接。打点接口模块305与故障管理模块302连接。如下,将结合图3的日志获取方法的各个步骤流程对日志获取系统包括10中的各个模块的功能进行介绍。In this embodiment, the remote diagnosis platform 20 includes a fault detection module 201 . The terminal device 30 includes a log collection module 301 , a fault management module 302 , a log upload channel module 303 , a log dot calling module 304 , and a dot interface module 305 . It should be noted that the modules in this application include software modules or hardware modules. In this embodiment, the log collection module 301 is connected to the fault management module 302 and the log upload channel module 303 respectively. The log dot calling module 304 is connected with the dot interface module 305 . The dot interface module 305 is connected with the fault management module 302 . As follows, the function of each module in the log acquisition system including 10 will be introduced in conjunction with the flow of each step of the log acquisition method in FIG. 3 .

请参考图3,所示为本申请一实施例中日志获取方法的流程图。所述方法包括如下步骤。Please refer to FIG. 3 , which is a flow chart of a log acquisition method in an embodiment of the present application. The method includes the following steps.

步骤S301,响应抓取日志的指令,远程诊断平台20的故障检测模块201将远程诊断指令发送给终端设备30的日志采集模块301,其中远程诊断指令中包括故障事件信息。Step S301 , in response to the instruction of grabbing logs, the fault detection module 201 of the remote diagnosis platform 20 sends the remote diagnosis instruction to the log collection module 301 of the terminal device 30 , wherein the remote diagnosis instruction includes fault event information.

在本实施中,终端设备30响应用户的操作,向远程诊断平台20发送抓取日志的指令。所述远程诊断平台20用于创建包含故障事件信息的日志任务,并将日志任务下发给终端设备30。例如,参考图4a-4d,所示为本申请一实施例中终端设备30向远程诊断平台20发送抓取日志的指令的应用场景图。本实施例中,参考图4a,点击终端设备30上显示的小程序后显示检测应用界面32,例如,所述小程序为荣耀手机的智能检测小程序。需要说明的是,所述小程序的应用图标显示在终端设备30的应用界面上,用户通过点击终端设备30的应用界面上的小程序的应用图标可以打开小程序的检测应用界面32。本实施例中,终端设备30响应用户对检测应用界面32的操作,向远程诊断平台20发送抓取日志的指令。具体的,当侦测到用户点击检测应用界面32上的诊断分析控件321的操作时,终端设备30显示诊断分析界面320(参考图4b)。所述诊断分析界面320显示有验证码栏位322。用户通过向后台系统发送手机号获取验证码,或通过拨打服务热线联系客服人员获取验证码。需要说明的是,后台系统为用于管理或控制终端设备30进行日志抓取的系统,例如后台系统可以为与终端设备30通信连接的服务器,或者后台系统可以与日志服务器40为同一装置。本实施例中,验证码为由数字、字母组成的字符串,用于对本次的日志的抓取进行安全验证。本实施例中,用户在验证码栏位322输入获取到的验证码后,终端设备30响应所述验证码,对所述验证码进行验证,并在验证通过后向远程诊断平台20发送抓取日志的指令,及显示诊断分析子界面323(参考图4c)供用户查看抓取的日志或退出日志的诊断。参考图5,所示为本申请一实施例中显示诊断分析子界面323的应用场景图。本实施例中,当所述验证码验证通过后,终端设备30还接收后台系统发送的通知消息31并在终端设备30的下拉菜单中显示所述通知消息。当侦测到用户点击终端设备30的下拉菜单栏中的通知消息31时,终端设备30显示诊断分析子界面323。所述诊断分析子界面323包括查看日志内容控件324、反馈控件325、退出控件326及问题描述窗口控件327。终端设备30响应用户点击查看日志内容控件324的操作,将匹配的日志内容进行显示以供用户查看(参考图4d)。需要说明的是,图4d所显示的日志内容可以是用户点击诊断分析子界面323上的查看日志内容控件324之后进行显示的,或者是用户点击检测应用界面32上的诊断分析控件321之后进行显示的,或者是用户在诊断分析子界面323的验证码栏位322中输入的验证码验证通过后进行显示的。本实施例中,终端设备30响应用户点击反馈控件325的操作,关闭日志的诊断。终端设备30响应用户点击退出控件326的操作,退出日志的诊断。终端设备30通过问题描述窗口控件327接收用户对故障事件的描述内容。In this implementation, the terminal device 30 sends an instruction to capture logs to the remote diagnosis platform 20 in response to the user's operation. The remote diagnosis platform 20 is used to create a log task containing fault event information, and send the log task to the terminal device 30 . For example, referring to FIGS. 4a-4d , it shows an application scenario diagram in which the terminal device 30 sends an instruction to capture logs to the remote diagnosis platform 20 in an embodiment of the present application. In this embodiment, referring to FIG. 4 a , the detection application interface 32 is displayed after clicking on the applet displayed on the terminal device 30 , for example, the applet is the smart detection applet of the Honor mobile phone. It should be noted that the application icon of the applet is displayed on the application interface of the terminal device 30 , and the user can open the detection application interface 32 of the applet by clicking the application icon of the applet on the application interface of the terminal device 30 . In this embodiment, the terminal device 30 sends an instruction to capture logs to the remote diagnosis platform 20 in response to the user's operation on the detection application interface 32 . Specifically, when it is detected that the user clicks on the operation of the diagnostic analysis control 321 on the detection application interface 32, the terminal device 30 displays the diagnostic analysis interface 320 (refer to FIG. 4b ). The diagnostic analysis interface 320 displays a verification code field 322 . The user obtains the verification code by sending the mobile phone number to the background system, or by calling the service hotline to contact the customer service personnel to obtain the verification code. It should be noted that the background system is a system for managing or controlling the terminal device 30 to perform log capture. For example, the background system may be a server connected to the terminal device 30 in communication, or the background system and the log server 40 may be the same device. In this embodiment, the verification code is a character string composed of numbers and letters, and is used for security verification of this log capture. In this embodiment, after the user enters the obtained verification code in the verification code field 322, the terminal device 30 responds to the verification code, verifies the verification code, and sends a capture to the remote diagnosis platform 20 after the verification is passed. log instructions, and display the diagnostic analysis sub-interface 323 (refer to FIG. 4 c ) for users to view captured logs or exit log diagnostics. Referring to FIG. 5 , it is an application scene diagram showing a diagnostic analysis sub-interface 323 in an embodiment of the present application. In this embodiment, after the verification code is verified, the terminal device 30 also receives a notification message 31 sent by the background system and displays the notification message in the pull-down menu of the terminal device 30 . When it is detected that the user clicks the notification message 31 in the pull-down menu bar of the terminal device 30 , the terminal device 30 displays the diagnosis analysis sub-interface 323 . The diagnostic analysis sub-interface 323 includes a view log content control 324 , a feedback control 325 , an exit control 326 and a problem description window control 327 . In response to the user's operation of clicking the view log content control 324, the terminal device 30 displays the matched log content for the user to view (refer to FIG. 4d ). It should be noted that the log content shown in FIG. 4d may be displayed after the user clicks the view log content control 324 on the diagnostic analysis sub-interface 323, or after the user clicks the diagnostic analysis control 321 on the detection application interface 32. or it is displayed after the verification code input by the user in the verification code field 322 of the diagnostic analysis sub-interface 323 is verified. In this embodiment, the terminal device 30 closes the log diagnosis in response to the user's operation of clicking the feedback control 325 . In response to the user's operation of clicking the exit control 326, the terminal device 30 exits the log diagnosis. The terminal device 30 receives the user's description of the fault event through the problem description window control 327 .

本实施例中,远程诊断平台20的故障检测模块201响应终端设备30发送的抓取日志的指令,将携带有故障事件信息的远程诊断指令发送给终端设备30的日志采集模块301。需要说明的是,故障检测模块201通过一任务界面接收远程诊断平台20侧的工作人员在所述任务界面50上输入的包含故障事件信息的日志任务,并将所述日志任务作为远程诊断指令。具体地,故障检测模块201响应终端设备30发送的抓取日志的指令,显示任务界面50。参考图6,所示为本申请一实施例中的任务界面50的示意图。所述任务界面50包括任务名称栏位、超时时长栏位、故障事件身份标签(ID)栏位、故障事件身份标签范围栏位,应用包名栏位,故障类型栏位。需要说明的是,任务名称栏位用于获取日志任务的名称。本实施例中,故障检测模块201的系统自动分配并录入任务名称到任务名称栏位。超时时长栏位用于获取日志任务的故障事件的超时时长。故障事件身份标签栏位用于获取故障事件的身份标签。故障事件身份标签范围栏位用于获取故障事件的身份标签的范围。应用包名栏位用于获取日志任务的应用包名。故障类型栏位用于获取故障事件的类型。需要说明的是,故障事件的类型包括,但不限于应用类(如系统/第三方应用、通信社交、多媒体等)、可靠性类(如死机、重启、升级等)性能类(如卡顿、启动慢等)、功耗类(如续航、发热、充电等)、通信类(如通话、短信、信号、数据等)、短距类(如WiFi、蓝牙、GPS、NFC等)、器件类(如传感、指纹、屏幕、红外等)。In this embodiment, the fault detection module 201 of the remote diagnosis platform 20 sends the remote diagnosis command carrying fault event information to the log collection module 301 of the terminal device 30 in response to the log capture command sent by the terminal device 30 . It should be noted that the fault detection module 201 receives the log task including fault event information input by the staff on the remote diagnosis platform 20 side on the task interface 50 through a task interface, and uses the log task as a remote diagnosis command. Specifically, the fault detection module 201 displays the task interface 50 in response to the command to capture logs sent by the terminal device 30 . Referring to FIG. 6 , it is a schematic diagram of a task interface 50 in an embodiment of the present application. The task interface 50 includes a task name field, a timeout duration field, a fault event ID tag (ID) field, a fault event ID tag range field, an application package name field, and a fault type field. It should be noted that the task name column is used to obtain the name of the log task. In this embodiment, the system of the fault detection module 201 automatically assigns and enters the task name into the task name column. The timeout period field is used to obtain the timeout period of the failure event of the log task. The Fault Event ID Tag field is used to get the ID tag of the fault event. The Fault Event ID Tag Range field is used to get the range of the fault event ID tag. The application package name field is used to obtain the application package name of the log task. The failure type field is used to obtain the type of failure event. It should be noted that the types of fault events include, but are not limited to, application categories (such as system/third-party applications, communication and social networking, multimedia, etc.), reliability categories (such as crashes, restarts, upgrades, etc.), performance categories (such as freezing, Slow start, etc.), power consumption (such as battery life, heating, charging, etc.), communication (such as calls, text messages, signals, data, etc.), short-range categories (such as WiFi, Bluetooth, GPS, NFC, etc.), device categories ( Such as sensing, fingerprint, screen, infrared, etc.).

需要说明的是,远程诊断平台20可以在获取到抓取日志的指令之前根据终端设备30是否上传过与故障事件对应的异常日志打点事件确定故障事件信息。若终端设备30上传过与故障事件对应的异常日志打点事件,远程诊断平台20通过任务界面50获取的故障事件信息包括故障事件身份标签,应用包名。若终端设备30未上传过与故障事件对应的异常日志打点事件,远程诊断平台20通过任务界面50获取的故障事件信息包括:故障事件的身份标签的范围、应用包名。It should be noted that the remote diagnosis platform 20 can determine the fault event information according to whether the terminal device 30 has uploaded an abnormal log event corresponding to the fault event before obtaining the command to grab the log. If the terminal device 30 has uploaded an abnormal log management event corresponding to the fault event, the fault event information acquired by the remote diagnosis platform 20 through the task interface 50 includes the fault event identity tag and the application package name. If the terminal device 30 has not uploaded an abnormal log management event corresponding to the fault event, the fault event information obtained by the remote diagnosis platform 20 through the task interface 50 includes: the scope of the identity tag of the fault event, and the application package name.

步骤S302,响应远程诊断指令,日志采集模块301打开诊断开关,并从远程诊断指令中获取故障事件信息。Step S302, in response to the remote diagnosis instruction, the log collection module 301 turns on the diagnosis switch, and obtains fault event information from the remote diagnosis instruction.

步骤S303,日志采集模块301将故障事件信息发送给故障管理模块302,并通知故障管理模块302获取与故障事件信息对应的日志。In step S303, the log collection module 301 sends the fault event information to the fault management module 302, and notifies the fault management module 302 to obtain logs corresponding to the fault event information.

步骤S304,故障管理模块301获取所述终端设备30的故障日志,根据所述故障事件信息从所述故障日志中确定出与所述故障事件信息相匹配的故障日志为目标故障日志。In step S304, the fault management module 301 obtains the fault log of the terminal device 30, and determines from the fault logs according to the fault event information that the fault log matching the fault event information is the target fault log.

本实施例中,日志采集模块301打开诊断开关后,从远程诊断指令中获取故障事件身份标签、应用包名,或从远程诊断指令中获取故障事件身份标签的范围、应用包名。日志采集模块301将故障事件标签或应用包名发送给故障管理模块302,并通知故障管理模块302获取故障事件标签对应的日志或应用包名对应的进程日志。故障管理模块302获取终端设备30在一组业务领域中进行故障日志打点得到的故障日志,根据故障事件身份标签从所述故障日志中确定出与故障事件身份标签相匹配的故障日志为目标故障日志,或根据应用包名从所述故障日志中确定出与应用包名相匹配的故障日志为目标故障日志。In this embodiment, after the log collection module 301 turns on the diagnosis switch, it obtains the fault event identity tag and application package name from the remote diagnosis command, or obtains the range of the fault event identity tag and the application package name from the remote diagnosis command. The log collection module 301 sends the fault event tag or the application package name to the fault management module 302, and notifies the fault management module 302 to obtain the log corresponding to the fault event tag or the process log corresponding to the application package name. The fault management module 302 acquires the fault logs obtained by the terminal device 30 in a group of business domains through fault log management, and determines from the fault logs the fault log that matches the fault event identity tag as the target fault log according to the fault event identity tag , or determine the fault log matching the application package name from the fault logs according to the application package name as the target fault log.

本实施例中,故障管理模块302获取终端设备30在一组业务领域中进行故障日志打点得到的故障日志包括:日志打点调用模块304在该组业务领域中进行故障日志打点得到该组业务领域的打点信息,并将该组业务领域的打点信息发送到打点接口模块305;打点接口模块305根据该组业务领域的打点信息确定出故障日志;所述故障管理模块302从打点接口模块305中获取故障日志。在获取到故障日志后,故障管理模块302通过远程诊断插件处理故障日志得到目标故障日志。具体地,远程诊断插件根据故障事件身份标签从所述故障日志中确定出与故障事件身份标签相匹配的故障日志,或根据应用包名从所述故障日志中确定出与应用包名相匹配的故障日志。In this embodiment, the fault management module 302 acquires the fault logs obtained by the terminal device 30 in a group of business fields through fault log management, including: the log management module 304 performs fault log management in the group of business fields to obtain the fault logs of the group of business fields Dot information, and the dot information of this group of business fields is sent to the dot interface module 305; The dot interface module 305 determines the failure log according to the dot information of this group of business fields; the fault management module 302 obtains the fault from the dot interface module 305 log. After obtaining the fault log, the fault management module 302 processes the fault log through the remote diagnosis plug-in to obtain the target fault log. Specifically, the remote diagnosis plug-in determines the fault log that matches the fault event identity tag from the fault log according to the fault event identity tag, or determines the fault log that matches the application package name from the fault log according to the application package name. Fault log.

本实施例中,所述业务领域包括,但不限于稳定性领域、性能领域。所述稳定性领域包括ANR、crash、tombstone、watching中的至少一种。所述性能领域包括启动时长、界面切换、响应时长中的至少一种。In this embodiment, the business domain includes, but is not limited to, the stability domain and the performance domain. The stability field includes at least one of ANR, crash, tombstone, and watching. The performance domain includes at least one of startup time, interface switching, and response time.

步骤S305,故障管理模块302将目标故障日志进行保存。In step S305, the fault management module 302 saves the target fault log.

本实施例中,故障管理模块302将目标故障日志保存在终端设备30的指定的文件目录下,例如,将目标故障日志保存在终端设备30的日志服务(LogService)目录。In this embodiment, the fault management module 302 saves the target fault log in a specified file directory of the terminal device 30 , for example, saves the target fault log in a log service (LogService) directory of the terminal device 30 .

步骤S306,故障管理模块302将目标故障日志发送给日志采集模块301。Step S306 , the fault management module 302 sends the target fault log to the log collection module 301 .

步骤S307,日志采集模块301将目标故障日志进行打包压缩。In step S307, the log collection module 301 packs and compresses the target fault log.

步骤S308,日志采集模块301响应反馈指令,关闭诊断开关并生成诊断关闭指令。In step S308, the log collection module 301 responds to the feedback instruction, turns off the diagnosis switch and generates a diagnosis turn-off instruction.

参考图4C,当侦测到用户点击终端设备30的诊断分析子界面323上的反馈控件325后,日志采集模块301生成反馈指令。所述日志采集模块301根据所述反馈指令关闭诊断开关,并生成诊断关闭指令。Referring to FIG. 4C , when it is detected that the user clicks the feedback control 325 on the diagnostic analysis sub-interface 323 of the terminal device 30 , the log collection module 301 generates a feedback instruction. The log collection module 301 turns off the diagnosis switch according to the feedback instruction, and generates a diagnosis turn-off instruction.

步骤S309,日志采集模块301将诊断关闭指令发送给故障检测模块201以通知故障检测模块201退出远程诊断。In step S309, the log collection module 301 sends a diagnosis shutdown command to the fault detection module 201 to notify the fault detection module 201 to exit the remote diagnosis.

步骤S310,日志采集模块301将目标故障日志或压缩后的目标故障日志发送给日志上传通道模块303。Step S310 , the log collection module 301 sends the target fault log or the compressed target fault log to the log upload channel module 303 .

步骤S311,日志上传通道模块303将目标故障日志或压缩后的目标故障日志上传给日志服务器40,并返回上传结果给日志采集模块301。Step S311 , the log upload channel module 303 uploads the target fault log or the compressed target fault log to the log server 40 , and returns the upload result to the log collection module 301 .

步骤S312,日志采集模块301将返回结果上传故障检测模块201。Step S312 , the log collection module 301 uploads the returned result to the fault detection module 201 .

参考图7,所示为本申请一实施例中电子设备100的硬件结构示意图。所述电子设备100包括远程诊断平台20、终端设备30或远程诊断平台20的终端设备30组合。例如,所述电子设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请的一些实施例对该电子设备100的具体类型不作特殊限制。Referring to FIG. 7 , it is a schematic diagram of a hardware structure of an electronic device 100 in an embodiment of the present application. The electronic device 100 includes a remote diagnosis platform 20 , a terminal device 30 or a combination of terminal devices 30 of the remote diagnosis platform 20 . For example, the electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cell phone, a personal Digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, wearable equipment, vehicle equipment, smart home Devices and/or smart city devices, some embodiments of the present application do not specifically limit the specific type of the electronic device 100 .

电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .

I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.

PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.

MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (displayserial interface, DSI), and the like. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .

GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备100,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices 100, such as AR devices.

可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备100供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device 100 through the power management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.

在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.

视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.

内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (non-volatile memory, NVM).

随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5 SDRAM)等;Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous dynamic random access memory, SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5 SDRAM), etc.;

非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Non-volatile memory may include magnetic disk storage devices, flash memory (flash memory).

快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universalflash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。According to the operating principle, flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the potential order of storage cells, it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), triple-level cell (TLC), quad-level cell (QLC), etc., can include universal flash storage (English: universal flash storage, UFS), An embedded multimedia memory card (embedded multi media Card, eMMC), etc.

随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用的数据等。The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of an operating system or other running programs, and can also be used to store user and application data.

非易失性存储器也可以存储可执行程序和存储用户及应用的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory can also store executable programs and store user and application data, etc., and can be loaded into random access memory in advance for the processor 110 to directly read and write.

外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 can be used to connect an external non-volatile memory, so as to expand the storage capacity of the electronic device 100 . The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external non-volatile memory.

内部存储器121或外部存储器接口120用于存储一个或多个计算机程序。一个或多个计算机程序被配置为被该处理器110执行。该一个或多个计算机程序包括多个指令,多个指令被处理器110执行时,可实现上述实施例中在电子设备100上执行的日志获取方法,以实现电子设备100的日志获取功能。The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 110 . The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 110 , the method for acquiring logs executed on the electronic device 100 in the above-mentioned embodiments can be implemented, so as to implement the log acquisition function of the electronic device 100 .

电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .

扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.

受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the receiver 170B can be placed close to the human ear to receive the voice.

麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.

耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备100平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of theUSA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.

陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.

加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备100姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device 100, and can be applied to applications such as horizontal and vertical screen switching, pedometers, etc.

距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.

接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.

环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.

指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.

温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .

骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.

SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .

本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的日志获取方法。This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to realize the log acquisition method in the above embodiment.

另外,本申请的一些实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的日志获取方法。In addition, some embodiments of the present application also provide a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor may execute the computer-executable instructions stored in the memory, so that the chip executes the log acquisition method in each method embodiment above.

其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Wherein, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated according to needs It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined Or it can be integrated into another device, or some features can be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The unit described as a separate component may or may not be physically separated, and a component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请的一些实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of some embodiments of the present application are essentially or part of the contribution to the prior art, or all or part of the technical solutions can be embodied in the form of software products, and the software products are stored in a The storage medium includes several instructions for enabling a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .

最后应说明的是,以上实施例仅用以说明本申请的一些实施例的技术方案而非限制,尽管参照较佳实施例对本申请的一些实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的一些实现例的技术方案进行修改或等同替换,而不脱离本申请的一些实施例的技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of some embodiments of the present application and not to limit them. Although some embodiments of the present application have been described in detail with reference to preferred embodiments, those of ordinary skill in the art should It is understood that the technical solutions of some implementation examples of the present application may be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of some embodiments of the present application.

Claims (26)

1.一种日志获取系统,包括第一设备和第二设备,所述第一设备和所述第二设备通信连接,其特征在于:1. A log acquisition system, comprising a first device and a second device, the first device and the second device are connected in communication, characterized in that: 所述第一设备被配置为:The first device is configured to: 响应抓取日志的指令,所述第一设备的故障检测模块将远程诊断指令发送给所述第二设备的日志采集模块,其中所述远程诊断指令包括故障事件信息,若所述第二设备上传过与故障事件对应的异常日志打点事件,所述故障事件信息包括故障事件身份标签、应用包名,若所述第二设备未上传过与所述故障事件对应的异常日志打点事件,所述故障事件信息包括所述故障事件的身份标签的范围、应用包名;In response to the instruction of grabbing logs, the fault detection module of the first device sends a remote diagnosis instruction to the log collection module of the second device, wherein the remote diagnosis instruction includes fault event information, if the second device uploads The abnormal log management event corresponding to the fault event, the fault event information includes the fault event identity tag, the application package name, if the second device has not uploaded the abnormal log management event corresponding to the fault event, the fault event The event information includes the scope of the identity label of the fault event and the name of the application package; 所述第二设备被配置为:The second device is configured to: 响应所述远程诊断指令,从所述远程诊断指令中获取故障事件信息;Responding to the remote diagnosis instruction, acquiring fault event information from the remote diagnosis instruction; 所述日志采集模块将所述故障事件信息发送给故障管理模块,并通知所述故障管理模块获取与所述故障事件信息对应的日志;The log collection module sends the fault event information to the fault management module, and notifies the fault management module to obtain a log corresponding to the fault event information; 所述故障管理模块获取所述第二设备的故障日志,根据所述故障事件信息从所述故障日志中确定出与所述故障事件信息相匹配的故障日志为目标故障日志,包括:根据所述故障事件身份标签、所述应用包名从所述故障日志中确定出与所述故障事件身份标签、所述应用包名相匹配的故障日志为目标故障日志;或根据所述故障事件身份标签的范围、所述应用包名从所述故障日志中确定出与所述故障事件的身份标签的范围、所述应用包名相匹配的故障日志为目标故障日志。The fault management module acquires the fault log of the second device, and determines from the fault log according to the fault event information that the fault log matching the fault event information is the target fault log, including: according to the The fault event identity tag and the application package name determine from the fault log that the fault log matching the fault event identity tag and the application package name is the target fault log; or according to the fault event identity tag The scope and the application package name determine from the fault logs that the fault log matching the scope of the identity tag of the fault event and the application package name is the target fault log. 2.如权利要求1所述的日志获取系统,其特征在于,所述故障管理模块获取所述第二设备的故障日志包括:2. The log acquisition system according to claim 1, wherein the fault management module acquiring the fault log of the second device comprises: 获取所述第二设备在至少一业务领域中进行故障日志打点得到的故障日志。Obtaining fault logs obtained by the second device performing fault log management in at least one business domain. 3.如权利要求2所述的日志获取系统,其特征在于,所述获取所述第二设备在至少一业务领域中进行故障日志打点得到的故障日志包括:3. The log acquisition system according to claim 2, wherein said acquisition of the fault log obtained by the second device in at least one business field through fault log management includes: 日志打点调用模块在所述至少一业务领域中进行故障日志打点得到所述至少一业务领域的打点信息,并将所述至少一业务领域的打点信息发送到打点接口模块;The log management calling module performs fault log management in the at least one business domain to obtain the management information of the at least one business domain, and sends the management information of the at least one business domain to the management interface module; 所述打点接口模块根据所述至少一业务领域的打点信息确定出故障日志;The point management interface module determines the fault log according to the point management information of the at least one business field; 所述故障管理模块从所述打点接口模块中获取故障日志。The fault management module acquires fault logs from the dotting interface module. 4.如权利要求1所述的日志获取系统,其特征在于,所述第二设备还被配置为:4. The log acquisition system according to claim 1, wherein the second device is further configured to: 所述故障管理模块在确定出目标故障日志后将所述目标故障日志发送给日志采集模块;The fault management module sends the target fault log to the log collection module after determining the target fault log; 所述日志采集模块将所述目标故障日志发送给日志上传通道模块;The log collection module sends the target failure log to the log upload channel module; 所述日志上传通道模块将所述目标故障日志上传给日志服务器。The log upload channel module uploads the target fault log to a log server. 5.如权利要求4所述的日志获取系统,其特征在于,所述第二设备还被配置为:5. The log acquisition system according to claim 4, wherein the second device is further configured to: 所述日志采集模块将所述目标故障日志进行打包压缩,并将压缩后的所述目标故障日志发送给日志上传通道模块;The log collection module packs and compresses the target fault log, and sends the compressed target fault log to the log upload channel module; 所述日志上传通道模块将压缩后的所述目标故障日志上传给所述日志服务器。The log upload channel module uploads the compressed target fault log to the log server. 6.如权利要求5所述的日志获取系统,其特征在于,所述第二设备还被配置为:6. The log acquisition system according to claim 5, wherein the second device is further configured to: 所述日志上传通道模块将所述目标故障日志或压缩后的所述目标故障日志返回给日志采集模块;The log upload channel module returns the target fault log or the compressed target fault log to the log collection module; 所述日志采集模块将返回结果上传给所述故障检测模块。The log collection module uploads the returned result to the fault detection module. 7.如权利要求4所述的日志获取系统,其特征在于,所述第二设备还被配置为:7. The log acquisition system according to claim 4, wherein the second device is further configured to: 所述日志采集模块响应反馈指令,生成诊断关闭指令;The log collection module responds to the feedback instruction and generates a diagnosis shutdown instruction; 所述日志采集模块将所述诊断关闭指令发送给所述故障检测模块以通知所述故障检测模块退出远程诊断。The log collection module sends the diagnosis closing instruction to the fault detection module to notify the fault detection module to exit the remote diagnosis. 8.如权利要求1所述的日志获取系统,其特征在于,所述第二设备还被配置为:8. The log acquisition system according to claim 1, wherein the second device is further configured to: 响应用户的操作,向所述第一设备发送所述抓取日志的指令。In response to the user's operation, sending the instruction of grabbing logs to the first device. 9.如权利要求8所述的日志获取系统,其特征在于,所述第二设备响应用户的操作,向所述第一设备发送所述抓取日志的指令包括:9. The log acquisition system according to claim 8, wherein the second device responds to the user's operation, and sending the instruction for grabbing the log to the first device includes: 响应用户对诊断分析控件的操作,向远程诊断平台发送所述抓取日志的指令。In response to the user's operation on the diagnosis and analysis control, the instruction of grabbing the log is sent to the remote diagnosis platform. 10.如权利要求9所述的日志获取系统,其特征在于,响应用户对诊断分析控件的操作,向远程诊断平台发送所述抓取日志的指令包括:10. The log acquisition system according to claim 9, wherein, in response to the user's operation on the diagnostic analysis control, sending the command to grab the log to the remote diagnostic platform includes: 显示第一界面,所述第一界面上显示诊断分析控件;displaying a first interface, where diagnostic analysis controls are displayed on the first interface; 响应用户点击所述诊断分析控件的操作,显示第二界面,所述第二界面上显示验证码栏位;及In response to the user's operation of clicking the diagnostic analysis control, a second interface is displayed, and a verification code field is displayed on the second interface; and 通过所述验证码栏位接收用户输入的验证码,并在所述验证码验证通过后向远程诊断平台发送所述抓取日志的指令。The verification code input by the user is received through the verification code field, and the instruction of grabbing logs is sent to the remote diagnosis platform after the verification code is verified. 11.如权利要求10所述的日志获取系统,其特征在于,所述第二设备还被配置为:11. The log acquisition system according to claim 10, wherein the second device is further configured to: 响应用户点击所述第二界面上的查看日志内容控件的操作,显示第三界面,其中所述第三界面上显示日志内容。In response to the user's operation of clicking the view log content control on the second interface, a third interface is displayed, wherein the log content is displayed on the third interface. 12.如权利要求1所述的日志获取系统,其特征在于,所述第一设备还被配置为:12. The log acquisition system according to claim 1, wherein the first device is further configured to: 所述故障检测模块通过任务界面接收用户在所述任务界面上输入的包含故障事件信息的日志任务,并将所述日志任务作为所述远程诊断指令。The fault detection module receives a log task including fault event information input by a user on the task interface through the task interface, and uses the log task as the remote diagnosis instruction. 13.如权利要求12所述的日志获取系统,其特征在于,所述任务界面包括故障事件身份标签栏位、应用包名栏位、故障事件身份标签范围栏位,所述故障事件身份标签栏位用于获取故障事件的身份标签,所述故障事件身份标签范围栏位用于获取故障事件的身份标签的范围,所述应用包名栏位用于获取应用包名。13. The log acquisition system according to claim 12, wherein the task interface includes a failure event identity label field, an application package name field, and a failure event identity label range field, and the failure event identity label field The bit is used to obtain the identity tag of the fault event, the fault event identity tag range field is used to obtain the range of the fault event identity tag, and the application package name field is used to obtain the application package name. 14.一种日志获取方法,应用在终端设备中,其特征在于,所述方法包括:14. A log acquisition method applied in a terminal device, characterized in that the method comprises: 日志采集模块响应接收的远程诊断指令,从所述远程诊断指令中获取故障事件信息,其中若第二设备上传过与故障事件对应的异常日志打点事件,所述故障事件信息包括故障事件身份标签、应用包名,若所述第二设备未上传过与所述故障事件对应的异常日志打点事件,所述故障事件信息包括所述故障事件的身份标签的范围、应用包名;The log acquisition module responds to the received remote diagnosis instruction, and obtains fault event information from the remote diagnosis instruction, wherein if the second device has uploaded an abnormal log event corresponding to the fault event, the fault event information includes the fault event identity tag, Application package name, if the second device has not uploaded an abnormal log management event corresponding to the fault event, the fault event information includes the scope of the identity tag of the fault event and the application package name; 所述日志采集模块将所述故障事件信息发送给故障管理模块,并通知所述故障管理模块获取与所述故障事件信息对应的日志;The log collection module sends the fault event information to the fault management module, and notifies the fault management module to obtain a log corresponding to the fault event information; 所述故障管理模块获取所述终端设备的故障日志,根据所述故障事件信息从所述故障日志中确定出与所述故障事件信息相匹配的故障日志为目标故障日志,包括:根据所述故障事件身份标签、所述应用包名从所述故障日志中确定出与所述故障事件身份标签、所述应用包名相匹配的故障日志为目标故障日志;或根据所述故障事件身份标签的范围、所述应用包名从所述故障日志中确定出与所述故障事件的身份标签的范围、所述应用包名相匹配的故障日志为目标故障日志。The fault management module obtains the fault log of the terminal device, and determines from the fault log according to the fault event information that the fault log matching the fault event information is the target fault log, including: according to the fault event information The event identity tag and the application package name determine from the fault log that the fault log matching the fault event identity tag and the application package name is the target fault log; or according to the scope of the fault event identity tag The application package name determines from the fault logs the fault log that matches the scope of the identity tag of the fault event and the application package name as the target fault log. 15.如权利要求14所述的日志获取方法,其特征在于,所述故障管理模块获取所述终端设备的故障日志包括:15. The log obtaining method according to claim 14, wherein the fault management module obtaining the fault log of the terminal device comprises: 获取所述终端设备在至少一业务领域中进行故障日志打点得到的故障日志。Obtaining fault logs obtained by performing fault log management in at least one business field of the terminal device. 16.如权利要求15所述的日志获取方法,其特征在于,所述获取所述终端设备在至少一业务领域中进行故障日志打点得到的故障日志包括:16. The log acquisition method according to claim 15, wherein said acquisition of the fault log obtained by the terminal device in at least one business field through fault log management comprises: 日志打点调用模块在所述至少一业务领域中进行故障日志打点得到所述至少一业务领域的打点信息,并将所述至少一业务领域的打点信息发送到打点接口模块;The log management calling module performs fault log management in the at least one business domain to obtain the management information of the at least one business domain, and sends the management information of the at least one business domain to the management interface module; 所述打点接口模块根据所述至少一业务领域的打点信息确定出故障日志;The point management interface module determines the fault log according to the point management information of the at least one business field; 所述故障管理模块从所述打点接口模块中获取故障日志。The fault management module acquires fault logs from the dotting interface module. 17.如权利要求14所述的日志获取方法,其特征在于,所述方法还包括:17. The log acquisition method according to claim 14, wherein the method further comprises: 所述故障管理模块在确定出目标故障日志后将所述目标故障日志发送给日志采集模块;The fault management module sends the target fault log to the log collection module after determining the target fault log; 所述日志采集模块将所述目标故障日志发送给日志上传通道模块;The log collection module sends the target failure log to the log upload channel module; 所述日志上传通道模块将所述目标故障日志上传给日志服务器。The log upload channel module uploads the target fault log to a log server. 18.如权利要求17所述的日志获取方法,其特征在于,所述方法还包括:18. The log acquisition method according to claim 17, wherein the method further comprises: 所述日志采集模块将所述目标故障日志进行打包压缩,并将压缩后的所述目标故障日志发送给日志上传通道模块;The log collection module packs and compresses the target fault log, and sends the compressed target fault log to the log upload channel module; 所述日志上传通道模块将压缩后的所述目标故障日志上传给所述日志服务器。The log upload channel module uploads the compressed target fault log to the log server. 19.如权利要求18所述的日志获取方法,其特征在于,所述方法还包括:19. The log acquisition method according to claim 18, wherein the method further comprises: 所述日志上传通道模块将所述目标故障日志或压缩后的所述目标故障日志返回给日志采集模块;The log upload channel module returns the target fault log or the compressed target fault log to the log collection module; 所述日志采集模块将返回结果上传给故障检测模块。The log collection module uploads the returned result to the fault detection module. 20.如权利要求14所述的日志获取方法,其特征在于,所述方法还包括:20. The log acquisition method according to claim 14, wherein the method further comprises: 所述日志采集模块响应反馈指令,生成诊断关闭指令;The log collection module responds to the feedback instruction and generates a diagnosis shutdown instruction; 所述日志采集模块将所述诊断关闭指令发送给故障检测模块以通知所述故障检测模块退出远程诊断。The log collection module sends the diagnosis closing instruction to the fault detection module to notify the fault detection module to exit the remote diagnosis. 21.如权利要求14所述的日志获取方法,其特征在于,所述方法还包括:21. The log acquisition method according to claim 14, wherein the method further comprises: 响应用户的操作,向远程诊断平台发送抓取日志的指令。In response to the user's operation, an instruction to capture logs is sent to the remote diagnosis platform. 22.如权利要求21所述的日志获取方法,其特征在于,所述响应用户的操作,向远程诊断平台发送抓取日志的指令包括:22. The log acquisition method according to claim 21, wherein the response to the user's operation, sending an instruction to grab logs to the remote diagnosis platform comprises: 响应用户对诊断分析控件的操作,向远程诊断平台发送所述抓取日志的指令。In response to the user's operation on the diagnosis and analysis control, the instruction of grabbing the log is sent to the remote diagnosis platform. 23.如权利要求22所述的日志获取方法,其特征在于,所述响应用户对诊断分析控件的操作,向远程诊断平台发送所述抓取日志的指令包括:23. The log acquisition method according to claim 22, wherein, in response to the user's operation on the diagnostic analysis control, sending the command to grab the log to the remote diagnostic platform includes: 显示第一界面,所述第一界面上显示诊断分析控件;displaying a first interface, where diagnostic analysis controls are displayed on the first interface; 响应用户点击所述诊断分析控件的操作,显示第二界面,所述第二界面上显示验证码栏位;及In response to the user's operation of clicking the diagnostic analysis control, a second interface is displayed, and a verification code field is displayed on the second interface; and 通过所述验证码栏位接收用户输入的验证码,并在所述验证码验证通过后向远程诊断平台发送所述抓取日志的指令。The verification code input by the user is received through the verification code field, and the instruction of grabbing logs is sent to the remote diagnosis platform after the verification code is verified. 24.如权利要求23所述的日志获取方法,其特征在于,所述方法还包括:24. The log acquisition method according to claim 23, wherein the method further comprises: 响应用户点击所述第二界面上的查看日志内容控件的操作,显示第三界面,其中所述第三界面上显示日志内容。In response to the user's operation of clicking the view log content control on the second interface, a third interface is displayed, wherein the log content is displayed on the third interface. 25.一种电子设备,其特征在于,包括处理器、存储器;其中所述处理器与所述存储器相耦合;25. An electronic device, comprising a processor and a memory; wherein the processor is coupled to the memory; 所述存储器,用于存储程序指令;The memory is used to store program instructions; 所述处理器,用于读取所述存储器中存储的所述程序指令,以实现如权利要求14至24中任一项所述的日志获取方法。The processor is configured to read the program instructions stored in the memory, so as to realize the log acquisition method according to any one of claims 14 to 24. 26.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序指令,当所述程序指令在电子设备上运行时,使得电子设备执行如权利要求14至24中任一项所述的日志获取方法。26. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores program instructions, and when the program instructions are run on the electronic device, the electronic device executes any one of claims 14-24. One of the described log acquisition methods.
CN202110977395.0A 2021-08-24 2021-08-24 Log acquisition system, method, electronic device and storage medium Active CN113704014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110977395.0A CN113704014B (en) 2021-08-24 2021-08-24 Log acquisition system, method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110977395.0A CN113704014B (en) 2021-08-24 2021-08-24 Log acquisition system, method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113704014A CN113704014A (en) 2021-11-26
CN113704014B true CN113704014B (en) 2022-11-01

Family

ID=78668914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110977395.0A Active CN113704014B (en) 2021-08-24 2021-08-24 Log acquisition system, method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113704014B (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022442B (en) * 2021-12-16 2023-06-09 荣耀终端有限公司 Audio fault time location method, electronic equipment and storage medium
CN114510197A (en) * 2021-12-31 2022-05-17 四川爱联科技股份有限公司 Storage method and device and electronic equipment
CN114490257B (en) * 2022-01-13 2022-10-21 星河智联汽车科技有限公司 Method, device and equipment for collecting logs of vehicle
CN114553731B (en) * 2022-02-25 2024-10-22 深圳市普渡科技有限公司 Data log acquisition system, method, equipment and medium
CN116049112B (en) * 2022-05-19 2024-07-30 荣耀终端有限公司 Method and system for reporting multi-device logs
CN116033466B (en) * 2022-07-22 2023-11-24 荣耀终端有限公司 Fault detection system, method and storage medium
CN115460071B (en) * 2022-07-27 2023-09-29 荣耀终端有限公司 Fault positioning method and device
CN115225472A (en) * 2022-07-29 2022-10-21 深圳市星卡软件技术开发有限公司 A log collection method, device and computer equipment
CN116049122B (en) * 2022-08-12 2023-11-21 荣耀终端有限公司 Log information transmission control method, electronic device and storage medium
CN116723079B (en) * 2022-10-31 2025-04-01 荣耀终端股份有限公司 Log capture method, electronic device and computer readable storage medium
CN116662129B (en) * 2022-11-02 2024-07-23 荣耀终端有限公司 Log acquisition method, device, chip, electronic device and medium
CN115576738B (en) * 2022-12-08 2023-03-03 中诚华隆计算机技术有限公司 Method and system for realizing equipment fault determination based on chip analysis
CN116414102A (en) * 2023-01-19 2023-07-11 上汽大众汽车有限公司 Fault diagnosis method of vehicle-mounted online service system
CN117130808B (en) * 2023-02-22 2024-07-12 荣耀终端有限公司 Log acquisition method and electronic equipment
CN116225855B (en) * 2023-05-10 2023-09-12 荣耀终端有限公司 Log generation method, electronic equipment and storage medium
CN117687880B (en) * 2023-08-03 2024-10-08 荣耀终端有限公司 Log processing method and device
CN117714665B (en) * 2023-08-17 2024-12-24 荣耀终端有限公司 Abnormality detection method, electronic device, and readable medium
CN117724894B (en) * 2023-08-30 2024-08-23 荣耀终端有限公司 Method for starting test program and electronic equipment
CN117931492A (en) * 2023-12-27 2024-04-26 河南昆仑技术有限公司 Risk processing method and device and computing equipment
CN118041753B (en) * 2024-04-15 2024-10-22 慧翰微电子股份有限公司 Fault analysis method, device and equipment of eSIM terminal equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414255A (en) * 2007-10-19 2009-04-22 国际商业机器公司 Method and apparatus for processing log event
CN109861841A (en) * 2018-11-09 2019-06-07 华为技术有限公司 A method and device for operating and maintaining processing equipment
CN111726239A (en) * 2019-03-20 2020-09-29 上海全好数码科技有限公司 Fault analysis pre-diagnosis system based on computer network equipment log
CN111708651A (en) * 2020-05-18 2020-09-25 北京奇艺世纪科技有限公司 Log acquisition, portrait generation and fault positioning method, device and related equipment
CN112214459A (en) * 2020-10-12 2021-01-12 成都精灵云科技有限公司 Resource processing flow log collection system based on event mechanism

Also Published As

Publication number Publication date
CN113704014A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
CN114650363B (en) Image display method and electronic device
WO2021052263A1 (en) Voice assistant display method and device
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN110737493A (en) theme switching method and device
CN113986369B (en) Internet of things equipment control method and system, electronic equipment and storage medium
CN113641271A (en) Application window management method, terminal device and computer-readable storage medium
CN115513571A (en) Battery temperature control method and terminal equipment
CN113380240B (en) Voice interaction method and electronic device
CN116048831A (en) A target signal processing method and electronic equipment
CN114816028A (en) Screen refreshing method, electronic device and computer-readable storage medium
CN115017227A (en) Data synchronization method and related equipment
CN115016666B (en) Touch processing method, terminal equipment and storage medium
CN115482143B (en) Applied image data calling methods, systems, electronic devices and storage media
CN113704209B (en) Data sharing method, electronic device and storage medium
CN113487272B (en) Schedule activity conflict judgment method, electronic device and storage medium
CN116662130A (en) Method for counting application usage time, electronic device and readable storage medium
CN115981756A (en) Data processing method, related device and communication system
CN114489469A (en) A data reading method, electronic device and storage medium
CN115529379B (en) Method, electronic device and storage medium for preventing bluetooth audio track from shaking
CN115952564B (en) Data writing method and terminal equipment
CN114942741B (en) Data transmission method and electronic device
HK40080860A (en) Method for calling image data of app, and system, electronic device, and storage medium
CN115700462A (en) Shortcut display system, method and related device
CN116095623A (en) Data transmission method, system and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230912

Address after: 201306 building C, No. 888, Huanhu West 2nd Road, Lingang New Area, Pudong New Area, Shanghai

Patentee after: Shanghai Glory Smart Technology Development Co.,Ltd.

Address before: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee before: Honor Device Co.,Ltd.

TR01 Transfer of patent right