Log management method and device, storage medium and electronic equipment

By obtaining and reporting event identifiers and timestamps synchronized between devices, and recording and uniformly managing event logs between devices, the problem of dispersed logs between devices is solved, and the efficiency of problem investigation and analysis is improved.

CN119884047APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311396705.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, the logs corresponding to the event interaction between devices are scattered in their respective systems, resulting in inconvenience in problem investigation and analysis.

Method used

By obtaining the event identifiers and event timestamps synchronized by multiple devices between devices, recording the event logs corresponding to the event interaction, and reporting them to the log collection server, the unified management of event logs of multiple devices is achieved.

Benefits of technology

Through the log collection server, the event logs of multiple devices can be restored, and the efficiency of developers in troubleshooting and analyzing problems arise during the interaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884047A_ABST
    Figure CN119884047A_ABST
Patent Text Reader

Abstract

The invention provides a log management method and device, a storage medium and electronic device.The log management method comprises the steps that event identifiers and event timestamps synchronized between multiple devices are obtained, the first device is any one of the multiple devices, and the second device is any one of the multiple devices; the event identifier and the event timestamp correspond to one-time event interaction among the multiple pieces of equipment. Based on the event identification and the event timestamp, an event log corresponding to event interaction is recorded, and the event log comprises the event identification and the event timestamp. And reporting the event logs to a log collection server to enable the log collection server to execute log management operation on the event logs of the multiple devices. The event logs recorded by the multiple devices are managed in a unified mode through the log collection server, the interaction process among the multiple devices can be restored, and the efficiency of a developer for troubleshooting and analyzing problems occurring in the interaction process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical solution disclosed herein relates to the field of computer technology, and in particular to a log management method and device, a storage medium, and an electronic device. Background Art

[0002] With the rapid development of the Internet of Things and smart devices, event interactions between devices such as smartphones, tablets, and TVs are becoming more and more frequent. When problems occur in event interactions between devices, developers need to troubleshoot and analyze the problems through the logs corresponding to the event interactions between devices.

[0003] However, in the related technical solutions, the logs corresponding to the event interactions between devices are scattered and stored in their respective systems, which brings inconvenience to the troubleshooting and analysis of the problem. Summary of the invention

[0004] In view of this, embodiments of the present disclosure provide a log management method and device, a storage medium, and an electronic device.

[0005] According to a first aspect of the present disclosure, a log management method is proposed, the method comprising:

[0006] Acquire event identifiers and event timestamps synchronized between multiple devices; the first device is any one of the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices;

[0007] Based on the event identifier and event timestamp, record an event log corresponding to the event interaction; the event log includes the event identifier and event timestamp;

[0008] The event log is reported to a log collection server, so that the log collection server performs a log management operation on the event logs of the multiple devices.

[0009] In combination with any implementation manner provided in the present disclosure, the plurality of devices further include: a second device;

[0010] The step of obtaining event identifiers and event timestamps synchronized between multiple devices includes:

[0011] establishing a communication connection with a second device among the plurality of devices;

[0012] The event identifier and the event timestamp are synchronized with the second device based on the communication connection.

[0013] In combination with any implementation manner provided in the present disclosure, the plurality of devices further include: a second device;

[0014] Reporting the event log to the log collection server includes:

[0015] The first event log recorded locally is sent to the second device, so that the second device reports the first event log and the second event log recorded by the second device to the log collection server.

[0016] In combination with any implementation manner provided in the present disclosure, the plurality of devices further include: a second device;

[0017] Reporting the event log to the log collection server includes:

[0018] receiving a second event log sent by the second device; the second event log is an event log recorded by the second device;

[0019] The locally recorded first event log and the second event log are reported to the log collection server.

[0020] In combination with any implementation manner provided in the present disclosure, before reporting the event log to the log collection server, the method further includes:

[0021] A data format conversion operation is performed on the data in the event log to convert the data format of the data in the event log into a predetermined format.

