CN107609117B - Log information reporting method and device, storage medium, ADSP and terminal - Google Patents

Log information reporting method and device, storage medium, ADSP and terminal Download PDF

Info

Publication number
CN107609117B
CN107609117B CN201710823514.0A CN201710823514A CN107609117B CN 107609117 B CN107609117 B CN 107609117B CN 201710823514 A CN201710823514 A CN 201710823514A CN 107609117 B CN107609117 B CN 107609117B
Authority
CN
China
Prior art keywords
log
reporting
log information
preset
data
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
CN201710823514.0A
Other languages
Chinese (zh)
Other versions
CN107609117A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710823514.0A priority Critical patent/CN107609117B/en
Publication of CN107609117A publication Critical patent/CN107609117A/en
Application granted granted Critical
Publication of CN107609117B publication Critical patent/CN107609117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses a log information reporting method, a log information reporting device, a storage medium, an ADSP and a terminal. The method comprises the following steps: generating log information in real time by a current audio digital signal processor; storing the generated first log information of a first preset log type into a log buffer area, and reporting the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting mode; and converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation, and reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second preset log reporting mode. According to the technical scheme provided by the embodiment of the application, the reporting speed and efficiency of the log information of the mobile terminal are improved, and different log information can be reasonably reported according to an adaptive log reporting mode.

Description

