Search

CN-121996240-A - Log visualization method, device, equipment, medium and program product

CN121996240ACN 121996240 ACN121996240 ACN 121996240ACN-121996240-A

Abstract

The application provides a log visualization method, a device, equipment, a medium and a program product, which relate to the internet technology, wherein the method comprises the steps that a first terminal collects a plurality of events in a log based on the time stamp sequence of the events; the method comprises the steps of obtaining a plurality of events, encoding the plurality of events to obtain encoded events, serializing the encoded events to obtain an event sequence, sending the event sequence to a background server, enabling a second terminal to pull the event sequence from the background server, deserializing the event sequence to obtain the encoded events, executing the encoded events, and displaying the executing process of the encoded events. Therefore, visualization of the log can be realized, log analysis personnel can intuitively perform log analysis, and experience of the log analysis personnel can be improved.

Inventors

  • DENG KUNLI
  • WANG ZHIYONG
  • HUANG CANHUI

Assignees

  • 腾讯科技(深圳)有限公司

Dates

Publication Date
20260508
Application Date
20241104

Claims (20)

  1. 1. A log visualization method, wherein the method is applied to a first terminal, the method comprising: collecting a plurality of events in a log based on the time stamp sequence of the events; Encoding the plurality of events to obtain encoded events; Serializing the encoded event to obtain an event sequence; And sending the event sequence to a background server so that a second terminal pulls the event sequence from the background server, deserializes the event sequence to obtain the encoded event, executes the encoded event, and simultaneously displays the execution process of the encoded event.
  2. 2. The method of claim 1, wherein the log is a log of a target applet; In the event that the plurality of events includes a component framework initialization event, the encoding the plurality of events includes: Acquiring node information of each node included in the component framework of the target applet and an initialization time stamp of the component framework, which are recorded in the component framework initialization event; node information of each node included in the component frame and an initialization time stamp of the component frame are encoded.
  3. 3. The method of claim 2, wherein, for each node included by the component framework, the node information of the node comprises at least one of: the identification of the node; the identity of the parent node of the node; a label of the node; The attributes of the nodes.
  4. 4. A method according to any one of claims 1-3, wherein the log is of a target applet; In the event that the plurality of events includes a component framework change event, the encoding the plurality of events includes: Acquiring node information of a changed node included in the component framework of the target applet recorded in the component framework change event; And encoding the node information of the changed node.
  5. 5. The method of claim 4, wherein the change node is an add node; Wherein the node information of the inserted node includes at least one of: The insertion operation type corresponding to the insertion node; An insertion timestamp of the insertion node; The identification of the inserted node; The identity of the parent node of the inserted node; an index of the inserted node under the parent node; the label of the inserted node; and inserting the attribute of the node.
  6. 6. The method of claim 4, wherein the change node is a delete node; wherein the node information of the deleted node includes at least one of: the deletion operation type corresponding to the deletion node; The identification of the deleted node; and deleting the deleting time stamp of the node.
  7. 7. The method of claim 4, wherein the change node is an attribute update node; Wherein the node information of the attribute updating node includes at least one of: The update operation type corresponding to the attribute update node; the attribute updates the identification of the node; updating the update attribute of the attribute update node; The attribute updates an update timestamp of the node.
  8. 8. A method according to any of claims 1-3, wherein, in the event that the plurality of events comprises object interaction events, the encoding of the plurality of events comprises: Acquiring event information recorded in the object interaction event; And encoding the event information.
  9. 9. The method of claim 8, wherein the object interaction event is a click event; wherein the event information includes at least one of: The type of click operation; Clicking the time stamp; Clicking an identification of the object; click position information.
  10. 10. A method according to any of claims 1-3, wherein, in the event that the plurality of events comprises a page jump event, the encoding the plurality of events comprises: acquiring page jump information recorded in the page jump event; and encoding the page jump information.
  11. 11. The method of claim 10, wherein the page jump information comprises at least one of: a page jump type; Page jump time stamp; skipping the path of the previous page; the path of the page after the jump; Parameters carried during page jumping.
  12. 12. A log visualization method, wherein the method is applied to a second terminal, the method comprising: Pulling the event sequence from the background server; performing deserialization on the event sequence to obtain a coded event; Executing the encoded event and simultaneously displaying the execution process of the encoded event.
  13. 13. The method of claim 12, wherein the performing the encoded event comprises: determining execution duration of each event based on the time stamp of each event in the encoded events; and executing each event in turn according to the sequence of the time stamps of each event and the execution time length.
  14. 14. The method of claim 13, wherein the determining the execution duration of each of the encoded events based on the time stamps of each event comprises: and calculating the time difference between the time stamp of the next event and the time stamp of the previous event according to any two adjacent events in the events to obtain the execution duration of the previous event.
  15. 15. The method of any of claims 12-14, further comprising: Synchronously displaying at least the description information of the current execution event in a second display area while displaying the execution process of the encoded event in the first display area; Wherein the first display area is different from the second display area.
  16. 16. A log visualization apparatus, comprising: The acquisition module is used for acquiring a plurality of events in the log based on the time stamp sequence of the events; the coding module is used for coding the plurality of events to obtain coded events; the serialization module is used for serializing the encoded event to obtain an event sequence; And the sending module is used for sending the event sequence to a background server so that a second terminal pulls the event sequence from the background server, deserializes the event sequence to obtain the encoded event, executes the encoded event and displays the execution process of the encoded event.
  17. 17. A log visualization apparatus, comprising: the pulling module is used for pulling the event sequence from the background server; the deserialization module is used for deserializing the event sequence to obtain an encoded event; The execution module and the display module are respectively used for executing the encoded event and displaying the execution process of the encoded event.
  18. 18. An electronic device, comprising: A processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory to perform the method of any of claims 1 to 15.
  19. 19. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1 to 15.
  20. 20. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any one of claims 1 to 15.