[0022] According to a second aspect of the present disclosure, a log management method is proposed, the method comprising:

[0023] Receive event logs of multiple devices; the event logs of each device include: event identifiers and event timestamps synchronized between the multiple devices, the event identifiers and event timestamps corresponding to an event interaction between the multiple devices;

[0024] A log management operation is performed on the event logs of the plurality of devices.

[0025] In combination with any implementation manner provided in the present disclosure, the multiple devices include: a first device and a second device;

[0026] The receiving event logs of multiple devices includes:

[0027] A first event log and a second event log reported by the first device are received; the first event log is recorded by the first device, and the second event log is recorded by the second device and sent to the first device.

[0028] In combination with any implementation manner provided in the present disclosure, when the number of the received event logs is multiple, and the multiple event logs include different event identifiers and event timestamps;

[0029] The performing log management operations on the event logs of the plurality of devices includes:

[0030] According to the event identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same event identifier;

[0031] For a log set of a target category, performing a log sorting operation on the event logs included in the log set of the target category according to the chronological order of the event timestamps;

[0032] The log sets of multiple categories obtained after the log sorting operation are stored.

[0033] In combination with any implementation manner provided in the present disclosure, the event log includes a device type identifier;

[0034] When the number of the received event logs is multiple, performing log management operations on the event logs of the multiple devices includes:

[0035] According to the device type identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same device type identifier;

[0036] The log sets of the multiple categories are stored.

[0037] According to a third aspect of the present disclosure, a log management device is provided, the device comprising:

[0038] An acquisition module, used to acquire event identifiers and event timestamps synchronized between multiple devices; the first device is any one of the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices;

[0039] A recording module, used to record an event log corresponding to the event interaction based on the event identifier and the event timestamp; the event log includes the event identifier and the event timestamp;

[0040] The reporting module is used to report the event log to a log collection server so that the log collection server performs log management operations on the event logs of the multiple devices.

[0041] According to a fourth aspect of the present disclosure, a log management device is provided, the device comprising:

[0042] A receiving module, configured to receive event logs of multiple devices; the event log of each device includes: event identifiers and event timestamps synchronized between the multiple devices, the event identifiers and event timestamps corresponding to one event interaction between the multiple devices;

[0043] An operation module is used to perform log management operations on the event logs of the multiple devices.

[0044] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the processor is prompted to implement the log management method of any embodiment of the present disclosure.

[0045] According to a sixth aspect of the present disclosure, there is provided an electronic device, comprising:

[0046] processor;

[0047] a memory for storing processor-executable instructions;

[0048] The processor is configured to execute the log management method of any embodiment of the present disclosure.

[0049] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0050] In the log management method and apparatus, storage medium and electronic device provided by the embodiments of the present disclosure. A first device can obtain event identifiers and event timestamps synchronized between multiple devices, and the first device is any device among the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices. Then, based on the acquired event identifier and event timestamp, an event log corresponding to the event interaction is recorded, and the event log is reported to a log collection server, so that the log collection server performs log management operations on the event logs of the multiple devices. The unified management of event logs recorded by multiple devices by the log collection server helps to restore the interaction process between multiple devices, and can improve the efficiency of developers in troubleshooting and analyzing problems that arise during the interaction process.

[0051] 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

[0052] 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.

[0053] Figure 1is a flow chart of a log management method according to an exemplary embodiment of the present disclosure;

[0054] Figure 2 is a three-party interaction diagram of a log management method according to an exemplary embodiment of the present disclosure;

[0055] Figure 3 is a flow chart of another log management method according to an exemplary embodiment of the present disclosure;

[0056] Figure 4 is a flow chart of another log management method according to an exemplary embodiment of the present disclosure;

[0057] Figure 5 is a flow chart of another log management method according to an exemplary embodiment of the present disclosure;

[0058] Figure 6 is a structural schematic diagram of a log management device according to an exemplary embodiment of the present disclosure;

