Fault data processing method, device and terminal equipment

By generating knowledge graphs and updating status sequence information, the terminal equipment can effectively process fault data, reduce redundant information, improve fault analysis efficiency, and solve the problems of excessive redundant information and low analysis efficiency in the prior art.

CN114201609BActive Publication Date: 2025-06-06HUAWEI DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010979579.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-17
Publication Date
2025-06-06
Estimated Expiration
2040-09-17

AI Technical Summary

Technical Problem

When processing fault data, terminal equipment has the problem of excessive redundant information, which leads to a long compression time and is difficult to directly establish the correspondence between each thread and function in the data, affecting the efficiency of fault analysis.

Method used

By reading the fault data, a knowledge graph is generated, and the status sequence information between entity objects is determined, and the knowledge graph is updated to obtain the target knowledge graph. This method extracts and structures the key information in the fault data to reduce redundant information.

Benefits of technology

It realizes the reduction of fault data compression time, improves fault analysis efficiency, and can quickly locate the cause of failure, reducing the difficulty of optimizing terminal equipment performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201609B_ABST
    Figure CN114201609B_ABST
Patent Text Reader

Abstract

The embodiment of the present application is applicable to the field of terminal technology, and provides a method, apparatus and terminal device for processing fault data, the method comprising: the terminal device reads the fault data, the fault data contains multiple entity objects; the terminal device generates a knowledge graph according to the multiple entity objects; the terminal device determines the state sequence information between the multiple entity objects; the terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data. The above method can be used to structure and serialize the fault data, so that the processed data retains the key feature information of the original fault data, which helps to reduce the time spent on compressing the fault data and improve the efficiency of subsequent analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the field of terminal technology, and in particular, relate to a method, apparatus and terminal device for processing fault data. Background Art

[0002] Usually, when a terminal device fails, it can automatically collect fault data for analysis by relevant personnel. For example, terminal devices with operating systems will automatically generate system tracing (systrace) data when frame loss, freeze, and other faults occur. After compressing the generated systrace data, the terminal device can store it locally for analysis and processing by relevant personnel to locate the cause of the fault and optimize device performance.

[0003] Generally, it takes about 1-10 seconds for a terminal device to generate systrace data. The data content in the systrace data is about 100,000-1 million lines, and the data size is about 10-100 megabytes. However, most of the information in the systrace data is redundant, and only a small part of the key information can be analyzed and processed. It will take a lot of time for the terminal device to compress all the generated systrace data. In addition, the terminal device generates systrace data in a pipeline form, which makes it difficult to directly establish the correspondence between the threads and functions in the data, which is not conducive to subsequent fault analysis. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus and terminal device for processing fault data, which are used to structure and serialize fault data so that the processed data retains the key feature information of the original fault data, helps to reduce the time spent on compressing fault data and improve the efficiency of subsequent analysis.

[0005] In a first aspect, an embodiment of the present application provides a method for processing fault data, including:

[0006] The terminal device reads fault data, wherein the fault data includes a plurality of entity objects;

[0007] The terminal device generates a knowledge graph according to the multiple entity objects;

[0008] The terminal device determines state sequence information between the plurality of entity objects;

[0009] The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data.

[0010] In a possible implementation of the first aspect, when the terminal device reads the fault data, it may read each row of data in the fault data in real time during the generation of the fault data. By reading each row of data in the fault data in real time, the processing efficiency of the fault data can be improved.

[0011] In a possible implementation of the first aspect, the terminal device reads each row of data in the fault data in real time. The terminal device may determine multiple keywords for marking entity objects, and then use each keyword to match each row of data in the fault data in turn; if any keyword is matched in the current row of data, the terminal device extracts the entity object corresponding to the matched keyword from the current row of data.

[0012] In a possible implementation of the first aspect, the entity object extracted by the terminal device may include multiple threads and multiple functions. When the terminal device generates a knowledge graph based on the multiple entity objects, it can first determine the logical relationship between the threads and the calling relationship between the threads and the functions; then, the terminal device generates a knowledge graph based on the logical relationship between the threads and the calling relationship between the threads and the functions.

[0013] In a possible implementation of the first aspect, the above-mentioned state sequence information may include thread state sequence information, and the terminal device determines the state sequence information between multiple entity objects, which may include: the terminal device determines the time point corresponding to each row of data in the fault data; the terminal device determines the thread state of the target thread at the time point, and determines the duration of each thread state according to the time point, and the target thread is any one of the multiple threads; then, the terminal device can arrange each thread state according to the sequence of time points and the duration of each thread state to obtain the thread state sequence information of the target thread.

[0014] In a possible implementation of the first aspect, the terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data, which may include: the terminal device adds the thread state sequence information of multiple threads to the knowledge graph; then, the terminal device updates the logical relationship between each thread to the logical relationship between the thread states of each thread to obtain the target knowledge graph.

[0015] In a possible implementation of the first aspect, the above-mentioned state sequence information may also include function state sequence information. The terminal device determines the state sequence information between multiple entity objects, and may also include: the terminal device determines multiple target functions called by the target thread, and determines the start and end time points when each target function is called; then, the terminal device determines the hierarchical calling relationship between each target function based on the start and end time points when each target function is called, and arranges each target function in the order of the start and end time points to obtain the function state sequence information of each target function.

[0016] In a possible implementation of the first aspect, the terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data, and also includes: the terminal device updates the calling relationship between threads and functions in the knowledge graph to function state sequence information to obtain the target knowledge graph.

[0017] In a possible implementation of the first aspect, when generating the target knowledge graph, the terminal device may also determine the attribute information and priority of each entity object based on the fault data, and add the attribute information and priority of each entity object to the target knowledge graph.

[0018] In a possible implementation of the first aspect, after generating the target knowledge graph, the terminal device can compress the target knowledge graph and store the compressed target knowledge graph locally on the device.

[0019] In a second aspect, an embodiment of the present application provides a device for processing fault data, including: a fault data reading module, a knowledge graph generation module, a state sequence information determination module and a knowledge graph update module, wherein:

[0020] The fault data reading module is used to read the fault data, wherein the fault data includes a plurality of entity objects.

[0021] The knowledge graph generation module is used to generate a knowledge graph based on multiple entity objects.

[0022] The state sequence information determination module is used to determine the state sequence information between multiple entity objects.

[0023] The knowledge graph updating module is used to update the knowledge graph according to the state sequence information to obtain the target knowledge graph that matches the fault data.

[0024] In a possible implementation manner of the second aspect, the fault data reading module may include a fault data reading submodule, wherein:

[0025] The fault data reading submodule is used to read each row of data in the fault data in real time during the generation process of the fault data.

[0026] In a possible implementation manner of the second aspect, the fault data reading submodule may include a keyword determination unit, a keyword matching unit, and an entity object extraction unit, wherein:

[0027] The keyword determination unit is used to determine a plurality of keywords, where the plurality of keywords are words that mark entity objects.

[0028] The keyword matching unit is used to use each keyword to match each row of data in the fault data in turn.

[0029] The entity object extraction unit is used to extract the entity object corresponding to the matched keyword from the current row of data if any keyword is matched in the current row of data.

[0030] In a possible implementation manner of the second aspect, the entity object may include multiple threads and multiple functions, and the above-mentioned knowledge graph generation module may include a thread logical relationship determination submodule, a function call relationship determination submodule, and a knowledge graph generation submodule, wherein:

[0031] The thread logic relationship determination submodule is used to determine the logical relationship between threads.

[0032] The function call relationship determination submodule is used to determine the call relationship between threads and functions.

[0033] The knowledge graph generation submodule is used to generate a knowledge graph based on the logical relationship between threads and the calling relationship between threads and functions.

[0034] In a possible implementation manner of the second aspect, the state sequence information may include thread state sequence information, and the state sequence information determination module may include a time point determination submodule, a thread state and duration determination submodule, and a thread state sequence information generation submodule, wherein:

[0035] A time point determination submodule is used to determine the time point corresponding to each row of data in the fault data;

[0036] The thread state and duration determination submodule is used to determine the thread state of the target thread at a time point and determine the duration of each thread state according to the time point. The target thread is any one of the multiple threads.

[0037] The thread state sequence information generation submodule is used to arrange each thread state according to the sequence of time points and the duration of each thread state to obtain the thread state sequence information of the target thread.

[0038] In a possible implementation manner of the second aspect, the knowledge graph updating module may include a thread state sequence information adding submodule and a logical relationship updating submodule, wherein:

[0039] The thread state sequence information adding submodule is used to add the thread state sequence information of multiple threads to the knowledge graph.

[0040] The logical relationship update submodule is used to update the logical relationship between each thread into the logical relationship between the thread states of each thread to obtain the target knowledge graph.

[0041] In a possible implementation manner of the second aspect, the state sequence information may further include function state sequence information, and the state sequence information determination module may include a target function determination submodule, a start and end time point determination submodule, a hierarchical call relationship determination submodule, and a function state sequence information generation submodule, wherein:

[0042] The target function determination submodule is used to determine multiple target functions called by the target thread.

[0043] The start and end time point determination submodule is used to respectively determine the start and end time points at which each target function is called.

[0044] The hierarchical calling relationship determination submodule is used to determine the hierarchical calling relationship between various target functions according to the start and end time points when each target function is called.

[0045] The function state sequence information generating submodule is used to arrange each objective function in the order of the start and end time points to obtain the function state sequence information of each objective function.

[0046] In a possible implementation manner of the second aspect, the knowledge graph updating module may further include a calling relationship updating submodule, wherein:

[0047] The calling relationship updating submodule is used to update the calling relationship between threads and functions in the knowledge graph to function state sequence information to obtain the target knowledge graph.

[0048] In a possible implementation manner of the second aspect, the apparatus may further include an attribute information and priority determination module and an attribute information and priority adding module, wherein:

[0049] The attribute information and priority determination module is used to determine the attribute information and priority of each entity object according to the fault data.

[0050] The attribute information and priority adding module is used to add the attribute information and priority of each entity object to the target knowledge graph.

[0051] In a possible implementation manner of the second aspect, the apparatus may further include a target knowledge graph compression module and a target knowledge graph storage module, wherein:

[0052] The target knowledge graph compression module is used to compress the target knowledge graph.

[0053] The target knowledge graph storage module is used to store the compressed target knowledge graph locally on the device.

[0054] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for processing fault data as described in any one of the first aspects above when executing the computer program.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and is characterized in that when the computer instructions are executed by a processor, a method for processing fault data as described in any one of the above-mentioned first aspects is implemented.

[0056] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the fault data processing method described in any one of the first aspects above.

[0057] In a sixth aspect, an embodiment of the present application provides a chip, comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement a method for processing fault data as described in any one of the first aspects above.

[0058] Compared with the prior art, the embodiments of the present application include the following beneficial effects:

[0059] In the embodiment of the present application, the terminal device can generate a knowledge graph based on multiple entity objects contained in the fault data by reading the fault data. These knowledge graphs can reflect the corresponding relationships between the various entity objects, such as the logical relationship between threads, the calling relationship between threads and functions, etc. On this basis, the terminal device can further mine the different state changes of each entity object when the terminal device fails by determining the state sequence information between multiple entity objects. The terminal device can obtain a target knowledge graph that matches the fault data by updating the generated knowledge graph using the above state sequence information. The target knowledge graph can not only reflect the relationship between entity objects, but also clarify the relationship between different states of entity objects. In the embodiment of the present application, the terminal device generates a knowledge graph and updates the knowledge graph based on the state sequence information, so that the target knowledge graph finally obtained only retains the key information in the fault data, reduces the amount of redundant information, and can easily and quickly locate the fault, thereby improving the efficiency of fault analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a structural diagram of a terminal device provided in an embodiment of the present application;

[0061] Figure 2 is a schematic flowchart of a method for processing fault data provided in an embodiment of the present application;

[0062] FIG3( a ) is a schematic diagram of a knowledge graph provided in an embodiment of the present application;

[0063] FIG3( b ) is a schematic diagram of another knowledge graph provided in an embodiment of the present application;

[0064] FIG. 4( a ) is a schematic diagram of thread state sequence information provided by an embodiment of the present application;

[0065] FIG4( b ) is a schematic diagram of another type of thread state sequence information provided by an embodiment of the present application;

[0066] Figure 5 is a schematic diagram of function state sequence information provided by an embodiment of the present application;

[0067] Figure 6 is a schematic diagram of a target knowledge graph provided in an embodiment of the present application;

[0068] Figure 7 is a schematic flowchart of another method for processing fault data provided in an embodiment of the present application;

[0069] Figure 8 is a schematic diagram of another thread state sequence information provided by an embodiment of the present application;

[0070] Fig. 9 is a schematic diagram of another function state sequence information provided by an embodiment of the present application;

[0071] Fig.10 is a schematic diagram of another target knowledge graph provided in an embodiment of the present application;

[0072] Fig.11 is a schematic diagram of another target knowledge graph provided in an embodiment of the present application;

[0073] Fig.12 It is a schematic diagram of a fault data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. For example, the first thread, the second thread, the third thread, etc. are only used to distinguish different threads, and their number and execution order are not limited.

[0075] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0076] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0077] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0078] The steps involved in the method for processing fault data provided in the embodiment of the present application are only examples. Not all steps must be performed, or not all contents in each step are optional. They can be increased or decreased as needed during use.

[0079] The same step or steps or contents with the same functions in different embodiments of the present application can be referenced to each other.

[0080] The fault data processing method provided in the embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.

[0081] For example, the terminal device can be a station (STAION, ST) in a wireless local area network (WLAN), a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a PDA device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set top box (set top box, STB), customer premise equipment (customer premise equipment, CPE) and / or other devices used to communicate on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (public land mobile network, PLMN), etc.

[0082] As an example but not limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but can also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0083] For example, Figure 1 The schematic diagram of the structure of a terminal device is shown. The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0084] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0085] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0086] The controller may be the nerve center and command center of the terminal device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0087] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0088] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0089] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100.

[0090] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0091] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0092] In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0093] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.

[0094] In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0095] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.

[0096] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0097] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices, such as AR devices, etc.

[0098] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0099] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the terminal device through the power management module 141.

[0100] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.

[0101] In some other embodiments, the power management module 141 may also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.

[0102] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0103] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0104] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.

[0105] In some embodiments, at least some functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 may be disposed in the same device as at least some modules of the processor 110.

[0106] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate 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. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0107] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0108] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0109] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0110] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0111] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0112] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0113] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal 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 other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0114] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0115] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0116] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the terminal device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0117] In an embodiment of the present application, the NPU or other processor can be used to perform operations such as face detection, face tracking, face feature extraction, and image clustering on face images in the video stored in the terminal device 100; perform operations such as face detection, face feature extraction, and other operations on face images in pictures stored in the terminal device 100, and cluster the pictures stored in the terminal device 100 based on the facial features of the pictures and the clustering results of face images in the video.

[0118] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0119] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the terminal device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc.

[0120] In addition, the internal memory 121 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0121] The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0122] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0123] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The terminal device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0124] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the ear.

[0125] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The terminal device 100 can be provided with at least one microphone 170C. In other embodiments, the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0126] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0127] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The terminal device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.

[0128] In some embodiments, touch operations acting on the same touch position but with different touch operation strengths may correspond to different operation instructions. For example, when a touch operation with a touch operation strength less than a first pressure threshold acts on a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation strength greater than or equal to the first pressure threshold acts on a short message application icon, an instruction to create a new short message is executed.

[0129] The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0130] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0131] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0132] The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and applied to applications such as horizontal and vertical screen switching and pedometers.

[0133] The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0134] The proximity light sensor 180G 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 terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and pocket mode automatically unlocks and locks the screen.

[0135] The ambient light sensor 180L is used to sense the ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touch.

[0136] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0137] The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0138] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the terminal device 100, which is different from the position of the display screen 194.

[0139] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 180M can also contact the human body's pulse to receive blood pressure beating signals.

[0140] In some embodiments, the bone conduction sensor 180M can also be set in the earphone to form a bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vocal bone obtained by the bone conduction sensor 180M to realize the voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize the heart rate detection function.

[0141] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100.

[0142] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0143] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0144] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the terminal device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.

[0145] Reference Figure 2 , shows a schematic diagram of the steps of a method for processing fault data provided by an embodiment of the present application, the method can be applied to Figure 1 In the terminal device 100 of the structure shown, the method may specifically include the following steps:

[0146] S201. A terminal device reads fault data, wherein the fault data includes multiple entity objects.

[0147] In an embodiment of the present application, the fault data may be automatically generated by an operating system installed in the terminal device when a certain fault occurs in the terminal device; or, the fault data may be automatically generated by an application configured in the terminal device when a certain fault occurs in the terminal device, and the embodiment of the present application is not limited to this.

[0148] For example, when a terminal device experiences a freeze or frame loss fault during operation, the operating system or configured application installed in the terminal device may generate fault data for the fault.

[0149] In a possible implementation of the embodiment of the present application, running When the terminal device of the operating system encounters frame loss, freeze, and other faults, The performance analysis tools provided by the operating system can automatically generate fault data, namely systrace data.

[0150] Fault data may contain multiple entity objects, such as processes, threads, functions, and so on.

[0151] Generally, a process is the basic unit for allocating and managing resources during the execution of concurrently executed programs. A thread is also called a lightweight process. A thread is an entity in a process and is the basic unit that is independently scheduled and dispatched by the system. A thread does not own system resources, but it can share all the resources owned by the process with other threads belonging to the same process. A thread can create and cancel another thread, and multiple threads in the same process can execute concurrently. A thread can implement various functions on a terminal device by calling corresponding functions. For example, a thread can implement page rendering on a terminal device by calling corresponding rendering functions.

[0152] In an embodiment of the present application, when a terminal device fails, the terminal device can read automatically generated fault data for relevant personnel to analyze the specific cause of the failure so as to optimize the performance of the terminal device.

[0153] S202. The terminal device generates a knowledge graph based on the multiple entity objects.

[0154] Generally, the fault data read by the terminal device may include various types of information, but not all of the information can be used to analyze the cause of the fault of the terminal device. In other words, there is a large amount of redundant information in the fault data read by the terminal device, which is not helpful for analyzing the cause of the fault.

[0155] Therefore, in the embodiment of the present application, the terminal device can process the read fault data in a targeted manner, reduce the amount of redundant information, and retain key information that can be used for fault analysis.

[0156] In a possible implementation of an embodiment of the present application, when the terminal device performs targeted processing on fault data, it can first generate a knowledge graph based on multiple entity objects contained in the fault information.

[0157] Knowledge graphs are a series of different graphics that show the development process and structural relationship of knowledge. Knowledge graphs can use visualization technology to describe knowledge resources and their carriers, and mine, analyze, construct, draw and display knowledge and their interrelationships.

[0158] In an embodiment of the present application, the knowledge graph generated based on multiple entity objects can be a visual image showing various relationships between processes and threads, threads and threads, and threads and functions.

[0159] As shown in FIG3(a), it is a schematic diagram of a knowledge graph provided by an embodiment of the present application. In FIG3(a), a first thread and a second thread are included. The first thread and the second thread may be two entity objects obtained by the terminal device by reading fault data. Among them, the arrow from the first thread to the second thread may represent a certain relationship between the first thread and the second thread. For example, the wake-up relationship between the first thread and the second thread.

[0160] As shown in FIG3(b), it is a schematic diagram of another knowledge graph provided by an embodiment of the present application. In FIG3(b), a first thread, a first function, and a second function are included. The first thread, the first function, and the second function may also be entity objects obtained by the terminal device by reading fault data. Among them, the arrows from the first thread to the first function and the second function may indicate that there is a calling relationship between the first thread and the first function and the second function. For example, the first thread may implement a corresponding function on the terminal device by calling the first function.

[0161] S203: The terminal device determines state sequence information between the multiple entity objects.

[0162] In an embodiment of the present application, the state sequence information of the entity object may include thread state sequence information of a thread and / or function state sequence information of a function.

[0163] The thread state sequence information may refer to the change of the thread state of a certain thread over time in the fault data read by the terminal device. For example, in the time period from T1 to T2, the thread state of the first thread is state 1, in the time period from T2 to T3, the thread state of the first thread is state 2, in the time period from T3 to T4, the thread state of the first thread is state 3, and so on.

[0164] As shown in FIG4(a), it is a schematic diagram of a thread state sequence information provided by an embodiment of the present application. In FIG4(a), it includes a first thread and the thread states of the first thread in various time periods, namely, state 1, state 2, and state 3. The length of the boxes used to represent each thread state in FIG4(a) can reflect the duration of each state. For example, the duration corresponding to state 1 can be the time period from T1 to T2, and the duration corresponding to state 2 can be the time period from T2 to T3.

[0165] In a possible implementation of the embodiment of the present application, the thread state sequence information can also be used to represent the interaction of multiple threads in different states. For example, for the wake-up relationship between the first thread and the second thread shown in FIG3 (a), the terminal device can determine by reading the fault data that the first thread wakes up the second thread when it is in state 1, so that the second thread enters the runnable state (state 2) from the sleep state (state 1), and the above relationship can be represented by the thread state sequence information shown in FIG4 (b).

[0166] Function state sequence information can be used to indicate the situation in which a function is called by a thread and the hierarchical calling relationship between the function and other functions. For example, in the time period from T1 to T4, the first function is called by the first thread; in the time period from T2 to T3, the first function calls the second function. The function state sequence information can be used to indicate the calling relationship between the first function and the first thread and the calling relationship between the first function and the second function. The above-mentioned time period from T2 to T3 is a subset of the time period from T1 to T4.

[0167] As for the calling relationship between the first thread and the first function and the second function shown in FIG3(b), based on the above analysis, it can be known that the first function calls the second function. Figure 5 The function state sequence information shown is represented.

[0168] S204. The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data.

[0169] In an embodiment of the present application, based on the terminal device generating a knowledge graph based on multiple entity objects, the terminal device can further update and improve the above knowledge graph by determining the state sequence information between each entity object, thereby obtaining a target knowledge graph that retains key information in the fault data.

[0170] like Figure 6 Shown is a schematic diagram of a target knowledge graph provided in an embodiment of the present application. Figure 6 The target knowledge graph shown in is the knowledge graph obtained by updating the state sequence information of the entity object into the knowledge graph based on Figure 3(a) and Figure 3(b).

[0171] In an embodiment of the present application, the terminal device can generate a knowledge graph based on multiple entity objects contained in the fault data by reading the fault data. These knowledge graphs can reflect the corresponding relationships between the various entity objects, such as the logical relationship between threads, the calling relationship between threads and functions, etc. On this basis, the terminal device can further mine the different state changes of each entity object when the terminal device fails by determining the state sequence information between multiple entity objects. The terminal device can obtain a target knowledge graph that matches the fault data by updating the generated knowledge graph using the above state sequence information. The target knowledge graph can not only reflect the relationship between entity objects, but also clarify the relationship between different states of entity objects. In an embodiment of the present application, the terminal device generates a knowledge graph and updates the knowledge graph based on the state sequence information, so that the target knowledge graph finally obtained only retains the key information in the fault data, reduces the amount of redundant information, and can easily and quickly locate the fault, thereby improving the efficiency of fault analysis.

[0172] Reference Figure 7 , shows a schematic diagram of the steps of another method for processing fault data provided by an embodiment of the present application. The method can be applied to Figure 1 In the terminal device 100 of the structure shown, the method may specifically include the following steps:

[0173] S701. During the generation of the fault data, the terminal device reads each row of data in the fault data in real time.

[0174] Usually, when a terminal device encounters a certain fault, the terminal device can automatically generate corresponding fault data through a performance analysis tool or application to record the operation status of each process and thread during the process of generating the fault. In order to facilitate subsequent analysis and processing of the fault, the terminal device can read the above fault data.

[0175] In a possible implementation manner of the embodiment of the present application, the terminal device reads the fault data by reading each row of data in the fault data in real time during the generation process of the fault data.

[0176] In an embodiment of the present application, fault data is generated in a pipeline form. When the corresponding performance analysis tool or application generates each line of fault data, the terminal device can read the line of data in real time, thereby improving the processing efficiency of the fault data.

[0177] Exemplarily, the fault data may be in the following form:

[0178] Row 1:

[0179] InputDispatcher-2244(1568)

[004] ....112583.763093:tracing_mark_write:E|1568

[0180] Line 2:

[0181] InputDispatcher-2244(1568)

[004] ....112583.763097:tracing_mark_write:E|1568

[0182] Line 3:

[0183] InputDispatcher-2244(1568)

[004] ....112583.763103:tracing_mark_write:B|1568|pokeUserActivity

[0184] Line 4:

[0185] InputDispatcher-2244(1568)

[004] ....112583.763106:tracing_mark_write:E|1568

[0186] Line 5:

[0187] InputDispatcher-2244(1568)

[004] ....112583.763109:tracing_mark_write:B|1568|pokeUserActivity

[0188] Line 6:

[0189] InputDispatcher-2244(1568)

[004] ....112583.763110:tracing_mark_write:E|1568

[0190] Line 7:

[0191] InputDispatcher-2244(1568)

[004] ....112583.763130:tracing_mark_write:C|1568|wq:PointerEventDispatcher0(server)|0

[0192] Line 8:

[0193] com.tencent.mm-21764(21764)

[005] d..4 112583.763133:sched_wakeup:comm=default_matrix_pid=22135prio=120target_cpu=000

[0194] Line 9:

[0195] InputDispatcher-2244(1568)

[004] ....112583.763135:tracing_mark_write:B|1568|startDispatchCycleLocked(inputChannel=PointerEventDispatcher0(server))

[0196] Line 10:

[0197] InputDispatcher-2244(1568)

[004] ....112583.763136:tracing_mark_write:E|1568

[0198] …

[0199] It should be noted that the words "row 1", "row 2", ... "row 10" and the like in the above-mentioned fault data are only added for the convenience of explaining the embodiment of the present application. In the actual fault data, there is no such mark for each row of data.

[0200] The following is an introduction to the meaning of each part of the data in combination with the above specific fault data.

[0201] Take the data in row 1 as an example. The string "InputDispatcher" at the beginning of the data in this row indicates the current task (TASK). The number "2244" after the string indicates the thread that executes the task, that is, the thread number (PID) of this thread. The number "1568" in the parentheses after the thread number indicates the process number, that is, the thread corresponding to the thread number "2244" belongs to the process corresponding to the process number "1568". The number "004" in the brackets is the CPU number, indicating that the task "InputDispatcher" runs on the CPU numbered "004". The number string "112583.763093" is the timestamp (TIMESTAMP). The timestamp in each row indicates the time point when the terminal device records the fault data in this row; the timestamps recorded in the fault data of different rows are different. The data after the timestamp indicates the specific function (FUNCTION), which is used to reflect the operations such as wake-up and replacement between threads, as well as the call of the function by the thread.

[0202] Referring to the data in row 8, the string "sched_wakeup:comm=default_matrix_pid=22135" indicates the wake-up operation between threads. That is, thread "21764" wakes up thread "22135". In this row of data, "prio=120" indicates the priority of the thread. The operations between threads in other rows of data can be identified in a similar manner.

[0203] Referring to the data in rows 1 to 5, the string "tracing_mark_write" indicates that a function call exists at the time point corresponding to each row of data. Among them, the letter "B" after the string "tracing_mark_write" indicates the beginning (Begin) of the function call, the character "E" indicates the end (End) of the function call, and the number "1568" after the letter "B" or "E" is the process number, which is the same as the process number represented by the number in the parentheses in each row of data. Specifically, referring to the data in row 3, the string "pokeUserActivity" after the process number "1568" is the function name, indicating that the function is called at the current time point. It should be noted that for the fault data in the above example, the terminal device can directly identify which function is called at the beginning of the function call through the records in the fault data; and when the function call ends, it is impossible to directly identify which function is called through the fault data. That is, in each row of data, there is no specific record of the function name after the letter "E". Therefore, it is necessary to match through the corresponding algorithm to find out the function that has ended the current call. Based on the relationship of the "stack" in the computer, the called function generally starts first and ends later. Therefore, for a row of fault data that records the end of a function call, by finding the "Begin" closest to the "End" in the rows before the row of data, it is possible to determine which function has ended the current call. For example, for the above-mentioned 3rd and 4th rows of data, the 3rd row of data records "B|1568|pokeUserActivity" and the 4th row of data records "E|1568". Through algorithm matching, it can be known that at the time point "112583.763103" in the 3rd row of data, the function "pokeUserActivity" begins to be called, and at the time point "112583.763106" in the 4th row of data, the function "pokeUserActivity" ends.

[0204] Of course, there are some nested relationships between thread calls to functions, that is, after a thread calls a function, the function calls another function. In other words, there may be a certain hierarchical relationship between functions. The thread calls the first-level function, the first-level function calls the second-level function, and the second-level function calls the third-level function.

[0205] By reading each line of fault data and analyzing and processing it, we can understand the state relationship between threads and the nested and hierarchical relationship between functions.

[0206] The terminal device can read each row of fault data in real time when the row is generated.

[0207] In the embodiment of the present application, each line of data in the fault data read in real time by the terminal device may include:

[0208] The terminal device determines multiple keywords, where the multiple keywords are words that mark entity objects; the terminal device uses each keyword to match each row of data in the fault data in turn; if any keyword is matched in the current row of data, the terminal device extracts the entity object corresponding to the matched keyword from the current row of data.

[0209] In an embodiment of the present application, a keyword may be a word used to mark an entity object. When a terminal device uses a keyword to match a hit in the fault data, the content corresponding to the fault data here is the information marked by the keyword. For example, the terminal device uses the keyword "pid" to match in the fault data. Since the keyword marks the thread number, when the terminal device matches and hits the keyword in the fault data, the information corresponding to the hit keyword can be identified as the corresponding object, that is, the thread number. For another example, the terminal device uses the keyword "prev_prio" to match in the fault data. Since the keyword marks the thread priority, when the terminal device matches and hits the keyword in the fault data, the information corresponding to the hit keyword can be identified as the corresponding thread priority.

[0210] The terminal device can obtain multiple entity objects and relationship information between the entity objects by reading the generated fault information line by line.

[0211] S702: The terminal device determines the logical relationship between threads and the calling relationship between threads and functions.

[0212] In an embodiment of the present application, the relationship information between the various entity objects obtained by the terminal device by reading the fault data may include the logical relationship between the various threads, and the calling relationship between the threads and the functions.

[0213] Exemplarily, the logical relationship between threads may include a wake-up relationship between a first thread and a second thread, a replacement relationship between a second thread and a third thread, and so on.

[0214] S703. The terminal device generates a knowledge graph based on the logical relationship between the threads and the calling relationship between the threads and functions.

[0215] In an embodiment of the present application, after determining the logical relationship between threads and the calling relationship between threads and functions, the terminal device can generate a knowledge graph as shown in Figure 3(a) and Figure 3(b) based on the logical relationship and calling relationship.

[0216] S704: The terminal device determines state sequence information between the multiple entity objects, where the state sequence information includes thread state sequence information and function state sequence information.

[0217] In an embodiment of the present application, the state sequence information between entity objects may include thread state sequence information and function state sequence information.

[0218] In a possible implementation manner of the embodiment of the present application, the terminal device determines the thread state sequence information between multiple threads, which may include:

[0219] The terminal device determines the time point corresponding to each row of data in the fault data; the terminal device determines the thread state of the target thread at each time point, and determines the duration of each thread state according to the time point; the terminal device arranges each thread state according to the sequence of the time points and the duration of each thread state, and obtains thread state sequence information of the target thread. The above target thread is any one of the multiple threads.

[0220] In the embodiment of the present application, each row of data in the fault data has corresponding time information, and the time point at which the row of data was generated can be determined by reading the time information. The terminal device can determine the thread state of each thread at the time point corresponding to each row of data by reading the state of each thread recorded in the row of data. Then, the terminal device can obtain the duration of each thread state of the thread by analyzing multiple rows of data.

[0221] For example, if the terminal device obtains the following flow information by reading the fault data:

[0222] Time T1: The first thread wakes up the second thread, and the second thread enters the runnable state

[0223] Time T2: The third thread replaces the second thread, and the second thread enters the running state

[0224] Time T3: The second thread replaces the fourth thread, and the second thread enters the sleeping state

[0225] Time T4: The fifth thread wakes up the second thread, and the second thread enters the runnable state again

[0226] Then, the sequence corresponding to the thread state and duration of the second thread in the time period from T1 to T4 can be expressed as: (runnable, T2-T1), (running, T3-T2), (sleeping, T4-T3). In each time period, the threads interacting with the second thread are the first thread, the third thread, and the fourth thread. The above sequence can be expressed as follows: Figure 8 The thread state sequence information shown is represented.

[0227] It should be noted that Figure 8 The thread state sequence shown is drawn with the second thread as the target thread, and only shows the changes of each thread state of the second thread, omitting the specific changes of the thread states of other threads.

[0228] In a possible implementation manner of the embodiment of the present application, the terminal device determines the function state sequence information between multiple functions, which may include:

[0229] The terminal device determines multiple target functions called by the target thread; the terminal device determines the start and end time points of each target function being called; the terminal device determines the hierarchical calling relationship between each target function based on the start and end time points of each target function being called, and arranges each target function in the order of the start and end time points to obtain function state sequence information of each target function.

[0230] In the embodiment of the present application, since each row of data in the fault data has corresponding time information, the terminal device can determine the time point when the row of data is generated by reading the time information. On this basis, the terminal device can determine whether each function is called by a certain thread by reading the status of each function recorded in the row of data. If the function is called, the terminal device can obtain the start and end time points of the function call by analyzing multiple rows of data, that is, the duration of the function call.

[0231] For example, if the terminal device obtains the following flow information by reading the fault data:

[0232] Time T1: Second thread - first function - begin

[0233] Time T2: Second thread - second function - begin

[0234] T3: Second thread—end

[0235] T4: Second thread—end

[0236] …

[0237] Time Tm: Second thread - Mth function - begin

[0238] Tm+1: Second thread - Nth function - begins

[0239] Tn moment: Second thread—end

[0240] Tn+1: Second thread—end

[0241] By analyzing the above transaction information, we can get the following information:

[0242] 1. The thread to which the first function and the second function belong is the second thread;

[0243] 2. The first function starts to be called at time T1 and ends to be called at time T4;

[0244] 3. The second function starts to be called at time T2 and ends to be called at time T3;

[0245] 4. The first function calls the second function;

[0246] …

[0247] The thread to which the m, Mth function and Nth function belong is the second thread;

[0248] m+1, the time when the Mth function starts to be called is Tm, and the time when it ends to be called is Tn+1;

[0249] n. The time when the Nth function starts to be called is Tm+1, and the time when it ends to be called is Tn;

[0250] n+1. The Mth function calls the Nth function.

[0251] The above sequence can be obtained by Fig. 9 The function state sequence information shown is represented.

[0252] S705. The terminal device adds the thread state sequence information of the multiple threads to the knowledge graph, and updates the logical relationship between the threads to the logical relationship between the thread states of the threads.

[0253] S706. The terminal device updates the calling relationship between the thread and the function in the knowledge graph to the function state sequence information to obtain the target knowledge graph.

[0254] In an embodiment of the present application, after the terminal device determines the thread state sequence information and the function state sequence information based on the fault data, it can update the above thread state sequence information and function state sequence information to the generated knowledge graph to obtain the target knowledge graph.

[0255] For example, the terminal device may use Figure 8 The thread state sequence shown and Fig. 9 The function state sequence shown in FIG3(a) and FIG3(b) is updated to obtain the following: Fig.10 The target knowledge graph shown above removes redundant information in the fault data and only retains the key information for fault analysis.

[0256] In the embodiment of the present application, the terminal device can also determine the attribute information and priority of each entity object according to the fault data. The attribute information may include ID attributes such as process number and thread number, and the priority may include the priority between threads. Fig.10 Based on the target knowledge graph shown in FIG. 1 , the terminal device can also add the attribute information and priority of each entity object to the target knowledge graph, and obtain the following Fig.11 The target knowledge graph shown.

[0257] In a possible implementation of the embodiment of the present application, in order to facilitate relevant personnel to analyze the cause of the fault and solve it in a targeted manner, the terminal device generates the following Fig.11 After the target knowledge graph is shown, the target knowledge graph can be compressed and the compressed target knowledge graph can be stored locally on the device to be provided to relevant personnel.

[0258] The embodiment of the present application can reduce the amount of redundant information contained in the final generated target knowledge graph by structuring and serializing fault data, retaining only key information in the fault data, which helps to quickly process fault data, facilitate locating the cause of the fault, and improve the efficiency of improving business performance.

[0259] The embodiment of the present application can divide the functional modules of the terminal device according to the above method example. For example, each functional module can be divided corresponding to each function, or one or more functions can be integrated into one functional module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0260] Reference Fig.12, showing a schematic diagram of a fault data processing device provided in an embodiment of the present application, the device can be applied to Figure 1 In the terminal device shown, the apparatus may include a fault data reading module 1201, a knowledge graph generating module 1202, a state sequence information determining module 1203 and a knowledge graph updating module 1204, wherein:

[0261] The fault data reading module is used to read the fault data, wherein the fault data includes a plurality of entity objects.

[0262] The knowledge graph generation module is used to generate a knowledge graph based on multiple entity objects.

[0263] The state sequence information determination module is used to determine the state sequence information between multiple entity objects.

[0264] The knowledge graph updating module is used to update the knowledge graph according to the state sequence information to obtain the target knowledge graph that matches the fault data.

[0265] In the embodiment of the present application, the fault data reading module may include a fault data reading submodule, wherein:

[0266] The fault data reading submodule is used to read each row of data in the fault data in real time during the generation process of the fault data.

[0267] In an embodiment of the present application, the fault data reading submodule may include a keyword determination unit, a keyword matching unit, and an entity object extraction unit, wherein:

[0268] The keyword determination unit is used to determine a plurality of keywords, where the plurality of keywords are words that mark entity objects.

[0269] The keyword matching unit is used to use each keyword to match each row of data in the fault data in turn.

[0270] The entity object extraction unit is used to extract the entity object corresponding to the matched keyword from the current row of data if any keyword is matched in the current row of data.

[0271] In an embodiment of the present application, an entity object may include multiple threads and multiple functions, and the above-mentioned knowledge graph generation module may include a thread logic relationship determination submodule, a function call relationship determination submodule, and a knowledge graph generation submodule, wherein:

[0272] The thread logic relationship determination submodule is used to determine the logical relationship between threads.

[0273] The function call relationship determination submodule is used to determine the call relationship between threads and functions.

[0274] The knowledge graph generation submodule is used to generate a knowledge graph based on the logical relationship between threads and the calling relationship between threads and functions.

[0275] In an embodiment of the present application, the state sequence information may include thread state sequence information, and the state sequence information determination module may include a time point determination submodule, a thread state and duration determination submodule, and a thread state sequence information generation submodule, wherein:

[0276] A time point determination submodule is used to determine the time point corresponding to each row of data in the fault data;

[0277] The thread state and duration determination submodule is used to determine the thread state of the target thread at a time point and determine the duration of each thread state according to the time point. The target thread is any one of the multiple threads.

[0278] The thread state sequence information generation submodule is used to arrange each thread state according to the sequence of time points and the duration of each thread state to obtain the thread state sequence information of the target thread.

[0279] In an embodiment of the present application, the knowledge graph update module may include a thread state sequence information adding submodule and a logic relationship updating submodule, wherein:

[0280] The thread state sequence information adding submodule is used to add the thread state sequence information of multiple threads to the knowledge graph.

[0281] The logical relationship update submodule is used to update the logical relationship between each thread into the logical relationship between the thread states of each thread to obtain the target knowledge graph.

[0282] In an embodiment of the present application, the state sequence information may further include function state sequence information, and the state sequence information determination module may include a target function determination submodule, a start and end time point determination submodule, a hierarchical call relationship determination submodule, and a function state sequence information generation submodule, wherein:

[0283] The target function determination submodule is used to determine multiple target functions called by the target thread.

[0284] The start and end time point determination submodule is used to respectively determine the start and end time points at which each target function is called.

[0285] The hierarchical calling relationship determination submodule is used to determine the hierarchical calling relationship between various target functions according to the start and end time points when each target function is called.

[0286] The function state sequence information generating submodule is used to arrange each objective function in the order of the start and end time points to obtain the function state sequence information of each objective function.

[0287] In the embodiment of the present application, the knowledge graph update module may further include a call relationship update submodule, wherein:

