CN113190399A - Log storage method and device, computer equipment and storage medium - Google Patents

Log storage method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113190399A
CN113190399A CN202110338497.8A CN202110338497A CN113190399A CN 113190399 A CN113190399 A CN 113190399A CN 202110338497 A CN202110338497 A CN 202110338497A CN 113190399 A CN113190399 A CN 113190399A
Authority
CN
China
Prior art keywords
log
key event
event state
memory
storing
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.)
Pending
Application number
CN202110338497.8A
Other languages
Chinese (zh)
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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202110338497.8A priority Critical patent/CN113190399A/en
Publication of CN113190399A publication Critical patent/CN113190399A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3068Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data format conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to a log storage method and device, computer equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining key event state information of a communication module, generating a key event state log according to the key event state information, and storing the key event state log into a nonvolatile storage module when a preset storage triggering condition is met. By adopting the method, the key event state log containing the data information when the communication module operates can be stored in the nonvolatile storage module, the loss of the key event state log caused by power failure and network disconnection can be avoided, the positioning of the communication module abnormity can be realized by searching the key event state log in the nonvolatile storage module or in the memory when the communication module is abnormal, a test device is not required to be externally connected, and the abnormity reappearance is carried out, so that the method is simple and convenient.

Description

Log storage method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a log storage method and apparatus, a computer device, and a storage medium.
Background
With the development of communication technology, the use of communication modules is becoming more and more common. At present, log information recorded by most communication modules in the operation process is easy to cause data loss due to conditions such as power failure and network disconnection of the communication modules.
When needing to solve communication module and appearing unusually maintaining, because the disappearance of log can't directly fix a position communication module unusual problem, need use external test tool to connect communication module and debug, reappear the unusual condition of communication module appearance, snatch the debugging information that communication module appears testing tool output when unusual in real time, utilize these debugging information analysis to fix a position communication module's problem.
Therefore, the test method for analyzing and positioning the abnormity of the communication module in the prior art has the problems of time and labor consumption.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a log storage method, device, computer device, and storage medium capable of locating an abnormality of a communication module simply and efficiently.
In a first aspect, the present application provides a log storage method, including:
acquiring key event state information of a communication module;
generating a key event state log according to the key event state information;
and when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module.
In one embodiment, generating a key event status log according to the key event status information includes:
acquiring the event grade of the key state information;
and classifying the key state information according to the event grade of the key state information, and adding a label to the classified key event state information to generate a key event state log.
In one embodiment, the log storage method further includes:
storing the key event state log into a preset memory;
when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module, wherein the storing comprises the following steps:
and when the preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module.
In one embodiment, when a preset storage trigger condition is met, storing a key event state log in a memory into a nonvolatile storage module includes:
judging whether the storage capacity of the memory reaches a preset capacity threshold value or not;
and if the storage capacity of the memory reaches a preset capacity threshold, storing the key event state log in the memory into a nonvolatile storage module.
In one embodiment, when a preset storage trigger condition is met, storing a key event state log in a memory into a nonvolatile storage module includes:
and storing the key event state log stored in the memory into a nonvolatile storage module according to a preset time period.
In one embodiment, storing the critical event status log in a non-volatile storage module comprises:
compressing the key event state log to generate a compressed log;
and storing the compressed log into a nonvolatile storage module.
In one embodiment, the format of the key event status log comprises a primary label, a secondary label, log content information, time, and event level.
In a second aspect, the present application provides a log storage apparatus, comprising:
the acquisition module is used for acquiring the key event state information of the communication module;
the generating module is used for generating a key event state log according to the key event state information;
and the storage module is used for storing the key event state log into the nonvolatile storage module when a preset storage triggering condition is met.
In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the above embodiments.
According to the log storage method, the log storage device, the computer equipment and the storage medium, the key event state log is generated by acquiring the key event state information of the communication module according to the key event state information, and the key event state log is stored in the nonvolatile storage module when the preset storage triggering condition is met. The method has the advantages that the key event state logs containing the data information when the communication module operates can be stored in the nonvolatile storage module, the key event state logs cannot be lost due to power failure and network disconnection, the analysis and the positioning of the communication module abnormity can be realized by searching the key event state logs in the nonvolatile storage module when the communication module is abnormal, an external testing device is not needed, and the abnormity reappearance is not needed.
Drawings
FIG. 1 is a diagram of an application environment of a log storage method in one embodiment;
FIG. 2 is a flow chart illustrating a method for storing logs in another embodiment;
FIG. 3 is a flowchart illustrating a log storage method according to another embodiment;
FIG. 4 is a flowchart illustrating a log storage method according to another embodiment;
FIG. 5 is a flowchart illustrating a log storage method according to another embodiment;
FIG. 6 is a flowchart illustrating a method for storing logs in accordance with another embodiment;
FIG. 7 is a flowchart illustrating a log storage method according to another embodiment;
FIG. 8 is a block diagram of a log storage device in one embodiment;
FIG. 9 is a block diagram of a log storage device in one embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The log storage method provided by the application can be applied to the application environment shown in fig. 1. The application environment comprises an Internet of things terminal. The internet of things terminal 11 includes a communication module 101, and the internet of things terminal 11 can realize network communication with other terminals 12 through the internal communication module 101. Among them, the communication module 101 may include: a processor 1011, a memory 1012, a non-volatile storage module 1013, and a radio frequency module 1014. The radio frequency module 1014 is configured to receive data information generated by the terminal 102 of the internet of things, and transmit the data information to the processor 1011; the processor 1011 is configured to process data information, which is transmitted by the radio frequency module 1014 and generated by the terminal 102 of the internet of things, and send the processed data information to other devices through the radio frequency module 1014; the processor 1011 is further configured to store event information generated during the operation of the communication module 101 in the memory 1012; the processor 1011 is further configured to store the event information stored in the memory 1012 into the nonvolatile storage module 1013. The communication module 101 may be a 2G module, a 3G module, a 4G module, a 5G module, an NB-IOT module, an e-MTC module, a LoRa module, and a Sigfox module, which are not limited herein.
In one embodiment, as shown in fig. 2, a log storage method is provided, which is exemplified by the application of the method to the processor in fig. 1, and includes the following steps:
s202, obtaining the key event state information of the communication module.
The key event state information refers to information related to the network in the operation process of the communication module. Illustratively, the critical event status information may include: the AT command operation record of the user, the change information of the sim card in the bit state, the network injection state change information of the network, the information of the dial-up connection, the state information of the key device, and the like, which are not limited in the embodiment of the present application.
Specifically, when the communication module is powered on, the key event state information is generated in real time, and the processor receives the key event state information in real time, that is, the key event state information of the communication module is acquired.
And S204, generating a key event state log according to the key event state information.
Specifically, after the key event state information is acquired, the key event state information can be classified, and the classified key event state information is used as a key event state log; or directly using the key event state information as a key event state log; the key event status information may also be tagged, and the key event status information after being tagged is used as a key event status log, which is not limited herein.
And S206, storing the key event state log into a nonvolatile storage module when the preset storage triggering condition is met.
The preset storage triggering condition is a triggering condition for storing the key event state log into the nonvolatile storage module, and the preset storage triggering condition may include real-time triggering storage; the method also can comprise triggering and storing the event grade of the key event state log when reaching a preset grade; a time period, a periodic trigger store, may also be included, and may be, for example, every 1 hour, every 2 hours, or every 30 minutes, without limitation.
Wherein the nonvolatile memory module may include: programmable read-only memory (PROM), Electrically alterable read-only memory (EAROM), Erasable Programmable read-only memory (EPROM), Electrically Erasable Programmable read-only memory (EEPROM), Flash memory, and the like, without limitation.
Specifically, when a preset storage triggering condition is met, storing the key event state log into the nonvolatile storage module, and when a preset time is reached, storing the generated key event state log into the nonvolatile storage module, for example, storing the key event state log into the nonvolatile storage module at a plurality of fixed times every day; the key event status log may also be stored to the nonvolatile storage module in real time when the key event status log is generated, which is not limited herein.
In the log storage method, the key event state information of the communication module is acquired; generating a key event state log according to the key event state information; and when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module. The method has the advantages that the key event state logs containing relevant data information during the operation of the communication module can be stored in the nonvolatile storage module, the nonvolatile storage module cannot lose the key event state logs due to power failure and network disconnection, the positioning of the communication module abnormality can be conveniently realized by searching the key event state logs of the nonvolatile storage module when the communication module is abnormal, an external testing device is not needed, and the abnormal reproduction is carried out, so that the method is simple and convenient.
The above embodiment describes a log storage method, and before log storage, a key event status log needs to be generated first, and how to generate the key event status log is described with an embodiment, in an embodiment, as shown in fig. 3, generating the key event status log according to key event status information includes:
s302, obtaining the event level of the key state information.
Specifically, the event level of the critical event status information may include general, important, urgent, etc.; may also include: level 1, level 2, level 3, etc., without limitation. When the key event state information is generated, the related event level is automatically generated, that is, the event level of the key event state information can be acquired while the key event state information is acquired.
S304, classifying the key state information according to the event grade of the key state information, adding a label to the classified key event state information, and generating a key event state log.
Specifically, the processor classifies the key event state information having the same event grade into one type according to the event grade corresponding to each piece of key event state information, and adds a label to the classified key event state information to generate a key event state log. For example, a SIM card tag, an operation record tag, a network status tag, and the like may be added to the critical event status information, which is not limited herein.
Optionally, the format of the key event status log includes a primary label, a secondary label, log content information, time, and event level. For example, the key event status log may be that SIM card, SIM card 1 are not in place, 13 o' clock at 1/11/2021, 27 min 30 sec, level 1.
In this embodiment, the key event status log is generated by acquiring the event level of the key status information, classifying the key status information according to the event level of the key status information, and adding a label to the classified key event status information. The method and the device can classify the state information of the key events, can search the corresponding key event state logs according to the labels when the communication module is abnormal, can analyze the abnormality of the communication module, and improve the efficiency of analyzing and positioning the abnormal condition of the communication module.
In the above embodiment, it is described that the key event status log is stored in the nonvolatile storage module, before this step, the key event status log may also be stored in a preset memory, and in an embodiment, as shown in fig. 4, the log storage method further includes:
s402, storing the key event state log into a preset memory.
The memory is a cache space for temporarily storing the key event state log. Specifically, after the communication module is powered on, a memory with a preset capacity is automatically allocated to store the key event status log. After the key event state log in the operation process of the communication module is obtained, the key time state log can be stored in the memory.
And S404, storing the key event state log in the memory into a nonvolatile storage module when a preset storage triggering condition is met.
Specifically, when a preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module, or when the preset capacity of the memory is full, storing the key event state log stored in the memory into the nonvolatile storage module, and deleting the key event state log stored in the memory. For example, if the preset capacity of the memory is 500M, when the preset capacity of the memory reaches 500M, the key event status log stored in the memory is stored in the nonvolatile storage module, and the key event status log stored in the memory is deleted. The key event status log stored in the memory may also be stored into the non-volatile storage module periodically, and the key event status log stored in the memory is deleted, for example, the key event status log stored in the memory is stored into the non-volatile storage module every 2 hours, and the key event status log stored in the memory is deleted, which is not limited herein.
In this embodiment, by storing the key event state log in a preset memory, the key event state log in the memory is stored in the nonvolatile storage module when a preset storage trigger condition is met. The method can store the key event log information into the preset memory and the nonvolatile storage module, is convenient for obtaining the key event log information from the memory and the nonvolatile storage module when the communication module is abnormal and the key event log information needs to be called, and increases the storage way of the key event state log.
In an embodiment, as shown in fig. 5, when the preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module includes:
s502, judging whether the storage capacity of the memory reaches a preset capacity threshold value.
Specifically, the preset capacity threshold is determined according to the maximum capacity of the memory capable of storing the key event status log, and is used for determining whether the storage capacity of the memory for storing the key event status log reaches the preset capacity threshold, for example, the preset capacity threshold is 1G, and determining whether the storage capacity of the memory reaches 1G.
And S504, if the storage capacity of the memory reaches a preset capacity threshold, storing the key event state log in the memory into the nonvolatile storage module.
Specifically, when the storage capacity of the memory reaches a preset capacity threshold, the key event state log in the memory is stored in the nonvolatile storage module. For example, the maximum capacity of the memory is 800M, the preset capacity threshold may be set to be 800M, 790M, 780M, and the like, and if the preset capacity threshold is 800M, when the storage capacity of the memory is 800M, the key event status log in the memory is stored in the nonvolatile storage module; if the preset capacity threshold is 790M, storing the key event status log in the memory into the nonvolatile memory module when the storage capacity of the memory is 792M, which is not limited herein.
Optionally, the key event status log stored in the memory is stored in the non-volatile storage module according to a preset time period. Illustratively, the key event state log stored in the memory is stored in the nonvolatile storage module every hour according to a preset time period. The preset time period may be, but is not limited to, every hour, every day, every 15 minutes.
In this embodiment, by determining whether the storage capacity of the memory reaches the preset capacity threshold, if the storage capacity of the memory reaches the preset capacity threshold, the key event status log in the memory is stored in the nonvolatile storage module. Meanwhile, the key event state log stored in the memory can be stored in the nonvolatile storage module according to a preset time period. The method can store the key event state logs stored in the memory into the nonvolatile storage module under the preset storage triggering condition, so that the condition that the information in the memory is lost under the conditions of full memory capacity, power failure, network disconnection and the like caused by the fact that only the key event state logs are stored into the memory is avoided, and the premise is provided for locating the abnormal part of the communication module by searching the key event state logs.
The foregoing embodiment describes that, when a preset storage triggering condition is met, a key event state log in a memory is stored in a nonvolatile storage module, and when the key event state log is stored in the nonvolatile storage module, the key event state log may be compressed and then stored in the nonvolatile storage module, where the key event state log is compressed in an embodiment, and in an embodiment, as shown in fig. 6, storing the key event state log in the nonvolatile storage module includes:
s602, compressing the key event state log to generate a compressed log.
Specifically, the key event status logs may be compressed one by one to generate compressed logs; the method may further pack a plurality of key event status logs of the same type, compress the packed key event status logs, and generate compressed logs, which is not limited herein.
S604, storing the compressed log into a nonvolatile storage module.
Specifically, the compressed log is stored in a nonvolatile storage module for saving.
In this embodiment, the key event status log is compressed to generate a compressed log, and the compressed log is stored in the nonvolatile storage module. The method can store the key event state log into the nonvolatile storage medium more times, prolong the service life of the nonvolatile storage medium and avoid the loss of the key event state log. Moreover, the key event state logs are compressed, so that the data volume can be reduced, and the storage resources of the nonvolatile storage module are saved.
To facilitate understanding of those skilled in the art, the log storage method will be further described in an embodiment, as shown in fig. 7, the log storage method includes:
s702, acquiring the key event state information of the communication module.
S704, obtaining the event level of the key state information.
S706, classifying the key state information according to the event grade of the key state information, adding a label to the classified key event state information, and generating a key event state log.
And S708, storing the key event state log into a preset memory.
S710, judging whether the storage capacity of the memory reaches a preset capacity threshold value.
And S712, if the storage capacity of the memory reaches the preset capacity threshold, compressing the key event state log in the memory to generate a compressed log.
And S714, storing the compressed log into a nonvolatile storage module.
And S716, compressing the key event state log stored in the memory according to a preset time period to generate a compressed log.
And S718, storing the compressed log into a nonvolatile storage module.
In this embodiment, the key event state logs are generated by acquiring the key event state information, classifying the key event state information and adding a label to the classified key event state information, and storing the key event state logs in the memory into the nonvolatile storage module when a preset storage triggering condition is met, so that the key event state logs of the communication module can be stored and are not easily lost. The key event state information is classified and labeled, so that a key time state log can be conveniently searched when the communication module is abnormal, the abnormal part of the communication module can be quickly positioned, an external testing device is not required to be connected for abnormal reproduction, debugging information is grabbed, and time and labor are saved.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
The above-mentioned embodiment describes a log storage method, and now a log storage apparatus is described with an embodiment, as shown in fig. 8, there is provided a log storage apparatus, including: an obtaining module 801, a generating module 802 and a storing module 803, wherein:
an obtaining module 801, configured to obtain key event status information of a communication module;
a generating module 802, configured to generate a key event status log according to the key event status information;
the storage module 803 is configured to store the key event status log into the nonvolatile storage module when a preset storage trigger condition is met.
In this embodiment, the obtaining module obtains key event state information of the communication module, the generating module generates a key event state log according to the key event state information, and the storing module stores the key event state log into the nonvolatile storing module when a preset storage triggering condition is met. The method has the advantages that the key event state logs containing the relevant data information during the operation of the communication module can be stored, the loss of the key event state logs caused by power failure and network disconnection is avoided, the abnormal positioning of the communication module can be conveniently realized by searching the relevant key event state logs of the nonvolatile storage module when the communication module is abnormal, an external test device is not needed, and abnormal reproduction is carried out, so that the method is simple and convenient.
In one embodiment, as shown in FIG. 9, the generation module 802 includes:
a first obtaining unit 8021, configured to obtain an event level of the key state information;
the first generating unit 8022 is configured to classify the key state information according to an event level of the key state information, add a label to the classified key event state information, and generate a key event state log.
Optionally, the format of the key event status log includes a primary label, a secondary label, log content information, time, and event level.
In one embodiment, referring to fig. 9, the log storage further includes:
a second storage module 804, configured to store the key event status log in a preset memory;
the third storage module 805 is configured to store the key event status log in the memory into the nonvolatile storage module when a preset storage trigger condition is met.
In one embodiment, referring to fig. 9, the third storage module 805 includes:
a judging unit 8051, configured to judge whether a storage capacity of the memory reaches a preset capacity threshold;
the first storage unit 8052 is configured to store the critical event status log in the memory into the nonvolatile storage module if the storage capacity of the memory reaches a preset capacity threshold.
The second storage unit 8053 is configured to store the key event state log stored in the memory into the nonvolatile storage module according to a preset time period.
In one embodiment, referring to fig. 9, the storage module 803 comprises:
the compression unit 8031 is configured to compress the key event status log to generate a compressed log;
a fourth storage unit 8032, configured to store the compressed log in the nonvolatile storage module.
For the specific definition of the log storage device, reference may be made to the above definition of the log storage method, which is not described herein again. The respective modules in the log storage device may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a log storage method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring key event state information of a communication module;
generating a key event state log according to the key event state information;
and when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module.
In one embodiment, the processor, when executing the computer program, implements generating a key event status log based on the key event status information, comprising:
acquiring the event grade of the key state information;
and classifying the key state information according to the event grade of the key state information, and adding a label to the classified key event state information to generate a key event state log.
Optionally, the format of the key event status log includes a primary label, a secondary label, log content information, time, and event level.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
storing the key event state log into a preset memory;
when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module, wherein the storing comprises the following steps:
and when the preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module.
In one embodiment, when the processor executes the computer program and meets a preset storage triggering condition, the method for storing the key event state log in the memory into the nonvolatile storage module includes:
judging whether the storage capacity of the memory reaches a preset capacity threshold value or not;
and if the storage capacity of the memory reaches a preset capacity threshold, storing the key event state log in the memory into a nonvolatile storage module.
In one embodiment, when the processor executes the computer program and meets a preset storage triggering condition, the method for storing the key event state log in the memory into the nonvolatile storage module includes:
and storing the key event state log stored in the memory into a nonvolatile storage module according to a preset time period.
In one embodiment, the processor when executing the computer program implements storing the critical event status log in a non-volatile storage module, comprising:
compressing the key event state log to generate a compressed log;
and storing the compressed log into a nonvolatile storage module.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring key event state information of a communication module;
generating a key event state log according to the key event state information;
and when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module.
In one embodiment, a computer program that when executed by a processor implements generating a key event status log from key event status information, comprising:
acquiring the event grade of the key state information;
and classifying the key state information according to the event grade of the key state information, and adding a label to the classified key event state information to generate a key event state log.
Optionally, the format of the key event status log includes a primary label, a secondary label, log content information, time, and event level.
In one embodiment, the computer program when executed by the processor further performs the steps of:
storing the key event state log into a preset memory;
when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module, wherein the storing comprises the following steps:
and when the preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module.
In one embodiment, when executed by a processor, a computer program for storing a critical event status log in a memory into a non-volatile storage module when a preset storage trigger condition is met includes:
judging whether the storage capacity of the memory reaches a preset capacity threshold value or not;
and if the storage capacity of the memory reaches a preset capacity threshold, storing the key event state log in the memory into a nonvolatile storage module.
In one embodiment, when executed by a processor, a computer program for storing a critical event status log in a memory into a non-volatile storage module when a preset storage trigger condition is met includes:
and storing the key event state log stored in the memory into a nonvolatile storage module according to a preset time period.
In one embodiment, a computer program that when executed by a processor implements storing a critical event status log in a non-volatile storage module, comprising:
compressing the key event state log to generate a compressed log;
and storing the compressed log into a nonvolatile storage module.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of log storage, the method comprising:
acquiring key event state information of a communication module;
generating a key event state log according to the key event state information;
and when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module.
2. The method of claim 1, wherein generating a key event status log based on the key event status information comprises:
acquiring the event grade of the key state information;
and classifying the key state information according to the event grade of the key state information, and adding a label to the classified key event state information to generate the key event state log.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
storing the key event state log into a preset memory;
when a preset storage triggering condition is met, storing the key event state log into a nonvolatile storage module, wherein the storing comprises:
and when the preset storage triggering condition is met, storing the key event state log in the memory into the nonvolatile storage module.
4. The method according to claim 3, wherein storing the key event status log in the memory into a non-volatile storage module when the preset storage triggering condition is met comprises:
judging whether the storage capacity of the memory reaches a preset capacity threshold value or not;
and if the storage capacity of the memory reaches the preset capacity threshold, storing the key event state log in the memory into the nonvolatile storage module.
5. The method according to claim 3, wherein storing the key event status log in the memory into a non-volatile storage module when the preset storage triggering condition is met comprises:
and storing the key event state log stored in the memory into the nonvolatile storage module according to a preset time period.
6. The method of claim 1 or 2, wherein storing the critical event status log in a non-volatile storage module comprises:
compressing the key event state log to generate a compressed log;
and storing the compressed log into the nonvolatile storage module.
7. The method of claim 1 or 2, wherein the format of the key event status log comprises a primary label, a secondary label, log content information, time, and event level.
8. A log storage device for a communication module, the device comprising:
the acquisition module is used for acquiring the key event state information of the communication module;
the generating module is used for generating a key event state log according to the key event state information;
and the storage module is used for storing the key event state log into the nonvolatile storage module when a preset storage triggering condition is met.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110338497.8A 2021-03-30 2021-03-30 Log storage method and device, computer equipment and storage medium Pending CN113190399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110338497.8A CN113190399A (en) 2021-03-30 2021-03-30 Log storage method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110338497.8A CN113190399A (en) 2021-03-30 2021-03-30 Log storage method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113190399A true CN113190399A (en) 2021-07-30

Family

ID=76974591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110338497.8A Pending CN113190399A (en) 2021-03-30 2021-03-30 Log storage method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113190399A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721746A (en) * 2021-08-04 2021-11-30 浙江大华技术股份有限公司 Log storage method and device
CN114327969A (en) * 2021-11-30 2022-04-12 西安广和通无线软件有限公司 Information acquisition method and device, computer equipment and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103035A1 (en) * 2016-12-08 2018-06-14 Zhejiang Dahua Technology Co., Ltd. Methods and systems for processing log data
CN109542844A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 A kind of event log collection method, system and electronic equipment and storage medium
CN111104294A (en) * 2019-10-25 2020-05-05 苏州浪潮智能科技有限公司 Method and device for generating BMC log
CN111176987A (en) * 2019-12-18 2020-05-19 深圳前海环融联易信息科技服务有限公司 Method and device for uniformly outputting front-end log, computer equipment and storage medium
CN111752737A (en) * 2020-06-09 2020-10-09 深圳移航通信技术有限公司 Log storage method, electronic device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103035A1 (en) * 2016-12-08 2018-06-14 Zhejiang Dahua Technology Co., Ltd. Methods and systems for processing log data
CN109542844A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 A kind of event log collection method, system and electronic equipment and storage medium
CN111104294A (en) * 2019-10-25 2020-05-05 苏州浪潮智能科技有限公司 Method and device for generating BMC log
CN111176987A (en) * 2019-12-18 2020-05-19 深圳前海环融联易信息科技服务有限公司 Method and device for uniformly outputting front-end log, computer equipment and storage medium
CN111752737A (en) * 2020-06-09 2020-10-09 深圳移航通信技术有限公司 Log storage method, electronic device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721746A (en) * 2021-08-04 2021-11-30 浙江大华技术股份有限公司 Log storage method and device
CN114327969A (en) * 2021-11-30 2022-04-12 西安广和通无线软件有限公司 Information acquisition method and device, computer equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN110647438B (en) Event monitoring method and device, computer equipment and storage medium
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
CN110442498B (en) Abnormal data node positioning method and device, storage medium and computer equipment
CN111143163B (en) Data monitoring method, device, computer equipment and storage medium
CN113190399A (en) Log storage method and device, computer equipment and storage medium
CN111475324B (en) Log information analysis method, device, computer equipment and storage medium
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
CN110209348B (en) Data storage method and device, electronic equipment and storage medium
CN112311902B (en) File sending method and device based on micro-service
CN114416121A (en) Firmware burning method and device, burning equipment and firmware burning system
CN111400127A (en) Service log monitoring method and device, storage medium and computer equipment
CN108446224B (en) Performance analysis method of application program on mobile terminal and storage medium
CN111984527A (en) Software performance testing method, device, equipment and medium
US9916220B2 (en) Smart logging of trace data for storage systems
CN112303811B (en) Processing method, device and system for air conditioner operation data, air conditioner and storage medium
CN113806195B (en) Data processing method, device, equipment, system and storage medium
CN113031984B (en) Remote online upgrade method and device for application program of management unit of dual-core intelligent electric meter
CN112818204B (en) Service processing method, device, equipment and storage medium
CN113993149A (en) Processing method and device of communication diagnosis log and readable storage medium
CN113824590A (en) Method for predicting problem of micro service network, computer device and storage medium
CN110928773A (en) Project test result management method and device, computer equipment and storage medium
CN111611142A (en) Information collection method, device and storage medium
CN105183656A (en) Method, system and device for detecting package stop failure of application program
CN111625502A (en) Data reading method and device, storage medium and electronic device
CN114185619B (en) Breakpoint compensation method, device, equipment and medium based on distributed operation

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210730

RJ01 Rejection of invention patent application after publication