[0059] Figure 7 is a structural schematic diagram of another log management device according to an exemplary embodiment of the present disclosure;

[0060] Figure 8 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0061] 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.

[0062] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0063] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0064] With the rapid development of the Internet of Things and smart devices, event interactions between devices such as smartphones, tablets, and TVs are becoming more and more frequent. When problems occur in event interactions between devices, developers need to troubleshoot and analyze the problems through the logs corresponding to the event interactions between devices.

[0065] However, in the related technical solutions, the logs corresponding to the event interactions between devices are scattered and stored in their respective systems, which brings inconvenience to the troubleshooting and analysis of the problem.

[0066] In view of this, the present disclosure provides a log management method. In this method, a log collection server can uniformly manage event logs recorded by multiple devices. In addition, the event logs collected by the log collection server include event identifiers and event timestamps of events recorded in the event logs, which helps to restore the interaction process between multiple devices and can improve the efficiency of developers in troubleshooting and analyzing problems that occur during the interaction process.

[0067] The log management method of the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0068] Figure 1 is a flow chart of a log management method according to an exemplary embodiment of the present disclosure. The method can be executed by a first device, such as Figure 1 As shown, the exemplary embodiment method may include the following steps:

[0069] In step 101, event identifiers and event timestamps synchronized among multiple devices are obtained.

[0070] The first device is any one of the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices.

[0071] The multiple devices may be two devices, or three devices, etc., which is not limited in the present disclosure. For the convenience of description, the multiple devices are two devices, and are respectively a mobile phone and a television. In other words, in this example, the method can be executed by a mobile phone or a television.

[0072] Take the operation process of projecting the screen displayed on a mobile phone to a TV as an example. First, the mobile phone sends a projection request message to the TV. After receiving the projection request message, the TV sends a response message to the mobile phone. In this process, the process of the mobile phone sending a projection request message to the TV is the first event interaction, and the process of the TV sending a response message to the mobile phone is the second event interaction.

[0073] In actual applications, the event identifiers and event timestamps of the above two event interactions can be synchronized by the following method:

[0074] First of all, since the two aforementioned event interactions are both event interactions during the screen casting operation, the two event interactions can use the same event identifier, such as cast. Alternatively, in order to distinguish, the first event interaction can use cast1 as the event identifier, and the second event interaction can use cast2 as the event identifier, which is not limited in this disclosure. For the convenience of description, the subsequent embodiments are introduced by taking the use of the same event identifier for two event interactions as an example.

[0075] First event interaction: When the mobile phone sends a screen casting request message to the TV, the screen casting request message can carry the event identifier cast and the event timestamp, such as the time currently displayed on the mobile phone. After the TV receives the screen casting request message sent by the mobile phone, it is equivalent to receiving the event identifier and event timestamp of this event interaction. At this point, the mobile phone and the TV have synchronously completed the event identifier and event timestamp of the first event interaction.

[0076] Second event interaction: When the TV sends a response message to the aforementioned screen casting request message to the mobile phone, it can carry the event identifier cast and the event timestamp in the response message, such as the time currently displayed on the TV. After the mobile phone receives the response message sent by the TV, it is equivalent to receiving the event identifier and event timestamp of this event interaction. At this point, the mobile phone and the TV have synchronously completed the event identifier and event timestamp of the second event interaction.

[0077] In an optional example, in order to avoid the problem of confusion in the event timestamps of the recorded event logs caused by inconsistent system timestamps between the mobile phone and the TV, when determining the event timestamp carried by the aforementioned response message, the TV can use the event timestamp carried in the screen projection request message sent by the received mobile phone as the starting time, calculate the current relative time, and use the relative time as the event timestamp carried by the response message.

[0078] For example, the event timestamp carried in the screen casting request message received by the TV is 13:13:15, and the time interval between the time when the TV sends the aforementioned response message and the time when it receives the aforementioned screen casting request message is 2 seconds. The relative time is 13:13:17. The calculated time can be used as the event timestamp carried in the aforementioned response message, thereby avoiding the problem of inconsistent system time between the mobile phone and the TV, which leads to confusion in the event timestamps of the recorded event logs.

