CN110543463A - Log storage method, device and equipment and readable storage medium - Google Patents

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

Info

Publication number
CN110543463A
CN110543463A CN201910871220.4A CN201910871220A CN110543463A CN 110543463 A CN110543463 A CN 110543463A CN 201910871220 A CN201910871220 A CN 201910871220A CN 110543463 A CN110543463 A CN 110543463A
Authority
CN
China
Prior art keywords
log data
storage area
log
storage
current
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
CN201910871220.4A
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.)
CSG Electric Power Research Institute
China Southern Power Grid Co Ltd
Research Institute of Southern Power Grid Co Ltd
Original Assignee
China Southern Power Grid Co Ltd
Research Institute of Southern Power Grid 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 China Southern Power Grid Co Ltd, Research Institute of Southern Power Grid Co Ltd filed Critical China Southern Power Grid Co Ltd
Priority to CN201910871220.4A priority Critical patent/CN110543463A/en
Publication of CN110543463A publication Critical patent/CN110543463A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Abstract

the invention discloses a log storage method, which comprises the following steps: acquiring original log data, and performing field adding processing on the original log data to obtain log data; the log data comprises a flag bit, original log data and an ending field; judging whether the size of the log data is larger than the size of the residual space of the current storage area or not; if not, storing the log data into the current storage area; if yes, formatting operation is carried out on the candidate storage area of the current storage area, and log data are stored in the candidate storage area; the invention solves the problem that the storage of the log based on the file system occupies a large space, reduces the occupied storage space and reduces the system cost; in addition, the invention also provides a log storage device, equipment and a computer readable storage medium, and the log storage device, the equipment and the computer readable storage medium also have the beneficial effects.

Description

