CN107609120A - Log information report method, device and storage medium, ADSP and terminal - Google Patents
Log information report method, device and storage medium, ADSP and terminal Download PDFInfo
- Publication number
- CN107609120A CN107609120A CN201710824064.7A CN201710824064A CN107609120A CN 107609120 A CN107609120 A CN 107609120A CN 201710824064 A CN201710824064 A CN 201710824064A CN 107609120 A CN107609120 A CN 107609120A
- Authority
- CN
- China
- Prior art keywords
- log information
- log
- target
- reporting
- digital signal
- 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.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及移动终端的日志控制技术领域,尤其涉及一种日志信息上报方法、装置及存储介质、ADSP和终端。The embodiments of the present application relate to the technical field of log control of mobile terminals, and in particular to a log information reporting method, device, storage medium, ADSP, and terminal.
背景技术Background technique
在移动终端上一般设置有一个音频数字信号处理器(advanced digital signalprocessor,ADSP),该处理器会集中管理移动终端上的所有传感器,可以节省移动终端应用处理器(Application Processor,AP)的很多资源。由于ADSP和AP是两个独立的处理器,所以传感器日志(log)信息的传递存储机制很复杂,相关技术中的日志上报控制方法存在缺陷,需要改进。Generally, an audio digital signal processor (advanced digital signal processor, ADSP) is installed on the mobile terminal, and the processor will centrally manage all the sensors on the mobile terminal, which can save a lot of resources of the mobile terminal application processor (Application Processor, AP). . Since the ADSP and the AP are two independent processors, the transmission and storage mechanism of sensor log (log) information is very complicated, and the log reporting control method in the related art has defects and needs to be improved.
发明内容Contents of the invention
本申请实施例提供一种日志信息上报方法、装置及存储介质、ADSP和终端,可以优化ADSP的日志信息上报方案。The embodiment of the present application provides a log information reporting method, device, storage medium, ADSP and terminal, which can optimize the log information reporting scheme of the ADSP.
在第一方面,本申请实施例提供了一种日志信息上报方法,包括:In the first aspect, the embodiment of the present application provides a method for reporting log information, including:
当前音频数字信号处理器接收到所在终端的应用处理器发送的用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型;The current audio digital signal processor receives a log acquisition instruction for acquiring target log information sent by the application processor of the terminal where it is located, and the log type of the target log information is the target log type;
根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率;A log information processing rule is set according to the log acquisition instruction, and the log information processing rule indicates that the current audio digital signal processor only generates or only reports the target log information, so as to reduce the input of the current audio digital signal processor to the The frequency with which the application processor reports log information;
将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。Reporting the target log information to the application processor according to the log information processing rule.
在第二方面,本申请实施例提供了一种日志信息上报装置,包括:In the second aspect, the embodiment of the present application provides a log information reporting device, including:
日志获取指令接收模块,用于当前音频数字信号处理器接收到所在终端的应用处理器发送的用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型;The log acquisition instruction receiving module is used for the current audio digital signal processor to receive the log acquisition instruction for acquiring the target log information sent by the application processor of the terminal where it is located, and the log type of the target log information is the target log type;
日志信息处理规则设置模块,用于根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率;A log information processing rule setting module, configured to set a log information processing rule according to the log acquisition instruction, and the log information processing rule indicates that the current audio digital signal processor only generates or only reports the target log information, so as to reduce the The frequency at which the current audio digital signal processor reports log information to the application processor;
日志信息上报模块,用于将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。A log information reporting module, configured to report the target log information to the application processor according to the log information processing rules.
第三方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面所提供的日志信息上报方法。In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for reporting log information as provided in the first aspect is implemented.
在第四方面,本申请实施例提供了一种移动终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行时实现如第一方面所提供的日志信息上报方法。In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor implements the computer program provided in the first aspect when executed. The log information reporting method.
本申请实施例通过由移动终端的应用处理器确定待获取的目标日志信息,所述目标日志信息的日志类型为目标日志类型,并将生成的用于获取目标日志信息的日志获取指令发送至所述移动终端的音频数字信号处理器,所述音频数字信号处理器根据所述日志获取指令设置日志信息处理规则,将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器,降低了日志信息的上报数量,减小了音频数字信号处理器向所述应用处理器上报日志信息的频率,降低了应用处理器的功耗。In the embodiment of the present application, the application processor of the mobile terminal determines the target log information to be acquired, the log type of the target log information is the target log type, and sends the generated log acquisition instruction for acquiring the target log information to the The audio digital signal processor of the mobile terminal, the audio digital signal processor sets log information processing rules according to the log acquisition instruction, and reports the target log information to the application processor according to the log information processing rules, The number of reported log information is reduced, the frequency of reporting log information to the application processor by the audio digital signal processor is reduced, and the power consumption of the application processor is reduced.
附图说明Description of drawings
图1为本申请实施例提供的一种日志信息上报过程示意图Figure 1 is a schematic diagram of a log information reporting process provided by the embodiment of the present application
图2是本申请实施例提供的一种日志信息上报方法的流程图;FIG. 2 is a flow chart of a method for reporting log information provided in an embodiment of the present application;
图3是本申请实施例提供的另一种日志信息上报方法的流程图;FIG. 3 is a flow chart of another method for reporting log information provided by an embodiment of the present application;
图4是本申请实施例提供的另一种日志信息上报方法的流程图;FIG. 4 is a flow chart of another log information reporting method provided by an embodiment of the present application;
图5是本申请实施例提供的一种日志信息上报装置的结构示意图;FIG. 5 is a schematic structural diagram of a log information reporting device provided in an embodiment of the present application;
图6是本申请实施例提供的一种移动终端的结构示意图;FIG. 6 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present application;
图7是本申请实施例提供的一种移动终端的另一结构示意图。FIG. 7 is another schematic structural diagram of a mobile terminal provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图对本申请具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。In order to make the purpose, technical solution and advantages of the present application clearer, specific embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only parts relevant to the present application are shown in the drawings but not all content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe various operations (or steps) as sequential processing, many of the operations may be performed in parallel, concurrently, or simultaneously. In addition, the order of operations can be rearranged. The process may be terminated when its operations are complete, but may also have additional steps not included in the figure. The processing may correspond to a method, function, procedure, subroutine, subroutine, or the like.
为了便于理解本申请实施例,下面以高通平台音频数字信号处理器(AudioDigital Dignal Processor,ADSP)架构为例对ADSP日志传输过程进行简要介绍。其中,ADSP架构是指:传感器挂载在ADSP上,ADSP管理终端内的所有传感器,在这种架构下,所有的传感器与ADSP进行交互,然后ADSP与应用处理器(Application Processor,AP)进行交互。ADSP上生成的日志信息主要是传感器的日志信息,还包括ADSP上电、掉电状态等系统日志信息。In order to facilitate the understanding of the embodiment of the present application, the ADSP log transmission process is briefly introduced below by taking the Qualcomm platform audio digital signal processor (Audio Digital Signal Processor, ADSP) architecture as an example. Among them, the ADSP architecture refers to: the sensor is mounted on the ADSP, and the ADSP manages all the sensors in the terminal. Under this architecture, all the sensors interact with the ADSP, and then the ADSP interacts with the application processor (Application Processor, AP). . The log information generated on the ADSP is mainly the log information of the sensor, and also includes system log information such as ADSP power-on and power-off status.
ADSP上可挂载环境光传感器、接近传感器、陀螺仪及加速度传感器等传感器,这些传感器会生成传感器日志(Sensor Log),其中,传感器日志可包括传感器的状态信息(如是否出现故障,处于何种工作状态等)以及工作过程中涉及到的各种数据(如采集的数据及各种判定阈值等),对于不同的传感器,所生成的传感器日志可能存在差异,本申请实施例不再一一举例。图1为本申请实施例提供的一种日志信息上报过程示意图。传感器日志由传感器生成,由于传感器挂载在ADSP上,所以需要通过ADSP传输至AP。在ADSP生成日志信息之后直接存入ADSP的日志缓冲区中,待日志缓冲区中存满以后按照一定的上报方式通过ADSP与AP之间的通信路径,将日志缓冲区中的日志信息上报至AP,其中,所述通信路径可以为通过共享内存(Shared Memory Driver,SMD)、进程间通信(Inter-Process Communication,IPC)及高通消息接口(Qualcom Message Interface,QMI)将日志信息传送至AP的Diagnostic task,进而传送至AP的文件系统或者QXDM工具。其中,Diagnostic task是一个诊断进程,QXDM(The QUALCOMM Extensible Diagnostic Monitor)是高通公司的可以对移动终端所发数据进行跟踪的工具,可通过对数据的分析进行相关测试或诊断。开启日志开关之后,在日志信息的传输过程中,日志信息一般是以字符串的形式传输的,其数据量是比较大的,而日志缓冲区的存储空间有限,日志缓冲区很快就会被填满,导致日志缓冲区中的日志信息一直向AP端进行上报,而AP端在接收到ADSP端上报的日志信息后就会去响应,导致AP端无法休眠,且需要频繁的去接收和处理日志信息,使AP端的功耗较大。若关闭日志开关,那么就会导致很多传感器相关的问题,由于缺乏底层驱动的日志信息而需要进行反复压力测试,徒增测试时间,严重影响对传感器相关问题的分析及解决效率。Sensors such as ambient light sensors, proximity sensors, gyroscopes, and acceleration sensors can be mounted on the ADSP, and these sensors will generate a sensor log (Sensor Log). Working status, etc.) and various data involved in the working process (such as collected data and various judgment thresholds, etc.), for different sensors, the generated sensor logs may be different, and the embodiments of the present application will not give examples one by one. . FIG. 1 is a schematic diagram of a log information reporting process provided by an embodiment of the present application. The sensor log is generated by the sensor. Since the sensor is mounted on the ADSP, it needs to be transmitted to the AP through the ADSP. After the ADSP generates the log information, it is directly stored in the ADSP’s log buffer. After the log buffer is full, the log information in the log buffer is reported to the AP through the communication path between the ADSP and the AP according to a certain reporting method. , wherein, the communication path can be through the shared memory (Shared Memory Driver, SMD), inter-process communication (Inter-Process Communication, IPC) and high-pass message interface (Qualcom Message Interface, QMI) to transmit the log information to the Diagnostic of AP task, and then sent to the AP's file system or QXDM tool. Among them, the Diagnostic task is a diagnostic process, and QXDM (The QUALCOMM Extensible Diagnostic Monitor) is a tool of Qualcomm that can track the data sent by the mobile terminal, and can perform related tests or diagnoses through data analysis. After the log switch is turned on, during the transmission of log information, the log information is generally transmitted in the form of character strings, and the amount of data is relatively large. However, the storage space of the log buffer is limited, and the log buffer will be quickly deleted. It is full, causing the log information in the log buffer to be reported to the AP all the time, and the AP will respond after receiving the log information reported by the ADSP, which makes the AP unable to sleep and needs to receive and process frequently log information, so that the power consumption of the AP side is relatively large. If the log switch is turned off, it will cause many sensor-related problems. Due to the lack of log information of the underlying driver, repeated stress tests are required, which will increase the test time and seriously affect the analysis and resolution of sensor-related problems.
接下来,将分别介绍日志信息的相关数据结构和日志信息的读取情景。Next, the relevant data structure of the log information and the reading scenario of the log information will be introduced respectively.
1、日志信息的相关数据结构。1. The related data structure of the log information.
struct logger_entry是一个用于描述一条Log记录的结构体。len成员变量记录了这条记录的有效负载的长度,有效负载指定的日志记录本身的长度。__pad成员变量是用来对齐结构体的。pid和tid成员变量分别用来记录是哪条进程写入了这条记录。sec和nsec成员变量记录日志写的时间。msg成员变量记录的就是有效负载的内容了,它的大小由len成员变量来确定。struct logger_entry is a structure used to describe a Log record. The len member variable records the length of the payload of this record, and the payload specifies the length of the log record itself. The __pad member variable is used to align the structure. The pid and tid member variables are used to record which process wrote this record respectively. The sec and nsec member variables record the time when the log was written. The msg member variable records the content of the payload, and its size is determined by the len member variable.
结构体struct logger_log就是真正用来保存日志的地方了。buffer成员变量变是用保存日志信息的内存缓冲区,它的大小由size成员变量确定。从misc成员变量可以看出,日志驱动程序使用的设备属于misc类型的设备,wq成员变量是一个等待队列,用于保存正在等待读取日志的进程。readers成员变量用来保存当前正在读取日志的进程,正在读取日志的进程由结构体logger_reader来描述。mutex成员变量是一个互斥量,用来保护log的并发访问。w_off成员变量用来记录下一条日志应该从哪里开始写。head成员变量用来表示打开日志文件中,应该从哪一个位置开始读取日志。The structure struct logger_log is the place where the log is actually saved. The buffer member variable is used to save the memory buffer of the log information, and its size is determined by the size member variable. It can be seen from the misc member variable that the device used by the log driver belongs to the misc type device, and the wq member variable is a waiting queue for saving the process waiting to read the log. The readers member variable is used to save the process that is currently reading the log, and the process that is reading the log is described by the structure logger_reader. The mutex member variable is a mutex used to protect concurrent access to the log. The w_off member variable is used to record where the next log should start to be written. The head member variable is used to indicate from which position in the open log file the log should be read.
2、日志信息的读取情景。2. Reading scenario of log information.
读取日志设备文件的方法为logger_read:The method to read the log device file is logger_read:
新打开日志设备文件时,是从log->head位置开始读取日志的,保存在structlogger_reader的成员变量r_off中。start标号处的while循环是在等待日志可读,如果已经没有新的日志可读了,那么就要读进程就要进入休眠状态,等待新的日志写入后再唤醒,这是通过prepare_wait和schedule两个调用来实现的。如果没有新的日志可读,并且设备文件不是以非阻塞O_NONBLOCK的方式打开或者这时有信号要处理(signal_pending(current)),那么就直接返回,不再等待新的日志写入。判断当前是否有新的日志可读的方法是:ret=(log->w_off==reader->r_off);即判断当前缓冲区的写入位置和当前读进程的读取位置是否相等,如果不相等,则说明有新的日志可读。继续向下看,如果有新的日志可读,那么就来获取下一条可读的日志记录的长度,从这里可以看出,日志读取进程可以日志记录为单位进行读取,一次只读取一条记录。需要说明的是,日志信息的读取和日志信息的上报是两个相对的过程,在某些情况下由应用处理器主动读取音频数字信号处理器中的日志信息,在某些情况次下由音频数字信号处理器主动向应用处理器上报日志信息,但是日志信息的读取和日志信息的上报机制和原理类似。When the log device file is newly opened, the log is read from the log->head position, which is saved in the member variable r_off of structlogger_reader. The while loop at the start label is waiting for the log to be readable. If there is no new log to be read, then the reading process will go to sleep and wait for the new log to be written before waking up. This is through prepare_wait and schedule Two calls to achieve. If there is no new log to read, and the device file is not opened in a non-blocking O_NONBLOCK mode or there is a signal to be processed at this time (signal_pending(current)), then return directly without waiting for a new log to be written. The method for judging whether there is a new log readable at present is: ret=(log->w_off==reader->r_off); that is, judging whether the writing position of the current buffer is equal to the reading position of the current reading process, if not If they are equal, it means that there is a new log to read. Continue to look down, if there is a new log to read, then get the length of the next readable log record, from here we can see that the log reading process can read in units of log records, and only read at a time one record. It should be noted that the reading of log information and the reporting of log information are two relative processes. In some cases, the application processor actively reads the log information in the audio digital signal processor, and in some cases The audio digital signal processor actively reports the log information to the application processor, but the mechanism and principle of reading the log information and reporting the log information are similar.
图2给出了本申请实施例提供的一种日志信息上报方法的流程图,本实施例的方法可以由日志信息上报装置来执行,该装置可通过硬件和/或软件的方式实现,所述装置可作为移动终端一部分设置在所述移动终端的内部,例如设置在移动终端的ADSP中。本实施例提供的方法适用于移动终端中的ADSP生成日志信息,向AP进行上报的情况。Figure 2 shows a flow chart of a method for reporting log information provided by an embodiment of the present application. The method of this embodiment can be executed by a device for reporting log information, which can be implemented by means of hardware and/or software. The device can be set inside the mobile terminal as a part of the mobile terminal, for example, set in the ADSP of the mobile terminal. The method provided in this embodiment is applicable to the case where the ADSP in the mobile terminal generates log information and reports it to the AP.
如图2所示,本实施例提供的日志信息上报方法包括以下步骤:As shown in Figure 2, the log information reporting method provided by this embodiment includes the following steps:
步骤101、终端的应用处理器发送用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型。Step 101. The application processor of the terminal sends a log acquisition instruction for acquiring target log information, where the log type of the target log information is the target log type.
步骤102、当前音频数字信号处理器接收到所述应用处理器发送的所述日志获取指令。当前音频数字信号处理器为所述终端上的音频数字信号处理器。Step 102, the current audio digital signal processor receives the log acquisition instruction sent by the application processor. The current audio digital signal processor is the audio digital signal processor on the terminal.
本申请实施中所述的终端包括但不限定于手机、笔记本或者电脑等配置有音频数字信号处理器和应用处理器的设备。The terminals mentioned in the implementation of this application include but are not limited to mobile phones, notebooks, or computers equipped with audio digital signal processors and application processors.
其中,所述应用处理发送的所述日志获取指令可以在所述应用处理器接收到用户作用于所在终端的操作指令之后生成。即应用处理器接收到用户作用于移动终端的日志获取指令后,将所述日志获取指令下发至音频数字信号处理器,例如,应用处理器接收到用户点击某个应用程序的日志开关产生的日志获取指令,确定目标日志信息为该应用程序的日志信息,并将用于获取该应用程序的日志获取指令下发至音频数字信号处理器。该步骤这样设置的原因是:应用处理器根据用户的操作来确定待获取的目标日志信息,音频数字信号处理器可有针对性的只处理目标日志信息,大大降低了日志信息的处理量和日志上报的频率,从而降低了应用处理器的功耗。Wherein, the log acquisition instruction sent by the application processor may be generated after the application processor receives an operation instruction from the user acting on the terminal. That is, after the application processor receives the log acquisition instruction that the user acts on the mobile terminal, it sends the log acquisition instruction to the audio digital signal processor. The log acquisition instruction determines that the target log information is the log information of the application program, and sends the log acquisition instruction for obtaining the application program to the audio digital signal processor. The reason for setting this step is: the application processor determines the target log information to be acquired according to the user's operation, and the audio digital signal processor can only process the target log information in a targeted manner, which greatly reduces the amount of log information processing and log information. reported frequency, thereby reducing the power consumption of the application processor.
其中,日志类型可基于传感器类型、日志信息内容、日志级别或ADSP架构功能域等进行分类。以下列举几种分类方式作为示意性说明。Among them, the log type can be classified based on sensor type, log information content, log level, or ADSP architecture functional domain. Several classification methods are listed below as illustrative illustrations.
可选的,在基于传感器类型分类时,可按照传感器的名称分类,例如传感器名称与日志类型一一对应;也可按照传感器的功能分类,例如,陀螺仪及加速度传感器等传感器是用于检测移动终端的运动数据的,可对应运动日志类型,环境光传感器和接近传感器是用于检测外界环境变化的,可对应环境日志类型;还可按照传感器的优先级进行分类,该优先级可以用于表征传感器日志上报的优先级。Optionally, when classifying based on sensor type, it can be classified according to the name of the sensor, for example, the sensor name corresponds to the log type one by one; it can also be classified according to the function of the sensor, for example, sensors such as gyroscopes and acceleration sensors are used to detect movement The motion data of the terminal can correspond to the type of motion log. The ambient light sensor and the proximity sensor are used to detect changes in the external environment and can correspond to the type of environmental log. It can also be classified according to the priority of the sensor, which can be used to represent The priority of sensor log reporting.
可选的,在基于日志信息内容分类时,可按照日志信息内容的类型分类,例如,传感器的工作状态为一类,传感器的异常情况为一类,传感器采集的数据为一类,传感器的校准数据为一类,传感器的判定阈值为一类等等;也可按照日志信息内容的重要程度分类,例如,传感器的状态信息的重要程度高于传感器采集的数据和判定阈值,可将不同传感器的状态信息对应一个日志类型,将不同传感器采集的数据和判定阈值对应另外一个日志类型。Optionally, when classifying based on the log information content, it can be classified according to the type of log information content, for example, the working status of the sensor is one category, the abnormal situation of the sensor is one category, the data collected by the sensor is one category, and the calibration of the sensor is one category. The data is classified into one category, the judgment threshold of the sensor is one category, etc.; it can also be classified according to the importance of the content of the log information. For example, the status information of the sensor is more important than the data collected by the sensor and the judgment threshold. The status information corresponds to one log type, and the data collected by different sensors and the judgment threshold correspond to another log type.
可选的,在基于日志级别分类时,一般从日志级别由低向高可包括以下几类:DEBUG(调试,表示所有合理的调试用日志),INFO(信息,表示正常使用时的日志),WARN(警告,表示可能有问题,还没发生错误),ERROR(错误,表示有问题并导致出错),FATAL(致命,表示有问题导致运行时发生致命错误,通常导致重启)。Optionally, when classifying based on the log level, the log level generally includes the following categories from low to high: DEBUG (debugging, indicating all reasonable debugging logs), INFO (information, indicating logs during normal use), WARN (warning, indicating that there may be a problem, and no error has occurred), ERROR (error, indicating that there is a problem and causing an error), FATAL (fatal, indicating that there is a problem that causes a fatal error during runtime, usually resulting in a restart).
可选的,在基于ADSP架构功能域分类时,可将不同功能域(功能模块)产生的日志信息分别对应一种日志类型。例如,传感器管理模块(Sensors Manager,Smgr)对应一种日志类型,传感器校准管理模块(Sensors Calibration Manager)对应一种日志类型,传感器算法管理模块(Sensors Alorithm Manager)对应一种日志类型等等。Optionally, when classifying functional domains based on the ADSP architecture, log information generated by different functional domains (functional modules) may correspond to a log type respectively. For example, a sensor management module (Sensors Manager, Smgr) corresponds to a log type, a sensor calibration management module (Sensors Calibration Manager) corresponds to a log type, a sensor algorithm management module (Sensors Alorithm Manager) corresponds to a log type, and so on.
当然,所述日志类型的分类还可基于其他因素进行分类,例如将日志信息基于当前运行的应用程序和音频数字信号处理器系统本身而分为两类等,也可以基于其他分类方法对日志类型进行分类,本实施例对此并不进行限制。Of course, the classification of the log types can also be classified based on other factors, for example, the log information is divided into two categories based on the currently running application program and the audio digital signal processor system itself, etc., and the log types can also be classified based on other classification methods. Classification is performed, which is not limited in this embodiment.
如上述对日志类型的分类,应用处理器端可先确定具有目标日志类型的目标日志信息,并向音频数字信号处理器端下发用于获取目标日志信息的日志获取指令,所述音频数字信号处理器接收所述日志获取指令。According to the above classification of log types, the application processor can first determine the target log information with the target log type, and issue a log acquisition instruction for obtaining the target log information to the audio digital signal processor end, the audio digital signal The processor receives the log acquisition instruction.
示例性的,所述目标日志类型为当前运行的应用程序,所述目标日志信息为当前运行的应用程序所生成的所有日志信息,例如,当前运行的应用程序为通话,一般通话应用程序下接近传感器、加速度传感器和环境光传感器处于工作状态,相应生成各个传感器的日志信息,那么将接近传感器、加速度传感器和环境光传感器的日志信息作为目标日志信息。Exemplarily, the target log type is the currently running application, and the target log information is all log information generated by the currently running application, for example, the currently running application is a call, and the general call application approaches The sensor, the acceleration sensor and the ambient light sensor are in the working state, and the log information of each sensor is correspondingly generated, so the log information of the proximity sensor, the acceleration sensor and the ambient light sensor is used as the target log information.
步骤103、所述音频数字信号处理器根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率。Step 103, the audio digital signal processor sets a log information processing rule according to the log acquisition instruction, and the log information processing rule instructs the current audio digital signal processor to only generate or report the target log information, so as to reduce the The frequency at which the current audio digital signal processor reports log information to the application processor.
在接收到应用处理器发送的日志获取指令之后,设置日志信息的处理规则,该处理规则突破现有技术中对日志信息的处理规则,指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,这样设置的原因是:减小当前音频数字信号处理器向应用处理器上报日志信息的频率,以降低唤醒应用处理器的频率,进而降低应用处理器的功耗。After receiving the log acquisition instruction sent by the application processor, set the processing rules of the log information, which break through the processing rules of the log information in the prior art, and instruct the current audio digital signal processor to only generate or only report the target Log information, the reason for this setting is to reduce the frequency of reporting log information to the application processor by the current audio digital signal processor, so as to reduce the frequency of waking up the application processor, thereby reducing the power consumption of the application processor.
示例性的,若日志获取指令为用于获取通话这个应用程序的日志信息,那么音频数字信号处理器可以设置相应的日志信息处理规则,即仅生成通话这个应用程序的日志信息,或者仅上报通话这个应用程序的日志信息。Exemplarily, if the log acquisition instruction is used to obtain the log information of the call application, then the audio digital signal processor can set the corresponding log information processing rules, that is, only generate the call call application log information, or only report the call call Log information for this application.
步骤104、所述音频数字信号处理器将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。Step 104, the audio digital signal processor reports the target log information to the application processor according to the log information processing rule.
在日志信息处理规则为仅生成目标日志信息时,只生成目标日志信息并将所述目标日志信息上报至应用处理器;在日志信息处理规则为仅上报目标日志信息时,生成目标日志信息并仅将目标日志信息上报至应用处理器。When the log information processing rule is to only generate target log information, only generate target log information and report the target log information to the application processor; when the log information processing rule is to only report target log information, generate target log information and only Report target log information to the application processor.
本实施例提供的日志信息上报方法,通过由移动终端的应用处理器确定待获取的目标日志信息,所述目标日志信息的日志类型为目标日志类型,并将生成的用于获取目标日志信息的日志获取指令发送至所述移动终端的音频数字信号处理器,所述音频数字信号处理器根据所述日志获取指令设置日志信息处理规则,将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器,降低了日志信息的上报数量,减小了音频数字信号处理器向所述应用处理器上报日志信息的频率,降低了应用处理器的功耗。In the log information reporting method provided in this embodiment, the application processor of the mobile terminal determines the target log information to be acquired, the log type of the target log information is the target log type, and the generated target log information is used to obtain the target log information The log acquisition instruction is sent to the audio digital signal processor of the mobile terminal, and the audio digital signal processor sets log information processing rules according to the log acquisition instruction, and reports the target log information to the The application processor reduces the number of log information reported, reduces the frequency of the audio digital signal processor to report the log information to the application processor, and reduces the power consumption of the application processor.
图3给出了本申请实施例提供的另一种日志信息上报方法的流程图。如图3所示,本实施例提供的方法包括以下步骤:FIG. 3 shows a flow chart of another method for reporting log information provided by the embodiment of the present application. As shown in Figure 3, the method provided in this embodiment includes the following steps:
步骤201、应用处理器确定待获取的目标日志信息。Step 201, the application processor determines target log information to be acquired.
步骤202、应用处理器向音频数字信号处理器下发用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型,所述目标日志类型包括目标传感器类型。Step 202: The application processor issues a log acquisition instruction for acquiring target log information to the audio digital signal processor, where the log type of the target log information is the target log type, and the target log type includes the target sensor type.
在音频数字信号处理上挂载着各式各样的传感器,在某些情况下可能是某个或者某几个传感器出现了异常情况,只需要这个或几个传感器的日志信息,那么可将这个或者几个传感器的类型作为目标传感器类型。例如,将接近传感器和环境光传感器作为目标传感器类型。Various sensors are mounted on audio digital signal processing. In some cases, one or several sensors may be abnormal. Only the log information of this or several sensors is needed. Then this Or several sensor types as target sensor types. For example, proximity sensor and ambient light sensor as target sensor types.
步骤203、所述音频数字信号处理器接收到所述日志获取指令。Step 203, the audio digital signal processor receives the log acquisition instruction.
步骤204、所述音频数字信号处理器根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示所述音频数字信号处理器仅上报所述目标日志信息。Step 204: The audio digital signal processor sets a log information processing rule according to the log acquisition instruction, and the log information processing rule instructs the audio digital signal processor to report only the target log information.
步骤205、所述音频数字信号处理器生成全部日志类型的日志信息。Step 205, the audio digital signal processor generates log information of all log types.
步骤206、所述音频数字信号处理器仅将日志类型包括目标传感器类型的目标日志信息按照第一上报频率上报至所述应用处理器,所述第一上报频率为音频数字信号处理器的日志上报默认频率。Step 206, the audio digital signal processor only reports the target log information of the log type including the target sensor type to the application processor according to the first reporting frequency, and the first reporting frequency is the log reporting of the audio digital signal processor default frequency.
其中,所述日志信息的第一上报频率可以为音频数字信号处理器默认的频率,例如,1秒钟上报20次,或者在满足设定条件时上报1次,比如音频数字信号处理的日志缓冲区填满时进行上报,也可以为其他频率设定方法,本实施例对此并不进行限定。Wherein, the first reporting frequency of the log information may be the default frequency of the audio digital signal processor, for example, report 20 times in 1 second, or report once when a set condition is met, such as log buffering of audio digital signal processing Reporting is performed when the area is full, and other frequency setting methods may also be used, which is not limited in this embodiment.
在本实施例中之所以要生成全部日志类型的日志信息是因为虽然当前只需获取目标日志信息,但后续可能存在需要获取其他日志类型的日志信息的情况,为了便于后续需要时采集其他日志类型的日志信息,先生成全部日志类型的日志信息,并将除目标日志类型的目标日志信息之外的其他日志信息存储到音频数字信号处理器的设定存储空间中。示例性的,所述目标日志类型为当前运行的应用程序通话,则相应生成当前运行的应用程序的接近传感器、加速度传感器和环境光传感器的日志信息为目标日志信息。若与此同时,指纹传感器和GPS传感器也处于工作状态,则相应也生成指纹传感器和GPS传感器的日志信息,在执行上报操作时只上报目标日志信息。In this embodiment, the log information of all log types is generated because although only the target log information is currently required, there may be cases where log information of other log types needs to be obtained in the future. In order to facilitate subsequent collection of other log types when necessary first generate log information of all log types, and store other log information except the target log information of the target log type in the set storage space of the audio digital signal processor. Exemplarily, the type of the target log is the call of the currently running application program, and correspondingly generating the log information of the proximity sensor, the acceleration sensor and the ambient light sensor of the currently running application program is the target log information. If at the same time, the fingerprint sensor and the GPS sensor are also in the working state, then the log information of the fingerprint sensor and the GPS sensor is also generated correspondingly, and only the target log information is reported when the reporting operation is performed.
可选的,在生成全部日志类型的日志信息之后还可以包括:将日志类型不包括目标传感器类型的其他目标日志信息按照第二上报频率上报至所述应用处理器,所述第二上报频率小于第一上报频率。Optionally, after the log information of all log types is generated, it may further include: reporting other target log information whose log type does not include the target sensor type to the application processor at a second reporting frequency, the second reporting frequency being less than The first reporting frequency.
示例性的,将指纹传感器和GPS传感器的日志信息按照第二上报频率上报至应用处理器。Exemplarily, the log information of the fingerprint sensor and the GPS sensor is reported to the application processor according to the second reporting frequency.
本实施例提供的方法,通过仅将目标日志信息上报至应用处理器,降低了日志信息的上报数量,减小了音频数字信号处理器向所述应用处理器上报日志信息的频率,降低了应用处理器的功耗。The method provided in this embodiment, by only reporting the target log information to the application processor, reduces the number of log information reported, reduces the frequency of the audio digital signal processor reporting log information to the application processor, and reduces the application The power consumption of the processor.
图4给出了本申请实施例提供的另一种日志信息上报方法的流程图。如图4所示,本实施例提供的日志信息上报方法包括以下步骤:FIG. 4 shows a flow chart of another method for reporting log information provided by the embodiment of the present application. As shown in Figure 4, the log information reporting method provided by this embodiment includes the following steps:
步骤301、应用处理器确定待获取的目标日志信息。Step 301, the application processor determines target log information to be acquired.
步骤302、应用处理器向音频数字信号处理器下发用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型,所述目标日志类型包括目标传感器类型。Step 302: The application processor issues a log acquisition instruction for acquiring target log information to the audio digital signal processor, where the log type of the target log information is the target log type, and the target log type includes the target sensor type.
步骤303、所述音频数字信号处理器接收到所述日志获取指令。Step 303, the audio digital signal processor receives the log acquisition instruction.
步骤304、所述音频数字信号处理根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示所述音频数字信号处理器仅生成所述目标日志信息。Step 304, the audio digital signal processor sets a log information processing rule according to the log acquisition instruction, and the log information processing rule instructs the audio digital signal processor to only generate the target log information.
步骤305、所述音频数字信号处理只生成日志类型包括目标传感器类型的目标日志信息。Step 305, the audio digital signal processing only generates target log information whose log type includes the target sensor type.
步骤306、所述音频数字信号处理将所述目标日志信息按照第一上报频率上报至所述应用处理器。所诉第一上报率为音频数字信号处理器的日志上报默认频率。Step 306, the audio digital signal processing reports the target log information to the application processor according to a first reporting frequency. The first reporting rate is the default frequency of audio digital signal processor log reporting.
其中,所述日志信息的第一上报频率可以为音频数字信号处理器默认的频率,例如,1秒钟上报20次,或者在满足设定条件时上报1次,比如音频数字信号处理的日志缓冲区填满时进行上报,也可以为其他频率设定方法,本实施例对此并不进行限定。Wherein, the first reporting frequency of the log information may be the default frequency of the audio digital signal processor, for example, report 20 times in 1 second, or report once when a set condition is met, such as log buffering of audio digital signal processing Reporting is performed when the area is full, and other frequency setting methods may also be used, which is not limited in this embodiment.
在本实施例中根据日志获取指令和设置的日志信息处理规则,只生成日志类型包括目标传感器类型的目标日志信息,在生成目标日志信息之后,将所述目标日志信息上报至应用处理器。In this embodiment, according to the log acquisition instruction and the set log information processing rules, only the target log information whose log type includes the target sensor type is generated, and after the target log information is generated, the target log information is reported to the application processor.
示例性的,所述目标日志类型为当前运行的应用程序通话,则相应生成当前运行的应用程序的接近传感器、加速度传感器和环境光传感器的日志信息为目标日志信息。若与此同时,指纹传感器和GPS传感器也处于工作状态,那么也不执行生成指纹传感器和GPS传感器的日志信息的操作。Exemplarily, the type of the target log is the call of the currently running application program, and correspondingly generating the log information of the proximity sensor, the acceleration sensor and the ambient light sensor of the currently running application program is the target log information. If at the same time, the fingerprint sensor and the GPS sensor are also in the working state, then the operation of generating the log information of the fingerprint sensor and the GPS sensor is not performed.
本实施例提供的方法,通过至生成包括目标传感器类型的目标日志信息,将所述目标日志信息上报至应用处理器,降低了日志信息的上报数量,减小了音频数字信号处理器向所述应用处理器上报日志信息的频率,降低了应用处理器的功耗。The method provided in this embodiment, by generating the target log information including the target sensor type, and reporting the target log information to the application processor, reduces the number of log information reported, and reduces the number of audio digital signal processors to the described The frequency at which the application processor reports log information reduces the power consumption of the application processor.
图5为本申请实施例提供的一种日志信息上报装置的结构示意图,该装置可由软件和/或硬件实现,集成在移动终端中,例如集成在移动终端的音频数字信号处理器中。如图5所示,该装置包括日志获取指令接收模块41、日志信息处理规则设置模块42和日志信息上报模块43。FIG. 5 is a schematic structural diagram of a log information reporting device provided by an embodiment of the present application. The device may be implemented by software and/or hardware, and integrated in a mobile terminal, such as an audio digital signal processor of the mobile terminal. As shown in FIG. 5 , the device includes a log acquisition instruction receiving module 41 , a log information processing rule setting module 42 and a log information reporting module 43 .
所述日志获取指令接收模块41,用于当前音频数字信号处理器接收到所在终端的应用处理器发送的用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型;The log acquisition instruction receiving module 41 is used for the current audio digital signal processor to receive the log acquisition instruction for acquiring target log information sent by the application processor of the terminal where it is located, and the log type of the target log information is the target log type ;
所述日志信息处理规则设置模块42,用于根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率;The log information processing rule setting module 42 is configured to set a log information processing rule according to the log acquisition instruction, and the log information processing rule indicates that the current audio digital signal processor only generates or only reports the target log information to reduce The frequency at which the current audio digital signal processor reports log information to the application processor;
所述日志信息上报模块43,用于将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。The log information reporting module 43 is configured to report the target log information to the application processor according to the log information processing rule.
本实施例提供的装置,通过由移动终端的应用处理器确定待获取的目标日志信息,所述目标日志信息的日志类型为目标日志类型,并将生成的用于获取目标日志信息的日志获取指令发送至所述移动终端的音频数字信号处理器,所述音频数字信号处理器根据所述日志获取指令设置日志信息处理规则,将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器,降低了日志信息的上报数量,减小了音频数字信号处理器向所述应用处理器上报日志信息的频率,降低了应用处理器的功耗。In the device provided by this embodiment, the application processor of the mobile terminal determines the target log information to be acquired, the log type of the target log information is the target log type, and generates a log acquisition instruction for acquiring the target log information sent to the audio digital signal processor of the mobile terminal, the audio digital signal processor sets log information processing rules according to the log acquisition instruction, and reports the target log information to the application according to the log information processing rules The processor reduces the number of reported log information, reduces the frequency of reporting log information to the application processor by the audio digital signal processor, and reduces the power consumption of the application processor.
在上述各实施例的基础上,所述应用处理发送的所述日志获取指令在所述应用处理器接收到用户作用于所在终端的操作指令之后生成。On the basis of the above embodiments, the log acquisition instruction sent by the application processor is generated after the application processor receives an operation instruction from the user acting on the terminal.
在上述各实施例的基础上,所述日志类型基于传感器类型、日志信息内容、日志级别或者ADSP架构功能域进行分类。Based on the above embodiments, the log types are classified based on sensor type, log information content, log level or ADSP architecture functional domain.
在上述各实施例的基础上,所述目标日志类型包括目标传感器类型,所述日志信息上报模块具体用于:On the basis of the above-mentioned embodiments, the target log type includes a target sensor type, and the log information reporting module is specifically used for:
生成全部日志类型的日志信息,获取日志类型包括目标传感器类型的目标日志信息;Generate log information of all log types, and obtain target log information of log types including target sensor types;
将所述目标日志信息按照第一上报频率上报至所述应用处理器,所述第一上报频率为音频数字信号处理器的日志上报默认频率;Reporting the target log information to the application processor according to a first reporting frequency, where the first reporting frequency is a default frequency for audio digital signal processor log reporting;
或者,or,
只生成日志类型包括目标传感器类型的目标日志信息;Only generate target log information whose log type includes the target sensor type;
将所述目标日志信息按照第一上报频率上报至所述应用处理器。Reporting the target log information to the application processor according to a first reporting frequency.
在上述各实施例的基础上,所述日志信息上报模块还可用于:On the basis of the above-mentioned embodiments, the log information reporting module can also be used for:
在生成全部日志类型的日志信息之后,将日志类型不包括目标传感器类型的其他目标日志信息按照第二上报频率上报至所述应用处理器,所述第二上报频率小于第一上报频率。After the log information of all log types is generated, other target log information whose log type does not include the target sensor type is reported to the application processor at a second reporting frequency, and the second reporting frequency is lower than the first reporting frequency.
在上述各实施例的基础上,所述日志信息上报模块生成全部日志类型的日志信息,仅将日志类型包括目标传感器类型的目标日志信息按照第一上报频率上报至所述应用处理器包括:On the basis of the above-mentioned embodiments, the log information reporting module generates log information of all log types, and reports only the target log information of the log type including the target sensor type to the application processor according to the first reporting frequency, including:
生成全部日志类型的日志信息,将所述日志类型包括目标传感器类型的目标日志信息的上报优先级设置为最高;Generate log information of all log types, and set the reporting priority of the target log information of the log type including the target sensor type to the highest;
从日志缓冲区中实时获取日志信息,在获取的当前日志信息的上报优先级为最高优先级时,将所述当前日志信息上报至所述应用处理器。Obtain log information from the log buffer in real time, and report the current log information to the application processor when the reporting priority of the acquired current log information is the highest priority.
在上述各实施例的基础上,所述日志信息上报模块只生成日志类型包括目标传感器类型的目标日志信息包括:On the basis of the above-mentioned embodiments, the log information reporting module only generates log information including target sensor type target log information including:
将日志类型不包括目标传感器类型的其他日志信息的生成状态设置为非使能状态,只生成日志类型包括目标传感器类型的目标日志信息。Set the generation state of other log information whose log type does not include the target sensor type to the disabled state, and only generate target log information whose log type includes the target sensor type.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种日志信息上报方法,该方法包括:The embodiment of the present application also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a log information reporting method when executed by a computer processor, the method comprising:
当前音频数字信号处理器接收到所在终端的应用处理器发送的用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型;The current audio digital signal processor receives a log acquisition instruction for acquiring target log information sent by the application processor of the terminal where it is located, and the log type of the target log information is the target log type;
根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率;A log information processing rule is set according to the log acquisition instruction, and the log information processing rule indicates that the current audio digital signal processor only generates or only reports the target log information, so as to reduce the input of the current audio digital signal processor to the The frequency with which the application processor reports log information;
将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。Reporting the target log information to the application processor according to the log information processing rules.
存储介质——任何的各种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如CD-ROM、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如DRAM、DDR RAM、SRAM、EDO RAM,兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如具体实现为计算机程序)。storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or tape drives; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc. ; non-volatile memory, such as flash memory, magnetic media (eg hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Also, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network such as the Internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected by a network. The storage medium may store program instructions (eg embodied as computer programs) executable by one or more processors.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的日志信息上报操作,还可以执行本申请任意实施例所提供的日志信息上报方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided in the embodiments of the present application, the computer-executable instructions are not limited to the above-mentioned log information reporting operation, and can also perform the log information reporting provided in any embodiment of the present application. Related operations in the method.
本实施例提供了一种音频数字信号处理器,其上存储有计算机程序,该程序被所述音频数字信号处理器执行时实现本申请任意实施例所提供的日志信息上报方法。This embodiment provides an audio digital signal processor, on which a computer program is stored, and when the program is executed by the audio digital signal processor, the log information reporting method provided by any embodiment of the present application is implemented.
本申请实施例提供了一种移动终端,该移动终端可以包括本申请任意实施例提供的日志信息上报装置。图6为本申请实施例提供的一种移动终端的结构示意图,如图6所示,该移动终端可以包括:传感器501,存储器502,处理器(所述处理器包括音频数字信号处理器503和应用处理器504)及存储在存储器上并可在音频数字信号处理器504上运行的计算机程序,所述音频数字信号处理器执行所述计算机程序时实现如本申请实施例所述的任意一种日志信息上报方法。其中,所述存储器502包括音频数字信号处理器503和应用处理器的共享内存,还包括音频数字信号处理器503和应用处理器各自独立的存储空间。An embodiment of the present application provides a mobile terminal, and the mobile terminal may include the apparatus for reporting log information provided in any embodiment of the present application. FIG. 6 is a schematic structural diagram of a mobile terminal provided by an embodiment of the present application. As shown in FIG. 6, the mobile terminal may include: a sensor 501, a memory 502, a processor (the processor includes an audio digital signal processor 503 and Application processor 504) and a computer program stored on the memory and operable on the audio digital signal processor 504, when the audio digital signal processor executes the computer program, any one of the methods described in the embodiments of the present application is realized. The log information reporting method. Wherein, the memory 502 includes a shared memory of the audio digital signal processor 503 and the application processor, and also includes independent storage spaces of the audio digital signal processor 503 and the application processor.
图7为本申请实施例提供的一种移动终端的另一结构示意图,如图7所示,该移动终端可以包括:存储器601、中央处理器(Central Processing Unit,CPU)602(又称处理器,以下简称CPU)、所述CPU包括应用处理器AP,所述存储器601,用于存储可执行程序代码;所述处理器602通过读取所述存储器601中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行:当前音频数字信号处理器接收到所在终端的应用处理器发送的用于获取目标日志信息的日志获取指令,所述目标日志信息的日志类型为目标日志类型;根据所述日志获取指令设置日志信息处理规则,所述日志信息处理规则指示当前音频数字信号处理器仅生成或者仅上报所述目标日志信息,以减小所述当前音频数字信号处理器向所述应用处理器上报日志信息的频率;将所述目标日志信息按照所述日志信息处理规则上报至所述应用处理器。FIG. 7 is another schematic structural diagram of a mobile terminal provided by an embodiment of the present application. As shown in FIG. 7, the mobile terminal may include: a memory 601, a central processing unit (Central Processing Unit, CPU) 602 (also known as a processor , hereinafter referred to as CPU), the CPU includes an application processor AP, and the memory 601 is used to store executable program codes; the processor 602 runs and The program corresponding to the executable program code is used to execute: the current audio digital signal processor receives a log acquisition instruction for acquiring target log information sent by the application processor of the terminal where it is located, and the log type of the target log information is the target log type; set log information processing rules according to the log acquisition instruction, and the log information processing rules indicate that the current audio digital signal processor only generates or only reports the target log information to reduce the current audio digital signal The processor reports the frequency of log information to the application processor; reports the target log information to the application processor according to the log information processing rule.
所述移动终端还包括:外设接口603、RF(Radio Frequency,射频)电路605、音频电路606、音频数字信号处理器613、传感器614、扬声器611、电源管理芯片608、输入/输出(I/O)子系统609、触摸屏612、其他输入/控制设备610以及外部端口604,这些部件通过一个或多个通信总线或信号线607来通信。The mobile terminal also includes: a peripheral interface 603, an RF (Radio Frequency, radio frequency) circuit 605, an audio circuit 606, an audio digital signal processor 613, a sensor 614, a loudspeaker 611, a power management chip 608, an input/output (I/O O) Subsystem 609 , touch screen 612 , other input/control devices 610 , and external ports 604 , these components communicate via one or more communication buses or signal lines 607 .
应该理解的是,图示移动终端600仅仅是移动终端的一个范例,并且移动终端600可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the illustrated mobile terminal 600 is only an example of a mobile terminal, and the mobile terminal 600 may have more or fewer components than those shown in the figure, and two or more components may be combined, Or can have a different component configuration. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
下面就本实施例提供的用于上报日志信息的移动终端进行详细的描述,该移动终端以手机为例。The mobile terminal used for reporting log information provided in this embodiment will be described in detail below, and the mobile terminal is taken as an example.
存储器601,所述存储器601可以被CPU602、外设接口603等访问,所述存储器601可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Memory 601, the memory 601 can be accessed by the CPU 602, the peripheral interface 603, etc., the memory 601 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices , or other volatile solid-state storage devices.
外设接口603,所述外设接口603可以将设备的输入和输出外设连接到CPU502和存储器601。Peripheral interface 603 , which can connect the input and output peripherals of the device to CPU 502 and memory 601 .
I/O子系统609,所述I/O子系统609可以将设备上的输入输出外设,例如触摸屏612和其他输入/控制设备610,连接到外设接口603。I/O子系统609可以包括显示控制器6091和用于控制其他输入/控制设备610的一个或多个输入控制器6092。其中,一个或多个输入控制器6092从其他输入/控制设备610接收电信号或者向其他输入/控制设备610发送电信号,其他输入/控制设备610可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器6092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。The I/O subsystem 609 , the I/O subsystem 609 can connect input and output peripherals on the device, such as a touch screen 612 and other input/control devices 610 , to the peripheral interface 603 . I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610 . Among them, one or more input controllers 6092 receive electrical signals from or send electrical signals to other input/control devices 610, which may include physical buttons (push buttons, rocker buttons, etc.) ), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 6092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏612,所述触摸屏612是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。A touch screen 612, the touch screen 612 is an input interface and an output interface between the user terminal and the user, and displays visual output to the user. The visual output may include graphics, text, icons, videos, and the like.
I/O子系统609中的显示控制器6091从触摸屏612接收电信号或者向触摸屏612发送电信号。触摸屏612检测触摸屏上的接触,显示控制器6091将检测到的接触转换为与显示在触摸屏612上的用户界面对象的交互,即实现人机交互,显示在触摸屏612上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or sends electrical signals to the touch screen 612 . The touch screen 612 detects the contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 612, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 612 can be a running Icons for games, icons for networking to appropriate networks, etc. It is worth noting that the device may also include an optical mouse, which is a touch-sensitive surface that does not display visual output, or that is an extension of a touch-sensitive surface formed by a touchscreen.
RF电路605,主要用于建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。具体地,RF电路605接收并发送RF信号,RF信号也称为电磁信号,RF电路605将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路605可以包括用于执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC(COder-DECoder,编译码器)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (that is, the network side), and realize data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. Specifically, the RF circuit 605 receives and sends RF signals, which are also called electromagnetic signals, and the RF circuit 605 converts electrical signals into electromagnetic signals or converts electromagnetic signals into electrical signals, and communicates with communication networks and other devices through the electromagnetic signals to communicate. RF circuitry 605 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC ( COder-DECoder, Codec) Chipset, Subscriber Identity Module (Subscriber Identity Module, SIM) and so on.
音频电路606,主要用于从外设接口603接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器611。The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603 , convert the audio data into electrical signals, and send the electrical signals to the speaker 611 .
音频数字信号处理器(ADSP)613,用于控制和管理传感器。Audio Digital Signal Processor (ADSP) 613 for controlling and managing the sensors.
传感器614,包括环境光传感器、接近传感器、陀螺仪及加速度传感器等。The sensor 614 includes an ambient light sensor, a proximity sensor, a gyroscope, an acceleration sensor, and the like.
扬声器611,用于将手机通过RF电路605从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 611 is used to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 605 into sound and play the sound to the user.
电源管理芯片608,用于为CPU602、I/O子系统及外设接口603所连接的硬件进行供电及电源管理。The power management chip 608 is used for power supply and power management for the hardware connected to the CPU 602 , the I/O subsystem and the peripheral interface 603 .
上述实施例中提供的日志信息上报装置、存储介质及移动终端可执行本申请任意实施例所提供的日志信息上报方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的日志信息上报方法。The log information reporting device, storage medium, and mobile terminal provided in the above embodiments can execute the log information reporting method provided in any embodiment of the present application, and have corresponding functional modules and beneficial effects for executing the method. For technical details not exhaustively described in the foregoing embodiments, refer to the method for reporting log information provided in any embodiment of the present application.
上述仅为本申请的较佳实施例及所运用的技术原理。本申请不限于这里所述的特定实施例,对本领域技术人员来说能够进行的各种明显变化、重新调整及替代均不会脱离本申请的保护范围。因此,虽然通过以上实施例对本申请进行了较为详细的说明,但是本申请不仅仅限于以上实施例,在不脱离本申请构思的情况下,还可以包括更多其他等效实施例,而本申请的范围由权利要求的范围决定。The above are only preferred embodiments of the present application and the applied technical principles. The present application is not limited to the specific embodiments described here, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can also include more other equivalent embodiments without departing from the concept of the present application, and the present application The scope is determined by the scope of the claims.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710824064.7A CN107609120B (en) | 2017-09-13 | 2017-09-13 | Log information reporting method and device, storage medium, ADSP and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710824064.7A CN107609120B (en) | 2017-09-13 | 2017-09-13 | Log information reporting method and device, storage medium, ADSP and terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107609120A true CN107609120A (en) | 2018-01-19 |
| CN107609120B CN107609120B (en) | 2020-07-31 |
Family
ID=61063671
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710824064.7A Expired - Fee Related CN107609120B (en) | 2017-09-13 | 2017-09-13 | Log information reporting method and device, storage medium, ADSP and terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107609120B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108833132A (en) * | 2018-04-26 | 2018-11-16 | 努比亚技术有限公司 | log acquisition control method, terminal and computer readable storage medium |
| CN110851313A (en) * | 2019-11-14 | 2020-02-28 | 东莞市小精灵教育软件有限公司 | Sensor debugging method, intelligent terminal, storage medium and electronic equipment |
| CN110888769A (en) * | 2018-09-07 | 2020-03-17 | 华为技术有限公司 | Data processing method and computer equipment |
| CN114067456A (en) * | 2021-10-13 | 2022-02-18 | 北京梧桐车联科技有限责任公司 | Log processing method, electronic device and storage medium |
| CN114116645A (en) * | 2021-12-02 | 2022-03-01 | 南京地平线集成电路有限公司 | Log management method, device, storage medium and electronic device for multiple processing units |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102790686A (en) * | 2011-05-17 | 2012-11-21 | 浙江核新同花顺网络信息股份有限公司 | Log data collecting method and system and log collecting server |
| US20140149972A1 (en) * | 2012-04-12 | 2014-05-29 | Tencent Technology (Shenzhen) Company Limited | Method, device and terminal for improving running speed of application |
| CN106326342A (en) * | 2016-08-04 | 2017-01-11 | 北京京东尚科信息技术有限公司 | Reporting method and device of page flow data and electronic equipment |
| CN106776385A (en) * | 2016-12-06 | 2017-05-31 | 广东欧珀移动通信有限公司 | A kind of transmission method, device and terminal of log log information |
-
2017
- 2017-09-13 CN CN201710824064.7A patent/CN107609120B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102790686A (en) * | 2011-05-17 | 2012-11-21 | 浙江核新同花顺网络信息股份有限公司 | Log data collecting method and system and log collecting server |
| US20140149972A1 (en) * | 2012-04-12 | 2014-05-29 | Tencent Technology (Shenzhen) Company Limited | Method, device and terminal for improving running speed of application |
| CN106326342A (en) * | 2016-08-04 | 2017-01-11 | 北京京东尚科信息技术有限公司 | Reporting method and device of page flow data and electronic equipment |
| CN106776385A (en) * | 2016-12-06 | 2017-05-31 | 广东欧珀移动通信有限公司 | A kind of transmission method, device and terminal of log log information |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108833132A (en) * | 2018-04-26 | 2018-11-16 | 努比亚技术有限公司 | log acquisition control method, terminal and computer readable storage medium |
| CN110888769A (en) * | 2018-09-07 | 2020-03-17 | 华为技术有限公司 | Data processing method and computer equipment |
| CN110888769B (en) * | 2018-09-07 | 2021-09-07 | 华为技术有限公司 | Data processing method and computer equipment |
| CN110851313A (en) * | 2019-11-14 | 2020-02-28 | 东莞市小精灵教育软件有限公司 | Sensor debugging method, intelligent terminal, storage medium and electronic equipment |
| CN110851313B (en) * | 2019-11-14 | 2024-02-20 | 东莞市小精灵教育软件有限公司 | Sensor debugging method, intelligent terminal, storage medium and electronic equipment |
| CN114067456A (en) * | 2021-10-13 | 2022-02-18 | 北京梧桐车联科技有限责任公司 | Log processing method, electronic device and storage medium |
| CN114116645A (en) * | 2021-12-02 | 2022-03-01 | 南京地平线集成电路有限公司 | Log management method, device, storage medium and electronic device for multiple processing units |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107609120B (en) | 2020-07-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107545067B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
| CN107609120B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
| JP6333965B2 (en) | Technology to track wake clock usage | |
| US9170912B1 (en) | System and methods for power and energy modeling in computing devices using system call tracing | |
| CN107479816B (en) | Recognition methods, device, storage medium and the mobile terminal of blank screen gesture | |
| CN110413497B (en) | Abnormal monitoring method, device, terminal equipment and computer-readable storage medium | |
| CN107402713B (en) | Method and device for accelerating black screen gesture processing, storage medium and mobile terminal | |
| WO2019214476A1 (en) | Screen direction setting method and device, storage medium and terminal | |
| WO2019128588A1 (en) | Process processing method and apparatus, electronic device, computer readable storage medium | |
| CN107562602B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
| CN110018905B (en) | Information processing method, device, computer device, and computer-readable storage medium | |
| CN107609114A (en) | Log information report method, device and storage medium, ADSP and terminal | |
| CN107577542B (en) | Log information reporting method, device, storage medium and mobile terminal | |
| CN109992425A (en) | Information processing method, apparatus, computer device, and computer-readable storage medium | |
| CN107609117B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
| CN108170585A (en) | Log processing method and device, terminal equipment and storage medium | |
| CN107609118A (en) | Log information reporting method, device and storage medium, ADSP and terminal | |
| CN107818036B (en) | Black screen detection method, mobile terminal and computer readable storage medium | |
| CN116450597A (en) | Log management method and related device | |
| CN106249874B (en) | Reporting method of sensor data, processor and mobile terminal | |
| US11507413B2 (en) | Tracking method, apparatus, device, and machine-readable medium | |
| CN108810274A (en) | Using startup method, apparatus, storage medium and the terminal of miscellaneous function | |
| US20140267096A1 (en) | Providing a hybrid touchpad in a computing device | |
| CN107621999B (en) | Log information reporting method and device, storage medium and mobile terminal | |
| US20140189408A1 (en) | System and method for reducing power consumption |
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 | ||
| CB02 | Change of applicant information |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200731 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |