CN115296986B - Event recording method and device, storage medium and electronic device - Google Patents

Event recording method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115296986B
CN115296986B CN202210737109.8A CN202210737109A CN115296986B CN 115296986 B CN115296986 B CN 115296986B CN 202210737109 A CN202210737109 A CN 202210737109A CN 115296986 B CN115296986 B CN 115296986B
Authority
CN
China
Prior art keywords
time
event
log
target
reporting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210737109.8A
Other languages
Chinese (zh)
Other versions
CN115296986A (en
Inventor
邓邱伟
王梦阳
区波
翟建光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210737109.8A priority Critical patent/CN115296986B/en
Publication of CN115296986A publication Critical patent/CN115296986A/en
Application granted granted Critical
Publication of CN115296986B publication Critical patent/CN115296986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/064Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving time analysis

Landscapes

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

Abstract

The application discloses a recording method and device of an event, a storage medium and an electronic device, and relates to the technical field of intelligent home, wherein the recording method of the event comprises the following steps: extracting a first reporting time for reporting the first log and attribute information of the target device from the first log reported by the target device; under the condition that the attribute information is abnormal, determining a time interval between a first reporting time and a second reporting time, wherein the second reporting time is the time of a second log reported by the target equipment before the first reporting time; and recording time information of the target event occurring by the target device in the first log based on the time interval.

Description

Event recording method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for recording events, a storage medium, and an electronic apparatus.
Background
The state of the device is judged in the prior art mainly through a large amount of state logs uploaded by the device. A large number of logs are stored in a database, and whether the device is in a certain state for a long time is judged from the large number of logs.
The judgment of the equipment state mainly depends on the program architecture of the used database, any change adjustment needs to comprehensively consider the condition of the database architecture, and the requirement of the real-time diagnosis equipment cannot be met.
Disclosure of Invention
The embodiment of the invention provides a recording method, a recording device, a storage medium and an electronic device for events, which are used for at least solving the problem that the state of equipment cannot be diagnosed in real time in the related technology.
According to an embodiment of the present invention, there is provided a recording method of an event, including: extracting a first reporting time for reporting the first log and attribute information of the target device from the first log reported by the target device; determining a time interval between the first reporting time and a second reporting time when the attribute information is abnormal, wherein the second reporting time is a time of a second log reported by the target device before the first reporting time; and recording time information of a target event occurring in the target device in the first log based on the time interval.
According to another embodiment of the present invention, there is provided a recording apparatus of an event, including: the first extraction module is used for extracting a first reporting time for reporting the first log and attribute information of the target equipment from the first log reported by the target equipment; a first determining module, configured to determine a time interval between the first reporting time and a second reporting time when the attribute information is abnormal, where the second reporting time is a time of a second log reported by the target device before the first reporting time; and the first recording module is used for recording the time information of the target event which occurs in the target equipment in the first log based on the time interval.
In an exemplary embodiment, the above apparatus further includes: the second determining module is used for determining an attribute field of the attribute information before determining a time interval between the first reporting time and the second reporting time under the condition that the attribute information is abnormal; and a third determining module, configured to determine that the attribute information is abnormal if the attribute field does not meet a first preset threshold.
In an exemplary embodiment, the first recording module includes: a first determining unit configured to determine that the first log and the second log are discontinuous when the time interval is greater than a second preset threshold; a second determining unit configured to determine the first reporting time as an event start time when the target event occurs; and the first recording unit is used for recording the event starting time.
In an exemplary embodiment, the first recording module includes: a third determining unit, configured to determine, when the time interval is less than or equal to a second preset threshold and the first log is an initial log, the first reporting time as an event start time when the target event occurs; and the second recording unit is used for recording the event starting time.
In an exemplary embodiment, the first recording module includes: a fourth determining unit configured to determine a duration of the target event if the time interval is less than or equal to a second preset threshold; a third recording unit, configured to determine, when the duration is less than or equal to a third preset threshold, the first reporting time as an event start event of the target event, and record the event start time; a fourth recording unit configured to determine, when the duration is greater than the third preset threshold, a time of an initial log of the recorded target event as an event start time when the target event occurs, and determine the first reporting time as an event end time of the target event; recording the event start time and the event end time, and recording the event start time and the event end time.
In an exemplary embodiment, the above apparatus further includes: and the release module is used for releasing the target event after recording the event start time and the event end time.
In an exemplary embodiment, the above apparatus further includes: and the first searching module is used for searching the target equipment based on the media access control address before extracting the first reporting time for reporting the first log and the attribute information of the target equipment from the first log reported by the target equipment so as to acquire the first log from the target equipment.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, the first reporting time for reporting the first log and the attribute information of the target equipment are extracted from the first log reported by the target equipment; under the condition that the attribute information is abnormal, determining a time interval between a first reporting time and a second reporting time, wherein the second reporting time is the time of a second log reported by the target equipment before the first reporting time; and recording time information of the target event occurring by the target device in the first log based on the time interval. Since in the above method, the attribute information in the log is judged in real time, and the time interval with the previous log is calculated, it is judged from the time interval and the attribute information whether the abnormality occurs in the apparatus. Instead of judging after storing a large number of logs into a database, the technical effect of judging the state of the target equipment in real time is achieved, and the problem that the state of the equipment cannot be diagnosed in real time in the related art is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of an interaction method of a smart device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of recording events according to an embodiment of the present invention;
fig. 3 is a schematic diagram of recording time information according to an embodiment of the present invention;
FIG. 4 is a flow chart of a device diagnostic method according to an embodiment of the present invention;
fig. 5 is a block diagram of a structure of an event recording apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, an interaction method of intelligent home equipment is provided. The interaction method of the intelligent household equipment is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home, intelligent household equipment ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, in this embodiment, the above-mentioned interaction method of the smart home device may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
In this embodiment, a method for recording an event is provided, and fig. 2 is a flowchart of a method for recording an event according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, extracting a first reporting time for reporting the first log and attribute information of the target device from the first log reported by the target device;
step S204, under the condition that the attribute information is abnormal, determining a time interval between a first reporting time and a second reporting time, wherein the second reporting time is the time of a second log reported by the target device before the first reporting time;
step S206, recording time information of a target event occurring in the target device in the first log based on the time interval.
Alternatively, the above-mentioned event recording method may be applied, but not limited to, in a scenario where the status of the apparatus is determined, for example, when the temperature in the refrigerating chamber of the refrigerator is continuously below zero, it is determined that an abnormality occurs in the refrigerating chamber of the refrigerator, and an abnormal event is recorded.
In this embodiment, the target device includes, but is not limited to, a home appliance, such as a smart air conditioner, a smart cigarette maker, a smart refrigerator, a smart oven, a smart stove, and the like.
In this embodiment, the attribute information of the target device may be stored in an attribute dictionary, where each attribute of the device and a field value corresponding to the attribute are stored. For example, the temperature field value of the refrigerating chamber of the refrigerator is 0-7 degrees.
In this embodiment, the target device may continuously upload the log in a normal state (e.g., a state in which communication is normal), and the interval time between two log times is relatively short, for example, when the refrigerator is in good communication condition, the log is uploaded every 1 minute. In the case of abnormal communication of the apparatus, the interval time between the two logs is not fixed, for example, the refrigerator is ten minutes apart in the case of abnormal communication condition. Optionally, the log uploaded by the refrigerator comprises the MAC address, identification information, model information of the refrigerator, real-time values of various sensors, time for reporting the log and the like.
In this embodiment, the time information may be stored in a memory, where a storage space is set for each MAC address, and the storage space includes two time stamps (which may be defined using int 64). For example, as shown in fig. 3, the two time stamps include a last report time stamp and an event start time stamp. And correspondingly storing the time information judged each time into two time stamps. On one hand, real-time quick inquiry aiming at equipment numbers is guaranteed, and on the other hand, a large amount of memory resources can be saved.
In addition, the recording method of the event in the present embodiment may not depend on a program such as a database. The system can be deployed at a server side, can be deployed at a home gateway, and can be integrated on a device main board. The system can be saved without involving hard disk storage, reading and writing, running memory occupation and the like.
The main body of execution of the above steps may be a specific processor provided in a terminal, a server, a terminal or a server, or a processor or a processing device provided separately from the terminal or the server, but is not limited thereto.
Through the steps, the first log information is extracted from the first log reported by the target equipment, wherein the first log information comprises the first reporting time for reporting the first log and the attribute information of the target equipment; under the condition that the attribute information is abnormal, determining a time interval between a first reporting time and a second reporting time, wherein the second reporting time is the time of a second log reported by the target equipment before the first reporting time; and recording time information of the target event occurring by the target device in the first log based on the time interval. Since in the above method, the attribute information in the log is judged in real time, and the time interval with the previous log is calculated, it is judged from the time interval and the attribute information whether the abnormality occurs in the apparatus. Instead of judging after storing a large number of logs into a database, the technical effect of judging the state of the target equipment in real time is achieved, and the problem that the state of the equipment cannot be diagnosed in real time in the related art is solved.
In an exemplary embodiment, before determining the time interval between the first reporting time and the second reporting time in the case that the attribute information is abnormal, the method further includes:
s1, determining attribute fields of attribute information;
s1, determining that the attribute information is abnormal under the condition that the field length of the attribute field is larger than a first preset threshold value.
In this embodiment, the attribute information may be acquired by each sensor in the device, and the first preset threshold may be set based on different application scenarios. For example, a temperature sensor in a refrigerator's fresh food compartment obtains a temperature value of-1 degree in a cool food compartment. The temperature threshold set in the cold meal is 0-7 degrees. The field value representing-1 degree does not satisfy the field value of 0-7 degrees, and it can be judged that the temperature in the cold dining room is abnormal, so that it is judged that the refrigerating room of the refrigerator is abnormal, and the refrigerator is in an abnormal state.
By the embodiment, whether the equipment is in an abnormal state can be accurately judged by judging the equipment attribute information.
In one exemplary embodiment, recording time information of a target event occurring at a target device in a first log based on a time interval includes:
s1, determining that a first log and a second log are discontinuous under the condition that the time interval is larger than a second preset threshold value;
s2, determining the first reporting time as the event starting time of the occurrence of the target event;
s3, recording event starting time.
In this embodiment, the second log is a previous log of the first log, and in the case where an abnormality (for example, communication abnormality or power failure) occurs in the target device, the time interval between the first log and the second log is relatively long (for example, the interval is 1 hour), and it is determined that an interrupt occurs between the first log and the second log. At this time, the event start time stamp and the last time reporting time stamp in the two time stamps in the memory are both assigned as the first reporting time. For example, when an interrupt occurs between two logs reported by the refrigerator, the time "10:00" of the current log reported is assigned to the event start time stamp and the last reporting time stamp. The last reported time stamp and the event start time stamp in memory are both "10:00".
In addition, in the case that the attribute information is normal, the embodiment may assign the event start timestamp and the last reporting timestamp in the two timestamps in the memory as the first reporting time.
According to the embodiment, whether the log is interrupted or not is determined through judging the time interval, the state of the equipment can be determined in real time, a large number of logs are stored independently of a database, and the memory space is saved.
In one exemplary embodiment, recording time information of a target event occurring at a target device in a first log based on a time interval includes:
s1, determining a first reporting time as an event start time of a target event when the time interval is smaller than or equal to a second preset threshold value and the first log is an initial log;
s2, recording event starting time.
In this embodiment, if the first log is the initial log, there is no log reported last time, and the event start timestamp and the last report timestamp in the two timestamps in the memory may be both assigned as the first report time. Thus completing the initialization of the time stamp.
In one exemplary embodiment, recording time information of a target event occurring at a target device in a first log based on a time interval includes:
s1, determining the duration of a first reporting time determination target event under the condition that the time interval is smaller than or equal to a second preset threshold value;
s2, determining the first reporting time as an event starting event of the target event and recording the event starting time under the condition that the duration time is smaller than or equal to a third preset threshold value;
s3, when the duration time is larger than a third preset threshold value, determining the time of the initial log of the recorded target event as the event start time of the occurrence target event, and determining the first reporting time as the event end time of the target event; recording event start time and event end time.
In this embodiment, the log reported by the device is not interrupted, but if the duration of the log does not reach the standard, the abnormality of the device is not issued. For example, if the refrigerator reports an event that the temperature of the cold room is below 0 degrees for only 2 minutes, it may be determined that the cold room is abnormally short. And not reporting the exception, and assigning the event start time stamp and the last time reporting time stamp in the two time stamps in the memory as the first reporting time.
And under the condition that the log reported by the equipment is not interrupted and the duration time of the log reaches the standard, the abnormality of the equipment is issued. For example, an event reported by the refrigerator that the temperature of the cold room is below 0 degrees for 1 hour may determine that an abnormality has occurred in the cold room. And releasing an abnormal result of the refrigerator. And assigning the event start time stamp and the last time reporting time stamp in the two time stamps in the memory as the first reporting time.
According to the embodiment, through judging the duration of the equipment abnormality, the release of the equipment abnormality can be more accurately determined.
In one exemplary embodiment, after recording the event start time and the event end time, the method further comprises:
s1, issuing a target event.
In this embodiment, publishing the target event includes, but is not limited to, writing the target event to a database, or to a message queue, or transmitting to other interfaces, etc. To clearly record the target event.
In an exemplary embodiment, before extracting, from the first log reported by the target device, the first reporting time for reporting the first log and the attribute information of the target device, the method further includes:
s1, searching the target device based on the media access control address to acquire a first log from the target device.
The embodiment can clearly correspond the MAC address to the attribute information of the equipment, so as to accurately judge whether the attribute information of the target equipment is abnormal.
The invention is illustrated below with reference to specific examples:
in order to solve the problem that the prior art cannot meet the requirement of real-time diagnosis of equipment, the embodiment provides a diagnosis method of equipment, as shown in fig. 4, and the embodiment comprises the following steps:
s401, acquiring a log reported at the time, wherein the log comprises an MAC address, an attribute dictionary and a reporting time stamp at the time; positioning the corresponding equipment according to the MAC address;
s402, after the equipment is determined, judging whether an attribute field in an attribute dictionary meets a preset condition, wherein the preset condition can be a preset field value;
s403, when no abnormality occurs in the attribute information included in the attribute dictionary, the value of the event start time stamp set in the memory is nullified, and the process goes to S410;
s404, judging whether a break occurs between the log reported this time and the log reported last time under the condition that the attribute information included in the attribute dictionary is abnormal;
s405, if the interruption occurs, assigning the value of the event start time stamp as the event of the log reported locally, and turning to S410;
s406, judging whether the time interval between the log reported this time and the log reported last time is a null value or not under the condition that no interruption occurs;
s407, if the time interval is a null value, assigning the value of the event start time stamp to the event of the log reported locally, and turning to S410;
s408, under the condition that the time interval is not a null value, calculating the duration time of the event included in the current reported log, wherein the calculation of the duration time can be obtained based on the event starting time stamp stored before;
s409, in case the duration reaches the standard, a diagnosis result is issued (e.g., written into a database, a message queue, or other interface, etc.). And assigning the reporting time stamp to the event starting time stamp. The same equipment ends one diagnosis and enters the next diagnosis period.
S410, assigning the 'current reporting time stamp' to the 'last reporting time stamp'.
The embodiment can identify a large number of events continuously conforming to a certain state for a long time based on the device log.
In addition, the embodiment does not depend on the services of any application program such as a database, the program itself is completely decoupled from the upstream and the downstream, and the running of the program can be realized relatively independently. Whether real-time data or historical data, whether there is a delay in the data, the data can be processed normally as long as it is packed to conform to the belonging format. Moreover, because the program has low requirement level on system resources, the running logic is simple and efficient, and no dependence is basically needed compared with upstream and downstream decoupling, the tested program algorithm can be very simply transplanted to almost all terminals except a cloud server, including but not limited to a home gateway and intelligent equipment with at least hardware configuration. Memory resources are greatly saved. Each time stamp is set as int64, and 8Byte space is occupied; each device is numbered 12-bit 16-ary number (taking physical MAC address as an example) and occupies 6 bytes of space, and then the actual occupied memory of each device is about 20 bytes. Processing the log of 100 tens of thousands of devices also requires only 20MB of memory space. This means that even if a very large number of device log data are processed, the occupation of memory resources by the present model is basically negligible. By reading the configuration items in real time, the program can respond to the adjustment algorithm threshold value in real time to perform real-time dynamic configuration without modifying codes, restarting the program and the like.
The embodiment also provides a device for recording events, which is used for implementing the above embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a recording apparatus of events according to an embodiment of the present invention, as shown in fig. 5, the apparatus including:
the first extracting module 52 is configured to extract, from a first log reported by the target device, a first reporting time for reporting the first log and attribute information of the target device;
a first determining module 54, configured to determine, in a case where the attribute information is abnormal, a time interval between a first reporting time and a second reporting time, where the second reporting time is a time of a second log that is reported by the target device before the first reporting time;
a first recording module 56 is configured to record, based on the time interval, time information of a target event occurring at the target device in the first log.
In an exemplary embodiment, the above apparatus further includes: the second determining module is used for determining an attribute field of the attribute information before determining a time interval between the first reporting time and the second reporting time under the condition that the attribute information is abnormal;
and a third determining module, configured to determine that the attribute information is abnormal if the attribute field does not meet a first preset threshold.
In an exemplary embodiment, the first recording module includes:
a first determining unit configured to determine that the first log and the second log are discontinuous when the time interval is greater than a second preset threshold;
a second determining unit configured to determine the first reporting time as an event start time when the target event occurs;
and the first recording unit is used for recording the event starting time.
In an exemplary embodiment, the first recording module includes:
a third determining unit, configured to determine, when the time interval is less than or equal to a second preset threshold and the first log is an initial log, the first reporting time as an event start time when the target event occurs;
and the second recording unit is used for recording the event starting time.
In an exemplary embodiment, the first recording module includes:
a fourth determining unit configured to determine a duration of the target event if the time interval is less than or equal to a second preset threshold;
a third recording unit, configured to determine, when the duration is less than or equal to a third preset threshold, the first reporting time as an event start event of the target event, and record the event start time;
a fourth recording unit configured to determine, when the duration is greater than the third preset threshold, a time of an initial log of the recorded target event as an event start time when the target event occurs, and determine the first reporting time as an event end time of the target event; recording the event start time and the event end time, and recording the event start time and the event end time.
In an exemplary embodiment, the above apparatus further includes:
and the release module is used for releasing the target event after recording the event start time and the event end time.
In an exemplary embodiment, the above apparatus further includes:
and the first searching module is used for searching the target equipment based on the media access control address before extracting the first reporting time for reporting the first log and the attribute information of the target equipment from the first log reported by the target equipment so as to acquire the first log from the target equipment.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method of recording an event, comprising:
extracting a first reporting time for reporting the first log and attribute information of target equipment from the first log reported by the target equipment;
determining a time interval between the first reporting time and a second reporting time under the condition that the attribute information is abnormal, wherein the second reporting time is the time of a second log reported by the target equipment before the first reporting time;
recording time information of a target event occurring in the target device in the first log based on the time interval;
wherein recording time information of a target event occurring in the target device in the first log based on the time interval includes:
determining that the first log and the second log are discontinuous under the condition that the time interval is larger than a second preset threshold value; determining the first reporting time as an event start time when the target event occurs;
recording the event start time.
2. The method according to claim 1, wherein, in the case where the attribute information is abnormal, before determining the time interval between the first reporting time and the second reporting time, the method further comprises:
determining an attribute field of the attribute information;
and determining that the attribute information is abnormal under the condition that the field length of the attribute field is larger than a first preset threshold value.
3. The method of claim 1, wherein recording time information for a target event occurring at the target device in the first log based on the time interval comprises:
determining the first reporting time as an event start time when the target event occurs when the time interval is smaller than or equal to a second preset threshold value and the first log is an initial log;
recording the event start time.
4. The method of claim 1, wherein recording time information for a target event occurring at the target device in the first log based on the time interval comprises:
determining the duration of the target event if the time interval is less than or equal to a second preset threshold;
determining the first reporting time as an event starting event of the target event and recording the event starting time under the condition that the duration time is smaller than or equal to a third preset threshold value;
when the duration is greater than the third preset threshold, determining the recorded time of the initial log of the target event as the event start time of the target event, and determining the first reporting time as the event end time of the target event; recording the event start time and the event end time.
5. The method of claim 4, wherein after recording the event start time and the event end time, the method further comprises:
and issuing the target event.
6. The method of claim 1, wherein before extracting, from a first log reported by a target device, a first reporting time for reporting the first log and attribute information of the target device, the method further comprises:
the target device is looked up based on a media access control address to obtain the first log from the target device.
7. A recording apparatus of events, comprising:
the first extraction module is used for extracting a first reporting time for reporting the first log and attribute information of the target equipment from the first log reported by the target equipment;
the first determining module is used for determining a time interval between the first reporting time and a second reporting time under the condition that the attribute information is abnormal, wherein the second reporting time is the time of a second log reported by the target equipment before the first reporting time;
the first recording module is used for recording time information of a target event which occurs to the target equipment in the first log based on the time interval;
wherein, the first recording module includes: a first determining submodule, configured to determine that the first log and the second log are discontinuous if the time interval is greater than a second preset threshold; a second determining submodule, configured to determine the first reporting time as an event start time when the target event occurs;
and the first recording submodule is used for recording the event starting time.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program when run performs the method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of claims 1 to 6by means of the computer program.
CN202210737109.8A 2022-06-27 2022-06-27 Event recording method and device, storage medium and electronic device Active CN115296986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210737109.8A CN115296986B (en) 2022-06-27 2022-06-27 Event recording method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210737109.8A CN115296986B (en) 2022-06-27 2022-06-27 Event recording method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115296986A CN115296986A (en) 2022-11-04
CN115296986B true CN115296986B (en) 2024-03-22

Family

ID=83820060

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210737109.8A Active CN115296986B (en) 2022-06-27 2022-06-27 Event recording method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115296986B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005236862A (en) * 2004-02-23 2005-09-02 Kddi Corp Log analyzing device and program, and recording medium
JP2009151388A (en) * 2007-12-18 2009-07-09 Fujitsu Ltd Monitoring program, method and apparatus
JP2010198410A (en) * 2009-02-26 2010-09-09 Nec Computertechno Ltd Server failure prediction system
JP2012002640A (en) * 2010-06-16 2012-01-05 Fujitsu Telecom Networks Ltd Testing device and testing method
CN107154083A (en) * 2016-03-03 2017-09-12 Ls 产电株式会社 Data recording equipment
CN108121645A (en) * 2017-12-25 2018-06-05 深圳市分期乐网络科技有限公司 A kind of daily record method for evaluating quality, device, server and storage medium
EP3361405A1 (en) * 2017-02-13 2018-08-15 Nokia Solutions and Networks Oy Enhancement of intrusion detection systems
CN113835969A (en) * 2021-09-30 2021-12-24 北京字跳网络技术有限公司 Micro-service monitoring method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005236862A (en) * 2004-02-23 2005-09-02 Kddi Corp Log analyzing device and program, and recording medium
JP2009151388A (en) * 2007-12-18 2009-07-09 Fujitsu Ltd Monitoring program, method and apparatus
JP2010198410A (en) * 2009-02-26 2010-09-09 Nec Computertechno Ltd Server failure prediction system
JP2012002640A (en) * 2010-06-16 2012-01-05 Fujitsu Telecom Networks Ltd Testing device and testing method
CN107154083A (en) * 2016-03-03 2017-09-12 Ls 产电株式会社 Data recording equipment
EP3361405A1 (en) * 2017-02-13 2018-08-15 Nokia Solutions and Networks Oy Enhancement of intrusion detection systems
CN108121645A (en) * 2017-12-25 2018-06-05 深圳市分期乐网络科技有限公司 A kind of daily record method for evaluating quality, device, server and storage medium
CN113835969A (en) * 2021-09-30 2021-12-24 北京字跳网络技术有限公司 Micro-service monitoring method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115296986A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN115296986B (en) Event recording method and device, storage medium and electronic device
CN110736224B (en) Control method and device of intelligent household equipment, storage medium and processor
CN116026095A (en) Method and device for determining fault type, storage medium and electronic device
CN114915514B (en) Method and device for processing intention, storage medium and electronic device
CN116614858A (en) Data transmission method and device, storage medium and electronic equipment
CN116225834A (en) Alarm information sending method and device, storage medium and electronic device
CN116360584A (en) Virtual target product generation method and device, storage medium and electronic device
CN107517236B (en) Event processing method, device and equipment for Internet of things
CN117914881A (en) Method and device for acquiring sensing data, storage medium and electronic device
CN116839165A (en) Air conditioner refrigerant detection method, storage medium and electronic device
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN117240874A (en) Equipment linkage method and device, storage medium and electronic device
CN114760235B (en) Method and device for executing dial testing task, storage medium and electronic device
CN117914788A (en) Message current limiting processing method and device for intelligent household equipment
CN117527459A (en) Control method and device of intelligent equipment, storage medium and electronic device
CN115373958A (en) Method and device for determining abnormal information, storage medium and electronic device
CN115312049A (en) Command response method, storage medium and electronic device
CN116561163A (en) Adjustment method and device of prediction model, storage medium and electronic equipment
CN114841234A (en) Fault feedback method, storage medium and electronic device
CN116033006A (en) Data processing method, system, storage medium and electronic device
CN116560974A (en) Interface testing method of Internet of things equipment, storage medium and electronic device
CN116483449A (en) Equipment awakening method and device, storage medium and electronic device
CN116418613A (en) Message reflow processing method and device, storage medium and electronic device
CN117857240A (en) Method and device for sending adjustment instruction, storage medium and electronic device
CN116170344A (en) Message monitoring method and device, storage medium and electronic device

Legal Events

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