[0288] The calling relationship updating submodule is used to update the calling relationship between threads and functions in the knowledge graph to function state sequence information to obtain the target knowledge graph.

[0289] In the embodiment of the present application, the above-mentioned device may further include an attribute information and priority determination module and an attribute information and priority adding module, wherein:

[0290] The attribute information and priority determination module is used to determine the attribute information and priority of each entity object according to the fault data.

[0291] The attribute information and priority adding module is used to add the attribute information and priority of each entity object to the target knowledge graph.

[0292] In the embodiment of the present application, the above-mentioned device may further include a target knowledge graph compression module and a target knowledge graph storage module, wherein:

[0293] The target knowledge graph compression module is used to compress the target knowledge graph.

[0294] The target knowledge graph storage module is used to store the compressed target knowledge graph locally on the device.

[0295] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0296] An embodiment of the present application also provides a terminal device, which may be the terminal device in the aforementioned embodiments, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for processing fault data in the aforementioned embodiments is implemented.

[0297] An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on a terminal device, the terminal device executes the above-mentioned related method steps to implement the fault data processing method in the above-mentioned embodiment.

[0298] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for processing fault data in the above-mentioned embodiment.

[0299] The embodiment of the present application further provides a chip, which may be a general-purpose processor or a dedicated processor. The chip includes a processor. The processor is used to support the terminal device to execute the above-mentioned related steps to implement the method for processing fault data in the above-mentioned embodiment.

[0300] Optionally, the chip further includes a transceiver, and the transceiver is used to accept the control of the processor and to support the terminal device to execute the above-mentioned related steps to implement the fault data processing method in the above-mentioned embodiment.

[0301] Optionally, the chip may also include a storage medium.

[0302] It should be noted that the chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.

[0303] In combination with the above, the present application provides the following embodiments:

[0304] Embodiment 1: A method for processing fault data, comprising:

[0305] The terminal device reads fault data, wherein the fault data includes a plurality of entity objects;

[0306] The terminal device generates a knowledge graph according to the multiple entity objects;

[0307] The terminal device determines state sequence information between the plurality of entity objects;

[0308] The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data.

[0309] Embodiment 2: According to the method of embodiment 1, the terminal device reads the fault data, including:

[0310] During the generation of the fault data, the terminal device reads each row of data in the fault data in real time.

[0311] Embodiment 3: According to the method of embodiment 2, the terminal device reads each line of data in the fault data in real time, including:

[0312] The terminal device determines a plurality of keywords, where the plurality of keywords are words that mark the entity object;

[0313] The terminal device uses each keyword to match each row of data in the fault data in turn;

[0314] If any keyword is matched in the current row of data, the terminal device extracts the entity object corresponding to the matched keyword from the current row of data.

[0315] Embodiment 4: According to the method described in any one of Embodiments 1 to 3, the entity object includes multiple threads and multiple functions, and the terminal device generates a knowledge graph according to the multiple entity objects, including:

[0316] The terminal device determines the logical relationship between threads and the calling relationship between threads and functions;

[0317] The terminal device generates a knowledge graph based on the logical relationship between the threads and the calling relationship between the threads and functions.

[0318] Embodiment 5: According to the method of embodiment 4, the state sequence information includes thread state sequence information, and the terminal device determines the state sequence information between the multiple entity objects, including:

[0319] The terminal device determines a time point corresponding to each row of data in the fault data;

[0320] The terminal device determines a thread state of a target thread at the time point, and determines a duration of each thread state according to the time point, the target thread being any one of the multiple threads;

[0321] The terminal device arranges each thread state according to the sequence of the time points and the duration of each thread state to obtain thread state sequence information of the target thread.

[0322] Embodiment 6, according to the method of embodiment 5, the terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data, including:

[0323] The terminal device adds the thread state sequence information of the multiple threads to the knowledge graph;

[0324] The terminal device updates the logical relationship between the threads into the logical relationship between the thread states of the threads to obtain the target knowledge graph.

[0325] Embodiment 7, according to the method of embodiment 5 or embodiment 6, the state sequence information further includes function state sequence information, and the terminal device determines the state sequence information between the multiple entity objects, further including:

[0326] The terminal device determines a plurality of target functions called by the target thread;

[0327] The terminal device determines the start and end time points of calling each target function respectively;

[0328] The terminal device determines the hierarchical calling relationship between the objective functions according to the start and end time points when the objective functions are called, and arranges the objective functions in the order of the start and end time points to obtain function state sequence information of the objective functions.

[0329] Embodiment 8, according to the method of embodiment 7, the terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data, further comprising:

[0330] The terminal device updates the calling relationship between the thread and the function in the knowledge graph to the function state sequence information to obtain the target knowledge graph.

[0331] Embodiment 9: The method according to any one of Embodiments 1 to 8, further comprising:

[0332] The terminal device determines the attribute information and priority of each entity object according to the fault data;

[0333] The terminal device adds the attribute information and priority of each entity object to the target knowledge graph.

[0334] Embodiment 10: The method according to embodiment 9 further includes:

[0335] The terminal device compresses the target knowledge graph and stores the compressed target knowledge graph locally on the device.

[0336] Embodiment 11: A device for processing fault data, applied to a terminal device, comprising:

[0337] A fault data reading module, used to read fault data, wherein the fault data includes multiple entity objects;

[0338] A knowledge graph generation module, used to generate a knowledge graph according to the multiple entity objects;

[0339] A state sequence information determination module, used to determine the state sequence information between the plurality of entity objects;

[0340] A knowledge graph updating module is used to update the knowledge graph according to the state sequence information to obtain a target knowledge graph that matches the fault data.

[0341] Embodiment 12: According to the device of embodiment 11, the fault data reading module comprises:

[0342] The fault data reading submodule is used to read each row of data in the fault data in real time during the generation process of the fault data.

[0343] Embodiment 13: According to the device of embodiment 12, the fault data reading submodule comprises:

[0344] The keyword determination unit is used to determine a plurality of keywords, where the plurality of keywords are words that mark the entity object.

[0345] The keyword matching unit is used to use each keyword to match each row of data in the fault data in turn.

[0346] The entity object extraction unit is used to extract the entity object corresponding to the matched keyword from the current row of data if any keyword is matched in the current row of data.

[0347] Embodiment 14: According to the device of any one of Embodiments 11 to 13, the entity object includes multiple threads and multiple functions, and the knowledge graph generation module includes:

[0348] The thread logic relationship determination submodule is used to determine the logical relationship between threads.

[0349] The function call relationship determination submodule is used to determine the call relationship between threads and functions.

[0350] Generate a knowledge graph generation submodule, which is used to generate a knowledge graph based on the logical relationship between the threads and the calling relationship between the threads and functions.

[0351] Embodiment 15, according to the apparatus of embodiment 14, the state sequence information includes thread state sequence information, and the state sequence information determination module includes:

[0352] The time point determination submodule is used to determine the time point corresponding to each row of data in the fault data.