Log information reporting method and device, storage medium, ADSP and terminal
Technical Field
The embodiment of the application relates to the technical field of log control of a mobile terminal, in particular to a log information reporting method, a log information reporting device, a storage medium, an ADSP (automatic dependent Surveillance protocol) and a terminal.
Background
An Audio Digital Signal Processor (ADSP) is generally disposed on the mobile terminal, and the Processor may centrally manage all sensors on the mobile terminal, so as to save many resources of an Application Processor (AP) of the mobile terminal. Because the ADSP and the AP are two independent processors, a transfer and storage mechanism of sensor log (log) information is complicated, and a log uploading control method in the related art has defects and needs to be improved.
Disclosure of Invention
The embodiment of the application provides a log information reporting method, a log information reporting device, a storage medium, an ADSP and a terminal, and can optimize the log information reporting scheme of the ADSP.
In a first aspect, an embodiment of the present application provides a method for reporting log information, including:
generating log information in real time by a current audio digital signal processor;
storing the generated first log information of a first preset log type into a log buffer area, and reporting the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting mode;
and converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation, and reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second preset log reporting mode.
In a second aspect, an embodiment of the present application provides a log information reporting apparatus, including:
the log information generating module is used for generating log information in real time by the current audio digital signal processor;
a first log information reporting module, configured to store the generated first log information of a first preset log type in a log buffer, and report the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting manner;
and the second log information reporting module is used for converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation and reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the log information reporting method provided in the first aspect.
In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor, when executing the computer program, implements the log information reporting method provided in the first aspect.
According to the embodiment of the application, the at least two log reporting channels are arranged, the first log information of the first preset log type is stored in the log buffer area, the first log information is reported to the application processor according to the first set log reporting mode, the second log information of the second preset log type is converted into the first reporting data of the preset data type according to the preset corresponding relation, and the first reporting data is reported to the application processor according to the second set log reporting mode, so that the reporting speed and efficiency of ADSP log information are improved, and different log information can be reasonably reported according to the adaptive log reporting mode.
Drawings
Fig. 1 is a schematic diagram of a log information reporting process provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for reporting log information according to an embodiment of the present application;
fig. 3 is a flowchart of another log information reporting method according to an embodiment of the present application;
fig. 4 is a flowchart of another log information reporting method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a log information reporting apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
fig. 7 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
In order to facilitate understanding of the embodiments of the present application, the ADSP log transmission process is briefly described below by taking an Audio Digital Signal Processor (ADSP) architecture of a high-pass platform as an example. Wherein, the ADSP architecture refers to: the sensors are mounted on the ADSP, the ADSP manages all the sensors in the terminal, and under the structure, all the sensors interact with the ADSP, and then the ADSP interacts with an Application Processor (AP). The log information generated on the ADSP is mainly the log information of the sensor, and also includes the system log information of the ADSP in power-on and power-off states.
The ADSP may be mounted with sensors such as an ambient light Sensor, a proximity Sensor, a gyroscope, and an acceleration Sensor, and these sensors may generate a Sensor Log (Sensor Log), where the Sensor Log may include state information of the Sensor (such as whether a fault occurs, what operating state is, and the like) and various data involved in the operating process (such as acquired data and various determination thresholds, and the like). Fig. 1 is a schematic diagram of a log information reporting process according to an embodiment of the present application. The sensor log is generated by the sensor, the sensor is mounted on the ADSP, so that the sensor needs to be transmitted to the AP through the ADSP, and the transmission channels of the sensor log and the sensor data are different. After the ADSP generates the log information, the log information is directly stored in a log buffer of the ADSP, and after the log buffer is full, the log information in the log buffer is reported to the AP through a Communication path between the ADSP and the AP according to a certain reporting mode, wherein the Communication path can be a Diagnostic task for transmitting the log information to the AP through a Shared Memory Driver (SMD), Inter-Process Communication (IPC) and a high-pass message interface (QMI), and further to a file system or a QXDM tool of the AP. The Diagnostic task is a Diagnostic process, and qxdm (the QUALCOMM ExtensibleDiagnostic monitor) is a tool of the general company that can track data sent by a mobile terminal, and can perform a correlation test or diagnosis by analyzing the data. In the related art, the transmission path of the data on the ADSP, for example, the Sensor data on the ADSP, is the transmission path of the ADSP Sensor data to the Sensor daemon and then to the Sensor hal through SMD, IPC/QMI message communication, and finally to the file system. Wherein, the Sensor daemon is a Sensor background process, and the Sensor hal is an interface of a hardware abstraction layer (hal) corresponding to the Sensor. After a log switch is turned on, in the transmission process of log information, sensor data is generally transmitted in a numerical value mode, the log information is generally transmitted in a character string mode, the data volume is large, the storage space of a log buffer area is limited, the log buffer area can be filled up quickly, the log information in the log buffer area is always reported to an AP (access point), the AP receives the log information reported by ADSP (automatic dependent surveillance protocol), the AP cannot sleep, and the log information needs to be received and processed frequently, so that the power consumption of a mobile terminal is large. If the log switch is turned off, many problems related to the sensor can be caused, repeated pressure testing is needed due to lack of log information of bottom-layer driving, testing time is increased unnecessarily, and analysis and solving efficiency of the problems related to the sensor are seriously influenced.
Next, a related data structure of the log information and a reading scenario of the log information will be separately described.
1. The associated data structure of the log information.
Figure BDA0001406919560000041
The struct loader _ entry is a structure used to describe a Log record. The len member variable records the length of the payload of this record, the length of the log record itself being specified by the payload. The __ pad member variable is used to align structures. The pid and tid member variables are used to record which process written this record, respectively. The sec and nsec member variables record the time of the log write. The msg member variable records the content of the payload and its size is determined by the len member variable.
Figure BDA0001406919560000042
Figure BDA0001406919560000051
The structure struct log _ log is the place actually used for storing the log. The buffer member variable is a memory buffer for storing log information, and the size of the buffer member variable is determined by the size member variable. As can be seen from the misc member variable, the device used by the journal driver belongs to a misc type of device, and the wq member variable is a wait queue for holding processes that are waiting to read the journal. The readers member variable is used for storing the process currently reading the log, and the process currently reading the log is described by a structure loader _ reader. The mutex member variable is a mutex that is used to protect the log's concurrent access. The w _ off member variable is used to record where the next log should be written from. The head member variable is used to indicate from which location in the open log file the log should be read.
2. And (4) reading the log information.
The method for reading the log device file is loader _ read:
Figure BDA0001406919560000052
when the log device file is newly opened, the log is read from the log- > head position and is stored in the member variable r _ off of structlogger _ reader. The while loop at start number is read while waiting for the log to be read, and if no new log is readable, the read process goes to sleep and wakes up after waiting for the new log to be written, which is realized by two calls, namely, prepare _ wait and schedule. If no new log is readable and the device file is not opened in the non-blocking O _ nonblocking manner or there is a signal to process (signal _ pending) at this time, then it returns directly without waiting for a new log write. The method for judging whether a new log is readable at present comprises the following steps: ret ═ (log- > w _ off ═ reader- > r _ off); that is, whether the writing position of the current buffer area is equal to the reading position of the current reading process is judged, and if not, a new log is readable. Continuing to look down, if a new log is readable, the length of the next readable log record is obtained, and as can be seen from this, the log reading process can read in units of log records, and only one record is read at a time. It should be noted that, the reading of the log information and the reporting of the log information are two opposite 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 mechanisms and principles of the reading of the log information and the reporting of the log information are similar.
Fig. 2 is a flowchart of a method for reporting log information according to an embodiment of the present disclosure, where the method according to this embodiment may be executed by a log information reporting apparatus, the apparatus may be implemented in a hardware and/or software manner, and the apparatus may be set inside a mobile terminal as a part of the mobile terminal, for example, in an ADSP of the mobile terminal. The method provided by the embodiment is suitable for the situation that the ADSP in the mobile terminal generates the log information and reports the log information to the AP.
As shown in fig. 2, the log information reporting method provided in this embodiment includes the following steps:
step 101, the current audio digital signal processor generates log information in real time.
An audio digital signal processor in the terminal generates log information in real time, wherein the log information can comprise log information of a sensor mounted on the audio digital signal processor; and system log information of the audio digital signal processor, such as log information of running states of the audio digital signal processor, such as power-on and power-off, can also be included. Wherein the log information of the sensor is generated by the sensor.
The terminal described in this embodiment includes, but is not limited to, a device such as a mobile phone, a notebook, or a tablet computer, which is integrated with an audio digital signal processor and an application processor.
Before the step, the operation of opening the log switch is further included, the operation of opening the log switch can be executed by an application processor on the terminal where the audio digital signal processor is located, and the application processor informs the audio digital signal processor, and the audio digital signal processor starts the operation of generating the log information on the audio digital signal processor after receiving the informing message.
And 102, storing the generated first log information of the first preset log type into a log buffer area.
The log type can be classified based on a sensor type, a log level, a log information content or an ADSP architecture functional domain.
Optionally, when classifying based on sensor types, the sensor types may be classified according to sensor names, for example, the sensor names correspond to log types one to one; the functions of the sensors can be classified according to the functions of the sensors, for example, the sensors such as a gyroscope, an acceleration sensor and the like are used for detecting the motion data of the mobile terminal and can correspond to the types of motion logs, and the ambient light sensor and the proximity sensor are used for detecting the changes of the external environment and can correspond to the types of environment logs; the sensor logs can be classified according to the priorities of the sensors, and the priorities can be used for representing the priorities reported by the sensor logs.
Optionally, when the content is classified based on the log information, the content may be classified according to the type of the log information content, for example, sensor logs are classified as one type, and ADSP system logs are classified as one type; because the log information on the ADSP is mainly sensor log information, the log information can also be classified by various factors of the sensor: for example, the working state of the sensor is of one type, the abnormal condition of the sensor is of one type, the data acquired by the sensor is of one type, the calibration data of the sensor is of one type, the judgment threshold value of the sensor is of one type, and the like; the log information may also be classified according to the importance of the log information content, for example, the importance of the state information of the sensor is higher than the data collected by the sensor and the determination threshold, the state information of different sensors may be associated with one log type, and the data collected by different sensors and the determination threshold may be associated with another log type.
Optionally, when classifying based on the log level, generally from low to high in the log level, the following categories may be included: DEBUG (DEBUG, representing all reasonable logs for debugging), INFO (information, representing logs in normal use), WARN (warning, representing possible problems, no ERRORs have occurred), ERROR (ERROR, representing problematic and causing ERRORs), FATAL (FATAL, representing problematic causing FATAL ERRORs at runtime, typically resulting in a restart).
Optionally, when classifying the functional domains based on the ADSP architecture, log information generated by different functional domains (functional modules) may be respectively corresponding to a log type. For example, a sensor management module (Sensors Manager, Smgr) corresponds to one log type, a sensor Calibration management module (Sensors Calibration Manager) corresponds to one log type, a sensor algorithm management module (Sensors algorithm Manager) corresponds to one log type, and so on.
Of course, the classification of the log types may also be based on other factors, for example, the log information is classified into two types based on the currently running application program and the audio digital signal processor system, and the log types may also be classified based on other classification methods, which is not limited in this embodiment.
In this step, the first preset log type may be one or more log types. For example, the device may be one of an ADSP system log type, or may be two of a proximity sensor type and an acceleration sensor type. The first log information may include one or more log records, but this embodiment is not limited to this.
Generally, a log type with a low priority level, a low importance level, or a low requirement on reporting real-time performance may be determined as a first preset log type, for example, if the log type is divided into a sensor log type and an ADSP system log type, and a user is currently interested in an operation condition of a sensor, the ADSP system log type may be determined as the first preset log type.
And 103, reporting the first log information to an application processor of the terminal where the current audio digital signal processor is located according to a first set log reporting mode.
The step reports first log information of a first preset log type to an application processor through a traditional log reporting mode.
And step 104, converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation.
In this step, the second preset log type may be one or more log types. For example, the sensor log type may be used, and the proximity sensor type and the acceleration sensor type may be used. The second log information may include one or more log records, which is not limited by this embodiment.
Generally, a log type with a high priority level, importance, or a high requirement on reporting real-time performance may be determined as the second preset log type, for example, if the log type is divided into a sensor log type and an ADSP system log type, and a user is currently interested in an operation condition of a sensor, the sensor log type may be determined as the second preset log type.
And step 105, reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode.
The step converts second log information of a second preset log type into data and reports the data to the application processor in a data reporting mode of a data channel. For example, a virtual device and a data reporting function corresponding to the virtual device may be preset, and the first reported data is reported by calling the data reporting function.
In the embodiment of the present application, the type of the preset data is not limited, and optionally, the data volume of the first report data is smaller than the data volume of the second log information. For example, the data type of the second log information is a character string type, and the preset data type is a numerical type (e.g., integer), which has the advantages of being compatible with the existing ADSP architecture sensor data transmission mechanism, and the data volume of the numerical type data is small and the transmission speed is fast. Exemplarily, in this step, the second log information is converted from a string type to a numerical type according to the preset corresponding relationship, so as to obtain the first reported data. For example, in the case of a proximity sensor, the first log information is assumed to be "open prox sensor", and the corresponding first reported data is assumed to be "100".
Optionally, the operation of reporting the first log information to the application processor according to the first set log reporting mode and the operation of reporting the first reported data to the application processor according to the second set log reporting mode are executed in parallel. The reason for this is: on one hand, the log information is reported through two log reporting channels, so that the log information reporting speed and efficiency are increased; on the other hand, the important second log information is transmitted through the data channel, so that the real-time reporting performance of the second log information is improved.
It should be noted that the execution sequence of the two steps of steps 102-103 and steps 104-105 in this embodiment is not limited, and for example, the steps 102-103 and then the steps 104-105 may be executed, or the steps 104-105 and then the steps 102-103 may be executed.
In the log information reporting method provided in this embodiment, by setting at least two log reporting channels, first log information of a first preset log type is stored in a log buffer, and the first log information is reported to an application processor according to a first set log reporting mode, second log information of a second preset log type is converted into first reporting data of a preset data type according to a preset corresponding relationship, and the first reporting data is reported to the application processor according to a second set log reporting mode, so that the reporting speed and efficiency of the ADSP log information are improved, and different log information can be reasonably reported according to an adaptive log reporting mode.
Fig. 3 is a flowchart of another log information reporting method according to an embodiment of the present application. As shown in fig. 3, the method provided by this embodiment includes the following steps:
step 201, the current audio digital signal processor generates log information in real time.
Step 202, storing the generated first log information of the first preset log type into a log buffer.
Step 203, determining a reporting time interval corresponding to the first preset log type.
If the log types of the log information have two or more types, the reporting time interval corresponding to the log information of each log type can be preset. If the first preset log type is a log type, the first preset log type corresponds to a reporting time interval, and if the first preset log type comprises a plurality of log types, each log type corresponds to a reporting time interval.
And step 204, reporting the first log information to the application processor according to the reporting time interval.
Reporting the first log information to an application processor is performed once every reporting time interval from a log buffer.
If the first preset log type is a log type, corresponding to a reporting time interval, reporting the first log information once every reporting time interval. And if the first preset log type comprises a plurality of log types, each log type corresponds to a reporting time interval, the corresponding first log information also comprises a plurality of first log sub-information with different log types, and each first log sub-information is reported to the application processor according to the corresponding reporting time interval.
Step 205, converting the generated second log information of the second preset log type into the first reported data of the preset data type according to the preset corresponding relationship.
And step 206, reporting the first reported data to the application processor according to a second set log reporting mode.
It should be noted that the execution sequence of the two steps of step 203-.
In the method provided by this embodiment, the first log information of the unimportant first preset log type is reported to the application processor according to the corresponding reporting time interval, so that the working pressure of the application processor can be reduced.
Fig. 4 is a flowchart of another log information reporting method according to an embodiment of the present application. As shown in fig. 4, the log information reporting method provided in this embodiment includes the following steps:
step 301, the current audio digital signal processor generates log information in real time.
Step 302, storing the generated first log information of the first preset log type into a log buffer area.
And step 303, reporting the first log information to the application processor according to a first set log reporting mode.
Step 304, converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation, wherein the second preset log type comprises a sensor log type.
For example, first, second log information generated by the audio digital signal processor and required to be reported is determined, and the second log information is converted into first reported data of a preset data type according to a preset corresponding relationship, that is, the second log information can be converted into a data format corresponding to a data transmission channel according to the preset corresponding relationship agreed with the application processor, so as to obtain the first reported data.
Step 305, calling a data reporting function corresponding to a preset virtual sensor, reporting the first reported data to the application processor by using the data reporting function, wherein the first reported data indicates the application processor to analyze the received first reported data based on the preset corresponding relationship, so as to obtain the second log information.
The preset virtual sensor can be arranged on an ADSP driving layer, namely the preset virtual sensor can be mounted on the ADSP as the sensor, so that the preset virtual sensor has the same data reporting capability as the sensor to the AP.
Optionally, the reporting the first reporting data to the application processor by using the data reporting function may include: and reporting the first reported data to the application processor through a sensor hardware abstraction layer interface by using a data reporting function corresponding to the preset virtual sensor.
Optionally, the preset virtual sensor includes a plurality of preset virtual sensors, the second log information includes a plurality of second log sub information, and correspondingly, the first reporting data includes a plurality of first reporting sub data, the invoking a data reporting function corresponding to the preset virtual sensor, and reporting the first reporting data to the application processor by using the data reporting function includes: respectively using the plurality of first reported subdata as current first reported subdata; determining the type of a sensor corresponding to the current first reported subdata; calling a data reporting function of a corresponding target virtual sensor according to the determined sensor type, wherein the target virtual sensor is contained in a plurality of preset virtual sensors, and different preset virtual sensors can be in a called state at the same time; and reporting the current first report subdata to the application processor by using a data reporting function of the target virtual sensor.
Because different preset virtual sensors can be in a called state at the same time, the log information transmission between different preset virtual sensors is independent and non-interfering, the parallel transmission of the log information can be realized, and the reporting efficiency of the log information is ensured. The call to the target virtual sensor may be, for example, a data reporting interface of the target virtual sensor, which may exist in a functional form or in another form.
For example, after the target virtual sensor is called, the target virtual sensor may be used to report the first reporting data to the AP, and then the AP may restore the received first reporting data to the second log information based on the preset corresponding relationship, so as to successfully realize the reporting of the second log information. As exemplified above, the received first data "100" is restored to the second log information "open prox sensor" based on the preset correspondence.
In some embodiments, after the analyzing, by the application processor, the received first reported data based on the preset corresponding relationship to obtain the second log information, the method further includes: and writing the second log information and the current system time into a log file. And writing the analyzed second log information and the current system time into a log file, so that the tracking analysis and the processing of the related problems of the sensor can be conveniently carried out according to the log file.
In some embodiments, the parameters defined in the data reporting function may include a sensor identification (id) and reported data content, the reported data content corresponding to the first reported data. After the sensor identifier is defined, the same reported data represents different meanings for different sensors, namely different log information, so that the bit number or the data volume of the reported data can be further reduced. The reported data content may include, for example, a string identifier (which may be used to indicate an id value corresponding to a log to be uploaded, where the id value may correspond to different operating states of the sensor), and may also include reported data, that is, data collected by the sensor. In addition, the data reporting function may further include other variables, such as a timestamp (timestamp). When the first report data is reported to the AP by using the data reporting function, the parameter values in the first report data can be compressed to realize packet uploading, so that the amount of transmission data can be further reduced, and the reporting speed is increased.
According to the method provided by the embodiment, the second log information of the sensor log type is reported through the data channel, so that the real-time property of reporting the more important second log information can be ensured, and the second log information is converted into the data of the data value type for reporting, so that the data volume reported by the log is reduced, and the efficiency of reporting the log is improved.
Fig. 5 is a schematic structural diagram of a log information reporting apparatus according to an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware and integrated in a mobile terminal. As shown in fig. 5, the apparatus includes a log information generating module 41, a first log information reporting module 42, and a second log information reporting module 43.
The log information generating module 41 is configured to generate log information in real time by the current audio digital signal processor;
the first log information reporting module 42 is configured to store the generated first log information of the first preset log type in a log buffer, and report the first log information to an application processor of the terminal where the current audio digital signal processor is located according to a first set log reporting mode;
the second log information reporting module 43 is configured to convert the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relationship, and report the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode.
In the apparatus provided in this embodiment, by setting at least two log reporting channels, first log information of a first preset log type is stored in a log buffer, and the first log information is reported to an application processor according to a first set log reporting mode, second log information of a second preset log type is converted into first reported data of a preset data type according to a preset corresponding relationship, and the first reported data is reported to the application processor according to a second set log reporting mode, so that the reporting speed and efficiency of the ADSP log information are improved, and different log information can be reasonably reported according to an adaptive log reporting mode.
On the basis of the foregoing embodiments, the operation of reporting the first log information to the application processor by the first log information reporting module according to a first set log reporting mode is executed in parallel with the operation of reporting the first reported data to the application processor by the second log information reporting module according to a second set log reporting mode.
On the basis of the foregoing embodiments, the reporting, by the first log information reporting module, the reporting, to the application processor of the terminal where the current audio digital signal processor is located, of the first log information according to a first set log reporting manner includes:
determining a reporting time interval corresponding to the first preset log type;
and reporting the first log information to the application processor according to the reporting time interval.
On the basis of the above embodiments, the log type is classified based on a sensor type, a log level, a log information content, or an ADSP architecture functional domain.
On the basis of the above embodiments, the log types are classified into a sensor log type and an ADSP system log type based on the log information content.
On the basis of the foregoing embodiments, the second preset log type includes a sensor log type, and the reporting module of the second log information reports the first reported data to the application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode includes:
and calling a data reporting function corresponding to a preset virtual sensor, reporting the first reported data to the application processor by using the data reporting function, wherein the first reported data instructs the application processor to analyze the received first reported data based on the preset corresponding relation, and obtaining the second log information.
On the basis of the foregoing embodiments, the method includes that the preset virtual sensor includes a plurality of preset virtual sensors, the second log information includes a plurality of second log sub-information, correspondingly, the first reporting data includes a plurality of first reporting data, the second log information reporting module calls a data reporting function corresponding to the preset virtual sensor, and reporting the first reporting data to the application processor by using the data reporting function includes:
respectively using the plurality of first reported subdata as current first reported subdata;
determining the type of a sensor corresponding to the current first reported subdata;
calling a data reporting function of a corresponding target virtual sensor according to the determined sensor type, wherein the target virtual sensor is contained in a plurality of preset virtual sensors, and different preset virtual sensors can be in a called state at the same time;
and reporting the current first report subdata to the application processor by using a data reporting function of the target virtual sensor.
An embodiment of the present application further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a log information reporting method, and the method includes: generating log information in real time by a current audio digital signal processor; storing the generated first log information of a first preset log type into a log buffer area, and reporting the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting mode; and converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation, and reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second preset log reporting mode.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., 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. In addition, 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 that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium including the computer-executable instructions provided in the embodiments of the present application is not limited to the above-described log information reporting operation, and may also perform related operations in the log information reporting method provided in any embodiments of the present application.
The present embodiment provides an audio digital signal processor, on which a computer program is stored, where the computer program, when executed by the audio digital signal processor, implements the log information reporting method provided in any embodiment of the present application.
The embodiment of the application provides a mobile terminal, which can comprise a log information reporting device provided by any embodiment of the application. Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application, and as shown in fig. 6, the mobile terminal may include: the system comprises a sensor 501, a memory 502, a processor (the processor comprises an audio digital signal processor 503 and an application processor 504), and a computer program stored on the memory and capable of being executed by the audio digital signal processor 504, wherein when the computer program is executed by the audio digital signal processor, any one of the log information reporting methods described in the embodiments of the present application is implemented. The memory 502 includes a shared memory of the audio digital signal processor 503 and the application processor, and further includes storage spaces of the audio digital signal processor 503 and the application processor, which are independent of each other.
The embodiment of the application provides a mobile terminal, which can comprise a log information reporting device provided by any embodiment of the application. Fig. 7 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application, and as shown in fig. 7, the mobile terminal may include: a memory 601, a Central Processing Unit (CPU) 602 (also called a processor, hereinafter referred to as CPU), where the CPU includes an application processor AP, and the memory 601 is used for storing executable program codes; the processor 602 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 601, for performing: generating log information in real time by a current audio digital signal processor; storing the generated first log information of a first preset log type into a log buffer area, and reporting the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting mode; and converting the generated second log information of the second preset log type into first reported data of a preset data type according to a preset corresponding relation, and reporting the first reported data to an application processor of the terminal where the current audio digital signal processor is located according to a second preset log reporting mode.
The mobile terminal further includes: peripheral interface 603, RF (Radio Frequency) circuitry 605, audio circuitry 606, audio digital signal processor 613, sensors 614, speakers 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other input/control devices 610, and external port 604, which communicate through one or more communication buses or signal lines 607.
It should be understood that the illustrated mobile terminal 600 is merely one example of a mobile terminal and that the mobile terminal 600 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. 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 following describes in detail the mobile terminal for reporting log information provided in this embodiment, where the mobile terminal takes a mobile phone as an example.
A memory 601, the memory 601 being accessible by the CPU602, the peripheral interface 603, and the like, the memory 601 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 603, said peripheral interface 603 may connect input and output peripherals of the device to the CPU502 and the memory 601.
An I/O subsystem 609, the I/O subsystem 609 may 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. The I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610. Where one or more input controllers 6092 receive electrical signals from or transmit electrical signals to other input/control devices 610, the other input/control devices 610 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 6092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 612, which touch screen 612 is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or transmits electrical signals to the touch screen 612. The touch screen 612 detects a contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 612, that is, to implement a human-computer interaction, where the user interface object displayed on the touch screen 612 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 605 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 605 converts electrical signals to or from electromagnetic signals and communicates with a communication network and other devices. 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 (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603, convert the audio data into an electric signal, and transmit the electric signal to the speaker 611.
An Audio Digital Signal Processor (ADSP)613 for controlling and managing the sensors.
The sensors 614 include an ambient light sensor, a proximity sensor, a gyroscope, an acceleration sensor, and the like.
The speaker 611 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 605 into sound and play the sound to the user.
And a power management chip 608 for supplying power and managing power to the hardware connected to the CPU602, the I/O subsystem, and the peripheral interface 603.
The log information reporting device, the storage medium and the 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 that are not described in detail in the above embodiments, reference may be made to a log information reporting method provided in any embodiment of the present application.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (10)

1. A log information reporting method is characterized by comprising the following steps:
generating log information in real time by a current audio digital signal processor;
storing the generated first log information of a first preset log type into a log buffer area, and reporting the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting mode;
converting second log information of a generated second preset log type into first reported data of a preset data type according to a preset corresponding relation, and reporting the first reported data to an application processor of a terminal where the current audio digital signal processor is located according to a second preset log reporting mode;
the second preset log type comprises a sensor log type;
the reporting of the first reported data to the application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode comprises:
and calling a data reporting function corresponding to a preset virtual sensor, reporting the first reported data to the application processor by using the data reporting function, wherein the first reported data instructs the application processor to analyze the received first reported data based on the preset corresponding relation, and obtaining the second log information.
2. The method of claim 1, wherein the reporting of the first log information to the application processor according to the first predetermined log reporting mode is performed in parallel with the reporting of the first reported data to the application processor according to the second predetermined log reporting mode.
3. The method according to claim 1 or 2, wherein reporting the first log information to the application processor of the terminal where the current audio digital signal processor is located according to a first set log reporting mode comprises:
determining a reporting time interval corresponding to the first preset log type;
and reporting the first log information to the application processor according to the reporting time interval.
4. The method of claim 1, wherein the log type is classified based on sensor type, log level, log information content, or ADSP architecture functional domain.
5. The method of claim 4, wherein the log types are classified into a sensor log type and an ADSP system log type based on log information content.
6. The method of claim 1, wherein the preset virtual sensor includes a plurality of preset virtual sensors, the second log information includes a plurality of second log sub-information, and accordingly, the first reporting data includes a plurality of first reporting sub-data, the invoking a data reporting function corresponding to the preset virtual sensor, and reporting the first reporting data to the application processor by using the data reporting function includes:
respectively using the plurality of first reported subdata as current first reported subdata;
determining the type of a sensor corresponding to the current first reported subdata;
calling a data reporting function of a corresponding target virtual sensor according to the determined sensor type, wherein the target virtual sensor is contained in a plurality of preset virtual sensors, and different preset virtual sensors can be in a called state at the same time;
and reporting the current first report subdata to the application processor by using a data reporting function of the target virtual sensor.
7. A log information reporting device is characterized by comprising:
the log information generating module is used for generating log information in real time by the current audio digital signal processor;
a first log information reporting module, configured to store the generated first log information of a first preset log type in a log buffer, and report the first log information to an application processor of a terminal where the current audio digital signal processor is located according to a first set log reporting manner;
a second log information reporting module, configured to convert second log information of a second preset log type into first reported data of a preset data type according to a preset correspondence, and report the first reported data to an application processor of a terminal where the current audio digital signal processor is located according to a second set log reporting mode;
the second preset log type comprises a sensor log type;
the reporting of the first reported data to the application processor of the terminal where the current audio digital signal processor is located according to a second set log reporting mode comprises:
and calling a data reporting function corresponding to a preset virtual sensor, reporting the first reported data to the application processor by using the data reporting function, wherein the first reported data instructs the application processor to analyze the received first reported data based on the preset corresponding relation, and obtaining the second log information.
8. A computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the log information reporting method according to any one of claims 1 to 6.
9. An audio digital signal processor having a computer program stored thereon, wherein the program, when executed by the audio digital signal processor, implements the log information reporting method according to any one of claims 1 to 6.
10. A mobile terminal comprising a memory, an audio digital signal processor, an application processor and a computer program stored in the memory and being executable on the audio digital signal processor, wherein the processor implements the log information reporting method according to any one of claims 1 to 6 when executing the computer program.
CN201710823514.0A 2017-09-13 2017-09-13 Log information reporting method and device, storage medium, ADSP and terminal Active CN107609117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710823514.0A CN107609117B (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
CN201710823514.0A CN107609117B (en) 2017-09-13 2017-09-13 Log information reporting method and device, storage medium, ADSP and terminal

Publications (2)

Publication Number Publication Date
CN107609117A CN107609117A (en) 2018-01-19
CN107609117B true CN107609117B (en) 2020-09-01

Family

ID=61062138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710823514.0A Active CN107609117B (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) CN107609117B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815198B (en) * 2018-12-10 2021-03-05 北京龙拳风暴科技有限公司 Method and device for implementing big data source layer of mobile game
CN110704342A (en) * 2019-09-20 2020-01-17 Oppo广东移动通信有限公司 Peripheral chip, application processor, terminal device and communication method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461844A (en) * 2014-10-31 2015-03-25 大唐移动通信设备有限公司 Log service method based on rule
CN104657254A (en) * 2013-11-19 2015-05-27 腾讯科技(深圳)有限公司 Operation information processing method and device
CN105429775A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Method and device for reporting log
CN106201844A (en) * 2016-06-29 2016-12-07 北京智能管家科技有限公司 A kind of log collecting method and device
CN106776385A (en) * 2016-12-06 2017-05-31 广东欧珀移动通信有限公司 A kind of transmission method of daily record log information, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5998764B2 (en) * 2012-09-04 2016-09-28 富士通株式会社 Information processing apparatus, log output method, and log output program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657254A (en) * 2013-11-19 2015-05-27 腾讯科技(深圳)有限公司 Operation information processing method and device
CN105429775A (en) * 2014-09-19 2016-03-23 腾讯科技(北京)有限公司 Method and device for reporting log
CN104461844A (en) * 2014-10-31 2015-03-25 大唐移动通信设备有限公司 Log service method based on rule
CN106201844A (en) * 2016-06-29 2016-12-07 北京智能管家科技有限公司 A kind of log collecting method and device
CN106776385A (en) * 2016-12-06 2017-05-31 广东欧珀移动通信有限公司 A kind of transmission method of daily record log information, device and terminal

Also Published As

Publication number Publication date
CN107609117A (en) 2018-01-19

Similar Documents

Publication Publication Date Title
CN107545067B (en) Log information reporting method and device, storage medium, ADSP and terminal
CN108512695B (en) Method and device for monitoring application blockage
US11151010B2 (en) Resource configuration method, mobile terminal and storage medium
JP6333965B2 (en) Technology to track wake clock usage
WO2019128540A1 (en) Resource management method, mobile terminal and computer readable storage medium
CN108153647B (en) Log processing method and device, terminal equipment and storage medium
WO2019137170A1 (en) Information processing method, mobile terminal, and computer readable storage medium
CN111078523B (en) Log acquisition method and device, storage medium and electronic equipment
CN107577542B (en) Log information reporting method and device, storage medium and mobile terminal
CN107562602B (en) Log information reporting method and device, storage medium, ADSP and terminal
CN107609114B (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
CN107609117B (en) Log information reporting method and device, storage medium, ADSP and terminal
WO2019128571A1 (en) Resource management method and device, mobile terminal, as well as computer readable storage medium
CN111858112B (en) Method, client and server for detecting memory leakage
CN110765085A (en) Log information writing method, system, storage medium and mobile terminal
CN107621999B (en) Log information reporting method and device, storage medium and mobile terminal
CN107818036B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN107908492B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN112231077A (en) Application scheduling method and electronic equipment
WO2019137173A1 (en) Resource management method, mobile terminal and computer-readable storage medium
WO2019137187A1 (en) Resource management method and apparatus, mobile terminal and computer-readable storage medium
CN107590241B (en) Log information reporting method and device, storage medium, ADSP and terminal
CN107609118A (en) Log information report method, device and storage medium, ADSP and terminal
CN108170576B (en) Log processing method and device, terminal equipment and storage medium

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
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.

GR01 Patent grant
GR01 Patent grant