[0079] It should be noted that the aforementioned description of the method for synchronizing event identifiers and event timestamps is merely illustrative, and is intended to enable those skilled in the art to better understand the technical solutions of the embodiments of the present disclosure. In practical applications, other methods may also be used to synchronize event identifiers and event timestamps, and the present disclosure does not limit this.

[0080] In step 102, an event log corresponding to the event interaction is recorded based on the event identifier and the event timestamp.

[0081] The event log includes the event identifier and event timestamp.

[0082] The following is still taking the two event interactions between the mobile phone and the TV as an example.

[0083] First event interaction: After the mobile phone and the TV synchronize the event identifier and event timestamp of the first event interaction, both the mobile phone and the TV can obtain the event identifier and event timestamp corresponding to the first event interaction. Then, the mobile phone can record the first event log 1 based on the event identifier and event timestamp of this synchronization. The TV can record the second event log 1 based on the event identifier and event timestamp of this synchronization. Among them, the first event log 1 and the second event log 1 both include the event identifier and event timestamp of the first event interaction.

[0084] Second event interaction: After the mobile phone and the TV synchronize the event identifier and event timestamp of the second event interaction, both the mobile phone and the TV can obtain the event identifier and event timestamp corresponding to the second event interaction. Then, the mobile phone can record the first event log 2 based on the event identifier and event timestamp of this synchronization. The TV can record the second event log 2 based on the event identifier and event timestamp of this synchronization. Among them, the first event log 2 and the second event log 2 both include the event identifier and event timestamp of the second event interaction.

[0085] In step 103, the event log is reported to a log collection server, so that the log collection server performs a log management operation on the event logs of the multiple devices.

[0086] Optionally, when the aforementioned mobile phone and television can both be connected to the Internet, the mobile phone and television can report the event logs recorded locally to the log collection server, so that the log collection server performs log management operations on the received event logs of multiple devices. The detailed process of the log collection server performing log management operations on the received event logs of multiple devices is described in detail in the subsequent embodiments and will not be repeated here.

[0087] In the above example, the mobile phone can report the first event log 1 and the first event log 2 recorded locally to the log collection server, and the TV can report the second event log 1 and the second event log 2 recorded locally to the log collection server.

[0088] Optionally, when the aforementioned TV cannot connect to the Internet, the TV can send the event log recorded locally to a mobile phone, and the mobile phone sends the event log recorded locally and the received event log recorded by the TV to the log collection server, so that the log collection server performs log management operations on the received event logs of the mobile phone and TV, thereby expanding the scope of application of this example method.

[0089] In the log management method provided by the embodiment of the present disclosure, the event logs recorded by multiple devices can be uniformly managed by the log collection server. The event logs collected by the log collection server include event identifiers and event timestamps of the events recorded in the event logs, which helps to restore the interaction process between multiple devices and can improve the efficiency of developers in troubleshooting and analyzing problems that arise during the interaction process.

[0090] Figure 2 It is a three-party interaction diagram of a log management method shown in the present disclosure according to an exemplary embodiment.

[0091] In this embodiment, the same steps as those in the previous embodiment will be briefly described without further details. For details, please refer to any of the previous embodiments. Figure 2 As shown, the exemplary embodiment method may include the following steps:

[0092] In step 201, a first device establishes a communication connection with a second device.

[0093] The communication connection may be a Bluetooth connection, a WiFi (Wireless Fidelity) connection, or the like.

[0094] Take the example that the first device is a TV and the second device is a mobile phone. The TV and the mobile phone can use the BLE (Bluetooth Low Energy) discovery method or the mDNS (Multicast Domain Name System) discovery method to discover each other. Then, the TV and the mobile phone can further determine the legitimacy of the other party through a two-way authentication mechanism, including but not limited to same account authentication, same LAN authentication, etc. After the authentication is completed, the TV and the mobile phone can successfully establish the aforementioned communication connection.

[0095] The aforementioned device discovery, device two-way authentication and other processes can be found in the introduction of the relevant technical solutions and will not be repeated here.

[0096] In step 202, the first device and the second device synchronize the event identifier and event timestamp of the currently initiated event based on the communication connection.

[0097] The TV and the mobile phone can synchronize event identifiers and event timestamps based on the aforementioned established Bluetooth connection or WiFi connection.

[0098] In step 203, the first device records a first event log based on the event identifier and the event timestamp.

[0099] The television may record a first event log based on the event identifier and the event timestamp, wherein the first event log includes the event identifier and the event timestamp.

[0100] In step 204, the second device records a second event log based on the event identifier and the event timestamp.

[0101] The mobile phone can record and obtain a second event log based on the event identifier and the event timestamp, and the event log includes the event identifier and the event timestamp.

[0102] In step 205, the first device sends the first event log to the second device.

[0103] When the TV cannot be connected to the Internet, it is impossible to directly send the first event log recorded locally to the log collection server. At this time, the TV can send the first event log recorded locally to a mobile phone that can be connected to the Internet.

[0104] In step 206, the second device reports the first event log and the second event log to a log collection server.

[0105] The mobile phone can report the second event log recorded locally and the first event log recorded by the TV and sent by the TV to the log collection server.

[0106] In one embodiment, before reporting the first event log and the second event log to the log collection server, a data format conversion operation may be performed on the data in the first event log and the second event log, respectively, to convert the data format of the data in the first event log and the second event log into a predetermined format.

[0107] For example, the predetermined format for the event timestamp in the event log may be: x year x month x day x hour x minute x second. The predetermined format for the information sequence in the event log may be: event timestamp, event identifier, device type identifier of the device to which the event log belongs, and log detailed information.

[0108] In this example, the data in the aforementioned first event log and the second event log can be converted into data formats respectively, so that the information in the first event log and the second event log are presented in the aforementioned predetermined format, thereby facilitating the subsequent log collection server to perform log management on the received multiple event logs.

[0109] In an optional example, before the mobile phone reports the first event log and the second event log to the log collection server, the mobile phone may perform a data format conversion operation on the data in the first event log and the second event log.

[0110] In another optional example, the television can perform the above data format conversion operation on the data in the first event log recorded, obtain the converted first event log, and then send it to the mobile phone. In this case, the mobile phone only needs to perform the above data format conversion operation on the data in the second event log recorded locally.

[0111] In step 207, the log collection server performs log management operations on the first event log and the second event log.

[0112] In the log management method provided by the embodiment of the present disclosure, for an event interaction, after the first device and the second device record the first event log and the second event log corresponding to this event interaction, the first event log and the second event log can be sent to the log collection server, so that the log collection server performs log management operations on the first event log and the second event log. Compared with the related technical solutions in which the event logs corresponding to the event interaction are stored in their respective systems and the logs need to be manually integrated, the real-time nature of event log acquisition can be improved, and the location and resolution of problems can be accelerated.

[0113] Figure 3is a flow chart of another log management method according to an exemplary embodiment of the present disclosure. The method can be executed by a log collection server, such as Figure 3 As shown, the exemplary embodiment method may include the following steps:

[0114] In step 301, event logs of a plurality of devices are received.

[0115] The event log of each device includes: event identifiers and event timestamps synchronized between the multiple devices, and the event identifiers and event timestamps correspond to one event interaction between the multiple devices.

[0116] The multiple devices include: a first device and a second device.

[0117] In an optional example, the log collection server may receive a first event log and a second event log reported by the first device. The first event log is recorded by the first device, and the second event log is recorded by the second device and sent to the first device. In this example, the first device is required to be connected to the Internet.

[0118] In another optional example, the log collection server may receive a first event log reported by the first device and a second event log reported by the second device. The first event log is recorded by the first device, and the second event log is recorded by the second device. In this example, both the first device and the second device are required to be connected to the Internet.

[0119] In step 302, a log management operation is performed on the event logs of the plurality of devices.

[0120] In this example, the following two log management operations are introduced:

[0121] The first one:

[0122] When the number of the received event logs is multiple, and the multiple event logs include different event identifiers and event timestamps, the following method may be used: Figure 4 The steps shown perform log management operations on the event logs of the multiple devices:

[0123] In step 401, a plurality of the event logs are classified according to the event identifiers to obtain a plurality of categories of log sets.

[0124] The event logs included in each type of log set contain the same event identifier. For example, the event logs included in a certain type of log set contain the same event identifier cast, and the event logs included in a certain type of log set contain the same event identifier call.

[0125] In step 402, for a log set of a target category, a log sorting operation is performed on the event logs included in the log set of the target category according to the sequence of the event timestamps.

[0126] For example, for a log set with an event identifier of cast, the log collection server may perform a log sorting operation on multiple event logs based on the sequence of event timestamps corresponding to the multiple event logs in the log set.

[0127] Specifically, if the log set includes 3 event logs, among which the event timestamp of event log 1 is 4 hours, 4 minutes and 4 seconds, the event timestamp of event log 2 is 4 hours, 4 minutes and 2 seconds, and the event timestamp of event log 3 is 4 hours, 4 minutes and 7 seconds, then the event logs in the log set obtained by performing a log sorting operation on them include: event log 2, event log 1, and event log 3.

[0128] In step 403, a plurality of types of log sets obtained after the log sorting operation are stored.

[0129] The log collection server may perform the aforementioned log sorting operation on each type of log collection, and then the log collection server may store multiple types of log collections obtained after the aforementioned log sorting operation.

[0130] In the log management method of this example, the log collection server first classifies the received multiple event logs based on the event identifier to obtain multiple categories of log sets. Then, for each category of log set, the multiple event logs included in each category of log set are sorted according to the order of the event timestamps and then stored, which can support developers to retrieve the interaction log of the event based on the event identifier. For example, if the developer wants to view the interaction log of the event cast, he can directly search based on the event identifier cast through a visual log management platform, that is, he can view the interaction log of this event, which helps developers to quickly troubleshoot and locate problems.

[0131] Second type:

[0132] When the event log includes a device type identifier and the number of received event logs is multiple, the following method can be used: Figure 5 The steps shown perform log management operations on the event logs of the multiple devices:

[0133] In step 501, the plurality of event logs are classified according to the device type identifier to obtain a plurality of types of log sets.

[0134] The event logs included in each type of log set contain the same device type identifier. Each device type identifier corresponds to a device.

[0135] Taking the aforementioned mobile phone and TV as an example, the event log recorded by the mobile phone includes the device type identifier of the mobile phone, such as 1000, and the event log recorded by the TV includes the device type identifier of the TV, such as 2000. The log collection server can classify multiple event logs based on the device type identifiers included in different event logs to obtain a log set with a device type identifier of 1000 and a log set with a device type identifier of 2000.

[0136] In step 502, log sets of the multiple categories are stored.

[0137] The log collection server can store the aforementioned log set with device type identification 1000 and the log set with device type identification 2000. That is, the log collection server can store the log set of event logs recorded by the mobile phone and the log set of event logs recorded by the TV.

[0138] In the log management method of this example, a log collection server classifies multiple event logs based on the device type identifiers included in different event logs to obtain log sets of multiple categories. Then, the log sets of the multiple categories are stored to support developers to retrieve event logs based on device type identifiers. For example, if a developer wants to view the event logs recorded by a mobile phone, a visual log management platform can be used to directly search based on the device type identifier 1000, that is, the event logs recorded by the mobile phone can be viewed, which helps developers to quickly locate and solve problems.

[0139] For the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the described order of actions, because according to the present disclosure, certain steps can be performed in other orders or simultaneously.

[0140] Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0141] Corresponding to the aforementioned application function implementation method embodiment, the present disclosure also provides an application function implementation device and a corresponding terminal embodiment.

[0142] Figure 6 is a structural diagram of a log management device according to an exemplary embodiment of the present disclosure. Figure 6As shown, the log management device may include:

[0143] The acquisition module 61 is used to acquire event identifiers and event timestamps synchronized between multiple devices; the first device is any device among the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices.

[0144] The recording module 62 is used to record the event log corresponding to the event interaction based on the event identifier and the event timestamp; the event log includes the event identifier and the event timestamp.

[0145] The reporting module 63 is used to report the event log to the log collection server, so that the log collection server performs log management operations on the event logs of the multiple devices.

[0146] Optionally, the multiple devices also include: a second device.

[0147] The acquisition module 61, when used to acquire event identifiers and event timestamps synchronized between multiple devices, includes:

[0148] A communication connection is established with a second device among the plurality of devices.

[0149] The event identifier and the event timestamp are synchronized with the second device based on the communication connection.

[0150] Optionally, the multiple devices also include: a second device.

[0151] The reporting module 63, when used to report the event log to the log collection server, includes:

[0152] The first event log recorded locally is sent to the second device, so that the second device reports the first event log and the second event log recorded by the second device to the log collection server.

[0153] Optionally, the multiple devices also include: a second device.

[0154] The reporting module 63, when used to report the event log to the log collection server, includes:

[0155] Receive a second event log sent by the second device; the second event log is an event log recorded by the second device.

[0156] The locally recorded first event log and the second event log are reported to the log collection server.

[0157] Optional, in Figure 6Based on the modules shown, the log management device may further include:

[0158] The conversion module is used to perform a data format conversion operation on the data in the event log to convert the data format of the data in the event log into a predetermined format.

[0159] Figure 7 is a structural diagram of another log management device according to an exemplary embodiment of the present disclosure, such as Figure 7 As shown, the log management device may include:

[0160] The receiving module 71 is used to receive event logs of multiple devices; the event log of each device includes: event identifiers and event timestamps synchronized between the multiple devices, and the event identifiers and event timestamps correspond to an event interaction between the multiple devices.

[0161] The operation module 72 is used to perform log management operations on the event logs of the multiple devices.

[0162] Optionally, the multiple devices include: a first device and a second device.

[0163] The receiving module 71, when used to receive event logs of multiple devices, includes:

[0164] A first event log and a second event log reported by the first device are received; the first event log is recorded by the first device, and the second event log is recorded by the second device and sent to the first device.

[0165] Optionally, when a plurality of event logs are received, and the plurality of event logs include different event identifiers and event timestamps.

[0166] The operation module 72, when used to perform log management operations on the event logs of the plurality of devices, includes:

[0167] According to the event identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same event identifier.

[0168] For a log set of a target category, a log sorting operation is performed on the event logs included in the log set of the target category according to the chronological order of the event timestamps.

[0169] The log sets of multiple categories obtained after the log sorting operation are stored.

[0170] Optionally, the event log includes a device type identifier.

[0171] When the number of the received event logs is multiple, the operation module, when used to perform the log management operation on the event logs of the multiple devices, includes:

[0172] According to the device type identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same device type identifier.

[0173] The log sets of the multiple categories are stored.

[0174] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.

[0175] Figure 8 8 is a schematic diagram of the structure of an electronic device 800 according to an exemplary embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a smart speaker, a tablet device, etc.

[0176] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0177] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0178] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 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.

[0179] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 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 800.

[0180] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 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 808 includes a front camera and / or a rear camera. When the electronic device 800 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.

[0181] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 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 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0182] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0183] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0184] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, 4G LTE, 5G NR or a combination thereof. In an exemplary embodiment, the communication component 816 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 816 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.

[0185] In an exemplary embodiment, the electronic device 800 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.

[0186] In an exemplary embodiment, a non-temporary computer-readable storage medium is also provided, such as a memory 804 including instructions. When the instructions in the storage medium are executed by a processor 820 of an electronic device 800, the electronic device 800 is enabled to execute the log management method of any embodiment of the present disclosure.

[0187] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0188] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure 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 description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0189] 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 log management method, characterized in that: The method is performed by a first device, and includes: Acquire event identifiers and event timestamps synchronized between multiple devices; the first device is any one of the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices; Based on the event identifier and event timestamp, record an event log corresponding to the event interaction; the event log includes the event identifier and event timestamp; The event log is reported to a log collection server, so that the log collection server performs a log management operation on the event logs of the multiple devices.

2. The method according to claim 1, characterized in that The plurality of devices further include: a second device; The step of obtaining event identifiers and event timestamps synchronized between multiple devices includes: establishing a communication connection with a second device among the plurality of devices; The event identifier and the event timestamp are synchronized with the second device based on the communication connection.

3. The method according to claim 1, characterized in that The plurality of devices further include: a second device; Reporting the event log to the log collection server includes: The first event log recorded locally is sent to the second device, so that the second device reports the first event log and the second event log recorded by the second device to the log collection server.

4. The method according to claim 1, characterized in that: The plurality of devices further include: a second device; Reporting the event log to the log collection server includes: receiving a second event log sent by the second device; the second event log is an event log recorded by the second device; The locally recorded first event log and the second event log are reported to the log collection server.

5. The method according to claim 1, characterized in that: Before reporting the event log to the log collection server, the method further includes: A data format conversion operation is performed on the data in the event log to convert the data format of the data in the event log into a predetermined format.

6. A log management method, characterized in that: The method is executed by a log collection server, and the method includes: Receive event logs of multiple devices; the event logs of each device include: event identifiers and event timestamps synchronized between the multiple devices, the event identifiers and event timestamps corresponding to an event interaction between the multiple devices; A log management operation is performed on the event logs of the plurality of devices.

7. The method according to claim 6, characterized in that The multiple devices include: a first device and a second device; The receiving event logs of multiple devices includes: A first event log and a second event log reported by the first device are received; the first event log is recorded by the first device, and the second event log is recorded by the second device and sent to the first device.

8. The method according to claim 6, characterized in that When the number of the received event logs is multiple, and the multiple event logs include different event identifiers and event timestamps; The performing log management operations on the event logs of the plurality of devices includes: According to the event identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same event identifier; For a log set of a target category, performing a log sorting operation on the event logs included in the log set of the target category according to the chronological order of the event timestamps; The log sets of multiple categories obtained after the log sorting operation are stored.

9. The method according to claim 6, characterized in that The event log includes a device type identifier; When the number of the received event logs is multiple, performing log management operations on the event logs of the multiple devices includes: According to the device type identifier, the plurality of event logs are classified to obtain a plurality of categories of log sets; the event logs included in each category of the log set contain the same device type identifier; The log sets of the multiple categories are stored.

10. A log management device, characterized in that: The device is applied to a first device, and includes: An acquisition module, used to acquire event identifiers and event timestamps synchronized between multiple devices; the first device is any one of the multiple devices, and the event identifier and event timestamp correspond to an event interaction between the multiple devices; A recording module, used to record an event log corresponding to the event interaction based on the event identifier and the event timestamp; the event log includes the event identifier and the event timestamp; The reporting module is used to report the event log to a log collection server so that the log collection server performs log management operations on the event logs of the multiple devices.

11. A log management device, characterized in that: The device is applied to a log collection server, and the device includes: A receiving module, configured to receive event logs of multiple devices; the event log of each device includes: event identifiers and event timestamps synchronized between the multiple devices, the event identifiers and event timestamps corresponding to one event interaction between the multiple devices; An operation module is used to perform log management operations on the event logs of the multiple devices.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 or claims 6 to 9 are implemented.

13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the steps of any one of the methods of claims 1-5 or claims 6-9.