Nothing Special   »   [go: up one dir, main page]

CN114422340B - Log reporting method, electronic equipment and storage medium - Google Patents

Log reporting method, electronic equipment and storage medium Download PDF

Info

Publication number
CN114422340B
CN114422340B CN202011086158.7A CN202011086158A CN114422340B CN 114422340 B CN114422340 B CN 114422340B CN 202011086158 A CN202011086158 A CN 202011086158A CN 114422340 B CN114422340 B CN 114422340B
Authority
CN
China
Prior art keywords
log
electronic device
fault
server
type
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
CN202011086158.7A
Other languages
Chinese (zh)
Other versions
CN114422340A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011086158.7A priority Critical patent/CN114422340B/en
Publication of CN114422340A publication Critical patent/CN114422340A/en
Application granted granted Critical
Publication of CN114422340B publication Critical patent/CN114422340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • 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/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/10Scheduling measurement reports ; Arrangements for measurement reports

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a log reporting method, electronic equipment and a storage medium, and relates to the technical field of communication, wherein the method comprises the following steps: generating a first fault code corresponding to a detected fault event in response to the fault event; wherein the first fault code comprises a first type and a second type; counting the frequency of the first type fault event, and starting log reporting based on the frequency; and generating a first log based on the first fault code of the first type, and sending the first log to a server to finish reporting the log. The method provided by the embodiment of the application can improve the association degree of the log and the fault event and the efficiency of log transmission, thereby improving the efficiency of locating the fault according to the log by the server.

Description