Description

Log visualization method, device, equipment, medium and program product Technical Field The embodiment of the application relates to the technical field of Internet, in particular to a log visualization method, a device, equipment, a medium and a program product. Background The log is used for recording information such as object operation, interface change, system running state and the like in the running process of the program. It is an integral part of the process of program development, operation and debugging. The log analysis personnel can know the running condition of the program and the like by analyzing the log of the program, and timely find and locate the problems, so that the program is repaired and optimized. At present, the logs are all in a plain text form, and a log analysis person needs to read the plain text form of the logs to conduct log analysis. However, this approach causes a problem that log analysts experience poorly. Disclosure of Invention The application provides a log visualization method, a device, equipment, a medium and a program product, so that the experience of log analysts can be improved. In a first aspect, an embodiment of the present application provides a log visualization method, where the method is applied to a first terminal, and the method includes collecting a plurality of events in a log based on a time stamp sequence of the events, encoding the plurality of events to obtain an encoded event, serializing the encoded event to obtain an event sequence, and sending the event sequence to a background server, so that a second terminal pulls the event sequence from the background server, deserializes the event sequence to obtain an encoded event, and executes the encoded event, and simultaneously displays an execution process of the encoded event. In a second aspect, an embodiment of the present application provides a log visualization method, where the method is applied to a second terminal, and the method includes pulling an event sequence from a background server, deserializing the event sequence to obtain an encoded event, executing the encoded event, and displaying an execution process of the encoded event. The embodiment of the application provides a log visualization device which comprises an acquisition module, a coding module, a serialization module and a sending module, wherein the acquisition module is used for acquiring a plurality of events in a log based on the time stamp sequence of the events, the coding module is used for coding the plurality of events to obtain coded events, the serialization module is used for serializing the coded events to obtain event sequences, the sending module is used for sending the event sequences to a background server so that a second terminal can pull the event sequences from the background server and deserialize the event sequences to obtain the coded events, and the coded events are executed, and meanwhile the execution process of the coded events is displayed. In some implementations, the log is a log of the target applet, and the encoding module is specifically configured to obtain node information of each node included in the component framework of the target applet and an initialization timestamp of the component framework recorded in the component framework initialization event, and encode the node information of each node included in the component framework and the initialization timestamp of the component framework, in the case that the plurality of events includes the component framework initialization event. In some implementations, for each node included by the component framework, the node information for the node includes at least one of: identification of the node; identification of the parent node of the node; A label of the node; The attributes of the nodes. In some implementations, the log is a log of the target applet, and the encoding module is specifically configured to obtain node information of a change node included in a component framework of the target applet recorded in the component framework change event and encode the node information of the change node when the plurality of events includes the component framework change event. In some implementations, the change node is an insert node, wherein the node information of the insert node includes at least one of: The type of the insertion operation corresponding to the insertion node; Inserting an insertion timestamp of the node; inserting the identification of the node; inserting the identity of the parent node of the node; Inserting an index of the node under the parent node; Inserting a label of the node; The properties of the node are inserted. In some implementations, the change node is a delete node, wherein the node information of the delete node includes at least one of: Deleting operation types corresponding to the deleting nodes; Deleting the identification of the node; The delete timestamp of the delete node. In some implementations,