log storage method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of data storage, and in particular, to a log storage method, apparatus, device, and computer-readable storage medium.
background
Currently, with the rapid development of scientific technology, various types of electronic devices such as personal computers and smart phones are increasing, and a great deal of convenience is brought to daily work and life of people.
During the daily operation of various electronic devices, it is often necessary to record corresponding logs. The technical maintenance personnel can check the running states of the electronic equipment in different time periods according to the logs, and after the electronic equipment is abnormal, the electronic equipment is checked and repaired by using the logs recorded before. Since the electronic device performs a variety of operations and steps, many logs are generated. The existing log is generally stored in a file form, and the storage mode occupies a large storage space, so that the storage space available for a user is reduced, and the system cost is increased.
Therefore, how to solve the problem that the log file occupies a large space is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
in view of the above, the present invention provides a log storage method, a log storage device, log storage equipment, and a computer-readable storage medium, which solve the problem that a log file occupies a large space.
in order to solve the above technical problem, the present invention provides a log storage method, including:
Acquiring original log data, and performing field adding processing on the original log data to obtain log data; wherein the log data comprises a flag bit, the original log data, and an end field;
Judging whether the size of the log data is larger than the size of the residual space of the current storage area or not;
If not, storing the log data into the current storage area;
If yes, formatting operation is carried out on the candidate storage area of the current storage area, and the log data is stored in the candidate storage area.
Optionally, the log data includes a flag bit, including:
and placing the flag bit at the beginning of the log data.
optionally, the flag bit is a preset ASCII code.
Optionally, the method further includes:
Sequencing each storage area in the storage space by using a preset storage sequence;
and determining the first storage area stored in the log data as a first storage area, and determining the last storage area stored in the log data as a last storage area.
Optionally, the sorting the storage regions in the storage space by using a preset storage order includes:
And sequencing each page in the flash by using the preset storage sequence.
Optionally, after determining that the size of the log data is larger than the size of the remaining space of the current storage area, before performing the formatting operation on the candidate storage area of the current storage area, the method further includes:
Judging whether the current storage area is the last storage area or not;
And if the current storage area is the last storage area, updating the zone bit, and determining the updated zone bit as the current zone bit.
Optionally, after the power failure is restarted, the method further includes:
According to the storage sequence, starting from the first storage area, acquiring the zone bit in each piece of log data, and judging whether the zone bit of the adjacent log data changes or not;
if not, determining the last storage area stored in the log data as the current storage area;
if yes, determining the last log data with the current zone bit as the latest log data, and determining the storage area stored in the latest log data as the current storage area.
the present invention also provides a log storage device, including:
The data acquisition module is used for acquiring original log data and performing field adding processing on the original log data to obtain log data; wherein the log data comprises a flag bit, the original log data, and an end field;
the judging module is used for judging whether the size of the log data is larger than the size of the residual space of the current storage area;
The first storage module is used for storing the log data into the current storage area if the size of the log data is smaller than or equal to the size of the residual space of the current storage area;
and the second storage module is used for performing formatting operation on a candidate storage area of the current storage area and storing the log data in the candidate storage area if the size of the log data is larger than the size of the residual space of the current storage area.
the invention also provides a log storage device, comprising a memory and a processor, wherein:
The memory for storing a computer program;
the processor is configured to execute the computer program to implement the log storage method.
the present invention also provides a computer readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the log storage method described above.
The method provided by the invention obtains the original log data, and adds the field to the original log data to obtain the log data; the log data comprises a flag bit, original log data and an end field. And judging whether the size of the log data is larger than the size of the residual space of the current storage area. If not, the log data is stored in the current storage area. If yes, formatting operation is carried out on the candidate storage area of the current storage area, and log data are stored in the candidate storage area. The method adopts a method of directly storing the log data, does not need to add excessive other data to the log data to generate the log file, occupies smaller storage space compared with the prior art of the log storage method based on the file system, reduces the occupied storage space and reduces the system cost.
in addition, the invention also provides a log storage device, equipment and a computer readable storage medium, and the log storage device, the equipment and the computer readable storage medium also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
fig. 1 is a flowchart of a log storage method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another log storage method according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of a log storage method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating another log storage method according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating another log storage method according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating another log storage method according to an embodiment of the present invention;
Fig. 7 is a schematic structural diagram of a log storage device according to an embodiment of the present invention;
Fig. 8 is a schematic structural diagram of a log storage device according to an embodiment of the present invention.
Detailed Description
in order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
Referring to fig. 1, fig. 1 is a flowchart illustrating a log storage method according to an embodiment of the present invention. The method comprises the following steps:
s101: and acquiring original log data, and performing field adding processing on the original log data to obtain log data.
Specifically, the original log data is obtained first, and after the original log data is obtained, the field adding processing is performed on the original log data to obtain the log data. Wherein the added fields include a flag bit and an end field. The embodiment does not limit whether the added field further includes other fields, such as a log length field. The number of flag bits is not limited to a specific number in this embodiment, but the number of flag bits is at least two in order to distinguish log data. Preferably, the flag bit is placed at the beginning of the entire log data, so that the flag bit can also serve to mark the beginning of the log data. The flag bit may be a preset ASCII code, and the specific bit number and content of fields such as the flag bit and the ending field are not limited in this embodiment, and only need to be distinguished from the original log data, the original data in the empty storage area, and other added fields. The size of each piece of log data is not limited, and whether the sizes of the log data are the same or not is also not limited, and the size of each piece of log data can be set according to specific conditions, for example, in order to improve the utilization rate of a storage area, the size of each piece of log data can be set to be a fixed size; or in order to facilitate reading, each piece of log data is set to be complete log data, so that the complete log data can be viewed in each reading, but the sizes of the log data may be different. The present embodiment does not limit the frequency of executing the operation of acquiring the original log data, for example, when the size of each piece of log data is set to be a fixed size, the operation of acquiring the original log data is executed each time the original log data reaches a preset size; or when each piece of log data is set to be complete log data, and when the complete original log data is detected, executing the operation of acquiring the original log data.
s102: and judging whether the size of the log data is larger than the size of the residual space of the current storage area.
After the log data are obtained, the size of the log data is compared with the size of the residual space of the current storage area, and whether the size of the log data is larger than the size of the residual space is judged.
S103: and storing the log data into the current storage area.
when the size of the log data is smaller than or equal to the size of the remaining space, the log data is stored in the current storage area. Specifically, the present embodiment does not limit the storage form of the log data, and for example, the log data may be stored in the form of ASCII code character strings; or the log data is stored in the form of a binary string. The embodiment does not limit the way of storing the log data, for example, the log data may be stored from the flag bit of the log data until the ending field is stored, and then the log data is stored in the storage area; or starting to store from the ending field until the flag bit is stored, the log data is stored in the storage area.
S104: and performing formatting operation on the candidate storage area of the current storage area, and storing the log data in the candidate storage area.
and when the size of the log data is larger than the size of the residual space of the current storage area, performing a formatting operation on the candidate storage area of the current storage area. Specifically, in this embodiment, a preset storage order is set, and each storage area in the storage space is sorted by using the preset storage order. The present embodiment does not limit the category of the storage space, and may be, for example, the entire flash or several pages in the flash, or a part of or the entire storage space of other power-down nonvolatile storage media. The size of each storage area is not limited in this embodiment, for example, a page in each flash is a storage area.
The embodiment does not limit the specific content of the preset storage sequence, that is, the specific storage sequence is not limited, for example, the storage sequence may be from a low address to a high address; or from high to low addresses. In this embodiment, log data are stored in a storage order, a first storage area where the log data are stored is determined as a first storage area, and a last storage area where the log data are stored is determined as a last storage area. The present embodiment is not limited to the setting method of the candidate storage area, and for example, the subsequent storage area of two storage areas adjacent in sequence may be determined as the candidate storage area of the previous storage area, and the candidate storage area of the last storage area may be determined as the first storage area, in the storage order. After the formatting operation is performed on the candidate storage area, the log data is stored in the candidate storage area.
Preferably, after determining that the size of the log data is larger than the size of the remaining space of the current storage area, determining whether the current storage area is the last storage area. And if the current storage area is not the last storage area, executing the step of carrying out the formatting operation on the candidate storage area of the current storage area. And if the current storage area is the last storage area, updating the zone bits according to the zone bit updating sequence. The flag bit updating sequence is set in advance and is used for determining the current flag bit. And determining the updated zone bit as the current zone bit, and then performing the formatting operation on the candidate storage area of the current storage area. Specifically, in order to store the newer log data, when the current initial area is the last storage area in the storage space and the size of the log data which is just acquired is larger than the size of the remaining space of the last storage area, the flag bit is updated and the updated flag bit, that is, the current flag bit, is put into the log data which is just acquired. And then formatting the candidate storage area of the last storage area, namely the first storage area, deleting the older log data, and storing the log data which is just obtained. The update flag bit can distinguish the newer log data from the older log data, and is convenient for determining the current storage area after the power failure is restarted.
Specifically, please refer to fig. 3, fig. 4, fig. 5 and fig. 6. In this embodiment, the storage space is a flash, and the storage area is each page in the flash. The method comprises the steps of obtaining original log data, obtaining the log data after field adding processing is carried out on the original log data, and judging whether the size of the log data is larger than the size of the residual space of a current storage area or not. In this embodiment, the size of each piece of log data is considered to be smaller than the size of each storage area. When no log data is stored in the storage area, that is, when the storage area is an empty storage area, any log data obtained can be stored in the empty storage area, please refer to fig. 3. The storage areas are sorted in the order of storage from the lower address to the upper address, and the candidate storage areas of the storage areas are determined. The operation of obtaining log data and determining whether the size of the log data is larger than the size of the remaining space of the current storage area is executed until the size of the log data is larger than the size of the remaining space of the last storage area, please refer to fig. 4. And updating the zone bit and determining the updated zone bit as the current zone bit. The candidate storage area of the last storage area is the first storage area, the formatting operation is performed on the first storage area, and the log data with the updated flag bit is stored in the first storage area, please refer to fig. 5, where the log data with diagonal line hatching in fig. 5 is the log data with the updated flag bit. The operations of obtaining the log data and determining whether the size of the log data is larger than the size of the remaining space of the current storage area are continuously executed, please refer to fig. 6.
By applying the log storage method provided by the embodiment of the invention, original log data are obtained, and field adding processing is carried out on the original log data to obtain log data; the log data comprises a flag bit, original log data and an end field. And judging whether the size of the log data is larger than the size of the residual space of the current storage area. If not, the log data is stored in the current storage area. If yes, formatting operation is carried out on the candidate storage area of the current storage area, and log data are stored in the candidate storage area. The method adopts a method of directly storing the log data, does not need to add excessive other data to the log data to generate the log file, occupies smaller storage space compared with the prior art of the log storage method based on the file system, reduces the occupied storage space and reduces the system cost.
example two:
based on the first embodiment, in practical application, a restart condition after power failure occurs. After restarting, in order to store the newer log data stored before restarting due to power failure, the flag bit is used to determine the current storage area, so as to delete the older log data stored before power failure and store the log data newly acquired after restarting. Referring to fig. 2 in detail, fig. 2 is a flowchart of another log storage method according to an embodiment of the present invention, including:
S201: and acquiring a flag bit in each piece of log data from the first storage area according to the storage sequence.
Specifically, the flag bits of the log data in each storage area are acquired from the first storage area to the last storage area according to the storage sequence. In each storage area, flag bits of log data are acquired in the order of storage.
S202: and judging whether the flag bit of the adjacent log data changes or not.
after the zone bit of each log data is obtained, whether the zone bit of the adjacent log data changes is judged. In this embodiment, the adjacent log data may be two adjacent log data stored in the same storage area according to a storage order; the last log data in any storage area other than the last storage area and the first log data in the candidate storage area may be used.
s203: and determining the last storage area stored in the log data as the current storage area.
if the zone bit of the adjacent log data is not changed, the last log data stored before the power failure is the latest log data, so that the storage area in which the latest log data is stored, namely the last storage area in which the log data is stored, is determined as the current storage area. After the current storage area is determined, the step of obtaining the original log data can be executed, and the log data can be stored continuously.
S204: and determining the last log data with the current zone bit as the latest log data, and determining the storage area stored in the latest log data as the current storage area.
If the flag bit of the adjacent log data changes, the power failure occurs when the log data is stored at the position before the log data with the previous flag bit after the last log data with the current flag bit. Therefore, the last log data with the current flag bit is determined as the latest log data, and the storage area stored in the latest log data is determined as the current storage area.
by applying the log storage method provided by the embodiment of the invention, the zone bit in each log data is obtained from the first storage area according to the storage sequence. And judging whether the flag bit of the adjacent log data changes or not. And if the flag bit of the adjacent log data is not changed, determining the last storage area stored in the log data as the current storage area. And if the flag bit of the adjacent log data changes, determining the last log data with the current flag bit as the latest log data, and determining the storage area stored in the latest log data as the current storage area. The method can determine the current storage area by utilizing the zone bit after the power failure restart so as to delete the older log data stored before the power failure and store the newly acquired log data after the restart.
example three:
in the following, the log storage device provided by the embodiment of the present invention is introduced, and the log storage device described below and the log storage method described above may be referred to correspondingly.
referring to fig. 7, fig. 7 is a schematic structural diagram of a log storage device according to an embodiment of the present invention, including:
The data acquisition module 100 is configured to acquire original log data and perform field addition processing on the original log data to obtain log data; the log data comprises a flag bit, original log data and an ending field;
A judging module 200, configured to judge whether the size of the log data is larger than the size of the remaining space of the current storage area;
the first storage module 300 is configured to store the log data into the current storage area if the size of the log data is smaller than or equal to the size of the remaining space of the current storage area;
The second storage module 400 is configured to perform a formatting operation on a candidate storage area of the current storage area and store the log data in the candidate storage area if the size of the log data is larger than the size of the remaining space of the current storage area.
The log storage device provided by the embodiment of the invention is applied to obtain original log data, and field adding processing is carried out on the original log data to obtain log data; the log data comprises a flag bit, original log data and an end field. And judging whether the size of the log data is larger than the size of the residual space of the current storage area. If not, the log data is stored in the current storage area. If yes, formatting operation is carried out on the candidate storage area of the current storage area, and log data are stored in the candidate storage area. The device adopts a method of directly storing log data, does not need to add excessive other data to the log data to generate a log file, occupies smaller storage space compared with the prior art based on the log storage of a file system, reduces the occupied storage space and reduces the system cost.
Optionally, the data obtaining module 100 includes:
And the flag bit placing unit is used for placing the flag bit at the beginning of the log data.
optionally, the flag bit is a preset ASCII code.
Optionally, the method further includes:
the sorting module is used for sorting each storage area in the storage space by using a preset storage sequence;
And the storage area determining module is used for determining the first storage area stored with the log data as the first storage area and determining the last storage area stored with the log data as the last storage area.
optionally, the sorting module includes:
And the page sequencing unit is used for sequencing each page in the flash by utilizing a preset storage sequence.
optionally, the method further includes:
the last storage area judging module is used for judging whether the current storage area is the last storage area or not;
And the zone bit updating module is used for updating the zone bit if the current storage area is the last storage area and determining the updated zone bit as the current zone bit.
optionally, the method further includes:
The flag bit acquisition module is used for acquiring the flag bit in each log data from the first storage area according to the storage sequence and judging whether the flag bit of the adjacent log data changes or not;
The first current storage area determining module is used for determining the last storage area stored in the log data as the current storage area if the flag bit of the adjacent log data is not changed;
and the second current storage area determining module is used for determining the last log data with the current zone bit as the latest log data and determining the storage area stored in the latest log data as the current storage area if the zone bit of the adjacent log data changes.
Example four:
in the following, the log storage device provided by the embodiment of the present invention is introduced, and the log storage device described below and the log storage method described above may be referred to correspondingly.
referring to fig. 8, fig. 8 is a schematic structural diagram of a journal storage device according to an embodiment of the present invention, where the journal storage device includes a memory and a processor, where:
A memory 10 for storing a computer program;
A processor 20 for executing a computer program to implement the log storage method described above.
example five:
In the following, a computer-readable storage medium provided by an embodiment of the present invention is introduced, and the computer-readable storage medium described below and the log storage method described above may be referred to correspondingly.
The present invention also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the log storage method described above.
the computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
the steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relationships such as first and second, etc., are intended only to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The log storage method, device, apparatus and computer-readable storage medium provided by the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of log storage, comprising:
acquiring original log data, and performing field adding processing on the original log data to obtain log data; wherein the log data comprises a flag bit, the original log data, and an end field;
judging whether the size of the log data is larger than the size of the residual space of the current storage area or not;
If not, storing the log data into the current storage area;
if yes, formatting operation is carried out on the candidate storage area of the current storage area, and the log data is stored in the candidate storage area.
2. the log storage method of claim 1, wherein the log data comprises a flag bit comprising:
and placing the flag bit at the beginning of the log data.
3. the log storage method according to claim 2, wherein the flag bit is a preset ASCII code.
4. The log storage method of claim 1, further comprising:
Sequencing each storage area in the storage space by using a preset storage sequence;
And determining the first storage area stored in the log data as a first storage area, and determining the last storage area stored in the log data as a last storage area.
5. the log storage method according to claim 4, wherein the sorting the storage areas in the storage space by using the preset storage order comprises:
And sequencing each page in the flash by using the preset storage sequence.
6. the log storage method according to claim 4, wherein after determining that the size of the log data is larger than the size of the remaining space of the current storage area, before performing the formatting operation on the candidate storage area of the current storage area, the method further comprises:
judging whether the current storage area is the last storage area or not;
And if the current storage area is the last storage area, updating the zone bit, and determining the updated zone bit as the current zone bit.
7. the log storage method of claim 6, further comprising, after a power outage restart:
According to the storage sequence, starting from the first storage area, acquiring the zone bit in each piece of log data, and judging whether the zone bit of the adjacent log data changes or not;
if not, determining the last storage area stored in the log data as the current storage area;
if yes, determining the last log data with the current zone bit as the latest log data, and determining the storage area stored in the latest log data as the current storage area.
8. A log storage device, comprising:
the data acquisition module is used for acquiring original log data and performing field adding processing on the original log data to obtain log data; wherein the log data comprises a flag bit, the original log data, and an end field;
the judging module is used for judging whether the size of the log data is larger than the size of the residual space of the current storage area;
the first storage module is used for storing the log data into the current storage area if the size of the log data is smaller than or equal to the size of the residual space of the current storage area;
And the second storage module is used for performing formatting operation on a candidate storage area of the current storage area and storing the log data in the candidate storage area if the size of the log data is larger than the size of the residual space of the current storage area.
9. a log storage device comprising a memory and a processor, wherein:
the memory for storing a computer program;
the processor is configured to execute the computer program to implement the log storage method according to any one of claims 1 to 7.
10. a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the log storage method of any one of claims 1 to 7.
CN201910871220.4A 2019-09-16 2019-09-16 Log storage method, device and equipment and readable storage medium Pending CN110543463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910871220.4A CN110543463A (en) 2019-09-16 2019-09-16 Log storage method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910871220.4A CN110543463A (en) 2019-09-16 2019-09-16 Log storage method, device and equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN110543463A true CN110543463A (en) 2019-12-06