[0353] The thread state and duration determination submodule is used to determine the thread state of the target thread at the time point, and determine the duration of each thread state according to the time point, wherein the target thread is any one of the multiple threads.

[0354] The thread state sequence information generating submodule is used to arrange each thread state according to the sequence of the time points and the duration of each thread state to obtain the thread state sequence information of the target thread.

[0355] Embodiment 16, according to the device of embodiment 15, the knowledge graph updating module includes:

[0356] The thread state sequence information adding submodule is used to add the thread state sequence information of the multiple threads to the knowledge graph.

[0357] The logical relationship updating submodule is used to update the logical relationship between each thread into the logical relationship between the thread states of each thread to obtain the target knowledge graph.

[0358] Embodiment 17: According to the apparatus of embodiment 15 or embodiment 16, the state sequence information further includes function state sequence information, and the state sequence information determination module further includes:

[0359] The target function determination submodule is used to determine multiple target functions called by the target thread.

[0360] The start and end time point determination submodule is used to respectively determine the start and end time points at which each target function is called.

[0361] The hierarchical calling relationship determination submodule is used to determine the hierarchical calling relationship between the various target functions according to the start and end time points when the various target functions are called.

[0362] The function state sequence information generating submodule is used to arrange the various objective functions in the order of the start and end time points to obtain the function state sequence information of the various objective functions.

[0363] Embodiment 18, according to the apparatus of embodiment 17, the knowledge graph updating module further includes:

[0364] The calling relationship updating submodule is used to update the calling relationship between the thread and the function in the knowledge graph to the function state sequence information to obtain the target knowledge graph.

[0365] Embodiment 19: The device according to any one of Embodiments 11 to 18, further comprising:

[0366] The attribute information and priority determination module is used to determine the attribute information and priority of each entity object according to the fault data.

[0367] The attribute information and priority adding module is used to add the attribute information and priority of each entity object to the target knowledge graph.

[0368] Embodiment 20: The device according to embodiment 19, further comprising:

[0369] The target knowledge graph compression module is used to compress the target knowledge graph.

[0370] The target knowledge graph storage module is used to store the compressed target knowledge graph locally on the device.

[0371] Embodiment 21, a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for processing fault data as described in any one of Embodiments 1 to 10 is implemented.

[0372] Embodiment 22: A computer-readable storage medium storing computer instructions, wherein the computer instructions, when executed by a processor, implement the method for processing fault data as described in any one of Embodiments 1 to 10.

[0373] Embodiment 23: A computer program product, when the computer program product is run on a terminal device, enables the terminal device to execute the fault data processing method described in any one of the above embodiments 1 to 10.

[0374] Embodiment 24: A chip comprising a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the method for processing fault data as described in any one of Embodiments 1 to 10.

[0375] Finally, it should be noted that the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for processing fault data, It is characterized in that include: The terminal device reads fault data, wherein the fault data includes a plurality of entity objects; The terminal device generates a knowledge graph according to the multiple entity objects; The terminal device determines state sequence information between the multiple entity objects, wherein the state sequence information includes thread state sequence information; The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data; The terminal device determines the state sequence information between the multiple entity objects, including: The terminal device determines a time point corresponding to each row of data in the fault data; The terminal device determines a thread state of a target thread at the time point, and determines a duration of each thread state according to the time point, wherein the target thread is any one of the multiple threads; The terminal device arranges each thread state according to the sequence of the time points and the duration of each thread state to obtain thread state sequence information of the target thread; The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data, including: The terminal device adds the thread state sequence information of the multiple threads to the knowledge graph; The terminal device updates the logical relationship between the threads into the logical relationship between the thread states of the threads to obtain the target knowledge graph.

2. The method according to claim 1, It is characterized in that The terminal device reads the fault data, including: During the generation of the fault data, the terminal device reads each row of data in the fault data in real time.

3. The method according to claim 2, It is characterized in that The terminal device reads each line of data in the fault data in real time, including: The terminal device determines a plurality of keywords, where the plurality of keywords are words that mark the entity object; The terminal device uses each keyword to match each row of data in the fault data in turn; If any keyword is matched in the current row of data, the terminal device extracts the entity object corresponding to the matched keyword from the current row of data.

4. The method according to any one of claims 1 to 3, It is characterized in that The entity object includes multiple threads and multiple functions, and the terminal device generates a knowledge graph according to the multiple entity objects, including: The terminal device determines the logical relationship between threads and the calling relationship between threads and functions; The terminal device generates a knowledge graph based on the logical relationship between the threads and the calling relationship between the threads and functions.

5. The method according to claim 1, It is characterized in that The state sequence information further includes function state sequence information, and the terminal device determines the state sequence information between the multiple entity objects, further including: The terminal device determines a plurality of target functions called by the target thread; The terminal device determines the start and end time points of calling each target function respectively; The terminal device determines the hierarchical calling relationship between the objective functions according to the start and end time points when the objective functions are called, and arranges the objective functions in the order of the start and end time points to obtain function state sequence information of the objective functions.

6. The method according to claim 5, It is characterized in that The terminal device updates the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data, further comprising: The terminal device updates the calling relationship between the thread and the function in the knowledge graph to the function state sequence information to obtain the target knowledge graph.

7. The method according to any one of claims 1 to 3 or 5 to 6, It is characterized in that Also includes: The terminal device determines the attribute information and priority of each entity object according to the fault data; The terminal device adds the attribute information and priority of each entity object to the target knowledge graph.

8. The method according to claim 7, It is characterized in that Also includes: The terminal device compresses the target knowledge graph and stores the compressed target knowledge graph locally on the device.

9. A device for processing fault data, It is characterized in that Applied to a terminal device, the device comprises: A fault data reading module, used to read fault data, wherein the fault data includes multiple entity objects; A knowledge graph generation module, used to generate a knowledge graph according to the multiple entity objects; A state sequence information determination module, used to determine state sequence information between the plurality of entity objects, the state sequence information including thread state sequence information; A knowledge graph updating module, used to update the knowledge graph according to the state sequence information to obtain a target knowledge graph matching the fault data; Wherein, the state sequence information determination module is specifically used for: The terminal device determines a time point corresponding to each row of data in the fault data; The terminal device determines a thread state of a target thread at the time point, and determines a duration of each thread state according to the time point, wherein the target thread is any one of the multiple threads; The terminal device arranges each thread state according to the sequence of the time points and the duration of each thread state to obtain thread state sequence information of the target thread; The knowledge graph updating module is specifically used for: The terminal device adds the thread state sequence information of the multiple threads to the knowledge graph; The terminal device updates the logical relationship between the threads into the logical relationship between the thread states of the threads to obtain the target knowledge graph.

10. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method for processing fault data according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium storing computer instructions. It is characterized in that When the computer instructions are executed by a processor, the method for processing fault data according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Application package analysis method and device and computer readable storage medium

    CN111400197A