CN117320051A - Modem detection method and device, readable storage medium and chip - Google Patents

Modem detection method and device, readable storage medium and chip Download PDF

Info

Publication number
CN117320051A
CN117320051A CN202210709227.8A CN202210709227A CN117320051A CN 117320051 A CN117320051 A CN 117320051A CN 202210709227 A CN202210709227 A CN 202210709227A CN 117320051 A CN117320051 A CN 117320051A
Authority
CN
China
Prior art keywords
modem
standby
sleep
state
log
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.)
Pending
Application number
CN202210709227.8A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210709227.8A priority Critical patent/CN117320051A/en
Publication of CN117320051A publication Critical patent/CN117320051A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The present disclosure relates to a method and an apparatus for detecting a modem, a readable storage medium and a chip, and relates to the field of communication technologies, where the method includes: after the terminal equipment enters a standby state, firstly detecting a standby sleep parameter of the modem, and when detecting that the standby sleep parameter of the modem does not meet a set condition, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs, and further obtaining a log of the modem. The method can timely extract the log of the modem after identifying the standby power consumption abnormality caused by the modem, and the analysis efficiency of the power consumption abnormality can be improved by extracting the log in the mode.

Description

Modem detection method and device, readable storage medium and chip
Technical Field
The disclosure relates to the field of communication technologies, and in particular, to a method and a device for detecting a modem, a readable storage medium and a chip.
Background
The intelligent terminals can be generally classified into an AP (Application Processor ) and a BP (Baseband Processor, baseband processor) from a system level, wherein the AP belongs to an upper layer, and an operating system, a user interface, an application program, and the like are all running on the AP. The BP belongs to the bottom layer, radio frequency communication and the like run on the BP, and a modem is an important module for processing communication functions in the BP.
In the related art, when the power consumption abnormality occurs in the intelligent terminal, the log of the modem is manually required to be obtained in general, but the same power consumption abnormality is often difficult to be reproduced, so that the log of the modem cannot be obtained, and the analysis efficiency of the power consumption abnormality is low.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, a readable storage medium, and a chip for detecting a modem.
According to a first aspect of embodiments of the present disclosure, there is provided a method for detecting a modem, where the method is applied to a terminal device, including:
detecting standby sleep parameters of the modem after the terminal equipment enters a standby state;
when the standby sleep parameter of the modem is detected to be not in accordance with a set condition, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs;
and obtaining a log of the modem.
Optionally, the standby sleep parameter includes a standby sleep rate, and the detecting the standby sleep parameter of the modem includes:
detecting the sleep time of the modem in the standby state and the sleep time of an application processor in the standby state;
And determining the standby sleep rate of the modem according to the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state.
Optionally, the detecting the sleep time of the modem in the standby state, and the sleep time of the application processor in the standby state includes:
acquiring the sum of sleep time durations of each sleep of the modem in a standby period as the sleep time duration of the modem in the standby state, wherein the standby period is a period from the starting time of the terminal equipment entering the standby state to the current time;
and obtaining the sum of the sleep time length of each sleep of the application processor in the standby period as the sleep time length of the application processor in the standby state.
Optionally, the standby sleep parameter includes a standby sleep rate, the set condition includes a set threshold of the standby sleep rate, and when detecting that the standby sleep parameter of the modem does not meet the set condition, determining that a standby power consumption abnormality problem caused by the modem abnormality occurs includes:
And when the standby sleep rate of the modem is lower than the set threshold value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
Optionally, when the standby sleep rate of the modem is lower than the set threshold, determining that a standby power consumption abnormality problem caused by the modem abnormality occurs includes:
and when the standby sleep rate of the modem is lower than the set threshold value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
Optionally, the standby sleep parameter includes standby sleep durations in different protocol stacks, and when detecting that the standby sleep parameter of the modem does not meet a set condition, determining that a standby power consumption abnormality problem caused by the modem abnormality occurs includes:
acquiring standby sleep time lengths of different protocol stacks of the modem, wherein the different protocol stacks correspond to different network systems;
and when the deviation of standby sleep time length of at least two protocol stacks in the different protocol stacks is larger than a set time difference value, determining that the problem of abnormal standby power consumption caused by the abnormal modem occurs.
Optionally, when the deviation of standby sleep durations of at least two protocol stacks in the different protocol stacks is greater than a set time difference value, determining that a standby power consumption abnormality problem caused by the modem abnormality occurs includes:
when the deviation of standby sleep time of at least two protocol stacks in the different protocol stacks is larger than a set time difference value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
Optionally, the obtaining the log of the modem includes:
confirming a grabbing log zone bit state, wherein the grabbing log zone bit state comprises an unclamped state and a grabbing completion state;
and grabbing the log of the modem under the condition that the state of the grabbing log flag bit is confirmed to be the non-grabbing state.
Optionally, the method further comprises:
after the log of the modem is acquired, the sleep time of the modem in a standby state and the sleep time of the application processor in the standby state are emptied;
and modifying the state of the grabbing log zone bit into a grabbing completion state.
Optionally, the method further comprises:
starting timing after the state of the log marker bit is modified into a grabbing completion state, resetting the grabbing log marker bit into the non-grabbing state when the timing time length reaches a preset time length or the terminal equipment enters a next standby state, and detecting standby sleep parameters of a modem until the log of the modem is acquired after the terminal equipment enters the standby state.
Optionally, after the terminal device enters the standby state, before detecting the standby sleep parameter of the modem, the method includes:
and judging whether the terminal equipment is in a standby state or not according to at least one of time information, ambient light intensity and motion sensor information of the terminal equipment.
According to a second aspect of the embodiments of the present disclosure, there is provided a detection apparatus for a modem, the apparatus being applied to a terminal device, including:
the detection module is configured to detect standby sleep parameters of the modem after the terminal equipment enters a standby state;
a determining module configured to determine that an abnormal standby power consumption problem caused by the modem abnormality occurs when it is detected that the standby sleep parameter of the modem does not meet a set condition;
And an acquisition module configured to acquire a log of the modem.
According to a third aspect of the embodiments of the present disclosure, there is provided a detection apparatus for a modem, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the steps of the method of any one of the first aspects are carried out when the executable instructions are executed.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the method for detecting a modem provided by the first aspect of the present disclosure.
According to a fifth aspect of embodiments of the present disclosure, there is provided a chip comprising a processor and an interface; the processor is configured to read instructions to perform the steps of the method of any of the first aspects.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the above technical solution, after the terminal device enters the standby state, firstly, the standby sleep parameter of the modem is detected, and when the standby sleep parameter of the modem is detected to be not in accordance with the set condition, the standby power consumption abnormality problem caused by the modem abnormality is determined to occur, and the log of the modem is further obtained. According to the technical scheme, the problem of abnormal standby power consumption caused by abnormal modems can be automatically identified by the terminal, the logs of the modems can be automatically grabbed, the logs of the modems can be timely extracted after the problem of abnormal standby power consumption caused by the modems is identified, and the analysis efficiency of abnormal power consumption conditions can be improved by extracting the logs in the mode.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of detecting a modem according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method of detecting a modem according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating another modem detection method according to an exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of detecting a modem according to an exemplary embodiment.
Fig. 5 is a flow chart illustrating a method of detecting a modem according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a detection apparatus of a modem according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating a detection apparatus of a modem according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
It should be noted that, all actions for acquiring signals, information or data in the present application are performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
After the terminal equipment enters a standby state, the modem still interacts with the network to ensure the normal work of services such as incoming calls, short messages and the like, when the modem has service activities, the modem wakes up from a sleep state, the modem possibly interacts with the application processor after waking up, so that the application processor is also waken up, when the service activities of the modem or the application processor are finished, the modem returns to the sleep state, when the application processor and the modem are in the sleep state of power consumption, the terminal equipment enters a low power consumption state, and if the modem or the application processor is frequently waken up, the standby power consumption abnormality can be caused. The terminal equipment in the present disclosure may be an intelligent terminal such as a mobile phone, a tablet computer, an intelligent wearable device, a personal computer, and an intelligent television.
In order to analyze and solve the problem of abnormal standby power consumption, the log of the modem or the application processor needs to be obtained generally, and the log of the application processor is generally extracted to consume little electric quantity of the terminal device, so that the method can be realized in the normal operation process of the terminal device, for example, after the problem of abnormal standby power consumption caused by the application processor occurs, the corresponding log can be directly extracted from the log of the application processor. However, extracting the modem log during normal operation of the terminal device results in a higher power consumption, and therefore the modem log is normally turned off by default. The applicant finds that, for the main stream processor platform, when the standby power consumption abnormality occurs, the method generally adopted is to firstly acquire the log of the application processor, analyze the wake-up and sleep conditions of the application processor and the modem in the standby process from the log, if the log of the modem is positioned to be abnormal, acquire the log of the modem by a manual opening mode for further analysis because of the default closing of the log of the modem, but firstly analyze the log of the application processor, and when the problem occurs, the log of the application processor is delayed by the manual opening mode, and the same abnormality condition is difficult to be repeated because the abnormal power consumption problem may have sporance, so if the same abnormal condition cannot be obtained in time after the occurrence of the problem, the log of the modem cannot be acquired by manually extracting the log after the occurrence of the problem, the analysis of the effective modem is possibly caused, the analysis of the abnormal power consumption abnormality is seriously affected, and the analysis efficiency is low.
Accordingly, in order to solve the above-described problems, the present disclosure provides a method of detecting a modem, which will be described below.
Fig. 1 is a flowchart illustrating a method for detecting a modem according to an exemplary embodiment, and as shown in fig. 1, the method for detecting a modem is used in a terminal device, which may be described above, and the method may include the following steps.
In step S101, after the terminal device enters a standby state, a standby sleep parameter of the modem is detected.
The standby state may be understood as a state in which a terminal device such as a mobile phone or a computer is powered on but does not perform any substantial work (no various operations on files and programs), for example, taking a smart phone as an example, the smart phone is left standing, and does not receive any opportunity to operate the smart phone to enter the standby state within a certain period of time, or the smart phone may be considered to enter the standby state after entering the screen locking state. In the standby state, the modem and the application processor of the terminal equipment are in a low-power sleep state under the condition of no service activity, so as to save electric quantity. The sleep parameters of the modem may include a sleep duration in a sleep state.
In step S102, when it is detected that the standby sleep parameter of the modem does not meet the set condition, it is determined that the standby power consumption abnormality problem caused by the modem abnormality occurs.
It will be appreciated that the modem also needs to perform the necessary network interactions during standby to maintain normal traffic. As described above, when the modem is active, it wakes up from a sleep state, possibly interacting with the application processor, resulting in the application processor also waking up. When the activities of the two are finished, the sleep state is returned again. However, when the modem is frequently woken up, the sleep time is far less than that of the application processor, it can be generally determined that the abnormal modem causes an abnormal standby power consumption problem.
In step S103, a log of the modem is acquired.
When it is determined that the problem of the abnormal standby power consumption caused by the abnormality of the modem occurs, in order to solve the problem of the power consumption, a log of the modem may be opened and extracted, and the extracted log is used to analyze the cause of the abnormal standby power consumption caused by the modem.
According to the technical scheme, the problem of abnormal standby power consumption caused by abnormal modems can be automatically identified by the terminal, the logs of the modems can be automatically grabbed, the logs of the modems can be timely extracted after the problem of abnormal standby power consumption caused by the modems is identified, and the analysis efficiency of abnormal power consumption conditions can be improved by extracting the logs in the mode.
Optionally, in one possible implementation manner, before detecting the standby sleep parameter of the modem after the terminal device enters the standby state in step S101, the method may include:
and judging whether the terminal equipment is in a standby state or not according to at least one of time information, ambient light intensity and motion sensor information of the terminal equipment.
By way of example, whether the terminal device is in a standby state may be determined in combination with time information, ambient light intensity, and motion sensor information of the device, for example, the time information of the device is 3 a.m., the terminal device is determined to be currently in a night environment based on the ambient light intensity and the time information, and the terminal device is determined to be in a stand-by state by the motion sensor information, at which time the terminal device may be determined to be in a standby state. For another example, in the case that it is determined that the terminal device is currently in the daytime environment based on the ambient light intensity and the time information, the terminal device may also be determined to be in the standby state.
Fig. 2 is a flowchart of a method for detecting a modem according to an exemplary embodiment, as shown in fig. 2, after the terminal device enters a standby state in step S101, detecting a standby sleep parameter of the modem may include the following steps:
In step S1011, the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state are detected.
Alternatively, step S1011 may include the steps of:
acquiring the sum of sleep time length of each sleep of the modem in a standby period, wherein the sum is used as the sleep time length of the modem in a standby state, and the standby period is a period from the starting time of the terminal equipment entering the standby state to the current time;
and obtaining the sum of the sleep time length of each sleep of the application processor in the standby period as the sleep time length of the application processor in the standby state.
It will be appreciated that in the standby state, the modem and the application processor may be woken up a plurality of times, and that when the application processor is woken up, the duration A of each sleep state of the application processor and the modem from the standby state to the current time is detected i And M j
For example, when the application processor is in a sleep state, the wake flag bit of the application processor may be set to 0 while recording its sleep start time a i1 When the application processor is awakened, the wake flag bit of the application processor may be set to 1, and the current time a is recorded at the same time i2 Sleep duration A of each sleep of application processor i =A i2 -A i1 The method comprises the steps of carrying out a first treatment on the surface of the Similarly, when the modem is in sleep state, the wake-up flag bit of the modem may be set to 0 while recording its sleep start time M j1 When the modem is awakened, the wake-up flag bit of the modem may be set to 1, while recording the current time M j2 Sleep duration M of each sleep of modem j =M j2 -M j1
Further, the sum of the durations of the multiple sleep states is recorded as a sleep duration A of the application processor and the modem in the standby state Total (S) And M Total (S)
Illustratively, A Total (S) And M Total (S) Can be expressed as:
wherein i is more than or equal to 0 and less than h, j is more than or equal to 0 and less than n, h and n can be the number of times the application processor and the modem are awakened in the standby period, h and n are integers, ai represents the ith sleep of the application processor, and Mj represents the jth sleep of the modem. For example, the standby period may be 1 hour, in which case a will wake up 3 times the application processor and 5 times the modem within 1 hour of the duration of the standby state Total (S) And M Total (S) The method comprises the following steps:
step S1012, determining a standby sleep rate of the modem according to the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state.
For example, the standby sleep rate of the modem may be represented by S, and the calculation method of S may be:
optionally, in a possible implementation manner, the standby sleep parameter in step S101 includes a standby sleep rate, and correspondingly, the setting condition in step S102 includes a setting threshold of the standby sleep rate, and when it is detected that the standby sleep parameter of the modem does not meet the setting condition, determining that a problem of abnormal standby power consumption caused by the abnormal modem occurs may include:
when the standby sleep rate of the modem is lower than the set threshold, it is determined that a standby power consumption abnormality problem caused by the modem abnormality occurs.
Optionally, in a possible implementation manner, it may be further determined, in combination with an operation clock state of the modem, whether the modem causes a standby power consumption abnormality problem, and accordingly, when a standby sleep rate of the modem is lower than the set threshold, determining that a standby power consumption abnormality problem caused by the modem abnormality occurs may include:
and when the standby sleep rate of the modem is lower than the set threshold value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
It can be appreciated that in the standby state, when the modem is frequently woken up, its sleep period M Total (S) May be much smaller than the sleep time duration a of the application processor Total (S) The standby sleep rate S of the modem is caused to become low, and when S is lower than a set threshold value, and a flag bit of the running clock state of the modem is set as a set value, the problem of abnormal standby power consumption caused by the abnormality of the modem is determined to occur. For example, a flag of the running clock stateThe flag bit may have a value of 1 or 0, wherein a flag bit of 1 in the running clock state indicates that the running clock state of the modem may be normal, and thus the set value may be 1, so that when S is lower than the set threshold and the flag bit of the running clock state of the modem is 1, it is determined that an abnormal standby power consumption problem caused by the modem abnormality occurs, otherwise, it is considered that the modem does not cause the abnormal standby power consumption problem.
Fig. 3 is a flowchart of another method for detecting a modem according to an exemplary embodiment, as shown in fig. 3, where the standby sleep parameter in step S101 includes standby sleep durations of different protocol stacks of the modem, and when it is detected that the standby sleep parameter of the modem does not meet the set condition in step S102, it is determined that a problem of abnormal standby power consumption caused by the abnormality of the modem occurs, and the method may include the following steps:
Step S1021, obtaining standby sleep time lengths of different protocol stacks of the modem, wherein the different protocol stacks correspond to different network systems.
Illustratively, standby sleep durations of different protocol stacks of the modem are obtained, where the different protocol stacks correspond to different network systems, and the different network systems may include 2G, 3G, 4G, 5G, and so on.
Step S1022, when the deviation of the standby sleep time of at least two protocol stacks in different protocol stacks is greater than the set time difference, determining that the problem of abnormal standby power consumption caused by the abnormal modem occurs.
Optionally, when the deviation of the standby sleep durations of at least two protocol stacks in the different protocol stacks is greater than the set time difference value in step S1022, determining that the problem of abnormal standby power consumption caused by the abnormal modem occurs may include:
when the deviation of standby sleep time of at least two protocol stacks in different protocol stacks is larger than the set time difference value and the flag bit of the running clock state of the modem is the set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
It can be understood that the deviation between standby sleep durations of different protocol stacks of the modem is within a certain range, and when the deviation of standby sleep durations of at least two protocol stacks in different protocol stacks is greater than a set time difference value, the problem of abnormal standby power consumption caused by the abnormality of the modem is determined. For example, assuming that the set time difference is 20 seconds, the standby sleep time of the modem in the 4G protocol stack is 100 seconds, and the standby sleep time of the modem in the 5G protocol stack is 10 seconds, it may be determined that the modem sleep abnormality problem occurs. If more than two network types are supported, in one implementation manner, the difference between the sleep durations of each two protocol stacks can be respectively determined, for example, 3G, 4G and 5G networks are supported, the standby sleep duration of the modem in the 4G protocol stack is 100 seconds, the standby sleep duration of the modem in the 5G protocol stack is 90 seconds, the standby sleep duration of the modem in the 3G protocol stack is 70 seconds, the difference between the standby sleep durations of the modem in the 4G and the 5G protocol stack is less than 20 seconds, but the difference between the standby sleep duration of the modem in the 4G protocol stack and the standby sleep duration of the modem in the 3G protocol stack is 30 seconds, and is more than 20 seconds, and then the abnormal sleep problem of the modem can be determined.
Optionally, after determining whether the deviation of the standby sleep time durations of the at least two protocol stacks is greater than the set time difference, a flag bit of an operation clock of the modem may be combined, and when the deviation of the standby sleep time durations of the at least two protocol stacks is greater than the set time difference, if the flag bit of the operation clock state of the modem is a set value (for example, the set value may be 1) at this time, it may be determined that an abnormal problem of standby power consumption caused by the abnormality of the modem occurs. The setting of the flag bit regarding the running clock state may refer to the content in step S1012 described above, and will not be described again.
Fig. 4 is a flowchart illustrating a method for detecting a modem according to an exemplary embodiment, and the step S103 of obtaining a log of the modem may include the following steps:
step S1031, confirming a status of the grabbing log flag bit, wherein the status of the grabbing log flag bit includes an unclamped status and a grabbing completion status.
Illustratively, the grab log flag C may include an unclamped state (FALSE) and a grab completion state (TRUE), which may need to be validated first before grabbing the modem's log.
In step S1032, when it is confirmed that the status of the log grabbing flag bit is the non-grabbing status, the log of the modem is grabbed.
Further, in the case where the status of the grasp log flag bit is confirmed to be an unclamped status (FALSE), the log of the modem is grasped.
Fig. 5 is a flowchart illustrating a method of detecting a modem according to an exemplary embodiment, and as shown in fig. 5, the method may further include the steps of:
step S104, after the log of the modem is obtained, the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state are emptied.
It will be appreciated that frequent grabbing of the modem log may have additional power consumption effects, so that at most one grabbing of the modem log may be performed in each standby state. After the log of the modem is acquired, the sleep period M of the modem in the standby state is cleared Total (S) And sleep duration a of the application processor in standby state Total (S)
Step S105, the state of the grabbing log zone bit is modified to be a grabbing completion state.
Illustratively, after the log of the modem is obtained, the grab log flag state is modified from an unclamped state (FALSE) to a grab complete state (TRUE).
Optionally, the method may further include:
starting timing after the state of the log marker bit is modified to be a grabbing completion state, resetting the grabbing log marker bit to be an unclamped state when the timing time length reaches a preset time length or the terminal equipment enters a next standby state, and re-executing the step S101 after the terminal equipment enters the standby state, detecting standby sleep parameters of the modem until the step S103 is performed to acquire the log of the modem.
Illustratively, after completing one grasp, a timer with a time length of 24 hours is started, and no further detection action is performed within the 24 hours. After the re-timing duration reaches the preset 24 hours, or when the terminal device enters the next standby state, resetting the status of the grabbing log flag bit from the grabbing completion state (TRUE) to the non-grabbing state (FALSE) to re-execute the step S101 of the method after the terminal device enters the standby state, and detecting the standby sleep parameter of the modem until the step S103 of obtaining the log of the modem.
In the above technical solution, after the terminal device enters the standby state, firstly, the standby sleep parameter of the modem is detected, and when the standby sleep parameter of the modem is detected to be not in accordance with the set condition, the standby power consumption abnormality problem caused by the modem abnormality is determined to occur, and the log of the modem is further obtained. According to the technical scheme, the problem of abnormal standby power consumption caused by abnormal modems can be automatically identified by the terminal, the logs of the modems can be automatically grabbed, the logs of the modems can be timely extracted after the problem of abnormal standby power consumption caused by the modems is identified, and the analysis efficiency of abnormal power consumption conditions can be improved by extracting the logs in the mode.
Fig. 6 is a block diagram illustrating a detection apparatus 600 of a modem according to an exemplary embodiment, and the detection apparatus 600 is applied to a terminal device. Referring to fig. 6, the detection apparatus 600 includes a detection module 610, a determination module 620, and an acquisition module 630.
The detection module 610 is configured to detect a standby sleep parameter of the modem after the terminal device enters a standby state;
the determining module 620 is configured to determine that an abnormal standby power consumption problem caused by the modem abnormality occurs when it is detected that the standby sleep parameter of the modem does not meet a set condition;
the acquisition module 630 is configured to acquire a log of the modem.
Optionally, the standby sleep parameter includes a standby sleep rate, and the detecting module 610 includes: a detection submodule and a determination submodule;
the detection sub-module is configured to: detecting the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state;
the determination submodule is configured to: and determining the standby sleep rate of the modem according to the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state.
Optionally, the detection sub-module is configured to:
acquiring the sum of sleep time durations of each sleep of the modem in a standby period, wherein the sleep time duration is a period from the starting time of the terminal equipment entering the standby state to the current time;
and obtaining the sum of the sleep time length of each sleep of the application processor in the standby period as the sleep time length of the application processor in the standby state.
Optionally, the standby sleep parameter includes a standby sleep rate, and the determining module 620 is configured to:
when the standby sleep rate of the modem is lower than a set threshold, it is determined that a standby power consumption abnormality problem caused by the modem abnormality occurs.
Optionally, the determining module 620 is configured to:
and when the standby sleep rate of the modem is lower than the set threshold value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
Optionally, in another implementation, the standby sleep parameter includes standby sleep durations in different protocol stacks, and the determining module 620 is configured to:
Obtaining standby sleep time lengths of different protocol stacks of the modem, wherein the different protocol stacks correspond to different network systems;
and when the deviation of standby sleep time length of at least two protocol stacks in the different protocol stacks is larger than the set time difference value, determining that the problem of abnormal standby power consumption caused by the abnormal modem occurs.
Optionally, the determining module 620 is configured to:
when the deviation of standby sleep time of at least two protocol stacks in the different protocol stacks is larger than the set time difference value and the flag bit of the running clock state of the modem is the set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
Optionally, the obtaining module 630 is configured to:
confirming a grabbing log zone bit state, wherein the grabbing log zone bit state comprises an unclamped state and a grabbing completion state;
and grabbing the log of the modem under the condition that the state of the grabbing log flag bit is confirmed to be the non-grabbing state.
Optionally, the detecting device 600 of the modem may further include: a processing module;
the processing module is configured to:
after the log of the modem is acquired, the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state are cleared;
And modifying the state of the grabbing log zone bit into a grabbing completion state.
Optionally, the processing module is configured to:
starting timing after the state of the log marker bit is modified into a grabbing completion state, resetting the grabbing log marker bit into an unclamped state when the timing time length reaches a preset time length or the terminal equipment enters a next standby state, and detecting standby sleep parameters of the modem until the log of the modem is acquired after the terminal equipment enters the standby state.
Optionally, the detecting device 600 of the modem may further include: a judging module;
the judging module is configured to:
and judging whether the terminal equipment is in a standby state or not through at least one of time information, ambient light intensity and motion sensor information of the terminal equipment.
According to the technical scheme, the problem of abnormal standby power consumption caused by abnormal modems can be automatically identified by the terminal, the logs of the modems can be automatically grabbed, the logs of the modems can be timely extracted after the problem of abnormal standby power consumption caused by the modems is identified, and the analysis efficiency of abnormal power consumption conditions can be improved by extracting the logs in the mode.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the modem detection method provided by the present disclosure.
Fig. 7 is a block diagram illustrating an apparatus 700 for a method of modem detection, according to an example embodiment. For example, apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, or the like.
Referring to fig. 7, an apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the apparatus 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the modem detection method described above. Further, the processing component 702 can include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on the apparatus 700, contact data, phonebook data, messages, pictures, videos, and the like. The memory 704 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 700.
The multimedia component 708 includes a screen between the device 700 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 700 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
The input/output interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, the sensor assembly 714 may detect an on/off state of the device 700, a relative positioning of the components, such as a display and keypad of the device 700, a change in position of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, an orientation or acceleration/deceleration of the device 700, and a change in temperature of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the apparatus 700 and other devices in a wired or wireless manner. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the above-described method of modem detection.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of apparatus 700 to perform the modem detection method described above. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The apparatus may be a stand-alone electronic device or may be part of a stand-alone electronic device, for example, in one embodiment, the apparatus may be an integrated circuit (Integrated Circuit, IC) or a chip, where the integrated circuit may be an IC or may be a collection of ICs; the chip may include, but is not limited to, the following: GPU (Graphics Processing Unit, graphics processor), CPU (Central Processing Unit ), FPGA (Field Programmable Gate Array, programmable logic array), DSP (Digital Signal Processor ), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), SOC (System on Chip, SOC, system on Chip or System on Chip), etc. The integrated circuit or chip may be configured to execute executable instructions (or code) to implement the modem detection method described above. The executable instructions may be stored on the integrated circuit or chip or may be retrieved from another device or apparatus, such as the integrated circuit or chip including a processor, memory, and interface for communicating with other devices. The executable instructions may be stored in the memory, which when executed by the processor, implement the modem detection method described above; alternatively, the integrated circuit or chip may receive the executable instructions through the interface and transmit the executable instructions to the processor for execution, so as to implement the above-mentioned method for detecting a modem.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described modem detection method when executed by the programmable apparatus.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A method for detecting a modem, applied to a terminal device, comprising:
Detecting standby sleep parameters of the modem after the terminal equipment enters a standby state;
when the standby sleep parameter of the modem is detected to be not in accordance with a set condition, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs;
and obtaining a log of the modem.
2. The method of claim 1, wherein the standby sleep parameter comprises a standby sleep rate, and wherein detecting the standby sleep parameter of the modem after the terminal device enters the standby state comprises:
detecting the sleep time of the modem in the standby state and the sleep time of an application processor in the standby state;
and determining the standby sleep rate of the modem according to the sleep time of the modem in the standby state and the sleep time of the application processor in the standby state.
3. The method of claim 2, wherein the detecting the sleep duration of the modem in the standby state and the sleep duration of the application processor in the standby state comprises:
acquiring the sum of sleep time durations of each sleep of the modem in a standby period, wherein the sum is the sleep time duration of the modem in the standby state, and the standby period is a period from the starting time of the terminal equipment entering the standby state to the current time;
And obtaining the sum of the sleep time length of each sleep of the application processor in the standby period as the sleep time length of the application processor in the standby state.
4. The method of claim 1, wherein the standby sleep parameter comprises a standby sleep rate, the set condition comprises a set threshold of the standby sleep rate, and the determining that the abnormal problem of standby power consumption caused by the abnormal modem occurs when the standby sleep parameter of the modem is detected to be not in compliance with the set condition comprises:
and when the standby sleep rate of the modem is lower than the set threshold value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
5. The method of claim 4, wherein determining that an abnormal standby power consumption problem caused by the modem abnormality occurs when the standby sleep rate of the modem is lower than the set threshold comprises:
and when the standby sleep rate of the modem is lower than the set threshold value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
6. The method of claim 1, wherein the standby sleep parameters include standby sleep durations in different protocol stacks, and wherein determining that a standby power consumption abnormality problem caused by the modem abnormality occurs when the standby sleep parameters of the modem are detected to be not in compliance with a set condition comprises:
acquiring standby sleep time lengths of different protocol stacks of the modem, wherein the different protocol stacks correspond to different network systems;
and when the deviation of standby sleep time length of at least two protocol stacks in the different protocol stacks is larger than a set time difference value, determining that the problem of abnormal standby power consumption caused by the abnormal modem occurs.
7. The method of claim 6, wherein determining that an abnormal standby power consumption problem caused by the modem abnormality occurs when a deviation of standby sleep durations of at least two of the different protocol stacks is greater than a set time difference value comprises:
when the deviation of standby sleep time of at least two protocol stacks in the different protocol stacks is larger than a set time difference value and the flag bit of the running clock state of the modem is a set value, determining that the problem of abnormal standby power consumption caused by the abnormality of the modem occurs.
8. The method of claim 1, wherein the obtaining the log of the modem comprises:
confirming a grabbing log zone bit state, wherein the grabbing log zone bit state comprises an unclamped state and a grabbing completion state;
and grabbing the log of the modem under the condition that the state of the grabbing log flag bit is confirmed to be the non-grabbing state.
9. The method of claim 8, wherein the method further comprises:
after the log of the modem is acquired, the sleep time of the modem in a standby state and the sleep time of the application processor in the standby state are emptied;
and modifying the state of the grabbing log zone bit into a grabbing completion state.
10. The method according to claim 9, wherein the method further comprises:
starting timing after the state of the log marker bit is modified into a grabbing completion state, resetting the grabbing log marker bit into the non-grabbing state when the timing time length reaches a preset time length or the terminal equipment enters a next standby state, and detecting standby sleep parameters of a modem until the log of the modem is acquired after the terminal equipment enters the standby state.
11. The method according to claim 1, characterized in that after the terminal device enters a standby state, before detecting a standby sleep parameter of a modem, the method comprises:
and judging whether the terminal equipment is in a standby state or not according to at least one of time information, ambient light intensity and motion sensor information of the terminal equipment.
12. A modem detection apparatus, applied to a terminal device, comprising:
the detection module is configured to detect standby sleep parameters of the modem after the terminal equipment enters a standby state;
a determining module configured to determine that an abnormal standby power consumption problem caused by the modem abnormality occurs when it is detected that the standby sleep parameter of the modem does not meet a set condition;
and an acquisition module configured to acquire a log of the modem.
13. A modem detection apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the steps of the method of any one of claims 1-11 are implemented when the executable instructions are executed.
14. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the method of any of claims 1-11.
15. A chip, comprising a processor and an interface; the processor being adapted to read instructions to perform the steps of the method of any of claims 1-11.
CN202210709227.8A 2022-06-21 2022-06-21 Modem detection method and device, readable storage medium and chip Pending CN117320051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210709227.8A CN117320051A (en) 2022-06-21 2022-06-21 Modem detection method and device, readable storage medium and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210709227.8A CN117320051A (en) 2022-06-21 2022-06-21 Modem detection method and device, readable storage medium and chip