Family

ID=68713665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910871220.4A Pending CN110543463A (en) 2019-09-16 2019-09-16 Log storage method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110543463A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538712A (en) * 2020-04-30 2020-08-14 恒生电子股份有限公司 Log recording method, processing node, electronic device and storage medium
CN112286893A (en) * 2020-09-23 2021-01-29 宁波水表(集团)股份有限公司 Log processing method and device applied to embedded terminal

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205387A1 (en) * 2002-03-21 2004-10-14 Kleiman Steven R. Method for writing contiguous arrays of stripes in a RAID storage system
CN101277211A (en) * 2008-05-16 2008-10-01 腾讯科技(深圳)有限公司 Method and apparatus for buffering data
CN101546294A (en) * 2009-04-30 2009-09-30 青岛海信宽带多媒体技术有限公司 Method for storing data in Flash memory
CN101661433A (en) * 2009-09-24 2010-03-03 青岛海信宽带多媒体技术有限公司 Business processing method based on Flash
CN102394763A (en) * 2011-07-26 2012-03-28 大唐移动通信设备有限公司 Method and device for importing messages
CN102567184A (en) * 2011-12-27 2012-07-11 青岛海信宽带多媒体技术有限公司 Journal storage method based on Flash
CN107291396A (en) * 2017-06-27 2017-10-24 北京华云网际科技有限公司 The wiring method and device of I/O data in distributed block storage system
CN107533507A (en) * 2015-02-23 2018-01-02 国际商业机器公司 According to the data in log-structured managing storage
CN108875075A (en) * 2018-07-09 2018-11-23 深圳市道通智能航空技术有限公司 The storage method and unmanned plane image transmission system of UAV system log

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205387A1 (en) * 2002-03-21 2004-10-14 Kleiman Steven R. Method for writing contiguous arrays of stripes in a RAID storage system
CN101277211A (en) * 2008-05-16 2008-10-01 腾讯科技(深圳)有限公司 Method and apparatus for buffering data
CN101546294A (en) * 2009-04-30 2009-09-30 青岛海信宽带多媒体技术有限公司 Method for storing data in Flash memory
CN101661433A (en) * 2009-09-24 2010-03-03 青岛海信宽带多媒体技术有限公司 Business processing method based on Flash
CN102394763A (en) * 2011-07-26 2012-03-28 大唐移动通信设备有限公司 Method and device for importing messages
CN102567184A (en) * 2011-12-27 2012-07-11 青岛海信宽带多媒体技术有限公司 Journal storage method based on Flash
CN107533507A (en) * 2015-02-23 2018-01-02 国际商业机器公司 According to the data in log-structured managing storage
CN107291396A (en) * 2017-06-27 2017-10-24 北京华云网际科技有限公司 The wiring method and device of I/O data in distributed block storage system
CN108875075A (en) * 2018-07-09 2018-11-23 深圳市道通智能航空技术有限公司 The storage method and unmanned plane image transmission system of UAV system log

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538712A (en) * 2020-04-30 2020-08-14 恒生电子股份有限公司 Log recording method, processing node, electronic device and storage medium
CN111538712B (en) * 2020-04-30 2023-07-21 恒生电子股份有限公司 Log recording method, processing node, electronic equipment and storage medium
CN112286893A (en) * 2020-09-23 2021-01-29 宁波水表(集团)股份有限公司 Log processing method and device applied to embedded terminal
CN112286893B (en) * 2020-09-23 2023-02-24 宁波水表(集团)股份有限公司 Log processing method and device applied to embedded terminal