Log reporting method, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a log reporting method, electronic equipment and a storage medium.
Background
With the continuous development of wireless communication and information technology, the application of the distributed scene is more and more diversified. However, due to instability of the communication environment in the distributed network, for example, instability of the network such as WIFI, bluetooth, etc., failure rate (for example, access failure, network drop, etc.) of the distributed service is high. To analyze faults in a distributed scenario, devices in the distributed network typically generate logs and report.
Disclosure of Invention
The embodiment of the application provides a log reporting method, electronic equipment and a storage medium, which are used for providing a mode of acquiring logs and sending the logs and improving the association degree of the logs and fault events and the efficiency of log transmission, so that the efficiency of locating faults according to the logs can be improved by a server.
In a first aspect, an embodiment of the present application provides a log reporting method, which is applied to a first electronic device, where the first electronic device and a second electronic device are in a service connection state, and the first electronic device and the second electronic device prohibit log reporting, including:
generating a first fault code corresponding to the fault event in response to the detected fault event; the first fault code comprises a first type and a second type; in particular, the fault event may include a fault detected by the first electronic device, such as a network fault, an application fault, a device fault, a system fault, and the like. The first fault code is used to identify the identity of the fault event, wherein the first fault code may be classified into a first type (e.g., high frequency type) and a second type (e.g., normal type). The first type of first fault code may be used to identify fault events associated with network faults and the second type of first fault code may be used to identify fault events associated with underlying faults.
Counting the frequency of a first type of fault event, and starting log reporting based on the frequency; specifically, the first electronic device may count the frequency of occurrence of the first type of fault event within the preset period of time, and may open log reporting based on the frequency. For example, if the frequency of occurrence of the first type of fault event is greater than or equal to the frequency threshold, log reporting may be initiated.
Generating a first log based on a first fault code of a first type, and sending the first log to a server to finish reporting of the log, wherein the first log comprises a service flow identity for identifying a service flow direction between the first electronic device and the second electronic device.
In one possible implementation, sending the first log to the server includes:
transmitting a first log to a server based on a preset log sampling rate; specifically, the log sampling rate may be a transmission frequency of the log.
In one possible implementation, sending the first log to the server includes:
adjusting a preset log sampling rate based on the frequency of the first type of fault event; specifically, the preset log sampling rate may be adjusted according to the frequency of the first type of fault event, for example, if the frequency of the first type of fault event is increased, the log sampling rate is increased, and if the frequency of the first type of fault event is decreased, the log sampling rate is decreased.
The first log is sent to the server based on the adjusted log sampling rate.
In one possible implementation manner, the method further includes:
and receiving a second log sent by the second electronic equipment, and sending the second log to the server, wherein the second log is generated by the second electronic equipment based on a second fault code of the first type, and the second fault code is generated by the second electronic equipment based on the detected fault event.
In one possible implementation manner, after generating the first fault code corresponding to the fault event in response to the detected fault event, the method further includes:
in response to a first operation by a user, a first log is generated based on a first fault code of a first type, and the first log is sent to a server. Specifically, the user may cause the first electronic device to transmit the first log by performing an operation in the first electronic device. For example, the user may operate in a log reporting application in the first electronic device such that the first electronic device may send the first log.
In one possible implementation manner, the method further includes:
and responding to a second operation of the user, sending a log request to the second electronic equipment, so that the second electronic equipment sends a second log to the first electronic equipment or sends the second log to the server. Specifically, the user may cause the second electronic device to transmit the second log by performing an operation in the first electronic device. For example, a user may operate in a log reporting application in a first electronic device, and in response to the user's operation, the first electronic device may send a log request to a second electronic device, such that the second electronic device sends a first log based on the log request; the first log may be sent to the first electronic device or may be sent to the server.
In a second aspect, an embodiment of the present application provides a log reporting apparatus, including:
the generating module is used for responding to the detected fault event and generating a first fault code corresponding to the fault event; the first fault code comprises a first type and a second type;
the starting module is used for counting the frequency of the first type of fault event and starting log reporting based on the frequency;
the first reporting module is used for generating a first log based on a first fault code of a first type, and sending the first log to the server to finish reporting the log, wherein the first log comprises a service flow identity which is used for identifying a service flow direction between the first electronic equipment and the second electronic equipment.
In one possible implementation manner, the first reporting module is further configured to send the first log to the server based on a preset log sampling rate.
In one possible implementation manner, the first reporting module includes:
the adjusting unit is used for adjusting a preset log sampling rate based on the frequency of the first type of fault event;
and the reporting unit is used for sending the first log to the server based on the adjusted log sampling rate.
In one possible implementation manner, the apparatus further includes:
and receiving a second log sent by the second electronic equipment, and sending the second log to the server, wherein the second log is generated by the second electronic equipment based on a second fault code of the first type, and the second fault code is generated by the second electronic equipment based on the detected fault event.
In one possible implementation manner, the apparatus further includes:
and the second reporting module is used for responding to the first operation of the user, generating a first log based on the first fault code of the first type and sending the first log to the server.
In one possible implementation manner, the apparatus further includes:
and the request module is used for responding to a second operation of the user and sending a log request to the second electronic equipment, so that the second electronic equipment sends a second log to the first electronic equipment or sends the second log to the server.
In a third aspect, an embodiment of the present application provides a first electronic device, including:
a memory for storing computer program code, the computer program code comprising instructions that, when read from the memory by the first electronic device, cause the first electronic device to perform the steps of:
Generating a first fault code corresponding to the fault event in response to the detected fault event; the first fault code comprises a first type and a second type;
counting the frequency of a first type of fault event, and starting log reporting based on the frequency;
generating a first log based on a first fault code of a first type, and sending the first log to a server to finish reporting of the log, wherein the first log comprises a service flow identity for identifying a service flow direction between the first electronic device and the second electronic device.
In one possible implementation manner, the step of causing the first electronic device to perform sending the first log to the server when the instruction is executed by the first electronic device includes:
and sending the first log to a server based on a preset log sampling rate.
In one possible implementation manner, the step of causing the first electronic device to perform sending the first log to the server when the instruction is executed by the first electronic device includes:
adjusting a preset log sampling rate based on the frequency of the first type of fault event;
the first log is sent to the server based on the adjusted log sampling rate.
In one possible implementation manner, the instructions, when executed by the first electronic device, cause the first electronic device to further perform the following steps:
and receiving a second log sent by the second electronic equipment, and sending the second log to the server, wherein the second log is generated by the second electronic equipment based on a second fault code of the first type, and the second fault code is generated by the second electronic equipment based on the detected fault event.
In one possible implementation manner, the step of causing the first electronic device to perform sending the first log to the server when the instruction is executed by the first electronic device includes:
in response to a first operation by a user, a first log is generated based on a first fault code of a first type, and the first log is sent to a server.
In one possible implementation manner, the instructions, when executed by the first electronic device, cause the first electronic device to further perform the following steps:
and responding to a second operation of the user, sending a log request to the second electronic device, so that the second electronic device sends a second log to the first electronic device or sends the second log to the server.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
Fig. 1 is a schematic diagram of a distributed service application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an application scenario of a log reporting method provided by an embodiment of the present application;
FIG. 3 is a flowchart illustrating an embodiment of a log reporting method according to the present application;
FIG. 4 is a flowchart illustrating another embodiment of a log reporting method according to the present application;
FIG. 5 is a flowchart illustrating a log reporting method according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a log reporting device according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
In a distributed network environment, distributed traffic is delivered as traffic flows. Fig. 1 is a schematic diagram of an application scenario of a distributed service. When a distributed fault occurs, the distributed device collects a log, for example, the device a can collect fault events reported by the distributed service through a log engine to generate a log, and send the log to a server for the server to analyze the log, so that the server can locate the fault of the distributed device. The log contains information of fault events. The distributed services between the devices are associated by a service flow identity (track), for example, the distributed service n of the device a and the distributed service n of the device B belong to the same track.
However, the data volume of the log is huge, and if the log generated by the device is transmitted to the server in real time, the massive log can have an influence on the performance of the distributed service and the transmission bandwidth between the device and the server. In addition, when the device acquires the log, only the ordinary log is acquired, and the ordinary log only records simple information such as errors, warnings and the like in service operation and does not record detailed information related to the communication network, so that the server is difficult to locate faults after receiving the ordinary log. Furthermore, at present, different log plug-ins are selected by compiling macros to transmit corresponding logs, which cannot be dynamically adjusted.
The embodiment of the application provides a log reporting method.
Referring to fig. 2, the application scenario provided by the embodiment of the present application is shown in fig. 2, and referring to fig. 2, the application scenario includes a first device 100 (e.g., a mobile phone), a second device 200 (e.g., a large screen, a tablet, a vehicle, etc.), and a server 300.
The connection between the first device 100 and the second device 200 may be established by a wireless manner, where the wireless manner may include WIFI, bluetooth, a cellular mobile network (such as 4G, 5G, etc.), and other wireless communication manners, for example, the first device 100 may be projected onto the second device 200, which is not limited in particular by the present application. The connection between the first device 100 and the server 300 may be established by a wireless manner, and the connection between the second device 200 and the server 300 may be established by a wireless manner, where the wireless manner may include a wireless communication manner such as WIFI, for example, the first device 100 and the second device 200 may send the generated log to the server 300, which is not limited in particular in the present application.
Fig. 3 is a schematic flow chart of an embodiment of a log reporting method according to an embodiment of the present application, where the method includes:
in step 101, the first device 100 establishes a connection with the second device 200.
Specifically, the user may establish a service connection with the second device 200 by starting an application in the first device 100 to complete networking between the first device 100 and the second device 200. Illustratively, the user may click on a screen-cast application on the display interface of the first device 100 to establish a screen-cast connection with the second device 200. In response to the user's operation, the first device 100 establishes a connection with the second device 200, whereby the networking between the first device 100 and the second device 200 can be completed, for example, the first device 100 can be screen-cast on the second device 200.
When the first device 100 and the second device 200 complete networking, the first device 100 and the second device 200 may respectively include a traffic flow identifier (traceid). The service flow id is used to identify flow information of a service flow, and the flow information of the service flow may include a networking device list (for example, an id of the first device 100 and an id of the second device 200), a device call relationship (for example, the first device 100 is on the second device 200, where the first device 100 is a sending end of a screen service, and the second device 200 is a receiving end of the screen service), and so on.
In step 102, the first device 100 detects a fault event and generates a first fault code corresponding to the fault event.
Specifically, the first device 100 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate the fault.
When an application (e.g., a screen-drop application) in the first device 100 fails, for example, the network fails. A corresponding first fault code may be generated based on the current fault event. The first fault code may be used to identify specific information of the present fault in the first device 100, so that the server may analyze and locate the fault. In addition, the first fault code may also be associated with a traffic flow identity and a fault type.
Step 103, the second device 200 acquires the fault event, and generates a second fault code corresponding to the fault event.
Specifically, the second device 200 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate faults
When an application (e.g., a screen-drop application) in the second device 200 fails, for example, the network fails. A corresponding second fault code may be generated based on the current fault event. The second fault code may be used to identify specific information of the present fault in the second device 200, so that the server may analyze and locate the fault. In addition, the second fault code may also be associated with a traffic flow identity and a fault type.
It will be appreciated that steps 102 and 103 are not sequential. Step 102 may be performed before step 103, step 102 may be performed after step 103, and step 102 may also be performed simultaneously with step 103, which is not particularly limited in the embodiment of the present application.
In step 104, the first device 100 starts the log reporting function based on the high frequency type of failure event frequency.
Specifically, the first device 100 may count the frequency of the high frequency type of the fault event, and compare the frequency of the high frequency type of the fault event with a preset first frequency threshold. It should be noted that, the first device 100 generally prohibits log reporting, that is, the first device 100 does not report the log, so that frequent log uploading is avoided from occupying bandwidth. If the frequency of the high-frequency type fault event is greater than or equal to the preset first frequency threshold, the first device 100 may start the log reporting function, that is, the fault occurs more frequently at this time, the first device 100 may report the log, so that the high-frequency log corresponding to the high-frequency type fault event may be reported to the server 300, so that the server 300 locates the fault reported by the first device 100.
In step 105, the second device 200 starts a log reporting function based on the high frequency type of failure event frequency.
Specifically, the second device 200 may count the frequency of the high frequency type of the fault event, and compare the frequency of the high frequency type of the fault event with a preset second frequency threshold. It should be noted that, the second device 200 generally prohibits log reporting, that is, the second device 200 does not report the log, so that frequent log uploading is avoided to occupy bandwidth. If the frequency of the high-frequency type fault event is greater than or equal to the preset second frequency threshold, the second device 200 may start the log reporting function, that is, the fault occurs more frequently at this time, the second device 200 may report the log, so that the high-frequency log corresponding to the high-frequency type fault event may be reported to the server 300, so that the server 300 locates the fault reported by the second device 200.
It will be appreciated that steps 104 and 105 are not sequential. Step 104 may be performed before step 105, step 104 may be performed after step 105, and step 104 may be performed simultaneously with step 105, which is not particularly limited in the embodiment of the present application.
At step 106, the first device 100 transmits the high frequency log to the server 300.
Specifically, the first device 100 may generate a corresponding log according to the fault event. For example, the first device 100 may generate a corresponding high frequency log according to the high frequency type fault event (e.g., the first fault code) acquired in step 103. The high frequency log may include, among other things, a device ID (e.g., an identity of the first device 100), a traffic flow ID (e.g., an identity of the traffic flow), and a fault event ID (e.g., a first fault code).
After the first device 100 generates the high-frequency log, the high-frequency log may be sent to the server 300 according to a preset log sampling rate, so that the server 300 may analyze and locate the fault. Wherein the log sampling rate is used to identify the frequency of transmission of the log.
Optionally, the first device 100 may also dynamically adjust the log sampling rate. Illustratively, the log sampling rate may be adjusted according to the frequency of the faults, the higher the log sampling rate if the frequency of the faults is higher, and the lower the log sampling rate if the frequency of the faults is lower. The first device 100 may then also send the high frequency log to the server 300 according to the adjusted log sampling rate.
In step 107, the second device 200 transmits the high frequency log to the server 300.
Specifically, the second device 200 may generate a corresponding log according to the fault event. For example, the second device 200 may generate a corresponding high frequency log according to the high frequency type fault event (e.g., the second fault code) acquired in step 104. The high frequency log may include, among other things, a device ID (e.g., an identity of the second device 200), a traffic flow ID (e.g., an identity of the traffic flow), and a fault event ID (e.g., a second fault code).
After the second device 100 generates the high-frequency log, the high-frequency log may be sent to the server 300 according to a preset sampling rate, so that the server 300 may analyze and locate the fault.
Optionally, the second device 200 may also dynamically adjust the log sampling rate. Illustratively, the log sampling rate may be adjusted according to the frequency of the faults, the higher the log sampling rate if the frequency of the faults is higher, and the lower the log sampling rate if the frequency of the faults is lower. The second device 200 may then also send the high frequency log to the server 300 according to the adjusted log sample rate.
Fig. 4 is a schematic flow chart of another embodiment of a log reporting method according to an embodiment of the present application, where the method includes:
In step 201, the first device 100 establishes a connection with the second device 200.
Specifically, the user may establish a connection with the second device 200 by starting an application in the first device 100 to complete networking between the first device 100 and the second device 200. Illustratively, the user may click on a screen-cast application on the display interface of the first device 100 to establish a connection with the second device 200. In response to the user's operation, the first device 100 establishes a connection with the second device 200, whereby the networking between the first device 100 and the second device 200 can be completed, for example, the first device 100 can be screen-cast on the second device 200.
When the first device 100 and the second device 200 complete networking, the first device 100 and the second device 200 may respectively include a traffic flow identifier (traceid). The service flow id is used to identify information related to the service flow, and the service flow related information may include a networking device list (for example, an id of the first device 100 and an id of the second device 200), a device call relationship (for example, the first device 100 is on the second device 200, where the first device 100 is a sending end of the screen service, and the second device 200 is a receiving end of the screen service), and so on.
In step 202, the first device 100 acquires a fault event, and generates a first fault code corresponding to the fault event.
Specifically, the first device 100 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate the fault.
When an application (e.g., a screen-drop application) in the first device 100 fails, for example, the network fails. A corresponding first fault code may be generated based on the current fault event. The first fault code may be used to identify specific information of the present fault in the first device 100, so that the server may analyze and locate the fault. In addition, the first fault code may also be associated with a traffic flow identity and a fault type.
In step 203, the second device 200 acquires the fault event, and generates a second fault code corresponding to the fault event.
Specifically, the second device 200 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate faults
When an application (e.g., a screen-drop application) in the second device 200 fails, for example, the network fails. A corresponding second fault code may be generated based on the current fault event. The second fault code may be used to identify specific information of the present fault in the second device 200, so that the server may analyze and locate the fault. In addition, the second fault code may also be associated with a traffic flow identity and a fault type.
It will be appreciated that steps 202 and 203 are not sequential. Step 202 may be performed before step 203, step 202 may be performed after step 203, and step 202 may be performed simultaneously with step 203, which is not particularly limited in the embodiment of the present application.
In step 204, the first device 100 starts the log reporting function based on the high frequency type of failure event frequency.
Specifically, the first device 100 may count the frequency of the high frequency type of the fault event, and compare the frequency of the high frequency type of the fault event with a preset first frequency threshold. If the frequency of the high-frequency type fault event is greater than or equal to the preset first frequency threshold, the first device 100 may start the log reporting function, so that the high-frequency log corresponding to the high-frequency type fault event may be reported to the server 300, so that the server 300 locates the fault reported by the first device 100.
In step 205, the second device 200 starts a log reporting function based on the high frequency type of failure event frequency.
The second device 200 may count the frequency of the high frequency type of the fault event and compare the frequency of the high frequency type of the fault event with a preset second frequency threshold. If the frequency of the high-frequency type fault event is greater than or equal to the preset second frequency threshold, the second device 200 may start the log reporting function, so that the high-frequency log corresponding to the high-frequency type fault event may be reported to the server 300, so that the server 300 locates the fault reported by the second device 200.
It will be appreciated that step 204 and step 205 are not sequential. Step 204 may be performed before step 205, step 204 may be performed after step 205, and step 204 may be performed simultaneously with step 205, which is not particularly limited in the embodiment of the present application.
The second device 200 sends 206 the second high frequency log to the first device 100.
Specifically, the second device 200 may generate a corresponding log according to the fault event. For example, the second device 200 may generate a corresponding second high frequency log according to the high frequency type fault event acquired in step 104. The second high frequency log may include, among other things, a device ID (e.g., an identity of the second device 200), a traffic flow ID (e.g., an identity of the traffic flow), and a fault event ID (e.g., a second fault code).
After the second device 100 generates the second high-frequency log, it may be determined whether the second device 200 has the capability of directly transmitting the second high-frequency log to the server 300, and if the second device 200 determines that the second device does not have the capability of networking, the second high-frequency log may be transmitted to the first device 100 having the capability of networking according to a preset sampling rate.
Optionally, the second device 200 may also dynamically adjust the log sampling rate. Illustratively, the log sampling rate may be adjusted according to the frequency of the faults, the higher the log sampling rate if the frequency of the faults is higher, and the lower the log sampling rate if the frequency of the faults is lower. The second device 200 may then also send the second high frequency log to the first device 100 according to the adjusted log sample rate.
In step 207, the first device 100 transmits the first high frequency log and the second high frequency log to the server 300.
Specifically, the first device 100 may generate a corresponding log according to the fault event. For example, the first device 100 may generate a corresponding first high frequency log according to the high frequency type fault event acquired in step 103. The first high frequency log may include, among other things, a device ID (e.g., an identity of the first device 100), a traffic flow ID (e.g., an identity of the traffic flow), and a fault event ID (e.g., a first fault code).
After the first device 100 generates the first high-frequency log, the first high-frequency log may be sent to the server 300 according to a preset sampling rate, so that the server 300 may analyze and locate the fault.
Optionally, the first device 100 may also dynamically adjust the log sampling rate. Illustratively, the log sampling rate may be adjusted according to the frequency of the faults, the higher the log sampling rate if the frequency of the faults is higher, and the lower the log sampling rate if the frequency of the faults is lower. The first device 100 may then also send the first high frequency log to the server 300 according to the adjusted log sampling rate.
Alternatively, the first device 100 may also transmit the second high frequency log to the server 300 together when transmitting the first high frequency log to the server 300. The first device 100 may also separately transmit the second high frequency log to the server 300, which is not particularly limited in the embodiment of the present application.
In the embodiment of the present application, the second device 200 sends the high-frequency log to the first device 100, so that the problem that the second device 200 cannot send the high-frequency log to the server 300 due to the lack of networking capability can be solved.
Fig. 5 is a schematic flow chart of still another embodiment of a log reporting method according to an embodiment of the present application, where the method includes:
in step 301, the first device 100 establishes a connection with the second device 200.
Specifically, the user may establish a connection with the second device 200 by starting an application in the first device 100 to complete networking between the first device 100 and the second device 200. Illustratively, the user may click on a screen-cast application on the display interface of the first device 100 to establish a connection with the second device 200. In response to the user's operation, the first device 100 establishes a connection with the second device 200, whereby the networking between the first device 100 and the second device 200 can be completed, for example, the first device 100 can be screen-cast on the second device 200.
When the first device 100 and the second device 200 complete networking, the first device 100 and the second device 200 may respectively include a traffic flow identifier (traceid). The service flow id is used to identify information related to the service flow, and the service flow related information may include a networking device list (for example, an id of the first device 100 and an id of the second device 200), a device call relationship (for example, the first device 100 is on the second device 200, where the first device 100 is a sending end of the screen service, and the second device 200 is a receiving end of the screen service), and so on.
In step 302, the first device 100 acquires a fault event and generates a first fault code corresponding to the fault event.
Specifically, the first device 100 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate the fault.
When an application (e.g., a screen-drop application) in the first device 100 fails, for example, the network fails. A corresponding first fault code may be generated based on the current fault event. The first fault code may be used to identify specific information of the present fault in the first device 100, so that the server may analyze and locate the fault. In addition, the first fault code may also be associated with a traffic flow identity and a fault type.
In step 303, the second device 200 acquires the fault event, and generates a second fault code corresponding to the fault event.
Specifically, the second device 200 may preset two types of faults, for example, a normal type and a high frequency type. Wherein, the common type of faults can generate corresponding common logs, and the high frequency type of faults can generate corresponding high frequency logs. The general log contains information of faults, such as alarms, etc., of the system base. The high frequency log may contain information about equipment or network related faults, such as network anomalies. By analyzing the high-frequency log, the server can more accurately and rapidly locate the fault.
When an application (e.g., a screen-drop application) in the second device 200 fails, for example, the network fails. A corresponding second fault code may be generated based on the current fault event. The second fault code may be used to identify specific information of the present fault in the second device 200, so that the server may analyze and locate the fault. In addition, the second fault code may also be associated with a traffic flow identity and a fault type.
It will be appreciated that steps 302 and 303 are not sequential. Step 302 may be performed before step 303, step 302 may be performed after step 303, step 302 may be performed simultaneously with step 303, and embodiments of the present application are not limited in this respect.
In step 304, the first device 100 generates a first high frequency log in response to the user's operation.
Specifically, the user may operate on the first device 100 to initiate log reporting of the first device 100 and the second device 200. Illustratively, the user may click on the log reporting application in the first device 100 to initiate log reporting by the first device 100 and the second device 200. The user may also initiate log reporting of the first device 100 and the second device 200 through other operations, which is not particularly limited in the embodiment of the present application. In response to the user's operation, the first device 100 generates a first high frequency log, wherein the first high frequency log is generated according to the first fault code.
The first device 100 sends 305 a first high frequency log to the server 300.
Specifically, after the first device 100 generates the first high frequency log, the first high frequency log may be transmitted to the server 300.
At step 306, the first device 100 sends a log request to the second device 200.
Specifically, the first device 100 may also send a log request to the second device 200, such that the second device 200 sends a second high frequency log, which is generated according to the second fault code. Wherein the second device 200 may detect its own networking capability before sending the second high frequency log, that is, the second device 200 may detect whether it has the capability to send the log directly to the server. If the second device 200 determines that it has the capability to send the log directly to the server, step 307 is performed. If the second device 200 determines that it does not have the capability to send the log directly to the server, then step 308 is performed.
In step 307, the second device 200 directly transmits the second high frequency log to the server 300.
The second device 200 sends 308 the second high frequency log to the first device 100.
The first device 100 forwards 309 the second high frequency log to the server 300.
In the embodiment of the application, after the user finds out that the equipment has faults, the user can directly operate on the equipment to trigger the report of the log, so that the server can receive the log as soon as possible, delay of the log caused by report based on the sampling rate is avoided, and the user can quickly analyze and position the faults.
Fig. 6 is a schematic structural diagram of an embodiment of a log reporting device according to the present application, and as shown in fig. 6, the log reporting device 60 may include: the generating module 61, the opening module 62 and the first reporting module 63;
a generating module 61, configured to generate a first fault code corresponding to a fault event in response to the detected fault event; the first fault code comprises a first type and a second type;
the opening module 62 is configured to count a frequency of the first type of fault event, and open log reporting based on the frequency;
the first reporting module 63 is configured to generate a first log based on a first fault code of a first type, and send the first log to a server to complete reporting of the log, where the first log includes a service flow identity, and the service flow identity is used to identify a service flow direction between the first electronic device and the second electronic device.
In one possible implementation manner, the first reporting module 63 is further configured to send the first log to the server based on a preset log sampling rate.
In one possible implementation manner, the first reporting module 63 includes: an adjusting unit 631 and a reporting unit 632;
an adjusting unit 631 for adjusting a preset log sampling rate based on the frequency of the first type fault event;
The reporting unit 632 is configured to send the first log to the server based on the adjusted log sampling rate.
In one possible implementation manner, the apparatus further includes: a receiving module 64;
a receiving module 64, configured to receive a second log sent by a second electronic device, and send the second log to the server, where the second log is generated by the second electronic device based on a second fault code of the first type, and the second fault code is generated by the second electronic device based on the detected fault event
In one possible implementation manner, the apparatus further includes: a second reporting module 65;
the second reporting module 65 is configured to generate a first log based on a first fault code of a first type in response to a first operation of a user, and send the first log to the server.
In one possible implementation manner, the apparatus further includes: a request module 66;
the request module 66 is configured to send a log request to the second electronic device in response to a second operation of the user, so that the second electronic device sends a second log to the first electronic device or sends the second log to the server.
The log reporting apparatus provided in the embodiment shown in fig. 6 may be used to implement the technical solution of the method embodiment shown in fig. 2 to 5 of the present application, and the implementation principle and technical effects may be further described with reference to the related descriptions in the method embodiment.
It should be understood that the above division of the modules of the log reporting device shown in fig. 6 is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; it is also possible that part of the modules are implemented in the form of software called by the processing element and part of the modules are implemented in the form of hardware. For example, the detection module may be a separately established processing element or may be implemented integrated in a certain chip of the electronic device. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
For example, the modules above may be one or more integrated circuits configured to implement the methods above, such as: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter ASIC), or one or more microprocessors (Digital Signal Processor; hereinafter DSP), or one or more field programmable gate arrays (Field Programmable Gate Array; hereinafter FPGA), etc. For another example, the modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Fig. 7 is a schematic structural diagram of an embodiment of an electronic device 700 according to the present application, where the first device 100 and the second device 200 may be the electronic device 700. As shown in fig. 7, the electronic device 700 may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (universal serial bus, USB) interface 730, a charge management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an earphone interface 770D, a sensor module 780, keys 790, a motor 791, an indicator 792, a camera 793, a display 794, a subscriber identity module (subscriber identification module, SIM) card interface 795, and the like. The sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an ambient light sensor 780L, a bone conduction sensor 780M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 700. In other embodiments of the application, electronic device 700 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 710 may include one or more processing units such as, for example: processor 710 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 710 for storing instructions and data. In some embodiments, the memory in processor 710 is a cache memory. The memory may hold instructions or data that has just been used or recycled by the processor 710. If the processor 710 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 710 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 710 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 710 may contain multiple sets of I2C buses. The processor 710 may be coupled to the touch sensor 780K, charger, flash, camera 793, etc., respectively, through different I2C bus interfaces. For example: processor 710 may couple touch sensor 780K through an I2C interface, causing processor 710 to communicate with touch sensor 780K through an I2C bus interface, implementing the touch functionality of electronic device 700.
The I2S interface may be used for audio communication. In some embodiments, processor 710 may contain multiple sets of I2S buses. The processor 710 may be coupled to the audio module 770 through an I2S bus to enable communication between the processor 710 and the audio module 770. In some embodiments, the audio module 770 may communicate audio signals to the wireless communication module 760 through an I2S interface to implement a function of answering a call through a bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, audio module 770 and wireless communication module 760 can be coupled by a PCM bus interface. In some embodiments, the audio module 770 may also communicate audio signals to the wireless communication module 760 through a PCM interface to enable a phone call receiving function through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 710 with the wireless communication module 760. For example: the processor 710 communicates with a bluetooth module in the wireless communication module 760 through a UART interface to implement bluetooth functions. In some embodiments, the audio module 770 may transmit an audio signal to the wireless communication module 760 through a UART interface, implementing a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 710 with peripheral devices such as the display 794, camera 793, and the like. The MIPI interfaces include camera serial interfaces (cameraserial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 710 and camera 793 communicate through a CSI interface to implement the photographing function of electronic device 700. Processor 710 and display screen 794 communicate via a DSI interface to implement the display functionality of electronic device 700.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect processor 710 with camera 793, display 794, wireless communication module 760, audio module 770, sensor module 780, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
USB interface 730 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. USB interface 730 may be used to connect a charger to charge electronic device 700, or may be used to transfer data between electronic device 700 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the connection between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 700. In other embodiments of the present application, the electronic device 700 may also use different interfacing manners, or a combination of multiple interfacing manners, as in the above embodiments.
The charge management module 740 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 740 may receive a charging input of a wired charger through the USB interface 730. In some wireless charging embodiments, the charge management module 740 may receive wireless charging input through a wireless charging coil of the electronic device 700. The charging management module 740 may also provide power to the electronic device through the power management module 741 while charging the battery 742.
The power management module 741 is configured to connect the battery 742, and the charge management module 740 and the processor 710. The power management module 741 receives input from the battery 742 and/or the charge management module 740 and provides power to the processor 710, the internal memory 721, the display 794, the camera 793, the wireless communication module 760, and the like. The power management module 741 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 741 may also be disposed in the processor 710. In other embodiments, the power management module 741 and the charge management module 740 may be disposed in the same device.
The wireless communication function of the electronic device 700 may be implemented by the antenna 1, the antenna 2, the mobile communication module 750, the wireless communication module 760, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 700 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 750 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 700. The mobile communication module 750 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 750 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 750 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 750 may be disposed in the processor 710. In some embodiments, at least some of the functional modules of the mobile communication module 750 may be disposed in the same device as at least some of the modules of the processor 710.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 770A, the receiver 770B, etc.), or displays images or video through the display screen 794. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 750 or other functional modules, independent of the processor 710.
The wireless communication module 760 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 700. The wireless communication module 760 may be one or more devices that integrate at least one communication processing module. The wireless communication module 760 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 710. The wireless communication module 760 may also receive signals to be transmitted from the processor 710, frequency modulate them, amplify them, and convert them to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 750 of electronic device 700 are coupled, and antenna 2 and wireless communication module 760 are coupled, such that electronic device 700 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 700 implements display functions through a GPU, a display screen 794, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 710 may include one or more GPUs that execute program instructions to generate or change display information.
The display 794 is used to display images, video, and the like. The display 794 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, a QLED), or the like. In some embodiments, the electronic device 700 may include 1 or N displays 794, N being a positive integer greater than 1.
The electronic device 700 may implement shooting functions through an ISP, a camera 793, a video codec, a GPU, a display screen 794, an application processor, and the like.
The ISP is used to process the data fed back by the camera 793. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 793.
The camera 793 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 700 may include 1 or N cameras 793, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 700 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 700 may support one or more video codecs. In this way, the electronic device 700 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 700 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 720 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 700. The external memory card communicates with the processor 710 via an external memory interface 720 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
Internal memory 721 may be used to store computer-executable program code, including instructions. The internal memory 721 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 700 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 721 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 710 performs various functional applications and data processing of the electronic device 700 by executing instructions stored in the internal memory 721 and/or instructions stored in a memory provided in the processor.
Electronic device 700 may implement audio functions through an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an ear-headphone interface 770D, an application processor, and so forth. Such as music playing, recording, etc.
The audio module 770 is used to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 770 may also be used to encode and decode audio signals. In some embodiments, the audio module 770 may be provided in the processor 710, or some of the functional modules of the audio module 770 may be provided in the processor 710.
Speaker 770A, also known as a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 700 may listen to music, or to hands-free conversations, through the speaker 770A.
Receiver 770B, also known as a "receiver," is used to convert the audio electrical signal into a sound signal. When electronic device 700 is answering a telephone call or voice message, voice can be received by placing receiver 770B close to the human ear.
Microphone 770C, also known as a "microphone" or "microphone," is used to convert sound signals into electrical signals. When making a call or sending voice information, the user can sound near the microphone 770C through his/her mouth, inputting a sound signal to the microphone 770C. The electronic device 700 may be provided with at least one microphone 770C. In other embodiments, the electronic device 700 may be provided with two microphones 770C, which may also perform a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 700 may also be provided with three, four or more microphones 770C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 770D is used to connect a wired earphone. Earphone interface 770D may be a USB interface 730 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, a American cellular telecommunications industry Association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 780A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 780A may be provided on display 794. Pressure sensor 780A
Such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor 780A, the capacitance between the electrodes changes. The electronic device 700 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 794, the electronic apparatus 700 detects the touch operation intensity according to the pressure sensor 780A. The electronic device 700 may also calculate the location of the touch based on the detection signal of the pressure sensor 780A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 780B may be used to determine the motion pose of the electronic device 700. In some embodiments, the angular velocity of electronic device 700 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 780B. The gyro sensor 780B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 780B detects the shake angle of the electronic device 700, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 700 through the reverse motion, so as to realize anti-shake. The gyro sensor 780B may also be used for navigation, somatosensory of game scenes.
The air pressure sensor 780C is used to measure air pressure. In some embodiments, the electronic device 700 calculates altitude from barometric pressure values measured by the barometric pressure sensor 780C, aiding in positioning and navigation.
The magnetic sensor 780D includes a hall sensor. The electronic device 700 may detect the opening and closing of the flip holster using the magnetic sensor 780D. In some embodiments, when the electronic device 700 is a flip machine, the electronic device 700 may detect the opening and closing of the flip according to the magnetic sensor 780D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 780E may detect the magnitude of acceleration of the electronic device 700 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 700 is stationary. The electronic equipment gesture recognition method can also be used for recognizing the gesture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
Distance sensor 780F for measuring distance. The electronic device 700 may measure the distance by infrared or laser. In some embodiments, the scene is photographed and the electronic device 700 can range using the distance sensor 780F to achieve quick focus.
The proximity light sensor 780G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 700 emits infrared light outward through the light emitting diode. The electronic device 700 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that an object is in the vicinity of the electronic device 700. When insufficient reflected light is detected, the electronic device 700 may determine that there is no object in the vicinity of the electronic device 700. The electronic device 700 may detect that the user holds the electronic device 700 in close proximity to the ear using the proximity light sensor 780G, so as to automatically extinguish the screen for power saving purposes. The proximity light sensor 780G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 780L is used to sense ambient light level. The electronic device 700 may adaptively adjust the brightness of the display 794 based on the perceived ambient light level. The ambient light sensor 780L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 780L may also cooperate with the proximity light sensor 780G to detect if the electronic device 700 is in a pocket to prevent false touches.
The fingerprint sensor 780H is used to collect a fingerprint. The electronic device 700 may utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 780J is used to detect temperature. In some embodiments, the electronic device 700 performs a temperature processing strategy using the temperature detected by the temperature sensor 780J. For example, when the temperature reported by temperature sensor 780J exceeds a threshold, electronic device 700 performs a reduction in performance of a processor located near temperature sensor 780J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 700 heats the battery 742 to avoid the low temperature causing the electronic device 700 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the electronic device 700 performs boosting of the output voltage of the battery 742 to avoid abnormal shutdown caused by low temperatures.
Touch sensor 780K, also known as a "touch device". The touch sensor 780K may be disposed on the display 794, and the touch sensor 780K and the display 794 form a touch screen, which is also called a "touch screen". The touch sensor 780K is used to detect a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 794. In other embodiments, the touch sensor 780K may also be disposed on a surface of the electronic device 700 at a different location than the display 794.
The bone conduction sensor 780M may acquire a vibration signal. In some embodiments, bone conduction sensor 780M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 780M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 780M may also be provided in the headset, in combination with an osteoinductive headset. The audio module 770 may analyze the voice signal based on the vibration signal of the sound part vibration bone block obtained by the bone conduction sensor 780M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beat signals acquired by the bone conduction sensor 780M, so that a heart rate detection function is realized.
The keys 790 include a power key, a volume key, etc. Key 790 may be a mechanical key. Or may be a touch key. The electronic device 700 may receive key inputs, generate key signal inputs related to user settings and function control of the electronic device 700.
The motor 791 may generate a vibration alert. The motor 791 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 791 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display screen 794. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 792 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 795 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 795, or removed from the SIM card interface 795 to enable contact and separation with the electronic device 700. The electronic device 700 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 795 may support a Nano SIM card, micro SIM card, etc. The same SIM card interface 795 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 795 may also be compatible with different types of SIM cards. SIM card interface 795 may also be compatible with external memory cards. The electronic device 700 interacts with the network through the SIM card to perform functions such as talking and data communication. In some embodiments, the electronic device 700 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 700 and cannot be separated from the electronic device 700.
It will be appreciated that, in order to achieve the above-mentioned functions, the electronic device includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the application can divide the functional modules of the electronic device and the like according to the method example, for example, each functional module can be divided corresponding to each function, and two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
The functional units in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or, or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor 710 to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. The log reporting method is applied to a first electronic device, the first electronic device and a second electronic device are in a service connection state, and the first electronic device and the second electronic device prohibit log reporting, and is characterized in that the method comprises the following steps:
generating a first fault code corresponding to a detected fault event in response to the fault event; wherein the first fault code comprises a first type and a second type;
counting the frequency of the first type fault event, and starting log reporting based on the frequency;
generating a first log based on the first fault code of the first type, and sending the first log to a server to finish reporting of the log, wherein the first log comprises a service flow identity for identifying a service flow direction between the first electronic device and the second electronic device;
The first electronic device and the second electronic device are terminal devices.
2. The method of claim 1, wherein the sending the first log to a server comprises:
and sending the first log to a server based on a preset log sampling rate.
3. The method of claim 1, wherein the sending the first log to a server comprises:
adjusting a preset log sampling rate based on the frequency of the first type of fault event;
and transmitting the first log to a server based on the adjusted log sampling rate.
4. The method according to claim 1, wherein the method further comprises:
and receiving a second log sent by the second electronic equipment, and sending the second log to the server, wherein the second log is generated by the second electronic equipment based on a second fault code of the first type, and the second fault code is generated by the second electronic equipment based on the detected fault event.
5. The method of claim 1, wherein after generating a first fault code corresponding to the fault event in response to the detected fault event, the method further comprises:
And responding to a first operation of a user, generating a first log based on the first fault code of the first type, and sending the first log to a server.
6. The method according to claim 4, wherein the method further comprises:
and responding to a second operation of the user, sending a log request to the second electronic equipment, so that the second electronic equipment sends the second log to the first electronic equipment or sends the second log to the server.
7. A first electronic device, comprising: a memory for storing computer program code, the computer program code comprising instructions that, when read from the memory by the first electronic device, cause the first electronic device to perform the steps of:
generating a first fault code corresponding to a detected fault event in response to the fault event; wherein the first fault code comprises a first type and a second type;
counting the frequency of the first type fault event, and starting log reporting based on the frequency;
generating a first log based on the first fault code of the first type, and sending the first log to a server to finish reporting of the log, wherein the first log comprises a service flow identity which is used for identifying a service flow direction between the first electronic equipment and the second electronic equipment;
The first electronic device and the second electronic device are terminal devices.
8. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of sending the first log to a server, comprise:
and sending the first log to a server based on a preset log sampling rate.
9. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of sending the first log to a server, comprise:
adjusting a preset log sampling rate based on the frequency of the first type of fault event;
and transmitting the first log to a server based on the adjusted log sampling rate.
10. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to further perform the steps of:
and receiving a second log sent by the second electronic equipment, and sending the second log to the server, wherein the second log is generated by the second electronic equipment based on a second fault code of the first type, and the second fault code is generated by the second electronic equipment based on the detected fault event.
11. The first electronic device of claim 7, wherein the instructions, when executed by the first electronic device, cause the first electronic device to perform the step of generating a first fault code corresponding to a detected fault event in response to the fault event, further comprising:
and responding to a first operation of a user, generating a first log based on the first fault code of the first type, and sending the first log to a server.
12. The first electronic device of claim 10, wherein the instructions, when executed by the first electronic device, cause the first electronic device to further perform the steps of:
and responding to a second operation of the user, sending a log request to the second electronic equipment, so that the second electronic equipment sends the second log to the first electronic equipment or sends the second log to the server.
13. A computer readable storage medium comprising computer instructions which, when run on a first electronic device, cause the first electronic device to perform the method of log reporting of any of claims 1-6.
CN202011086158.7A 2020-10-12 2020-10-12 Log reporting method, electronic equipment and storage medium Active CN114422340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011086158.7A CN114422340B (en) 2020-10-12 2020-10-12 Log reporting method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011086158.7A CN114422340B (en) 2020-10-12 2020-10-12 Log reporting method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114422340A CN114422340A (en) 2022-04-29
CN114422340B true CN114422340B (en) 2023-10-10

Family

ID=81260427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011086158.7A Active CN114422340B (en) 2020-10-12 2020-10-12 Log reporting method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114422340B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049112B (en) * 2022-05-19 2024-07-30 荣耀终端有限公司 Method and system for reporting multi-device log
CN116662129B (en) * 2022-11-02 2024-07-23 荣耀终端有限公司 Log acquisition method, device, chip, electronic equipment and medium
CN117135263B (en) * 2023-02-16 2024-06-07 荣耀终端有限公司 Log information acquisition method, electronic device and computer readable storage medium
CN116225855B (en) * 2023-05-10 2023-09-12 荣耀终端有限公司 Log generation method, electronic equipment and storage medium
CN117687880B (en) * 2023-08-03 2024-10-08 荣耀终端有限公司 Log processing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04117854A (en) * 1990-09-07 1992-04-17 Nec Corp Intermittent fault detection system by network management system
CN101505245A (en) * 2009-03-06 2009-08-12 成都市华为赛门铁克科技有限公司 Method and apparatus for sending log information
CN101616235A (en) * 2009-07-17 2009-12-30 中兴通讯股份有限公司 A kind of V.21 targeting signal detection method
CN105868040A (en) * 2016-03-29 2016-08-17 Tcl通力电子(惠州)有限公司 Log collection method and collection terminal
CN106341259A (en) * 2016-08-26 2017-01-18 乐视控股(北京)有限公司 Fault information report method and device
CN108280011A (en) * 2018-01-16 2018-07-13 北京小米移动软件有限公司 Daily record grasping means and device
CN108768752A (en) * 2018-06-25 2018-11-06 华为技术有限公司 fault locating method, device and system
CN110995468A (en) * 2019-11-13 2020-04-10 上海钧正网络科技有限公司 System fault processing method, device, equipment and storage medium of system to be analyzed
CN111343326A (en) * 2020-04-22 2020-06-26 Oppo广东移动通信有限公司 Method and related device for acquiring test log

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04117854A (en) * 1990-09-07 1992-04-17 Nec Corp Intermittent fault detection system by network management system
CN101505245A (en) * 2009-03-06 2009-08-12 成都市华为赛门铁克科技有限公司 Method and apparatus for sending log information
CN101616235A (en) * 2009-07-17 2009-12-30 中兴通讯股份有限公司 A kind of V.21 targeting signal detection method
CN105868040A (en) * 2016-03-29 2016-08-17 Tcl通力电子(惠州)有限公司 Log collection method and collection terminal
CN106341259A (en) * 2016-08-26 2017-01-18 乐视控股(北京)有限公司 Fault information report method and device
CN108280011A (en) * 2018-01-16 2018-07-13 北京小米移动软件有限公司 Daily record grasping means and device
CN108768752A (en) * 2018-06-25 2018-11-06 华为技术有限公司 fault locating method, device and system
CN110995468A (en) * 2019-11-13 2020-04-10 上海钧正网络科技有限公司 System fault processing method, device, equipment and storage medium of system to be analyzed
CN111343326A (en) * 2020-04-22 2020-06-26 Oppo广东移动通信有限公司 Method and related device for acquiring test log

