CN109901799B - Log reading and writing method and device - Google Patents

Log reading and writing method and device Download PDF

Info

Publication number
CN109901799B
CN109901799B CN201910152538.7A CN201910152538A CN109901799B CN 109901799 B CN109901799 B CN 109901799B CN 201910152538 A CN201910152538 A CN 201910152538A CN 109901799 B CN109901799 B CN 109901799B
Authority
CN
China
Prior art keywords
log
hard disk
written
track information
read
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
CN201910152538.7A
Other languages
Chinese (zh)
Other versions
CN109901799A (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201910152538.7A priority Critical patent/CN109901799B/en
Publication of CN109901799A publication Critical patent/CN109901799A/en
Application granted granted Critical
Publication of CN109901799B publication Critical patent/CN109901799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a log reading and writing method and a device, wherein the method comprises the following steps: acquiring a first log needing to be written into a first hard disk; reading the last piece of track information recorded in the log storage record list file to obtain a second hard disk for writing the log last time, wherein the track information comprises the identification of the hard disk for writing the log and the initial position information of the written log; judging whether the second hard disk is the same as the first hard disk or not; and if the log is different from the log, writing the first log into the first hard disk, and writing the first initial position information and the identifier of the first hard disk into the log storage record table file as track information, wherein the first initial position information represents the initial position of the first log. By applying the technical scheme provided by the embodiment of the application, the completeness and continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making wrong strategy decisions is reduced.

Description

Log reading and writing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a log reading and writing method and apparatus.
Background
With the wide deployment of the application firewall, the functions of application identification chart, application audit, attack trend analysis URL (Uniform Resource Locator) access, log display and the like provided by the Deep Packet Inspection (DPI) series characteristics of the application firewall provide good information reference for users, and provide a good reference for the deployment of security policies. The graph and other information are provided as logs that are not stored, that is, the graph and other information are obtained by classifying the logs.
Currently, when storing a Log, in order to improve the storage efficiency, a Log Daemon process (e.g., Log _ Daemon) stores the Log on a hard disk of a service board where the Log is located nearby. In practical application, due to various factors such as plugging and unplugging of the service boards, power failure and the like, the log daemon process is often migrated from one service board to another service board, and then logs are dispersedly stored in different logs. When the log is read, only the log stored on the hard disk of the service board where the log daemon process is located can be read, which causes the read log to be incomplete and discontinuous, further causes the data analysis to be incomplete, and makes an error strategy decision.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for reading and writing a log, so as to improve the integrity and continuity of the read log, improve the comprehensiveness of data analysis, and reduce the probability of making an erroneous policy decision. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a log writing method, where the method includes:
acquiring a first log needing to be written into a first hard disk;
reading the last piece of track information recorded in a log storage record table file to obtain a second hard disk for writing logs last time, wherein the track information comprises the identification of the hard disk for writing the logs and the initial position information of the written logs;
judging whether the second hard disk is the same as the first hard disk or not;
and if the log is different from the first log, writing the first log into the first hard disk, and writing first initial position information and the identifier of the first hard disk into the log storage record table file as track information, wherein the first initial position information represents the initial position of the first log.
In a second aspect, an embodiment of the present application provides a log reading method, where the method includes:
receiving a log reading instruction;
according to the log reading instruction, acquiring track information of the log to be read, which is written into different hard disks, from a log storage recording file, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log;
determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written into different hard disks;
and reading the logs to be read from different hard disks according to the determined hard disk identification and the initial position information.
In a third aspect, an embodiment of the present application provides an apparatus for writing a log, where the apparatus includes:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first log needing to be written into a first hard disk;
the reading unit is used for reading the last track information recorded in the log storage record list file to obtain a second hard disk written with the log last time, wherein the track information comprises an identifier of the hard disk written with the log and initial position information of the written log;
the judging unit is used for judging whether the second hard disk is the same as the first hard disk or not;
and a writing unit configured to write the first log into the first hard disk, and write first start position information indicating a start position at which the first log is written and an identifier of the first hard disk as track information into the log storage record table file, when it is determined that the second hard disk is different from the first hard disk.
In a fourth aspect, an embodiment of the present application provides a log reading apparatus, where the apparatus includes:
the acquisition unit is used for acquiring a log reading instruction;
the reading unit is used for acquiring track information of the log to be read, which is written into different hard disks, from the log storage record file according to the log reading instruction, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log;
the determining unit is used for determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written into different hard disks;
the reading unit is further used for reading the logs to be read from different hard disks according to the determined hard disk identification and the initial position information.
In a fifth aspect, an embodiment of the present application provides a network device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor is caused by the machine-executable instructions to implement any step of the log writing method provided in the first aspect.
In a sixth aspect, the present application provides a network device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor is caused by the machine-executable instructions to implement any one of the steps of the log reading method provided in the second aspect.
In a seventh aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: any step of the log writing method provided by the first aspect above is implemented.
In an eighth aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing any step of the log reading method provided by the second aspect.
The embodiment of the application provides a log reading and writing method and device, and the method and device are used for writing the log into a first hard disk and simultaneously writing the track information written into the log into a log storage record list file. The log storage record table file can record track information of the log written into different hard disks. When the logs are read, the written track information of the logs can be read from the log storage record table file according to the sequence of writing the track information, and then the logs are read from the hard disks according to the read track information, so that the completeness and the continuity of the read logs are improved, the comprehensiveness of data analysis is improved, and the probability of making wrong strategy decisions is reduced.
Of course, it is not necessary for any product or method of practicing the present application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic view of a stacking apparatus;
fig. 2 is a schematic flowchart of a log writing method according to an embodiment of the present application;
FIG. 3 is a first schematic diagram of a journal provided in an embodiment of the present application;
FIG. 4 is a second schematic diagram of a journal provided in an embodiment of the present application;
FIG. 5 is a third schematic diagram of a journal provided in an embodiment of the present application;
FIG. 6 is a fourth illustration of a journal provided by an embodiment of the present application;
fig. 7 is a first flowchart illustrating a log reading method according to an embodiment of the present application;
fig. 8 is a second flowchart of a log reading method according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a log writing apparatus according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a log reading apparatus according to an embodiment of the present disclosure;
fig. 11 is a first structural diagram of a network device according to an embodiment of the present application;
fig. 12 is a schematic diagram of a second structure of a network device according to an embodiment of the present application.
Detailed Description
The technical solutions in 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 obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The words appearing in the embodiments of the present application are explained below.
"Line XX": indicating that no data is stored at this position Line XX.
"Line XX record": indicating that data, such as log X, has been stored at the Line XX location.
Once log writing: the log is written in a period of time from the migration of the log daemon process to the service board where one hard disk is located to the migration of the log daemon process from the hard disk to the service board where other hard disks are located.
Currently, when storing a Log, in order to improve storage efficiency, a Log Daemon process (e.g., Log _ Daemon) stores the Log nearby on a hard disk of a service board where the Log is located.
The stacking apparatus shown in fig. 1 includes an apparatus 1 and an apparatus 2, and the apparatus 1 and the apparatus 2 form the stacking apparatus through an Intelligent Resilient Framework (IRF). The device 1 includes a service board 1 and a service board 2, and the device 2 includes a service board 3.
When the log daemon is located on the service board 1 of the device 1, the log daemon stores the generated log on the hard disk of the service board 1.
When the log daemon process is migrated to the service board 2 due to various factors such as plugging and unplugging of the service board or the hard disk, power failure, interface or flow change, and main/standby device switching, the log daemon process stores the generated log on the hard disk of the service board 2.
When the log daemon process is migrated to the service board 3 due to various factors such as plugging and unplugging of the service board or the hard disk, power failure, interface or flow change, and main/standby device switching, the log daemon process stores the generated log on the hard disk of the service board 3.
At this time, the master device checks the log generated by the device, checks information such as application identification and attack type, and when data analysis is performed, the information is only from the log stored on the hard disk of the service board 3, and the log is not read from the hard disks of the service board 1 and the service board 2. This results in incomplete and discontinuous logs being read, which in turn results in incomplete data analysis and erroneous policy decisions being made.
In order to improve the integrity and continuity of a read log, improve the comprehensiveness of data analysis, and reduce the probability of making an erroneous policy decision, embodiments of the present application provide a log writing method, which may be applied to any network device. The network device may be a master device in the stacking device or may be a separate physical device. The network device includes a plurality of hard disks. One service board can independently have one hard disk, and can also share one hard disk with other service boards. The embodiment of the present application does not limit this.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the log is read, the written track information of the log can be read from the log storage record table file according to the sequence of writing the track information, and then the log is read from each hard disk according to the read track information, so that the integrity and the continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making an error strategy decision is reduced.
The present application will be described below with reference to specific examples.
Referring to fig. 2, fig. 2 is a schematic flowchart of a log writing method according to an embodiment of the present application. For convenience of description, the network device is explained as an execution subject. The log writing method includes the following steps.
Step 201, a first log which needs to be written into a first hard disk is obtained.
The network device must generate a log during operation. For example, a network device deletes, stores, or migrates certain data and a log is generated.
When the log daemon runs on the service board where the first hard disk is located, the network device writes the log into the first hard disk. That is, when the log daemon runs on the service board where the first hard disk is located, the log obtained by the log daemon is the first log that needs to be written into the first hard disk.
Step 202, reading the last track information recorded in the log storage record table file to obtain a second hard disk in which the log is written last time. The track information comprises the identification of the hard disk written into the log and the initial position information of the written log.
In the embodiment of the application, the network equipment creates a log storage record table file. The log storage record table file is used for recording the track information of log storage, namely the track information written by the log. The trace information stored in the log can be understood as the trace information migrated by the log daemon. The log storage record table file as shown in table 1.
TABLE 1
Log stored trace information
HDA01 Line0 record
HDA03 Line234 record
HDA02 Line456 record
In table 1, 3 pieces of track information are recorded. Among the 3 pieces of track information, "HDA 01", "HDA 03", and "HDA 02" are identification of the hard disk, and "Line 0 record", "Line 234 record", and "Line 456" are start position information. From table 1, it can be determined that the log daemon migrates from the service board where the hard disk HDA01 is located to the service board where the hard disk HDA03 is located, and then migrates to the service board where the hard disk HDA02 is located.
In an optional embodiment, the track information may further include start position authentication information. The initial position authentication information is used for further authenticating the initial position information after the initial position information is determined so as to ensure the accuracy of data reading.
In one example, the starting location authentication information may include a time at which the log starts to be written, and a random value generated according to the time at which the log starts to be written. The random value has uniqueness to ensure accurate reading to the log. A log storage record table file as shown in table 2.
TABLE 2
Log stored trace information
HDA01 Line0 record 201801182314564356789
HDA03 Line234 record 201806182314564456789
HDA02 Line456 record 201807182314564456889
In table 2, "201801182314564356789", "201806182314564456789", and "201807182314564456889" are start position authentication information. Taking "201801182314564356789" as an example, the first 13 digits "201801182314564" of "201801182314564356789" means the time of starting to write the log in 2018, month 01, day 18, hour 23, 14 minutes, 564 milliseconds, and the last 6 digits "356789" are random values generated according to the time of starting to write the log, and have uniqueness.
The random value generated at the time of starting to write the log can be calculated by using an algorithm such as MD5, CRC (Cyclic Redundancy Check) and the like. This is not particularly limited in the embodiments of the present application.
After the first log is obtained, the network device reads the last piece of track information recorded in the log storage record table file. After the network device reads the last track information recorded in the log storage record list file, the network device can extract the hard disk identifier included in the read track information, and the hard disk corresponding to the hard disk identifier is the second hard disk written last time. The first hard disk may be a hard disk on any service board in the network device.
For example, as shown in table 1, the network device may read that the last track information recorded in the log storage record table file is "HDA 02 Line456 record 201807182314564456889", the identifier of the hard disk included in the track information is HDA02, and then may determine that the second hard disk is a hard disk HDA 02.
Step 203, determine whether the second hard disk is the same as the first hard disk. If not, go to step 204.
In an optional embodiment, if the log storage record table file is empty, the last piece of track information read by the network device is also empty, that is, the determined second hard disk is empty, at this time, the network device may determine that the second hard disk is different from the first hard disk, and continue to perform step 204.
In another alternative embodiment, if the log storage record table file is not empty, but the hard disk identifier included in the last piece of track information read by the network device is different from the first hard disk, step 204 is also executed.
Step 204, writing the first log into the first hard disk, and writing the first start position information and the identifier of the first hard disk into a log storage record table file as track information. Wherein the first start position information indicates a start position of writing to the first log.
If the network device determines that the second hard disk is different from the first hard disk, the network device may determine that the hard disk in which the log is written is different from the hard disk in which the log was written last time, and the log daemon process is migrated.
In an optional embodiment, in order to improve the accuracy of subsequent data reading, the network device determines a time for writing the first log into the first hard disk, generates first start position authentication information according to the determined time, and writes the first start position information, the first start position authentication information, and an identifier of the first hard disk as track information into the log storage record table file. The first initial position authentication information is used for authenticating the first initial position information so as to determine the accuracy of the first initial position information.
In an optional embodiment, each time the network device acquires a log that needs to be written in the first hard disk, the last piece of track information recorded in the log storage record table file can be read. And if so, judging whether the second hard disk is the same as the first hard disk. If the log is the same as the first hard disk, the network equipment can determine that the log daemon process is not migrated, and write the log into the first hard disk. If the log daemon process is different from the first log daemon process, the network equipment can determine that the log daemon process is migrated, write the first log into the first hard disk, and write the first initial position information and the identifier of the first hard disk into a log storage record table file as track information. The network equipment acquires each log and judges whether the log daemon process is migrated or not, and continuous and complete logs are guaranteed to be read subsequently.
In another optional embodiment, after acquiring a first log that needs to be written in the first hard disk, the network device determines whether the log is written in the first hard disk. If the log is not written in the first hard disk, the network equipment reads the last piece of track information recorded in the log storage record table file and judges whether the second hard disk is the same as the first hard disk or not.
If the log is written in the first hard disk, the network device may detect whether a time difference between the current time and the time when the last log in the current first hard disk is written in is greater than a preset time threshold. It is considered that the log daemon is generally written continuously and uninterruptedly in the case that migration does not occur, that is, the time difference between the two logs is generally smaller than the preset time threshold.
Based on this, if the time difference between the current time and the time when the last log in the first hard disk is written in is greater than the preset time threshold, the network device may determine that the log daemon process may migrate, and in order to further accurately determine whether the log daemon process migrates, read the last trace information recorded in the log storage record table file, and determine whether the second hard disk is the same as the first hard disk.
If the time difference between the current time and the time when the last log in the first hard disk is written in is not larger than the preset time threshold, the network equipment can determine that the log daemon process is not migrated, and write the first log in the first hard disk.
The network device does not judge whether the log daemon process is migrated or not when each log is acquired, and only determines whether the log daemon process is migrated or not under a certain condition (the time difference between the current time and the time when the last log in the current first hard disk is written is greater than a preset time threshold), so that the load of the device is reduced. In this embodiment, the preset time threshold may be set according to the performance of the device, the requirements of the user, and the like.
In another optional embodiment, after acquiring the first log that needs to be written to the first hard disk, the network device:
(1) if the log is written in the first hard disk, the network device may detect whether an end identifier exists after the last log in the current first hard disk. And the end mark is used for indicating that the log writing into the hard disk is ended. Specifically, the end flag is used to indicate: due to various factors such as plugging and unplugging of the hard disk on the service board or the service board, power failure, interface or flow change, main and standby equipment switching and the like, the log is not written into the hard disk of the service board any more.
If the end identifier exists, the network equipment can determine that the last time the log writing into the first hard disk is ended, the log writing is generated when the log daemon process migrates to the service board where the first hard disk is located again, the first log is written into the first hard disk, and the first initial position information and the identifier of the first hard disk are used as track information and written into the log storage record list file;
if the end identifier does not exist, the network equipment can determine that the writing of the log is not ended, the log daemon process is not migrated, and the first log is written into the first hard disk;
(2) if the log is not written in the first hard disk, the first hard disk does not have an end identifier, the network device cannot determine whether the log daemon process is migrated, the last piece of track information recorded in the log storage record table file is read, and whether the second hard disk is the same as the first hard disk is judged so as to judge whether the log daemon process is migrated.
In an optional embodiment, in order to accurately determine whether the log daemon process migrates, when there is no end identifier after the last log in the first hard disk, the last trace information recorded in the log storage record table file is read, and it is determined whether the second hard disk is the same as the first hard disk, so as to determine whether the log daemon process migrates.
In an optional embodiment, the network device may determine whether other logs have been stored in the first hard disk when determining that the second hard disk is different from the first hard disk. And if other logs are stored, the network equipment writes an end identifier into the first hard disk, and writes the first log after the end identifier. The end mark is used for indicating that the log writing into the hard disk is ended.
Therefore, when the log written in one hard disk is read, if the network equipment reads the end identifier, the log daemon process can be determined to be migrated from the service board where the hard disk is located to the service board where other hard disks are located, once log writing to the hard disk is ended, the log daemon process does not continue to read from the hard disk, but finds other hard disks, and the log reading continues from the other hard disks. This improves the continuity of the read log.
For example, the end flag is EOR the leader in digital solution and the journaling record table file is empty. The current log daemon process is located on a service board where the hard disk HDA01 is located, and the hard disk HDA01 is a first hard disk. The network equipment acquires a log needing to be written into the hard disk HDA01, reads the last piece of track information recorded in the log storage record table file, determines that the second hard disk is empty, and further determines that the second hard disk is different from the first hard disk. In addition, the network device determines that no other log is stored in the first hard disk (i.e., hard disk HDA01), and if the log is empty, writes the log into hard disk HDA01, as shown in fig. 3. In addition, the network device writes the start position information "Line 0 record" and the identification HDA01 of the hard disk HDA01 as track information into the log storage record table file, as shown in table 3.
TABLE 3
Log stored trace information
HDA01 Line0 record
When the log daemon process is migrated from the service board where the hard disk HDA01 is located to the service board where the hard disk HDA03 is located (at this time, the hard disk HDA03 is the first hard disk), the network device reads the last piece of track information recorded in the log storage record table file, as shown in table 3, may obtain the track information "HDA 01 Line0 record", determine that the second hard disk is the hard disk HDA01, and further determine that the second hard disk is different from the first hard disk. In addition, when the network device determines that other logs are stored in the first hard disk (i.e., the hard disk HDA03), it writes an end flag into the Line233 of the hard disk HDA03, and starts to write the logs at the Line234 after the end flag, as shown in fig. 4.
In addition, the network device writes the start position information "Line 234 record" and the identification HDA03 of the hard disk HDA03 as track information into the log storage record table file, as shown in table 4.
TABLE 4
Log stored track information
HDA01 Line0 record
HDA03 Line234 record
In another alternative embodiment, in the case that the network device determines that the second hard disk is different from the first hard disk, the end identifier may be written after the last log in the second hard disk. The end mark is used for indicating that the log writing into the hard disk is ended. And writing an end mark after the last log in the second hard disk, which means that the log end mark is written into the second hard disk.
In this way, when the log written in one hard disk is read, if the network device reads the end identifier, it can be determined that the log daemon process is migrated from the service board where the hard disk is located to the service board where the other hard disk is located, once log writing to the hard disk is ended, the log daemon process does not continue to read from the hard disk, but finds the other hard disk, and continues to read the log from the other hard disk. This improves the continuity of the read log.
For example, the end flag is EOR the leader in digital solution and the journaling record table file is empty. Currently, the log daemon is located on the service board where the hard disk HDA01 is located, and the hard disk HDA01 is the first hard disk, as shown in fig. 5. The network equipment acquires the log which needs to be written into the hard disk HDA01, writes the log into the hard disk HDA01, and updates the log storage record table file, as shown in Table 3.
When the log daemon process is migrated from the service board where the hard disk HDA01 is located to the service board where the hard disk HDA03 is located (at this time, the hard disk HDA03 is the first hard disk), the network device reads the last piece of track information recorded in the log storage record table file, as shown in table 3, may obtain the track information "HDA 01 Line0 record", determine that the second hard disk is the hard disk HDA01, and further determine that the first hard disk is different from the second hard disk, the network device writes the end identifier after the last log in the second hard disk HDA01, and starts to write the log at the Line234 position in the hard disk HDA03, as shown in fig. 6.
In addition, the network device writes the start position information "Line 234 record" and the identification HDA03 of the hard disk HDA03 as track information into the log storage record table file, as shown in table 4.
The log writing method provided by the embodiment of the application can be applied to network equipment comprising a plurality of log daemon processes. For each log daemon, a log storage record table file for the log daemon may be set in the network device, and for the log written by each log daemon, the writing may be performed with reference to the embodiments shown in fig. 2 to fig. 6.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the log is read, the written track information of the log can be read from the log storage record table file according to the sequence of writing the track information, and then the log is read from each hard disk according to the read track information, so that the integrity and the continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making an error strategy decision is reduced.
Based on the same inventive concept, according to the log writing method embodiment, the embodiment of the application also provides a log reading method. Referring to fig. 7, fig. 7 is a schematic flowchart of a first log reading method according to an embodiment of the present application. For convenience of description, the network device is explained as an execution subject. The log reading method comprises the following steps.
Step 701, obtaining a log reading instruction.
In one example, when the log needs to be read, a user reads an instruction to the log input in the network device. In another example, a log reading plan is stored in advance in the network device, and the log reading plan includes a time when the log is read. When the time to read the log included in the log reading plan is reached, the network device generates a log reading instruction.
Step 702, according to the log reading instruction, obtaining track information of the log to be read, which is written into different hard disks, from the log storage record file, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log.
In the embodiment of the application, the network equipment creates a log storage record table file. The log storage record table file is used for recording the track information of log storage, namely the track information written by the log. The trace information stored in the log can be understood as the trace information migrated by the log daemon. As shown in table 1.
In an optional embodiment, the track information may further include start position authentication information. The starting position authentication information is used for further authenticating the starting position information after the starting position information is determined. The starting position authentication information may include a time when the log starts to be written, and/or a random value generated according to the time when the log starts to be written, where the random value has uniqueness to ensure accurate log reading.
In the embodiment of the application, after the network device obtains the log reading instruction, track information of the log to be read, which is written into different hard disks, is obtained from the log storage record file. The following description will be made by taking table 1 as an example. The network equipment reads track information 'HDA 01 Line0 record', HDA03 Line234 record 'and HDA02 Line456 record' from the log storage record table file.
Step 703, determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written in different hard disks.
The log to be read may include a plurality of logs, and thus the log to be read may be stored in different hard disks due to migration of the log daemon. Therefore, in the embodiment, the track information of the log to be read, which is written into different hard disks, can be obtained by reading the log storage record file.
For example, the network device reads track information "HDA 01 Line0 record", "HDA 03 Line234 record" and "HDA 03 Line234 record", determines, according to the read track information "HDA 01 Line0 record", that the identifier of the hard disk corresponding to the log to be read is "HDA 01", and determines that the start position information of the log to be read on the corresponding hard disk is "Line 0 record";
and determining the identifier of the hard disk corresponding to the log to be read as HDA03 according to the read track information of the HDA03 Line234 record, and determining the initial position information of the log to be read on the corresponding hard disk as the Line234 record.
And determining the identifier of the hard disk corresponding to the log to be read as HDA02 according to the read track information of HDA02 Line456 record, and determining the initial position information of the log to be read on the corresponding hard disk as Line456 record.
Step 704, reading the log to be read from different hard disks according to the determined identifier and initial position information of the hard disk.
After determining the identifier of the hard disk and the corresponding initial position information, the network device reads the log to be read from different hard disks.
The description is still given by way of example in step 703. The identification 'HDA 01' of the hard disk represents that the hard disk is HDA01, the identification 'HDA 02' of the hard disk represents that the hard disk is HDA02, the identification 'HDA 03' of the hard disk represents that the hard disk is HDA03, the initial position information 'Line 0 record' represents that the initial storage position of the log in the HDA01 is a Line0 position, the initial position information 'Line 234 record' represents that the initial storage position of the log in the HDA03 is a Line234 position, and the initial position information 'Line 456 record' represents that the initial storage position of the log in the HDA02 is a Line456 position;
the network equipment reads the log to be read from the Line0 position of the hard disk HDA01, reads the log to be read from the Line234 position of the hard disk HDA03 and reads the log to be read from the Line456 position of the hard disk HDA 02.
In an embodiment of the application, the network device obtains, from the log storage record file, the track information in which the log to be read is written to different hard disks according to the sequence in which the track information is written to the log storage record file. And the network equipment determines the identifier of the hard disk and corresponding initial position information according to the sequence of the acquired track information, and reads the log to be read from different hard disks.
Here, the sequence of writing the track information into the log storage record file is the migration process of the log daemon process on the service board where different hard disks are located. The network equipment acquires the track information of the logs to be read, which are written into different hard disks, from the log storage record file according to the sequence of writing the track information into the log storage record file, and then reads the logs to be read from the different hard disks, so that the read logs can be ensured to be complete and continuous in time.
As shown in table 1, the sequence of writing track information in the log storage record table file is as follows: "HDA 01 Line0 record" → "HDA 03 Line234 record" → "HDA 02 Line456 record". The network device reads the HDA01 Line0 record and reads the log according to the HDA01 Line0 record. The network device then reads the "HDA 03 Line234 record" and reads the log according to the "HDA 03 Line234 record". The network device then reads "HDA 02 Line456 record". The log is read according to "HDA 03 Line234 record".
In an optional embodiment, each piece of track information may further include start position authentication information. After the network equipment acquires the track information, the initial position information included in the acquired track information is authenticated according to the initial position authentication information included in the acquired track information. After the initial position information included in the acquired track information passes the authentication, the network device can read the log to be read from different hard disks according to the determined identifier of the hard disk and the initial position information.
For example, the track information acquired by the network device is "HDA 01 Line0 record 201801182314564356789". Here, "201801182314564356789" is the home position authentication information. The first 13 digits "201801182314564" of "201801182314564356789" means that the time of starting to write the log is 2018, 01, 18, 23, 14 minutes, 564 milliseconds, and the last 6 digits "356789" should be a random value generated from the time of starting to write the log. The network device calculates a random value according to "201801182314564", and determines whether the calculated random value is the same as the random value "356789" included in the home location authentication information. If the two types of track information are the same, the network device may determine that the initial location information included in the obtained track information passes authentication. Otherwise, the network device may determine that the initial location information included in the acquired trajectory information fails to be authenticated.
In an optional embodiment, if the start position information included in the obtained track information fails to be authenticated, the network device does not process the obtained track information.
In an optional embodiment, in order to improve the continuity and integrity of reading the log, an end identifier is written in the hard disk after the log writing is finished each time. Based on this, after the end identifier is read in the hard disk for reading the log currently, the network device can determine that one-time log writing of the hard disk for reading the log currently is ended, and determine the identifier and the initial position information of the next hard disk corresponding to the log to be read according to the track information of different hard disks into which the log is written.
For example, as shown in table 1, currently, the network device reads the log according to the obtained track information "HDA 01 Line0 record", and then the hard disk that reads the log is the hard disk HDA 01. After the network device reads the ending identifier in the hard disk HDA01, according to the next track information HDA03 Line234 record of the HDA01 Line0 record, it can be determined that the identifier of the next hard disk corresponding to the log to be read is 'HDA 03', and the next initial position information corresponding to the log to be read is 'Line 234 record'.
The following describes in detail the log reading method provided in the embodiment of the present application with reference to the log storage record table file shown in table 2, each hard disk log shown in fig. 6, and a second flowchart of the log reading method shown in fig. 8.
Step 801, a network device obtains a log reading instruction.
Step 802, the network device reads the bar track information from the log storage record table file. For example, the track information 11 "HDA 01 Line0 record 201801182314564356789" in table 2 is read.
In step 803, the network device determines, according to the track information 11(HDA01 Line0 record 201801182314564356789), that the identifier of the hard disk corresponding to the log to be read is "HDA 01", and determines that the start position information of the corresponding log to be read is "Line 0 record".
In step 804, the network device authenticates "Line 0 record" according to the start location authentication information "201801182314564356789" included in the track information 11.
If the authentication is passed, go to step 805;
if the authentication is not passed, the process returns to step 802, and the next piece of track information of the track information 11 in the log storage record table file is read. As in table 2, the next track information of the track information 11 is the next track information 12 "HDA 03 Line234 record 201806182314564456789" of the track information 11.
Step 805, the network device determines the hard disk HDA01 according to the hard disk identifier "HDA 01, and determines the start position of the open read log as position Line0 according to the start position information" Line0 record ".
In step 806, the network device reads the log from the Line0 location of the hard disk HDA 01.
In step 807, the network device detects whether an end identifier is read every time it reads a log. If so, step 802 is performed. If not, the log is continuously read.
The log reading method provided by the embodiment of the application can be applied to network equipment comprising a plurality of log daemon processes. For each log daemon, a log storage record table file for the log daemon can be set in the network device, and for the log written by each log daemon, reading can be performed with reference to the embodiments shown in fig. 7 to 8.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the logs are read, the written track information of the logs can be read from the log storage record table file according to the sequence of writing the track information, and then the logs are read from the hard disks according to the read track information, so that the completeness and the continuity of the read logs are improved, the comprehensiveness of data analysis is improved, and the probability of making wrong strategy decisions is reduced.
Based on the same inventive concept, according to the embodiment of the log writing method, the embodiment of the application also provides a log writing device. Referring to fig. 9, fig. 9 is a schematic structural diagram of a log writing apparatus according to an embodiment of the present application. The apparatus includes an acquisition unit 901, a reading unit 902, a judgment unit 903, and a writing unit 904.
An obtaining unit 901, configured to obtain a first log that needs to be written in a first hard disk;
a reading unit 902, configured to read the last track information recorded in the log storage record table file to obtain a second hard disk to which the log was written last time, where the track information includes an identifier of the hard disk to which the log is written and initial position information of the log;
a determining unit 903, configured to determine whether the second hard disk is the same as the first hard disk;
a writing unit 904, configured to write the first log into the first hard disk if it is determined that the second hard disk is different from the first hard disk, and write the first log into the log storage record table file using the first start position information and the identifier of the first hard disk as the track information, where the first start position information indicates the start position of the first log.
In an alternative embodiment, the writing unit 904 may further be configured to:
and if the second hard disk is different from the first hard disk, judging whether other logs are stored in the first hard disk, and writing an end identifier into the first hard disk, wherein the end identifier is used for indicating that the writing of the logs into the hard disk is ended.
In an alternative embodiment, the writing unit 904 may further be configured to:
and if the second hard disk is different from the first hard disk, writing an end mark after the last log in the second hard disk, wherein the end mark is used for indicating that the log writing into the hard disk is ended.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the log is read, the written track information of the log can be read from the log storage record table file according to the sequence of writing the track information, and then the log is read from each hard disk according to the read track information, so that the integrity and the continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making an error strategy decision is reduced.
Based on the same inventive concept, according to the embodiment of the log reading method, the embodiment of the application also provides a log reading device. Referring to fig. 10, fig. 10 is a schematic structural diagram of a log reading apparatus according to an embodiment of the present disclosure. The apparatus includes an acquisition unit 1001, a reading unit 1002, and a determination unit 1003.
An acquisition unit 1001 configured to acquire a log reading instruction;
the reading unit 1002 is configured to obtain, according to a log reading instruction, track information that a log to be read is written to different hard disks from a log storage record file, where each track information includes an identifier of a hard disk to which the log is written and initial position information of the written log;
a determining unit 1003, configured to determine, according to the track information that the log is written into different hard disks, an identifier of a hard disk corresponding to the log to be read, and start position information of the log to be read on a corresponding hard disk;
the reading unit 1002 is further configured to read a log to be read from a different hard disk according to the determined identifier and the start position information of the hard disk.
In an optional embodiment, each piece of track information may further include start position authentication information;
at this time, the authentication unit is used for authenticating the initial position information included in the track information of the different hard disks written in the log according to the initial position authentication information included in the track information of the different hard disks written in the log;
the reading unit 1002 may be specifically configured to read the log to be read from the different hard disks according to the determined identifier and the start position information of the hard disk after the log is authenticated by the start position information included in the track information written in the different hard disks.
In an alternative embodiment, the reading unit 1002 may specifically be configured to:
and after reading the end mark in the hard disk for reading the log currently, determining the mark and the initial position information of the next hard disk corresponding to the log to be read according to the track information of the log written into different hard disks, wherein the end mark is used for indicating the end of writing the log into the hard disks.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the logs are read, the written track information of the logs can be read from the log storage record table file according to the sequence of writing the track information, and then the logs are read from the hard disks according to the read track information, so that the completeness and the continuity of the read logs are improved, the comprehensiveness of data analysis is improved, and the probability of making wrong strategy decisions is reduced.
Based on the same inventive concept, according to the above-mentioned log writing method embodiment, the present application further provides a network device, as shown in fig. 11, including a processor 1101 and a machine-readable storage medium 1102, where the machine-readable storage medium 1102 stores machine-executable instructions capable of being executed by the processor 1101. The processor 1101 is caused by machine executable instructions to implement any of the steps of the log writing method provided by the embodiments described above with respect to fig. 2-6. The log writing method comprises the following steps:
acquiring a first log needing to be written into a first hard disk;
reading the last piece of track information recorded in the log storage record list file to obtain a second hard disk for writing the log last time, wherein the track information comprises the identification of the hard disk for writing the log and the initial position information of the written log;
judging whether the second hard disk is the same as the first hard disk;
and if the log is different from the log, writing the first log into the first hard disk, and writing the first initial position information and the identifier of the first hard disk into the log storage record table file as track information, wherein the first initial position information represents the initial position of the first log.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the log is read, the written track information of the log can be read from the log storage record table file according to the sequence of writing the track information, and then the log is read from each hard disk according to the read track information, so that the integrity and the continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making an error strategy decision is reduced.
In one embodiment, as shown in fig. 11, the network device may further include: a communication interface 1103 and a communication bus 1104; the processor 1101, the machine-readable storage medium 1102 and the communication interface 1103 complete mutual communication through the communication bus 1104, and the communication interface 1103 is used for communication between the network device and other devices.
Based on the same inventive concept, according to the above-mentioned embodiment of the log reading method, as shown in fig. 12, the embodiment of the present application further provides a network device, which includes a processor 1201 and a machine-readable storage medium 1202, where the machine-readable storage medium 1202 stores machine-executable instructions that can be executed by the processor 1201. The processor 1201 is caused by machine executable instructions to implement any of the steps of the log reading method provided by the embodiments of fig. 7-8 described above. The log reading method comprises the following steps:
acquiring a log reading instruction;
according to the log reading instruction, acquiring track information of logs to be read, which are written into different hard disks, from a log storage recording file, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log;
determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written into different hard disks;
and reading the logs to be read from different hard disks according to the determined hard disk identification and the initial position information.
According to the technical scheme provided by the embodiment of the application, the log is written into the first hard disk, and meanwhile, the track information written into the log is written into the log storage record table file. The log storage record table file can record track information of the log written into different hard disks. When the log is read, the written track information of the log can be read from the log storage record table file according to the sequence of writing the track information, and then the log is read from each hard disk according to the read track information, so that the integrity and the continuity of the read log are improved, the comprehensiveness of data analysis is improved, and the probability of making an error strategy decision is reduced.
In one embodiment, as shown in fig. 12, the network device may further include: a communication interface 1203 and a communication bus 1204; the processor 1201, the machine-readable storage medium 1202, and the communication interface 1203 complete communication with each other through the communication bus 1204, and the communication interface 1203 is used for communication between the network device and other devices.
The communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The machine-readable storage medium may include a RAM (Random Access Memory) and may also include a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium may be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also DSPs (Digital Signal Processing), ASICs (Application Specific Integrated circuits), FPGAs (Field Programmable Gate arrays) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Based on the same inventive concept, according to the above-mentioned embodiment of the log writing method, an embodiment of the present application further provides a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement any step of the log writing method provided by the above-mentioned embodiment of fig. 2 to 6.
Based on the same inventive concept, according to the above embodiment of the log reading method, an embodiment of the present application further provides a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, cause the processor to implement any step of the log reading method provided in the above embodiment described in fig. 7 to 8.
It is noted that, herein, relational terms such as first and second, and the like may be 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. 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. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the log writing device, the log reading device, the network device, and the machine-readable storage medium, since they are basically similar to the embodiments of the log writing method and the log reading method, the description is relatively simple, and the relevant points can be referred to the partial description of the embodiments of the log writing method and the log reading method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A method of log writing, the method comprising:
acquiring a first log needing to be written into a first hard disk;
reading the last piece of track information recorded in a log storage record table file to obtain a second hard disk written with a log last time, wherein the track information comprises an identifier of the hard disk written with the log and initial position information of the written log, and the second hard disk written with the log last time is a hard disk corresponding to the identifier of the hard disk included in the last piece of track information;
judging whether the second hard disk is the same as the first hard disk or not;
and if the first log is different from the second log, writing the first log into the first hard disk, and writing first initial position information and the identifier of the first hard disk into the log storage record table file as track information, wherein the first initial position information represents the initial position of the first log.
2. The method of claim 1, wherein if it is determined that the second hard disk is different from the first hard disk, before writing the first log to the first hard disk, the method further comprises:
judging whether other logs are stored in the first hard disk or not;
and if so, writing an end identifier into the first hard disk, wherein the end identifier is used for indicating that the writing of the log into the hard disk is ended.
3. The method of claim 1, wherein if it is determined that the second hard disk is different from the first hard disk, the method further comprises:
and writing an end identifier after the last log in the second hard disk, wherein the end identifier is used for indicating that the log writing into the hard disk is ended.
4. A method of log reading, the method comprising:
acquiring a log reading instruction;
according to the log reading instruction, acquiring track information of the log to be read, which is written into different hard disks, from a log storage recording file, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log;
determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written into different hard disks;
and reading the logs to be read from different hard disks according to the determined hard disk identification and the initial position information.
5. The method of claim 4, wherein each piece of track information further comprises start position authentication information; the method further comprises the following steps:
according to the initial position authentication information included in the track information of the log written into different hard disks, authenticating the initial position information included in the track information of the log written into different hard disks;
and after the log is authenticated by the initial position information included in the track information written into different hard disks, executing the step of reading the log to be read from different hard disks according to the determined identifier and the initial position information of the hard disks.
6. The method of claim 4, wherein the completely reading the log to be read from the different hard disks according to the hard disk identifier and the start position information comprises:
and after reading an end mark in the hard disk for reading the log at present, determining the mark and the initial position information of the next hard disk corresponding to the log to be read according to the track information of the log written into different hard disks, wherein the end mark is used for indicating the end of writing the log into the current hard disk.
7. An apparatus for log writing, the apparatus comprising:
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring a first log needing to be written into a first hard disk;
the reading unit is used for reading the last piece of track information recorded in the log storage record list file to obtain a second hard disk written with the log last time, wherein the track information comprises an identifier of the hard disk written with the log and initial position information of the written log, and the second hard disk written with the log last time is a hard disk corresponding to the identifier of the hard disk included in the last piece of track information;
the judging unit is used for judging whether the second hard disk is the same as the first hard disk or not;
and a writing unit configured to write the first log into the first hard disk, and write first start position information indicating a start position at which the first log is written and an identifier of the first hard disk as track information into the log storage record table file, when it is determined that the second hard disk is different from the first hard disk.
8. The apparatus of claim 7, wherein the write unit is further configured to:
and if the second hard disk is different from the first hard disk, judging whether other logs are stored in the first hard disk, and writing an end identifier into the first hard disk, wherein the end identifier is used for indicating that the writing of the logs into the hard disk is ended.
9. The apparatus of claim 7, wherein the writing unit is further configured to:
and if the second hard disk is different from the first hard disk, writing an end mark after the last log in the second hard disk, wherein the end mark is used for indicating that the log writing into the hard disk is ended.
10. An apparatus for log reading, the apparatus comprising:
the acquisition unit is used for acquiring a log reading instruction;
the reading unit is used for acquiring track information of the log to be read, which is written into different hard disks, from the log storage record file according to the log reading instruction, wherein each track information comprises an identifier of the hard disk in which the log is written and initial position information of the written log;
the determining unit is used for determining the identifier of the hard disk corresponding to the log to be read and the initial position information of the log to be read on the corresponding hard disk according to the track information of the log written into different hard disks;
the reading unit is further used for reading the logs to be read from different hard disks according to the determined hard disk identification and the initial position information.
11. The apparatus of claim 10, wherein each track information further comprises a start position authentication information; the device further comprises:
the authentication unit is used for authenticating the initial position information included in the track information of the different hard disks written in the log according to the initial position authentication information included in the track information of the different hard disks written in the log;
the reading unit is specifically configured to read the log to be read from the different hard disks according to the determined identifier and the start position information of the hard disk after the log is authenticated by the start position information included in the track information written into the different hard disks.
12. Device according to claim 10, characterized in that the reading unit, in particular for
And after reading the end mark in the hard disk for reading the log at present, determining the mark and the initial position information of the next hard disk corresponding to the log to be read according to the track information of the log written into different hard disks, wherein the end mark is used for indicating the end of writing the log into the hard disks.
13. A network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 6.
14. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 6.
CN201910152538.7A 2019-02-28 2019-02-28 Log reading and writing method and device Active CN109901799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910152538.7A CN109901799B (en) 2019-02-28 2019-02-28 Log reading and writing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910152538.7A CN109901799B (en) 2019-02-28 2019-02-28 Log reading and writing method and device

Publications (2)

Publication Number Publication Date
CN109901799A CN109901799A (en) 2019-06-18
CN109901799B true CN109901799B (en) 2022-08-19

Family

ID=66945813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910152538.7A Active CN109901799B (en) 2019-02-28 2019-02-28 Log reading and writing method and device

Country Status (1)

Country Link
CN (1) CN109901799B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991099A (en) * 1995-09-27 1997-04-04 Mitsubishi Electric Corp Disk update log recording system
CN1736078A (en) * 2002-08-28 2006-02-15 皇家飞利浦电子股份有限公司 Secure logging of transactions
CN102135932A (en) * 2011-03-08 2011-07-27 浪潮(北京)电子信息产业有限公司 Monitoring system and monitoring method thereof
CN103559119A (en) * 2013-10-25 2014-02-05 华为技术有限公司 File operation request processing method and device
CN103780638A (en) * 2012-10-18 2014-05-07 腾讯科技(深圳)有限公司 Data synchronization method and system
CN104035729A (en) * 2014-05-22 2014-09-10 中国科学院计算技术研究所 Block device thin-provisioning method for log mapping
CN105468473A (en) * 2014-07-16 2016-04-06 北京奇虎科技有限公司 Data migration method and data migration apparatus
CN107438829A (en) * 2015-04-08 2017-12-05 华为技术有限公司 Partitioned storage data set redoes log record
CN107506149A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 System management memory journal dump method and device
CN108182154A (en) * 2017-12-22 2018-06-19 深圳大普微电子科技有限公司 A kind of reading/writing method and solid state disk of the journal file based on solid state disk
CN108304553A (en) * 2018-02-01 2018-07-20 平安普惠企业管理有限公司 Data migration method, device, computer equipment and storage medium
CN108804038A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Method, apparatus, server and the computer-readable medium of daily record data migration

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7756838B2 (en) * 2005-12-12 2010-07-13 Microsoft Corporation Robust end-of-log processing
WO2014091600A1 (en) * 2012-12-13 2014-06-19 株式会社日立製作所 Storage device and method for moving storage device
CN103761161B (en) * 2013-12-31 2017-01-04 华为技术有限公司 Recover the method for data, server and system
US9697219B1 (en) * 2014-12-29 2017-07-04 EMC IP Holding Company LLC Managing log transactions in storage systems
US10552403B2 (en) * 2015-05-21 2020-02-04 Vmware, Inc. Using checksums to reduce the write latency of logging
CN105893172A (en) * 2015-11-30 2016-08-24 乐视云计算有限公司 Hard disk data recovery method and system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0991099A (en) * 1995-09-27 1997-04-04 Mitsubishi Electric Corp Disk update log recording system
CN1736078A (en) * 2002-08-28 2006-02-15 皇家飞利浦电子股份有限公司 Secure logging of transactions
CN102135932A (en) * 2011-03-08 2011-07-27 浪潮(北京)电子信息产业有限公司 Monitoring system and monitoring method thereof
CN103780638A (en) * 2012-10-18 2014-05-07 腾讯科技(深圳)有限公司 Data synchronization method and system
CN103559119A (en) * 2013-10-25 2014-02-05 华为技术有限公司 File operation request processing method and device
CN104035729A (en) * 2014-05-22 2014-09-10 中国科学院计算技术研究所 Block device thin-provisioning method for log mapping
CN105468473A (en) * 2014-07-16 2016-04-06 北京奇虎科技有限公司 Data migration method and data migration apparatus
CN107438829A (en) * 2015-04-08 2017-12-05 华为技术有限公司 Partitioned storage data set redoes log record
CN107506149A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 System management memory journal dump method and device
CN108182154A (en) * 2017-12-22 2018-06-19 深圳大普微电子科技有限公司 A kind of reading/writing method and solid state disk of the journal file based on solid state disk
CN108304553A (en) * 2018-02-01 2018-07-20 平安普惠企业管理有限公司 Data migration method, device, computer equipment and storage medium
CN108804038A (en) * 2018-05-29 2018-11-13 新华三技术有限公司 Method, apparatus, server and the computer-readable medium of daily record data migration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
云计算面临的安全问题及防御策略;贾佳;《电信工程技术与标准化》;20151015;全文 *

Also Published As

Publication number Publication date
CN109901799A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN110992992B (en) Hard disk test method, device and storage medium
CN107066519B (en) Task detection method and device
CN110727597B (en) Method for checking invalid code completion case based on log
CN112818307B (en) User operation processing method, system, equipment and computer readable storage medium
CN111104246B (en) Method, device, computer equipment and storage medium for improving verification efficiency of error detection and correction of DRAM
CN107391292B (en) Block chain verification method and system for realizing error correction aiming at data of block body
CN109815697B (en) Method and device for processing false alarm behavior
CN110908920A (en) Interface function testing method and device and related components
CN105302924A (en) File management method and device
WO2017012460A1 (en) Method and apparatus for detecting failure of random memory, and processor
CN110568346A (en) Aging test method and system for smart card
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN109901799B (en) Log reading and writing method and device
CN113312205B (en) Data verification method and device, storage medium and computer equipment
CN106933858B (en) Page source statistical method and view controller
CN112286786A (en) Database testing method and device and server
CN108156203B (en) Storage system and storage node management method
CN113704123B (en) Interface testing method, device, equipment and storage medium
CN112631842B (en) System memory identification test method, system and electronic equipment
CN111181927B (en) Login method and server
CN109560964B (en) Equipment compliance checking method and device
CN108255715B (en) Test result processing method and terminal equipment
CN111475400A (en) Verification method of service platform and related equipment
JP6708086B2 (en) Operation information recording program, operation information recording device, and operation information recording method
CN117033237A (en) Log test method and device, electronic equipment and storage medium

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