Similar Documents

Publication Publication Date Title
CN111880736B (en) Solid state disk access method, device, equipment and medium
CN111596863A (en) Data reading method, device and equipment and readable storage medium
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN110543463A (en) Log storage method, device and equipment and readable storage medium
CN115114232A (en) Method, device and medium for enumerating historical version objects
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN111061429B (en) Data access method, device, equipment and medium
WO2019041891A1 (en) Method and device for generating upgrade package
CN108664255B (en) Software upgrading method and device
CN112328379A (en) Application migration method, device, equipment and medium
CN110287182B (en) Big data comparison method, device, equipment and terminal
CN111930395A (en) Program downloading method of intelligent terminal and intelligent terminal
CN106484691B (en) data storage method and device of mobile terminal
CN107506474B (en) Database operation method and device based on object mapping
CN111881281B (en) Log processing method, device, equipment and medium
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN114237976A (en) Data acquisition method and device
CN110008059B (en) Data updating method and device for nonvolatile storage medium and storage medium
CN108197157B (en) Method, apparatus and computer-readable storage medium for managing data to be stored
CN107704247B (en) Method for reducing size of multi-core firmware
CN108132971B (en) Analysis method and device for database fragment files
CN111538651A (en) Interface testing method, device, server and storage medium
CN110597828A (en) Database changing method, device, equipment and storage medium
CN110968460B (en) Method and device for recovering website in system breakdown state

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

Application publication date: 20191206