Also Published As

Publication number Publication date
CN114422340A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN114422340B (en) Log reporting method, electronic equipment and storage medium
CN111095723B (en) Wireless charging method and electronic equipment
CN111399742B (en) Interface switching method and device and electronic equipment
CN113126948B (en) Audio playing method and related equipment
CN113343193B (en) Identity verification method and device and electronic equipment
CN113973398B (en) Wireless network connection method, electronic equipment and chip system
WO2022022319A1 (en) Image processing method, electronic device, image processing system and chip system
CN113490291B (en) Data downloading method and device and terminal equipment
CN114490174B (en) File system detection method, electronic device and computer readable storage medium
CN112099741B (en) Display screen position identification method, electronic device and computer readable storage medium
CN114880251B (en) Memory cell access method, memory cell access device and terminal equipment
CN114554012B (en) Incoming call answering method, electronic equipment and storage medium
CN116389884B (en) Thumbnail display method and terminal equipment
CN115412678B (en) Exposure processing method and device and electronic equipment
CN114338913A (en) Fault diagnosis method and electronic device
CN116662130A (en) Method for counting application use time length, electronic equipment and readable storage medium
CN115389927B (en) Method and system for measuring and calculating motor damping
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN117593236A (en) Image display method and device and terminal equipment
CN114520870B (en) Display method and terminal
CN116048769B (en) Memory recycling method and device and terminal equipment
CN116707050B (en) Method and device for recording charge and discharge times, electronic equipment and readable storage medium
CN116321265B (en) Network quality evaluation method, electronic device and storage medium
CN116708317B (en) Data packet MTU adjustment method and device and terminal equipment
CN115134402B (en) Equipment connection method and electronic equipment

Legal Events

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