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

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

Info

Publication number
CN112000630B
CN112000630B CN202010887313.9A CN202010887313A CN112000630B CN 112000630 B CN112000630 B CN 112000630B CN 202010887313 A CN202010887313 A CN 202010887313A CN 112000630 B CN112000630 B CN 112000630B
Authority
CN
China
Prior art keywords
log
log storage
storage area
storage
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010887313.9A
Other languages
Chinese (zh)
Other versions
CN112000630A (en
Inventor
亓国强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010887313.9A priority Critical patent/CN112000630B/en
Publication of CN112000630A publication Critical patent/CN112000630A/en
Application granted granted Critical
Publication of CN112000630B publication Critical patent/CN112000630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/172Caching, prefetching or hoarding of files
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a log storage method, a log storage device, log storage equipment and a computer readable storage medium, wherein the log storage method comprises the following steps: constructing a log storage area; the log storage area is a local storage area of a non-system disk; generating a log interface corresponding to the log storage area; acquiring a log to be stored, and calling a log interface to store the log to be stored into a log storage area; accessing a log storage area by calling a log interface, and further storing the log to be stored into the log storage area; because the log storage area is a local storage area, a log server is not needed, long-distance data transmission is not needed, transmission bandwidth is not needed to be occupied, and storage efficiency is improved; meanwhile, the log storage area is a non-system disk, so that the system disk space is not occupied, the limitation of the system disk storage space is avoided, and the storage efficiency is improved.

Description

Log storage method, device, equipment and readable storage medium
Technical Field
The present disclosure relates to the field of storage technologies, and in particular, to a log storage method, a log storage device, a log storage apparatus, and a computer readable storage medium.
Background
In this increasing age of storage devices, storage applications become ever more sophisticated, and as storage systems become more complex, positioning problems become very difficult when problems (especially data inconsistency problems) occur on the IO path during the development phase. The most direct and effective way to locate problems is to analyze logs and clear the business logic, thereby finding out the problem points. The related art generally stores a log on a system disk or stores the log using a dedicated log server when storing the log. However, the system disk storage space is limited, more logs cannot be stored, logs cannot be stored efficiently, and frequent reading and writing of logs can increase wear of the system disk. The log server is adopted, so that the log server depends on external storage and occupies transmission bandwidth, the use cost is high, the performance is poor, and the log cannot be stored efficiently.
Therefore, how to solve the problem that the related art cannot efficiently store logs is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, an object of the present application is to provide a log storage method, a log storage device, a log storage apparatus, and a computer readable storage medium, which do not occupy a transmission bandwidth, are not limited by a system disk storage space, and improve storage efficiency.
In order to solve the above technical problems, the present application provides a log storage method, including:
constructing a log storage area; the log storage area is a local storage area of a non-system disk;
generating a log interface corresponding to the log storage area;
and acquiring a log to be stored, and calling the log interface to store the log to be stored into the log storage area.
Optionally, the acquiring the log to be stored includes:
acquiring log data;
and correspondingly filling the log data into a preset log structure to obtain the log to be stored.
Optionally, the calling the log interface to store the log to be stored in the log storage area includes:
determining a specified path in the log storage area;
and calling the log interface to store the log to be stored to the appointed path.
Optionally, the generating a log interface corresponding to the log storage area includes:
generating an initial log interface;
and setting the initial log interface to a binary read-write mode so as to store the log to be stored in a binary form.
Optionally, the building a log storage area includes:
determining a plurality of log storage disks according to the construction instruction; the log storage disk is a local storage disk of a non-system disk;
forming a log storage pool by using the log storage disk, and dividing a plurality of log storage volumes in the log storage pool;
and determining the log storage pool or part of the log storage volume as the log storage area.
Optionally, the method further comprises:
and if the log reading instruction is acquired, calling the log interface to read the log to be read specified by the log reading instruction.
Optionally, the calling the log interface to read the log to be read specified by the log reading instruction includes:
analyzing the log reading instruction to obtain screening information;
screening the logs in the log storage area according to the screening information;
and determining the logs which pass the screening as the logs to be read, and calling the log interface to read the logs to be read.
The application also provides a log storage device, comprising:
the construction module is used for constructing a log storage area; the log storage area is a local storage area of a non-system disk;
the generation module is used for generating a log interface corresponding to the log storage area;
the storage module is used for acquiring the log to be stored, and calling the log interface to store the log to be stored into the log storage area.
The application also provides a log storage device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the log storage method described above.
The application also provides a computer readable storage medium for storing a computer program, wherein the computer program realizes the log storage method when being executed by a processor.
The log storage method constructs a log storage area; the log storage area is a local storage area of a non-system disk; generating a log interface corresponding to the log storage area; and acquiring a log to be stored, and calling a log interface to store the log to be stored into a log storage area.
It can be seen that this method stores the log in a log storage area, which is a local storage area, but which is a local storage area of a non-system disk. In order to store the log in the log storage area, a log interface corresponding to the log storage area may be generated. After the log to be stored is obtained, the log storage area is accessed in a mode of calling a log interface, and then the log to be stored is stored in the log storage area. Because the log storage area is a local storage area, a log server is not needed, long-distance data transmission is not needed, transmission bandwidth is not needed to be occupied, and storage efficiency is improved. Meanwhile, the log storage area is a non-system disk, so that the system disk space is not occupied, the limitation of the system disk storage space is avoided, the storage efficiency is improved, and the problem that the related technology cannot efficiently store the log is solved.
In addition, the application also provides a log storage device, log storage equipment and a computer readable storage medium, and the log storage device and the computer readable storage medium have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
Fig. 1 is a flowchart of a log storage method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a specific log storage process according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a log storage device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a log storage device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a log storage method according to an embodiment of the present application. The method comprises the following steps:
s101: constructing a log storage area; the log storage area is a local storage area of a non-system disk.
Note that, in this embodiment, the specific form of the log storage device that performs all or part of the steps in the log storage method is not limited, and may be, for example, a computer or a server of any model. The log storage area is the storage area of the non-system disk in the log storage device, namely the local storage area of the non-system disk. The local storage area is a storage area formed by a storage medium of the log storage device, and the storage medium may be a mechanical hard disk, a solid state hard disk or other types of storage media, which is not limited in this embodiment. The system disk is used for storing the system program and provides space for the system to run. The embodiment is not limited to a specific method for constructing the log storage area, for example, all or part of non-system disks in the log storage device may be selected to form a log storage pool, and the log storage pool may be determined as the log storage area. Since the log storage area is constructed based on the local storage area of the non-system disk, the storage medium used to construct the log storage area does not include the system disk and is not limited by the capacity of the system disk.
Because the log storage area is a local storage area and does not comprise a system disk, the log storage area is used for storing the log without communication with a log server, so that the storage efficiency is improved while the bandwidth is saved. Meanwhile, the size of the log storage area can be set according to the needs, the limitation of the capacity of the system disk is avoided, the frequent transfer of logs or the deletion of logs are not required, the storage efficiency is improved, and the abrasion to the system disk caused by the frequent reading and writing of the system disk is avoided.
Further, in one possible implementation, the corresponding log storage area may be determined as needed. Specifically, the step S101 includes:
step 11: a plurality of log storage disks is determined according to the build instructions.
Step 12: the journal storage pool is composed of journal storage disks and a plurality of journal storage volumes are partitioned among the journal storage pools.
Step 13: the log storage pool or partial log storage volume is determined to be the log storage area.
The journal storage disk is a local storage disk other than the system disk, that is, a hard disk other than the system disk. The build instructions are to designate a journal storage disk in a local storage disk of the non-system disk to build a journal storage pool using the journal storage disk. The log storage pool may be partitioned into a plurality of log storage volumes, which may be arbitrarily partitioned across the log storage pools. After the log storage volume is obtained, all of the log storage volume, i.e., the log storage pool, or a portion of the log storage volume may be determined to be the log storage area. Specifically, the log storage volume may be divided according to the construction instruction, and the log storage area may be determined according to the construction instruction as well; or the log storage volumes may be divided according to a preset division manner, and the log storage areas may be determined according to a preset determination manner. Specific content of the preset division manner is not limited, for example, the specific content can be divided in an uneven manner, and the log storage pool is divided into a plurality of log storage volumes by setting the size of each log volume; or may be divided in an average manner, dividing the log storage pool into a plurality of log storage volumes by setting the number of log volumes. The specific content of the preset determination means is not limited, and for example, the number of log storage volumes contained in the log storage area may be set, or determination of those log storage volumes as the log storage area may be specified. Referring to fig. 2, fig. 2 is a schematic diagram of a specific log storage process provided in the embodiment of the present application, where in fig. 2, a log pool is a log storage pool, which is formed by a plurality of hard disks (i.e., log storage disks), and a plurality of log volumes (i.e., log volume 1, log volume 2, …, log volume x) are further divided on the log pool.
S102: a log interface corresponding to the log storage area is generated.
The log interface corresponds to a log storage area, and is used for writing or reading a log in the log storage area, and the specific generation mode is related to factors such as a specific form and a use environment (a Windows system, a Linux system, etc.), which is not limited in this embodiment. After the log interface is generated, the log to be stored may be stored in the log storage area when it is acquired.
Specifically, in a possible implementation manner, the storage form of the log may be set, and a specific setting manner may be set for the log interface. The step S102 may include:
step 21: an initial log interface is generated.
Step 22: the initial log interface is set to a binary read-write mode to store the log to be stored in binary form.
The specific generation manner of the initial log interface is not limited in this embodiment, and reference may be made to the related art. After the initial log interface is obtained, it can be set to a binary read-write mode as needed. The log interface of the binary read-write mode may store the log to be stored in a binary form. It should be noted that, the initial log interface may also be set to other read/write modes, which is not limited in this embodiment. The embodiment is not limited to a specific setting manner of setting the initial log interface to the binary read/write mode, and for example, the interface code corresponding to the initial log interface may be modified.
S103: and acquiring a log to be stored, and calling a log interface to store the log to be stored into a log storage area.
The log to be stored may be a log generated at the time of system operation or may be a log generated at the time of service execution. For example, referring to fig. 2, the log to be stored in fig. 2 is generated when each service volume in the service pool is intelligent, and the generated log to be stored is stored in the log storage area by a log forwarding (i.e. calling a log interface) manner. The log to be stored can be obtained periodically, or the generated log to be stored can be obtained in real time in order to ensure the security of the log. After the log to be stored is obtained, the log to be stored can be stored in the log storage area by calling the log interface. Specifically, the log to be stored may be directly stored in the log storage area, or may be processed and stored in the log storage area.
In one possible implementation, the log to be stored may be structured to facilitate searching and reading. The step of obtaining the log to be stored may include:
step 31: log data is obtained.
Step 32: and correspondingly filling the log data into a preset log structure to obtain a log to be stored.
In this embodiment, the log to be stored is structured by a preset log structure. The preset log structure is preset and is a blank log frame. The log data is directly acquired data, which can include items such as log content, time stamp, identity identifier and the like, and after the log data is acquired, each item is correspondingly filled into a preset log structure. And obtaining the log to be stored after all log data are filled. In another possible implementation manner, the partial log data may be structured, that is, the target log data is determined in the log data, and the target log data is filled into the corresponding first preset log structure, so as to obtain the first log to be stored. And determining non-target log data and a first log to be stored in the log data as the log to be stored. The target log data may be a critical portion of the log data or may be a portion specified as desired.
Further, in one possible implementation, the log to be stored may be stored to a specified location. The step of calling the log interface to store the log to be stored in the log storage area may include:
step 41: a specified path in the log storage area is determined.
Step 42: and calling a log interface to store the log to be stored to a designated path.
The specific path is a storage position corresponding to the log to be stored in the log storage area, and various specific determining modes can be adopted, for example, when the log to be stored needs to be written in each time, the specific path corresponding to the log to be stored can be updated according to a preset path updating rule; or may acquire a path specification instruction, and determine the specified path by parsing the path specification instruction. After determining the instruction path, storing the log to be stored in a designated path of a log storage area, and completing the storing of the log to be stored.
Further, in one possible implementation, the log that has been written to the log storage area may also be read out. Specifically, the method may further include:
step 51: and if the log reading instruction is acquired, calling a log interface to read the log to be read specified by the log reading instruction.
The log reading instruction may be sent by other terminals or devices, or may be entered by a user. After the log reading instruction is obtained, the log interface can be called to read the log to be read specified by the log reading instruction. Specifically, the readout process may include:
step 61: and analyzing the log reading instruction to obtain screening information.
Step 62: and screening the logs in the log storage area according to the screening information.
Step 63: and determining the logs passing the screening as logs to be read, and calling a log interface to read the logs to be read.
In this embodiment, the log reading instruction includes screening information, where the screening information is used to screen the log in the log storage area to obtain the log to be read. The specific content of the filtering information is not limited, and may be, for example, timestamp information, or may be log number information, where the log number information may be a number of a preset log structure, and the number on the preset log structure may be updated after a new log to be stored is generated each time. The number log information may be a number or may be a range of numbers. After the logs are screened, the logs which pass the screening are determined to be logs to be read, and a log interface is called to read the logs to be read. The specific manner of readout is not limited, and reference may be made to the related art.
By applying the log storage method provided by the embodiment of the application, the log is stored in the log storage area, and the log storage area is a local storage area, but is a local storage area of a non-system disk. In order to store the log in the log storage area, a log interface corresponding to the log storage area may be generated. After the log to be stored is obtained, the log storage area is accessed in a mode of calling a log interface, and then the log to be stored is stored in the log storage area. Because the log storage area is a local storage area, a log server is not needed, long-distance data transmission is not needed, transmission bandwidth is not needed to be occupied, and storage efficiency is improved. Meanwhile, the log storage area is a non-system disk, so that the system disk space is not occupied, the limitation of the system disk storage space is avoided, the storage efficiency is improved, and the problem that the related technology cannot efficiently store the log is solved.
The following describes a log storage device provided in an embodiment of the present application, and the log storage device described below and the log storage method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a log storage device according to an embodiment of the present application, including:
a building module 110 for building a log storage area; the log storage area is a local storage area of a non-system disk;
a generation module 120, configured to generate a log interface corresponding to the log storage area;
the storage module 130 is configured to obtain a log to be stored, and call the log interface to store the log to be stored into the log storage area.
Optionally, the storage module 130 includes:
the data acquisition unit is used for acquiring log data;
and the filling unit is used for correspondingly filling the log data into a preset log structure to obtain a log to be stored.
Optionally, the storage module 130 includes:
a path determination unit configured to determine a specified path in the log storage area;
and the storage unit is used for calling the log interface to store the log to be stored to the appointed path.
Optionally, the generating module 120 includes:
an initial interface generating unit for generating an initial log interface;
and the interface setting unit is used for setting the initial log interface into a binary read-write mode so as to store the log to be stored in a binary form.
Optionally, the building module 110 includes:
a storage disk determining unit configured to determine a plurality of log storage disks according to the construction instruction; the log storage disk is a local storage disk of a non-system disk;
the storage volume dividing unit is used for forming a log storage pool by using the log storage disk and dividing a plurality of log storage volumes in the log storage pool;
and the storage area determining unit is used for determining the log storage pool or part of the log storage volume as the log storage area.
Optionally, the method further comprises:
and the reading module is used for calling the log interface to read the log to be read specified by the log reading instruction if the log reading instruction is acquired.
Optionally, the readout module comprises:
the analysis unit is used for analyzing the log reading instruction to obtain screening information;
the screening unit is used for screening the logs in the log storage area according to the screening information;
and the reading unit is used for determining the logs passing the screening as the logs to be read and calling a log interface to read the logs to be read.
The following describes a log storage device provided in an embodiment of the present application, where the log storage device described below and the log storage method described above may refer to each other correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a log storage device according to an embodiment of the present application. Where log storage device 100 may include a processor 101 and a memory 102, and may further include one or more of a multimedia component 103, an information input/information output (I/O) interface 104, and a communication component 105.
Wherein the processor 101 is configured to control the overall operation of the log storage device 100 to perform all or part of the steps in the log storage method described above; the memory 102 is used to store various types of data to support operation on the log storage device 100, which may include, for example, instructions for any application or method operating on the log storage device 100, as well as application-related data. The Memory 102 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as one or more of static random access Memory (Static Random Access Memory, SRAM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The multimedia component 103 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 102 or transmitted through the communication component 105. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 104 provides an interface between the processor 101 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the log storage device 100 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G or 4G, or a combination of one or more thereof, the respective communication component 105 may thus comprise: wi-Fi part, bluetooth part, NFC part.
The log storage device 100 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated ASIC), digital signal processor (Digital Signal Processor, abbreviated DSP), digital signal processing device (Digital Signal Processing Device, abbreviated DSPD), programmable logic device (Programmable Logic Device, abbreviated PLD), field programmable gate array (Field Programmable Gate Array, abbreviated FPGA), controller, microcontroller, microprocessor, or other electronic components for performing the log storage methods set forth in the above embodiments.
The following describes a computer readable storage medium provided in an embodiment of the present application, and the computer readable storage medium described below and the log storage method described above may be referred to correspondingly.
The present application 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: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation should not be considered to be beyond the scope of this application.
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. The software modules may be disposed 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 is further noted that, in this document, relational terms such as first and second, and the like are used solely 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. Moreover, the terms include, comprise, or any other variation is 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 principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (5)

1. A log storage method, comprising:
determining a plurality of log storage disks according to a construction instruction, forming a log storage pool by using the log storage disks, and dividing a plurality of log storage volumes in the log storage pool; determining the log storage pool or a portion of the log storage volume as the log storage area; the log storage disk is a local storage disk of a non-system disk;
generating an initial log interface, and setting the initial log interface into a binary read-write mode to generate a log interface corresponding to the log storage area;
acquiring log data, and correspondingly filling the log data into a preset log structure to obtain a log to be stored;
calling the log interface to store the log to be stored in the log storage area;
if a log reading instruction is acquired, analyzing the log reading instruction to obtain screening information, screening the logs in the log storage area according to the screening information, determining the logs which pass the screening as logs to be read, and calling the log interface to read the logs to be read.
2. The log storage method of claim 1, wherein the invoking the log interface to store the log to be stored in the log storage area comprises:
determining a specified path in the log storage area;
and calling the log interface to store the log to be stored to the appointed path.
3. A log storage device, comprising:
the determining module is used for determining a plurality of log storage disks according to the construction instruction, forming a log storage pool by utilizing the log storage disks, and dividing a plurality of log storage volumes in the log storage pool; determining the log storage pool or a portion of the log storage volume as the log storage area; the log storage disk is a local storage disk of a non-system disk;
the generation module is used for generating an initial log interface and setting the initial log interface into a binary read-write mode so as to generate a log interface corresponding to the log storage area;
the acquisition module is used for acquiring log data and correspondingly filling the log data into a preset log structure to obtain a log to be stored;
the storage module is used for calling the log interface to store the log to be stored into the log storage area;
and the reading module is used for analyzing the log reading instruction to obtain screening information if the log reading instruction is acquired, screening the logs in the log storage area according to the screening information, determining the logs which pass the screening as logs to be read, and calling the log interface to read the logs to be read.
4. A log storage device comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor configured to execute the computer program to implement the log storage method according to any one of claims 1 or 2.
5. 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 of claims 1 or 2.
CN202010887313.9A 2020-08-28 2020-08-28 Log storage method, device, equipment and readable storage medium Active CN112000630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010887313.9A CN112000630B (en) 2020-08-28 2020-08-28 Log storage method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010887313.9A CN112000630B (en) 2020-08-28 2020-08-28 Log storage method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112000630A CN112000630A (en) 2020-11-27
CN112000630B true CN112000630B (en) 2024-01-23

Family

ID=73465414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010887313.9A Active CN112000630B (en) 2020-08-28 2020-08-28 Log storage method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112000630B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748885B (en) * 2021-01-18 2023-01-17 联想(北京)有限公司 Information processing method, device, equipment and storage medium
CN115174289B (en) * 2022-05-24 2023-10-24 青岛海尔科技有限公司 Log data storage method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317742A (en) * 2014-11-17 2015-01-28 浪潮电子信息产业股份有限公司 Thin provisioning method for optimizing space management
CN105138283A (en) * 2015-08-11 2015-12-09 北京百度网讯科技有限公司 Computer disk and data management method and apparatus used for computer disk

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162989A (en) * 2019-12-11 2020-05-15 杭州迪普科技股份有限公司 Method and device for processing mail audit log

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317742A (en) * 2014-11-17 2015-01-28 浪潮电子信息产业股份有限公司 Thin provisioning method for optimizing space management
CN105138283A (en) * 2015-08-11 2015-12-09 北京百度网讯科技有限公司 Computer disk and data management method and apparatus used for computer disk

Also Published As

Publication number Publication date
CN112000630A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN112000630B (en) Log storage method, device, equipment and readable storage medium
US20170083539A1 (en) Fast Recovery Using Self-Describing Replica Files In A Distributed Storage System
CN106557307B (en) Service data processing method and system
CN112084438A (en) Code scanning skip data processing method, device, equipment and system
CN112732300A (en) Data packet updating method and device, electronic equipment and readable storage medium
US10951540B1 (en) Capture and execution of provider network tasks
US11157456B2 (en) Replication of data in a distributed file system using an arbiter
CN112632930B (en) Table data control method and device
CN109710454A (en) A kind of cloud host snapshot method and device
US11558459B2 (en) User-defined custom storage classes for hybrid-cloud and multicloud data management
CN112182115A (en) Relationship display method and device, storage medium and electronic device
KR100640243B1 (en) Apparatus for improvement of applications performance in mobile communication terminal and method
CN113190563B (en) Index generation method, device and storage medium
CN111880996B (en) Bare metal data acquisition method, device, equipment and readable storage medium
CN114116676A (en) Data migration method and device, electronic equipment and computer readable storage medium
CN111522783B (en) Data synchronization method, device, electronic equipment and computer readable storage medium
CN117009294B (en) Method for implementing consistency snapshot in distributed file system
CN109726053B (en) Switching method and device of database control center and computer equipment
CN108255593B (en) Task coordination method, device, medium and electronic equipment based on shared resources
CN116775736A (en) Data acquisition method, device, equipment and readable storage medium
CN116634019A (en) Resource processing method, device and storage medium based on distributed cloud platform
CN117349256A (en) File anticorrosion method, device and system based on distributed platform
CN115686588A (en) Component library updating method and device, computer equipment and storage medium
CN117111800A (en) Menu configuration method, menu configuration device, computer device, storage medium, and program product
CN118672683A (en) Buried data processing method, buried data processing apparatus, computer device, readable storage medium, and program product

Legal Events

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