Debugging method, system and device, electronic equipment and storage medium
By obtaining and summarizing the log data of each node of the distributed system, the complexity of distributed system debugging is solved, and effective debugging and visibility of debugging events and running state are realized.
Patent Information
- Application Number
- CN202311221839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-03-25
AI Technical Summary
The complexity of distributed systems makes it significantly challenging to debug them, and prior art is difficult to obtain visibility of the runtime behavior of all nodes.
By obtaining the log data of the event to be debugged in the system to be debugged, and summarizing, structuring, aggregating and storing it, debugging the debugging events based on the aggregated log data.
It realizes the operation status of each node in the debugging system in a simple way, reduces the debugging pressure, and is suitable for the debugging system developed by various operating system platforms and programming languages.
Smart Images

Figure CN119690808A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of distributed program debugging, and in particular to a debugging method, system, device, electronic device and storage medium. Background Art
[0002] With the development of mobile distributed systems, each node of the distributed system can run on many networked devices, thereby enhancing the flexibility and scalability of the system. However, due to the complexity of distributed systems, debugging distributed systems is significantly challenging. Therefore, effective debugging methods are urgently needed to obtain visibility into the runtime behavior of all nodes. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a debugging method, system, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a debugging method is provided, the method comprising:
[0005] Acquire at least one event to be debugged of the system to be debugged, wherein the system to be debugged includes a plurality of nodes;
[0006] Obtaining log data of the event to be debugged on each of the nodes;
[0007] The log data is aggregated, and the event to be debugged is debugged based on the aggregated log data.
[0008] In an exemplary embodiment, the method further comprises:
[0009] The log data is structured to obtain structured log data.
[0010] In an exemplary embodiment, structuring the log data to obtain structured log data includes:
[0011] Determine a plurality of preset fields, and obtain log elements corresponding to the preset fields in the log data;
[0012] The structured log data is determined based on the corresponding relationship between the preset fields and the log elements.
[0013] In an exemplary embodiment, the method further comprises:
[0014] The structured log data is aggregated to obtain aggregated log data.
[0015] In an exemplary embodiment, the method further comprises:
[0016] The structured log data is stored in a preset storage queue.
[0017] In an exemplary embodiment, aggregating the log data includes:
[0018] The structured log data and the configuration information are stored in a summary database correspondingly, wherein the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
[0019] In an exemplary embodiment, the method further comprises:
[0020] The structured log data is visually displayed.
[0021] In an exemplary embodiment, the method further comprises:
[0022] Display the alarm information of the event to be debugged.
[0023] In an exemplary embodiment, the event to be debugged is an event that needs to be kept consistent in each of the nodes.
[0024] According to a second aspect of an embodiment of the present disclosure, a debugging system is provided, the system comprising:
[0025] An acquisition module is configured to acquire at least one event to be debugged of the system to be debugged, wherein the system to be debugged includes a plurality of nodes;
[0026] A log library module is configured to obtain log data of the event to be debugged on each of the nodes and send the log data to the aggregation module;
[0027] The aggregation module is configured to aggregate the log data and debug the event to be debugged based on the aggregated log data.
[0028] In an exemplary embodiment, the log library module is further configured to:
[0029] The log data is structured to obtain structured log data, and the structured log data is sent to the aggregation module.
[0030] In an exemplary embodiment, the log library module is further configured to:
[0031] Determine a plurality of preset fields, and obtain log elements corresponding to the preset fields in the log data;
[0032] The structured log data is determined based on the corresponding relationship between the preset fields and the log elements.
[0033] In an exemplary embodiment, the system further includes an aggregation module configured to:
[0034] The structured log data is aggregated to obtain aggregated log data, and the aggregated log data is sent to the aggregation module.
[0035] In an exemplary embodiment, the system further includes a message module configured to:
[0036] The structured log data is stored in a preset storage queue.
[0037] In an exemplary embodiment, the aggregation module is further configured to:
[0038] The structured log data and the configuration information are stored in a summary database correspondingly, wherein the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
[0039] In an exemplary embodiment, the system further comprises a dashboard module configured to:
[0040] The structured log data is visually displayed.
[0041] In an exemplary embodiment, the dashboard module is further configured to:
[0042] Display the alarm information of the event to be debugged.
[0043] In an exemplary embodiment, the event to be debugged is an event that needs to be kept consistent in each of the nodes.
[0044] According to a third aspect of an embodiment of the present disclosure, a debugging device is provided, the device comprising:
[0045] An acquisition unit is configured to acquire at least one event to be debugged of a system to be debugged, wherein the system to be debugged includes a plurality of nodes; and acquire log data of the event to be debugged on each of the nodes;
[0046] The summarizing unit is configured to summarize the log data and debug the event to be debugged based on the summarized log data.
[0047] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0048] processor;
[0049] a memory for storing processor-executable instructions;
[0050] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.
[0051] According to a fifth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.
[0052] The above method disclosed in the present invention has the following beneficial effects: the running status of each node of the event to be debugged in the system to be debugged can be known in a simple way, and the log data of the event to be debugged can be obtained separately, which can avoid the interference of other event log data, thereby reducing the debugging pressure. In addition, it has the characteristics of wide applicability, and is suitable for systems to be debugged on various operating system platforms, and for systems to be debugged developed using various programming languages.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0055] Figure 1 is a flowchart of a debugging method according to an exemplary embodiment;
[0056] Figure 2 is a flowchart of a debugging method according to an exemplary embodiment;
[0057] Figure 3 is a block diagram of a debugging system according to an exemplary embodiment;
[0058] Figure 4 is a block diagram of a debugging device according to an exemplary embodiment;
[0059] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0061] In the related art, log printing statements are the main way to record log events in mobile applications. However, this method can only provide console log records. When multiple nodes are involved in synchronous debugging in a distributed system, it is necessary to view log records on each node separately, and the debugger must analyze the relationship between each node by himself. In addition, the recorded log events are the original log data of the distributed system as a whole, and there is a lack of automatic analysis function for the original log data. Therefore, it is extremely cumbersome to obtain log data through log printing statements and debug the distributed system.
[0062] With the continuous development of computer technology, log libraries for debugging distributed systems have emerged in related technologies, such as distributed tracing systems such as Zipkin or Jaeger. These systems provide log libraries that can associate log data of each node. The log library generates a tracing ID, uses the tracing ID to identify and associate log data in the code, and propagates the log data associated with the tracing ID in the distributed system, so that the tracing system can know the delays, dependencies, and errors of each node, and debug the distributed system based on this. However, these tracing systems lack support for mobile platforms, and even if they support mobile platforms, these distributed tracing systems need to propagate tracing contexts when propagating log data between nodes, which greatly increases the complexity of the tracing system and the complexity of implementing the detection code, making it unsuitable for debugging needs of mobile distributed systems.
[0063] In an exemplary embodiment of the present disclosure, in order to overcome the problems existing in the related art, a debugging method is provided, including: obtaining at least one event to be debugged of a system to be debugged, the system to be debugged includes multiple nodes; obtaining log data of the event to be debugged on each node; and debugging the event to be debugged based on the log data. The method can obtain the running status of each node of the event to be debugged in the system to be debugged in a simple manner, thereby reducing the debugging pressure, and has the characteristics of wide applicability, and is applicable to systems to be debugged on various operating system platforms, and to systems to be debugged developed using various programming languages.
[0064] In an exemplary embodiment of the present disclosure, a debugging method is provided. Figure 1 is a flowchart of a debugging method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0065] Step S101, obtaining at least one event to be debugged of a system to be debugged, where the system to be debugged includes multiple nodes;
[0066] Step S102, obtaining log data of the event to be debugged on each node;
[0067] Step S103: aggregate the log data, and debug the event to be debugged based on the aggregated log data.
[0068] The debugging method in the embodiments of the present disclosure is applicable to debugging the systems to be debugged on various platforms. The system to be debugged may be any system to be debugged including multiple nodes, such as a distributed system. The method is applicable to, for example, a mobile distributed system, a PC (Personal Computer) distributed system, a Web (network) distributed system, etc.
[0069] In step S101, the system to be debugged is distributed on different devices or different services. Different devices can be devices with different operating systems, such as a mobile phone with an Android operating system and a computer with a Windows operating system, or two different devices with the same operating system and the same model, such as mobile phone 1 and mobile phone 2 with an Android operating system and the same model; different services represent different functional modules on the same device, and each functional module runs as an independent thread or an independent process, such as functional module 1 and functional module 2 on the same device. Each device and each service distributed by the system to be debugged is a node of the system to be debugged. The system to be debugged includes multiple nodes, and each node usually corresponds to a computer server. In one example, the system to be debugged is a distributed system.
[0070] The event to be debugged is a preset event, which is determined by the debugger or developer. The event to be debugged can be an event on a single node of the system to be debugged, or an event related to the interaction or dependency between multiple nodes, or an event that needs to be consistent among all nodes.
[0071] In some possible implementations, the event to be debugged is an event that needs to be kept consistent in each node.
[0072] The shared data between all nodes of the system to be debugged needs to be consistent between the nodes. For example, after the shared data in a node is updated and the update is successful, the shared data on the remaining nodes also need to be updated accordingly, that is, the update needs to be synchronized to the remaining nodes so that when the shared data is read on any other node, the updated shared data is read. If the event to be debugged is an event related to the shared data between all nodes, the consistency between the nodes of the system to be debugged can be maintained through program debugging.
[0073] In step S102, a lightweight log library is pre-designed to obtain log data. The log library is inserted into the code corresponding to the event to be debugged of each node, and the log data of the event to be debugged on each node can be obtained. The log data of the event to be debugged is obtained separately, which can avoid interference from other event log data when debugging the event to be debugged.
[0074] In some possible implementations, a unified, easy-to-use API (Application Programming Interface) is provided through a cross-platform development SDK (Software Development Kit), such as logEvent (eventName, parameters). The API is called in the code corresponding to the event to be debugged on each node, and a pre-designed log library can be inserted. The code of the entire system to be debugged can be run to obtain the log data of the event to be debugged on each node. If the event to be debugged is an event on a single node, it is only necessary to call the API in the code corresponding to the event to be debugged in the node; if the event to be debugged is an event related to the interaction or dependency between multiple nodes, the API is called in the code corresponding to the event to be debugged on each of the multiple nodes; if the event to be debugged is an event that needs to be consistent between all nodes, the API is called in the code corresponding to the event to be debugged on each of all nodes.
[0075] In step S103, the log data of the event to be debugged of each node is summarized, and the summarized log data can reflect the activity data of the event to be debugged in each node of the system to be debugged. The code program of the event to be debugged is debugged according to the log data, and the anomaly can be quickly found, thereby locating the problem and troubleshooting. For example, the event to be debugged is shared data A between all nodes, and the shared data A is updated on a certain node and updated to shared data B. At this time, the log data can reflect the changes of the shared data A on the remaining nodes. If the log data shows that the shared data A is still on the remaining node, it means that the node is abnormal.
[0076] In an exemplary embodiment of the present disclosure, when debugging a system to be debugged based on logs, log data of the event to be debugged on each node is obtained respectively by inserting a log library into the code of the event to be debugged, so that the impact on the overall system to be debugged is minimized to avoid affecting the performance of the system to be debugged itself, and the log data of the event to be debugged is obtained separately to avoid interference from log data of other events; the log data of each node is then aggregated, and the aggregation operation can provide system-wide log visibility, so that the user does not need to view the log data on each node in turn, nor does it need to perform complex context propagation between each node, and the log data of the event to be debugged on each node can be associated, so that when debugging the event to be debugged based on the aggregated log data, the running status of the event to be debugged on each node of the system to be debugged can be known in a simple way, thereby reducing the debugging pressure of the debugger, and the method has wide applicability, and is applicable to systems to be debugged on various operating system platforms, and to systems to be debugged developed using various programming languages.
[0077] In an exemplary embodiment of the present disclosure, a debugging method is provided. Figure 2 is a flowchart of a debugging method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0078] Step S201, obtaining at least one event to be debugged of a system to be debugged, where the system to be debugged includes multiple nodes;
[0079] Step S202, obtaining log data of the event to be debugged on each node;
[0080] Step S203, structuring the log data to obtain structured log data;
[0081] Step S204, aggregating the structured log data to obtain aggregated log data;
[0082] Step S205, storing the structured log data in a preset storage queue;
[0083] Step S206, storing the structured log data and the configuration information in a summary database in correspondence, wherein the configuration information includes at least one of the following: a node identifier of the structured log data, and a storage time of the structured log data;
[0084] Step S207, visually displaying structured log data;
[0085] Step S208: Debugging the event to be debugged based on the aggregated structured log data.
[0086] The specific implementation of step S201 and step S202 refers to step S101 and step S102, which will not be repeated here.
[0087] In step S203, since the original log data of the event to be debugged obtained is irregular, it is impossible to reflect clear historical activity data in chronological order, and the data format is also various, so it is relatively cumbersome to count logs and query and analyze logs. Therefore, in order to use log data more conveniently, the obtained log data is structured to obtain structured log data, so as to perform query and statistical analysis on logs, so that logs are more regular and standardized. A log data structuring function is added to the pre-designed log library to automatically analyze the log data. When the log library is inserted into the code corresponding to the event to be debugged, after the log data is obtained by the log library, the log data is structured to obtain structured log data.
[0088] In some possible implementations, multiple preset fields are determined, and log elements corresponding to the preset fields in the log data are obtained; and structured log data is determined based on the corresponding relationship between the preset fields and the log elements.
[0089] The preset fields include node ID, event ID to be debugged, event name to be debugged, timestamp, log level, duration, etc. Different events to be debugged can be associated with each other through the time ID to be debugged, such as correlation ID. The log elements corresponding to the preset fields are extracted from the log data, that is, the log content, and the log structure is composed of the correspondence between the preset fields and the log elements to obtain structured log data. When the structured log data is used later, the relevant log content can be easily queried through the preset fields.
[0090] In step S204, after obtaining the structured log data of the event to be debugged in each node, it is necessary to summarize the structured log data of each node, and therefore, each node is required to send the obtained structured log data to the summary service. In order to reduce the network bandwidth usage during the sending process and reduce the load of the summary service, each node performs aggregation processing on the structured log data before sending to obtain aggregated log data. The aggregation processing can be performed by the aggregation service of each node, including operations such as collection, buffering, and preprocessing of the structured log data, such as simple log analysis, log filtering, log classification, etc. Thus, each node sends the aggregated log data to the summary service, which can reduce the network bandwidth usage during the sending process and reduce the load of the summary service. At the same time, sending log data in batches can also save the signaling overhead of each node and the summary.
[0091] In step S205, the preset storage queue may be a preset buffer or a preset message system, such as a Kafka message system. Each node stores the structured log in the message system, and the aggregation service reads the structured log data from the message system.
[0092] Storing structured log data in a preset storage queue can act as a buffer when the amount of log data is large and the aggregation service cannot receive it completely, or when the aggregation service temporarily does not process the log data. In addition, it can also decouple the log library and the aggregation service to facilitate the use of the log data in other services or business needs, and multiple services can use the log data at the same time.
[0093] In step S206, after the summary service obtains the structured log data, the structured log data and the corresponding configuration information are stored in the summary database, and the configuration information includes at least one of the following: the node identifier of the structured log data and the storage time of the structured log data. The node identifier of the structured log data indicates which node the structured log data comes from, and the storage time of the structured log data indicates the storage time when the structured log data is stored in the summary database.
[0094] In step S207, in order to more conveniently and intuitively know the association relationship of the structured log data between each node, the structured log data in the summary database is visualized, for example, using a dashboard to visualize it. Through the visualization interface, the structured log data can be searched and queried more intuitively, and the change trend of the related data can be intuitively observed.
[0095] In some possible implementations, the alarm information of the event to be debugged is displayed. For example, when an error occurs in the event to be debugged, the error alarm information is displayed in red font in the dashboard; when the performance of the event to be debugged degrades, the warning alarm information is displayed in yellow font in the dashboard summary.
[0096] In step S208, the running status of the event to be debugged can be known based on the structured log data of each node after aggregation. Based on this, the event to be debugged is debugged, and the anomaly can be found quickly, thereby locating the problem and troubleshooting.
[0097] It should be noted that steps S201-S203 and step S208 in this embodiment can be used as independent embodiments, and any step in steps S204-S207 is an optional step and can be omitted or replaced in other embodiments. When each step is executed, the data used is the data obtained in the previous step. For example, when step S204 and step S205 exist in one embodiment at the same time, when step S205 performs the storage of structured log data in a preset storage queue, the aggregated log data is stored in the preset storage queue; when step S205 and step S206 exist in one embodiment at the same time, when step S206 performs the storage of structured log data and configuration information in a summary database, the structured log data is obtained from the preset storage queue, and the structured log data and the configuration information are stored in the summary database; when step S204 and step S206 exist in one embodiment at the same time, and the embodiment does not include step S205, when step S206 performs the storage of structured log data and configuration information in a summary database, the aggregated log data and the configuration information are stored in the summary database.
[0098] In an exemplary embodiment of the present disclosure, a debugging system is provided. Figure 3 is a block diagram of a debugging system 300 according to an exemplary embodiment. Figure 3 As shown, the system includes:
[0099] The acquisition module 301 is configured to acquire at least one event to be debugged of the system to be debugged, where the system to be debugged includes multiple nodes;
[0100] The log library module 302 is configured to obtain the log data of the event to be debugged on each node and send the log data to the aggregation module 303;
[0101] The aggregation module 303 is configured to aggregate the log data and debug the event to be debugged based on the aggregated log data.
[0102] In an exemplary embodiment, the log library module 302 is further configured to:
[0103] The log data is structured to obtain structured log data, and the structured log data is sent to the aggregation module.
[0104] In an exemplary embodiment, the log library module 302 is further configured to:
[0105] Determine multiple preset fields, and obtain log elements corresponding to the preset fields in the log data;
[0106] Based on the correspondence between preset fields and log elements, structured log data is determined.
[0107] In an exemplary embodiment, the system further includes an aggregation module 304 configured to:
[0108] Aggregate the structured log data to obtain aggregated log data, and send the aggregated log data to the summary module.
[0109] In an exemplary embodiment, the system further includes a message module 305 configured to:
[0110] Store structured log data in the preset storage queue.
[0111] In an exemplary embodiment, the aggregation module 303 is further configured to:
[0112] The structured log data and the configuration information are stored in a summary database in correspondence, and the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
[0113] In an exemplary embodiment, the system further includes a dashboard module 306 configured to:
[0114] Visualize structured log data.
[0115] In an exemplary embodiment, the dashboard module 306 is further configured to:
[0116] Displays the alarm information of the event to be debugged.
[0117] In an exemplary embodiment, the event to be debugged is an event that needs to be kept consistent in each node.
[0118] Regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0119] In an exemplary embodiment of the present disclosure, a debugging device is provided. Figure 4 is a block diagram of a debugging device according to an exemplary embodiment. Figure 4 As shown, the device comprises:
[0120] The acquisition unit 401 is configured to acquire at least one event to be debugged of the system to be debugged, where the system to be debugged includes multiple nodes; and acquire log data of the event to be debugged on each node;
[0121] The summarizing unit 402 is configured to summarize the log data and debug the event to be debugged based on the summarized log data.
[0122] In an exemplary embodiment, the acquisition unit 401 is further configured to:
[0123] The log data is structured to obtain structured log data.
[0124] In an exemplary embodiment, the acquisition unit 401 is further configured to:
[0125] Determine multiple preset fields, and obtain log elements corresponding to the preset fields in the log data;
[0126] Based on the correspondence between preset fields and log elements, structured log data is determined.
[0127] In an exemplary embodiment, the acquisition unit 401 is further configured to:
[0128] Aggregate the structured log data to obtain aggregated log data.
[0129] In an exemplary embodiment, the acquisition unit 401 is further configured to:
[0130] Store structured log data in the preset storage queue.
[0131] In an exemplary embodiment, the summarizing unit 402 is further configured to:
[0132] The structured log data and the configuration information are stored in a summary database in correspondence, and the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
[0133] In an exemplary embodiment, the apparatus further includes a display unit 403 configured to:
[0134] Visualize structured log data.
[0135] In an exemplary embodiment, the display unit 403 is further configured to:
[0136] Displays the alarm information of the event to be debugged.
[0137] In an exemplary embodiment, the event to be debugged is an event that needs to be kept consistent in each node.
[0138] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0139] Figure 5 is a block diagram of an electronic device 500 according to an exemplary embodiment.
[0140] Reference Figure 5, the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0141] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0142] The memory 504 is configured to store various types of data to support operations on the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0143] The power supply component 506 provides power to the various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.
[0144] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0145] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0146] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0147] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0148] The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0149] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0150] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0151] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a debugging method, the method including any of the above methods.
[0152] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0153] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A debugging method, characterized in that: The method comprises: Acquire at least one event to be debugged of the system to be debugged, wherein the system to be debugged includes a plurality of nodes; Obtaining log data of the event to be debugged on each of the nodes; The log data is aggregated, and the event to be debugged is debugged based on the aggregated log data.
2. The debugging method according to claim 1, characterized in that: The method further comprises: The log data is structured to obtain structured log data.
3. The debugging method according to claim 2, characterized in that: The step of structuring the log data to obtain structured log data includes: Determine a plurality of preset fields, and obtain log elements corresponding to the preset fields in the log data; The structured log data is determined based on the corresponding relationship between the preset fields and the log elements.
4. The debugging method according to claim 2, characterized in that: The method further comprises: The structured log data is aggregated to obtain aggregated log data.
5. The debugging method according to claim 2, characterized in that: The method further comprises: The structured log data is stored in a preset storage queue.
6. The debugging method according to any one of claims 2 to 5, characterized in that: The aggregating the log data includes: The structured log data and the configuration information are stored in a summary database correspondingly, wherein the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
7. The debugging method according to claim 6, characterized in that: The method further comprises: The structured log data is visually displayed.
8. The debugging method according to claim 7, characterized in that: The method further comprises: Display the alarm information of the event to be debugged.
9. The debugging method according to any one of claims 1 to 5, characterized in that: The event to be debugged is an event that needs to be kept consistent in each of the nodes.
10. A debugging system, characterized in that: The system comprises: An acquisition module is configured to acquire at least one event to be debugged of the system to be debugged, wherein the system to be debugged includes a plurality of nodes; A log library module is configured to obtain log data of the event to be debugged on each of the nodes and send the log data to the aggregation module; The aggregation module is configured to aggregate the log data and debug the event to be debugged based on the aggregated log data.
11. The debugging system according to claim 10, characterized in that: The log library module is also configured as follows: The log data is structured to obtain structured log data, and the structured log data is sent to the aggregation module.
12. The debugging system according to claim 11, characterized in that: The log library module is also configured as follows: Determine a plurality of preset fields, and obtain log elements corresponding to the preset fields in the log data; The structured log data is determined based on the corresponding relationship between the preset fields and the log elements.
13. The debugging system according to claim 11, characterized in that: The system further includes an aggregation module configured to: The structured log data is aggregated to obtain aggregated log data, and the aggregated log data is sent to the aggregation module.
14. The debugging system according to claim 11, characterized in that The system also includes a message module configured to: The structured log data is stored in a preset storage queue.
15. The debugging system according to any one of claims 11 to 14, characterized in that: The aggregation module is further configured to: The structured log data and the configuration information are stored in a summary database correspondingly, wherein the configuration information includes at least one of the following: a node identifier of the structured log data and a storage time of the structured log data.
16. The debugging system according to claim 15, characterized in that: The system further includes a dashboard module configured to: The structured log data is visually displayed.
17. The debugging system according to claim 16, characterized in that: The dashboard module is also configured to: Display the alarm information of the event to be debugged.
18. The debugging system according to any one of claims 10 to 14, characterized in that: The event to be debugged is an event that needs to be kept consistent in each of the nodes.
19. A debugging device, characterized in that: The device comprises: An acquisition unit is configured to acquire at least one event to be debugged of a system to be debugged, wherein the system to be debugged includes a plurality of nodes; and acquire log data of the event to be debugged on each of the nodes; The summarizing unit is configured to summarize the log data and debug the event to be debugged based on the summarized log data.
20. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the debugging method according to any one of claims 1 to 9.
21. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the debugging method as described in any one of claims 1 to 9.