Publications (1)

Publication Number Publication Date
CN117320051A true CN117320051A (en) 2023-12-29

Family

ID=89295884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210709227.8A Pending CN117320051A (en) 2022-06-21 2022-06-21 Modem detection method and device, readable storage medium and chip

Country Status (1)

Country Link
CN (1) CN117320051A (en)

Similar Documents

Publication Publication Date Title
US10031575B2 (en) Method and device for waking up MCU chip
EP4224294A1 (en) Cross-device content sharing method, electronic device and system
WO2016150163A1 (en) Module wakeup method and apparatus
CN104298547B (en) terminal setting method and device
CN105979088B (en) Message pushing method and device
CN109002387B (en) User reminding method and device of application program, terminal equipment and storage medium
US20160378512A1 (en) Circuit, method, and device for waking up master mcu
CN104899029A (en) Screen control method and apparatus
KR101845877B1 (en) Method and device for waking up mcu
CN113645341B (en) Power key false touch detection method and electronic equipment
CN108108683B (en) Touch response method, mobile terminal and storage medium
CN107783790B (en) Terminal awakening method and device
CN107506019A (en) Management method and device, terminal, the storage medium of application program
CN106371831A (en) Awakening control method and device and terminal
CN108027697A (en) Control the method and device of display interface
CN109634762B (en) Data recovery method and device, electronic equipment and storage medium
CN110856196B (en) WLAN service optimization method, terminal device and storage medium
CN107368175A (en) Reduce processing method, device and the terminal of power consumption of terminal
CN113361305A (en) Fingerprint acquisition method, electronic device and computer-readable storage medium
CN117320051A (en) Modem detection method and device, readable storage medium and chip
CN113282361B (en) Window processing method and electronic equipment
CN113986190A (en) Application processing method and device and electronic equipment
CN111722695B (en) Terminal equipment power consumption optimization method and device
CN112947739A (en) Terminal application program management method and device, terminal and storage medium
CN115904297A (en) Screen display detection method, electronic device 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