CN116954487A - Log storage method, device and equipment - Google Patents

Log storage method, device and equipment Download PDF

Info

Publication number
CN116954487A
CN116954487A CN202211234901.8A CN202211234901A CN116954487A CN 116954487 A CN116954487 A CN 116954487A CN 202211234901 A CN202211234901 A CN 202211234901A CN 116954487 A CN116954487 A CN 116954487A
Authority
CN
China
Prior art keywords
log
coding
mapping table
coded
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211234901.8A
Other languages
Chinese (zh)
Inventor
秦至希
林紫微
唐建伦
龙建宇
李雪林
马小川
曹宝丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202211234901.8A priority Critical patent/CN116954487A/en
Publication of CN116954487A publication Critical patent/CN116954487A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a log storage method, a device and equipment, and relates to the technical field of computers, wherein the log storage method comprises the following steps: according to the coding mapping table sent by the second equipment, coding the obtained log to obtain a coded log; caching the encoded log into a buffer area; writing the encoded log in the buffer not written to the flash memory when at least one of the following conditions is satisfied: the number of encoded logs in the buffer reaches the maximum storage number of the buffer; the priority of the latest cached code log in the buffer area is higher than or equal to the first preset priority. According to the scheme, the obtained logs are subjected to coding processing, redundant information in the logs is reduced, when the number of coded logs in the buffer area reaches the condition, the coded logs which are not written into the flash memory in the buffer area are written into the flash memory, so that the frequency of erasing the flash memory can be reduced, and the service life of a storage block is prolonged to a certain extent.

Description

Log storage method, device and equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for storing logs.
Background
With the high-speed development of the 5G technology and the Internet of things technology, the data transmission capability of the embedded equipment is improved, the embedded equipment is widely applied to various fields, and a large amount of system logs can appear in the normal operation process of the embedded equipment. The logs record key information of problems of hardware, software and systems in an embedded system (embedded equipment), and technicians can locate reasons of errors of the embedded equipment through the logs, so that the method plays a key role in solving difficult problems.
At present, because the storage space and bandwidth for storing the logs in the embedded equipment are limited, if the logs are only cached in the memory, abnormal phenomena such as downtime and the like can be caused to lose the logs, so that technicians can not locate and analyze reasons, and if the logs are stored in the file system, flash memories (flash memories) can be frequently erased, so that the service life of the storage blocks is influenced.
Disclosure of Invention
The embodiment of the invention provides a log storage method, device and equipment, which are used for solving the problem that flash is frequently erased and written to a file system to influence the service life of a storage block in the prior art.
In order to solve the technical problems, the embodiment of the invention provides the following technical scheme:
In a first aspect, an embodiment of the present invention provides a log storage method, applied to a first device, where the method includes:
according to the coding mapping table sent by the second equipment, coding the obtained log to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
caching the encoded log into a buffer area;
writing the encoded log in the buffer not written to flash memory to the flash memory when at least one of the following conditions is satisfied:
the number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
Optionally, when a condition that the priority of the coded log of the latest cache in the buffer is higher than or equal to a first preset priority is satisfied, after the coded log of the buffer, which is not written into the flash memory, is written into the flash memory, the method further includes:
writing the coded log cached after the first coded log in the buffer area into the flash memory according to a first preset rule; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
Wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
n is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
Optionally, a ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
Optionally, the encoding processing is performed on the obtained log according to the encoding mapping table sent by the second device to obtain an encoded log, which includes:
acquiring a log generated by the first equipment in real time;
preprocessing the log generated in real time to obtain a preprocessed log;
and carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
Optionally, the preprocessing the log generated in real time includes at least one of the following:
Carrying out data segment segmentation on the log generated in real time;
screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
Optionally, the acquiring the log generated by the first device in real time includes at least one of the following:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
Optionally, the encoding processing is performed on the preprocessed log according to the encoding mapping table sent by the second device to obtain an encoded log, which includes:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
Optionally, after replacing the corresponding encoded value in the encoding mapping table with the character string of the data segment in the preprocessed log that is successfully matched, the method further includes:
adding verification information to the tail of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
Optionally, the method further comprises:
under the condition that the size of the log file exceeds a preset size, modifying the name of the log file into a target name;
compressing the log file corresponding to the target name to obtain a compressed log file;
deleting the log file corresponding to the target name;
the log file is a file written into the coded log in the flash memory;
the target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
Optionally, the method further comprises:
and deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
Optionally, the method further comprises:
when the first equipment is in an idle state, according to the sending identification, taking the compressed log file which is not sent to the second equipment by the first equipment as a target log file;
And sending the target log file to the second device.
In a second aspect, an embodiment of the present invention further provides a log storage method, applied to a second device, where the method includes:
acquiring a history log generated by first equipment;
generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
and sending the coding mapping table to the first device.
Optionally, the generating the coding mapping table according to the redundancy of the character strings of the data segments in the history log includes:
determining redundancy of the character strings according to the occurrence probability of the character strings of the data segments in the history log and the length of the character strings;
arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
forming the coding mapping table by the first M character strings and corresponding preset coding values respectively; m is an integer greater than or equal to 1.
Optionally, the method further comprises:
receiving a target log file sent by the first equipment;
decompressing the target log file to obtain a decompressed log file;
Obtaining a log of the first device in the decompressed log file according to the coding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
the compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
Optionally, the obtaining, according to the encoding mapping table and the decompressed log file, the log of the first device in the decompressed log file includes:
and replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, replacing the encoded value in the decompressed log file with a string corresponding to the encoded value in the encoding mapping table, to obtain a log of the first device in the decompressed log file, where the log includes:
Determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
and replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the method further comprises:
and archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
In a third aspect, an embodiment of the present invention further provides a log storage device, applied to a first apparatus, where the device includes:
the first processing module is used for carrying out coding processing on the obtained log according to the coding mapping table sent by the second equipment to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
the first storage module is used for caching the coding log to a buffer area;
the second storage module is used for writing the coded log which is not written into the flash memory in the buffer area into the flash memory when at least one of the following conditions is met:
The number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
Optionally, the apparatus further comprises:
the third storage module is used for writing the coded log which is not written into the flash memory in the buffer area into the flash memory after writing the coded log which is cached after the first coded log in the buffer area into the flash memory according to a first preset rule when the priority of the coded log which is cached latest in the buffer area is higher than or equal to a first preset priority; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
N is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
Optionally, a ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
Optionally, the first processing module includes:
the first acquisition unit is used for acquiring logs generated by the first equipment in real time;
the first processing unit is used for preprocessing the log generated in real time to obtain a preprocessed log;
and the second processing unit is used for carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
Optionally, the first processing unit is specifically configured to at least one of:
carrying out data segment segmentation on the log generated in real time;
screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
Optionally, the first obtaining unit is specifically configured to at least one of the following:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
Optionally, the second processing unit is specifically configured to:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
Optionally, the first processing module further includes:
the third processing unit is used for adding verification information to the tail end of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
Optionally, the apparatus further comprises:
the name modification module is used for modifying the name of the log file into a target name under the condition that the size of the log file exceeds a preset size;
the compression module is used for compressing the log file corresponding to the target name to obtain a compressed log file;
the first deleting module is used for deleting the log file corresponding to the target name;
the log file is a file written into the coded log in the flash memory;
The target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
Optionally, the apparatus further comprises:
and the first deleting module is used for deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
Optionally, the apparatus further comprises:
the determining module is used for taking the compressed log file which is not transmitted to the second device by the first device as a target log file according to the transmitting identification when the first device is in an idle state;
and the log file sending module is used for sending the target log file to the second equipment.
In a fourth aspect, an embodiment of the present invention further provides a log storage device, applied to a second apparatus, where the device includes:
the acquisition module is used for acquiring a history log generated by the first equipment;
the second processing module is used for generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
And the mapping table sending module is used for sending the coding mapping table to the first equipment.
Optionally, the second processing module includes:
a first determining unit, configured to determine redundancy of a character string according to an occurrence probability of the character string of a data segment in the history log and a length of the character string;
the ordering unit is used for arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
a fourth processing unit, configured to form the first M strings into the code mapping table with corresponding preset code values respectively; m is an integer greater than or equal to 1.
Optionally, the apparatus further comprises:
the receiving module is used for receiving the target log file sent by the first equipment;
the decompression module is used for decompressing the target log file to obtain a decompressed log file;
a fifth processing unit, configured to obtain a log of the first device in the decompressed log file according to the encoding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
The compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
Optionally, the fifth processing unit is specifically configured to:
and replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the fifth processing unit is specifically configured to:
determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
and replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the apparatus further comprises:
And the archiving module is used for archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, where the apparatus is a first apparatus, including: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the log storage method according to any of the first aspects.
In a sixth aspect, an embodiment of the present invention further provides an apparatus, where the apparatus is a second apparatus, including: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the log storage method of any of the second aspects.
In a seventh aspect, an embodiment of the present invention further provides a readable storage medium, on which a program is stored, which when executed by a processor, implements the steps of the log storage method according to any one of the first aspects, or implements the steps of the log storage method according to any one of the second aspects.
The beneficial effects of the invention are as follows:
according to the scheme, the obtained logs are subjected to coding processing according to the coding mapping table sent by the second device to obtain the coded logs, redundant information in the logs is reduced, the coded logs are cached to the buffer zone, and when the condition that the number of the coded logs in the buffer zone reaches at least one of the maximum storage number of the buffer zone and the priority of the coded logs cached latest in the buffer zone is higher than or equal to the first preset priority is met, the coded logs which are not written into the flash memory in the buffer zone are written into the flash memory (flash), so that the frequency of erasing the flash is reduced, and the service life of a storage block is protected to a certain extent.
Drawings
Fig. 1 shows a flowchart of a log storage method applied to a first device according to an embodiment of the present invention;
fig. 2 is a schematic diagram showing connection between a first device and a second device according to an embodiment of the present invention;
FIG. 3 shows a flowchart of writing a coded log of a buffer into a flash according to an embodiment of the present invention;
FIG. 4 shows a flowchart of a log reading module of an embedded device according to an embodiment of the present invention for reading log data;
FIG. 5 is a flowchart of a log encoding module according to an embodiment of the present invention for encoding preprocessed log data;
FIG. 6 shows a flowchart of a log storage method applied to a second device according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a method for storing logs according to an embodiment of the present invention;
FIG. 8 is a block diagram of a first device and a second device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a log storage device applied to a first device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a log storage device applied to a second apparatus according to an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of a first device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a second apparatus according to an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the drawings and the specific embodiments thereof in order to make the objects, technical solutions and advantages of the present invention more apparent.
Aiming at the problem that in the prior art, flash is frequently erased when a log is stored in a file system, and the service life of a storage block is influenced, the invention provides a log storage method, a log storage device and log storage equipment.
As shown in fig. 1, an embodiment of the present invention provides a log storage method, which is applied to a first device, and the method includes:
Step 101: according to the coding mapping table sent by the second equipment, coding the obtained log to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
in the embodiment of the present invention, the first device is an embedded device or other devices, and in the embodiment of the present invention, the first device is an embedded device, the second device is a log server, the first device and the second device are linked through a Network (Network), and a connection schematic diagram of the first device and the second device is shown in fig. 2.
The code mapping table is obtained by the log server according to the character strings of the data segments in the log (history log) file.
In this step, the embedded device is initialized through the network communication module of the embedded device, and is connected with the log server, and determines whether the locally stored code mapping table is valid or not according to comparison between the current time and the generation time of the locally stored code mapping table, if it is determined that the locally stored code mapping table is invalid (the local code mapping table is expired), the code mapping table is updated, that is, a new code mapping table is downloaded from the log server and stored in the memory. Wherein the stored code mapping table is also downloaded from the log server.
And according to the coding mapping table downloaded from the log server, coding the log to obtain a coded log.
In the step, the log is encoded through the encoding mapping table to obtain the encoded log, so that redundant information in the log can be reduced.
Step 102: and caching the encoded log into a buffer area.
In this step, the encoded log is buffered in a buffer of the embedded device, preferably a ring buffer.
Step 103: writing the encoded log in the buffer not written to flash memory to the flash memory when at least one of the following conditions is satisfied:
the number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
In this step, when the buffer area is a ring buffer area and the encoded log cached in the buffer area satisfies the storage condition, the encoded log in the ring buffer area, which is not written into the flash, is written into the flash:
the storage condition includes at least one of:
when the buffer capacity of the coded log in the annular buffer area exceeds a preset upper limit (the maximum storage quantity of the buffer area);
When the priority of the latest cached code log in the ring buffer is higher than or equal to the preset daily priority (first preset priority).
According to the embodiment of the invention, the cached logs are subjected to coding processing according to the coding mapping table, so that redundant information in the logs can be reduced, the frequency of erasing flash can be effectively reduced under the condition that the total amount of log data is the same, the service life of a storage block is protected, the coded logs are cached, and when the coded logs in the buffer area meet the storage conditions, the coded logs which are not written into the flash in the buffer area are written into the flash (nonvolatile memory), so that the frequency of erasing flash is further reduced, and the service life of the storage block is prolonged.
Optionally, when a condition that the priority of the coded log of the latest cache in the buffer is higher than or equal to a first preset priority is satisfied, after the coded log of the buffer, which is not written into the flash memory, is written into the flash memory, the method further includes:
writing the coded log cached after the first coded log in the buffer area into the flash memory according to a first preset rule; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
Wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
n is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
In the embodiment of the invention, when the buffer area is a ring buffer area and the priority of the latest cached code log in the buffer area is higher than or equal to the preset daily priority (first preset priority), the code log which is not written into the flash in the buffer area is written into the flash, at this time, the log is cached into a protection mode, under the mode, when the number of the code logs which enter the ring buffer area later reaches the first number, the first number of the code logs is written into the flash, the first number of the code logs is updated, the first number of the code logs after updating is larger than the first number of the code logs before updating, under the condition that the number of the code logs of the ring buffer area reaches the first number after updating, the first number of the code logs after updating is written into the flash until the first number after the last updating is equal to or larger than the maximum storage number of the ring buffer area, the first number of the code logs after the last updating is written into the flash, and then the normal mode is restored, or the first number of the code logs after the maximum storage number of the ring buffer area is written into the flash.
Under the normal mode, when the coded logs cached in the buffer area meet the storage conditions, the coded logs which are not written into the flash in the annular buffer area are written into the flash.
It should be noted that, in this process, if the priority of the cached encoded log is higher than or equal to the preset daily priority (the first preset priority), the encoded log in the buffer area, which is not written into the flash, is written into the flash again, and the protection mode is re-entered again, so as to repeat the above steps.
For example, if the maximum storage number of the ring buffer is 10 and the first number is 1, the first number is updated according to the rule of increasing the first number by 2, and therefore, the 5 th encoded log of the latest buffer is higher in priority than the first preset priority, and therefore, the first 5 encoded logs in the ring buffer are written into the flash, then the ring buffer buffers the 1 st encoded log after the first 5 encoded logs, writes the 1 st encoded log into the flash, the first number is updated to 3, then the 1 st encoded log, the 2 nd encoded log and the 3 rd encoded log after the 1 st encoded log are buffered in the ring buffer, the 1 st encoded log, the 2 nd encoded log and the 3 rd encoded log are written into the flash, the first number is updated to 5, then the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log and the 5 th code log after the 3 rd code log (the 1 st code log, the 2 nd code log and the 3 rd code log) are cached in the ring buffer, the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log and the 5 th code log are written into the flash, the first quantity is updated to 7, then the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log and the 5 th code log after the 5 th code log (the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log and the 5 th code log) are cached in the ring buffer, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log and the 7 th code log are written into the flash, the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log and the 7 th code log are written into the flash, the first number is updated to 9, then the 7 th code log (the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log and the 7 th code log) is cached in the ring buffer, the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log, the 7 th code log, the 8 th code log and the 9 th code log are written into the flash, the first number is updated to 11, and the first number after the update is larger than the maximum storage number of the annular buffer, so that the 9 coded logs (1 st coded log, 2 nd coded log, 3 rd coded log, 4 th coded log, 5 th coded log, 6 th coded log, 7 th coded log, 8 th coded log and 9 th coded log) are cached in the annular buffer, and the 1 st coded log, 2 nd coded log, 3 rd coded log, 4 th coded log, 5 th coded log, 6 th coded log, 7 th coded log, 8 th coded log, 9 th coded log and 10 th coded log are processed by the method of processing, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log, the 7 th code log, the 8 th code log, the 9 th code log and the 10 th code log are written into the flash, and then the normal mode is restored.
In this process, the priority of the updated first number of encoded logs buffered in the ring buffer or the maximum stored number of encoded logs in the ring buffer is lower than the first preset priority.
For another example, if the maximum storage number of the ring buffer is 8, the first number is 1, the first number is updated according to the rule that the first number is doubled (that is, the first number after updating is equal to the first number before updating multiplied by 2), so that the priority of the 3 rd encoded log in the latest buffer is higher than the first preset priority, the first 3 encoded logs in the ring buffer are written into the flash, then the ring buffer caches the 1 st encoded log behind the first 3 encoded logs, writes the 1 st encoded log into the flash, updates the first number to 2, then the ring buffer caches the 1 st encoded log behind the 1 st encoded log, the 2 nd encoded log, writes the 1 st encoded log, the 2 nd encoded log into the flash, the first number is updated to 4, then the annular buffer area caches the 1 st code log, the 2 nd code log, the 3 rd code log and the 4 th code log after the 2 nd code log (the 1 st code log, the 2 nd code log), the 3 rd code log and the 4 th code log, the 1 st code log, the 2 nd code log, the 3 rd code log and the 4 th code log are written into the flash, the first quantity is updated to 8, the first quantity after the update is equal to the maximum storage quantity of the annular buffer area, therefore, the 1 st code log, the 2 nd code log, the 3 rd code log and the 4 th code log after the 4 th code log (the 1 st code log, the 2 nd code log, the 3 rd code log, the 4 th code log, the 5 th code log, the 6 th code log, the 7 th code log and the 8 th code log are written into the flash, the normal mode is resumed.
In this process, the priority of the updated first number of encoded logs buffered in the ring buffer or the maximum stored number of encoded logs of the ring buffer is lower than the first preset priority.
After entering the protection mode, the protection mode provided by the embodiment of the invention gradually restores the maximum storage quantity of the buffer area from the first quantity of the code logs (preferably, a single code log) to store, namely gradually restores the quantity of the code logs cached according to the mode of increasing the caching frequency, and uniformly writes the code logs restored each time into the flash, so that the frequency of erasing the flash is reduced, the service life of a storage block is prolonged, and meanwhile, the problem that the key log information and the environmental log information in the current state are lost when the abnormal downtime condition occurs is effectively prevented.
It should be noted that, the above process of writing the encoded log of the buffer into the flash is performed by the log storage module of the embedded device.
Preferably, the ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
Preferably, the preset value is 2, i.e. the first number after updating is equal to the first number before updating multiplied by 2.
The following specifically describes a process of writing a coded log of a buffer area (ring buffer) into a flash according to an embodiment of the present invention with reference to fig. 3:
step 301: initializing a log storage module, configuring a current log storage mode to be a normal mode, and then executing step 302;
step 302: acquiring log data after the coding processing, namely acquiring a coding log, and then executing step 303;
step 303: judging whether the sum of the encoded log data length (encoded log number) buf_len stored in the current ring buffer and the encoded log (encoded log number) data length (encoded log number) data_len to be buffered later is smaller than or equal to the buffer space (maximum storage number of the buffer) buf_size, if the sum of the buf_len and the data_len is larger than the buf_size, executing step 310, and if the sum of the buf_len and the data_len is larger than the buf_size, executing step 304. The total length buf_len of the encoded log data stored in the current ring buffer is calculated as follows: p_write is the ring buffer write pointer offset, p_read is the ring buffer read pointer offset, buf_len=p_write-p_read if p_write > p_read; if p_write < p_read, buf_len=p_write+buf_size-p_read; buf_len=buf_size if p_write=p_read and the number of entries (number of encoded logs) num >0 of encoded logs stored in the ring buffer;
Step 304: analyzing the pri field of the encoded log data to be cached to obtain the priority field pri of the encoded log data, and then executing step 305;
step 305: adding the encoded log data to be cached to the ring buffer write pointer position, and increasing the number num of entries of the recorded encoded log by 1, followed by performing step 306;
step 306: judging whether the priority of the latest added coded log data is higher than or equal to a preset normal condition log priority critical value (first preset priority) pri_normal, wherein the higher the priority in the Linux kernel is, the smaller the value of pri is, so in this step, judging whether pri is smaller than or equal to pri_normal, if the priority of the latest added coded log data is lower than the normal condition log priority critical value, executing step 307, and if the priority of the latest added coded log data is higher than or lower than the normal condition log priority critical value, executing step 309;
step 307: judging whether the total length buf_len of the encoded log data stored in the current annular buffer area reaches or exceeds a preset log buffer length (the maximum storage quantity of the buffer area) len_max, namely whether buf_len is larger than or equal to len_max, if buf_len is larger than or equal to len_max, executing step 308, and if buf_len is smaller than len_max, executing step 313;
Step 308: judging whether the current log mode is a normal mode, if so, executing step 310, and if not, executing step 312;
step 309: if the priority of the newly added coded log data is higher than or lower than a normal condition log priority critical value, the situation that serious errors occur and abnormal downtime possibly occurs later is indicated, the current log mode is marked as a protection mode, and the number (first number) num_max of the maximum stored coded log in the protection mode is initialized to be 1;
step 310: if the current mode is the normal mode, indicating that the encoded log in the buffer area exceeds the preset upper limit of the buffered data under the normal condition, writing the encoded log data which is buffered in the current annular buffer area and is not written into the flash, and then executing step 311;
step 311: after the coded log data of the annular buffer area are written into flash for storage, the data cached in the annular buffer area are emptied, and the number num of entries of the coded log cached in the annular buffer area is initialized;
step 312: when it is determined in step 308 that the current log mode is not the normal mode (is the protection mode), the current log mode is marked as the normal mode, the maximum number of stored log data entries num_max in the protection mode is initialized to 1, and then step 310 is executed;
Step 313: if the total length buf_len of the encoded log data stored in the current ring buffer area in step 307 does not exceed the preset log buffer length len_max, judging whether the current log mode is a normal mode, if so, continuing to acquire the encoded log data, namely executing step 302, and if not, executing step 314;
step 314: if the current log mode is determined to be the protection mode in step 313, determining whether the number num of entries of the encoded log cached in the current ring buffer reaches the number num_max of the maximum stored log data entries in the protection mode, if not, continuing to obtain the encoded log data, that is, executing step 302, if so, executing step 315;
step 315: if the number num of entries of the encoded log cached in the current ring buffer reaches the number num_max of the maximum stored log data entries in the protection mode, the number num_max of the maximum stored log data entries in the protection mode is enlarged to be 2 times of the original number, and then the stored log data is written into the flash in step 310.
Optionally, the encoding processing is performed on the obtained log according to the encoding mapping table sent by the second device to obtain an encoded log, which includes:
Acquiring a log generated by the first equipment in real time;
preprocessing the log generated in real time to obtain a preprocessed log;
and carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
In the embodiment of the invention, a log reading module of the embedded equipment acquires log data (original log data) in real time, performs piece-by-piece preprocessing on the acquired log data to obtain a preprocessed log, loads a coding mapping table in a memory (downloads from a log server and stores the coded mapping table in the memory), and performs coding processing on the preprocessed log according to the coding mapping table by a log coding module of the embedded equipment to obtain a coded log.
Optionally, the preprocessing the log generated in real time includes at least one of the following:
carrying out data segment segmentation on the log generated in real time;
screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
Preprocessing the acquired log generated in real time comprises at least one of the following:
Performing data segment segmentation (line segmentation) on the log generated in real time;
filtering logs according to the priority, namely screening logs with the priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp field operation to the log generated in real time.
According to the priority filtering log, the log with the priority higher than or equal to the preset filtering priority (second preset priority) is cached or printed, and the log with the priority lower than the preset filtering priority is ignored.
Optionally, the acquiring the log generated by the first device in real time includes at least one of the following:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
In the embodiment of the invention, the log reading module of the embedded device acquires the original log data from the kernel cache_log_buf of the embedded device, and if log data of other important applications need to be added, the original log data can be acquired through the application program interface (Application Program Interface, API) of the corresponding application log.
The following describes, in detail, the process of reading log data by the log reading module of the embedded device with reference to fig. 4:
Step 401: initializing a ring buffer, loading a coding mapping table from a memory, and then executing step 402;
step 402: acquiring original log data from the kernel system log cache_log_buf, if logs of other important applications are needed to be added, acquiring the original log data through a corresponding application log API, and executing step 403;
step 403: judging whether the currently acquired log data is new log data, if so, executing step 404, otherwise, executing step 402, namely, continuing to acquire the original log data;
step 404: if step 403 determines that new original log data is obtained, the log priority field pri of the log data is parsed, and then step 405 is executed;
step 405: filtering the original log data according to the log priority field pri of the log data, if pri is lower than the log priority (the higher the priority in the Linux kernel is, the smaller the value of pri) which is preset to be stored, i.e. if pri is smaller than pri_store, not storing the log data, continuing to obtain the original log data, i.e. executing step 402, and if pri is greater than or equal to pri_store, executing step 406;
Step 406: if the log priority field pri of the log data in step 405 is higher than or equal to the log priority (second preset priority) pri_store to be stored in advance, timestamp information is added to the log data, and unified formatting is performed. Illustratively, the processed log data format is: [ timestamp ] [ pri ] [ module ] data\r\n, wherein timestamp is a log timestamp identifier, pri is a log priority identifier, module is a log module identifier, and data is a log data part.
Optionally, the encoding processing is performed on the preprocessed log according to the encoding mapping table sent by the second device to obtain an encoded log, which includes:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
In the embodiment of the invention, the process of encoding the preprocessed log by the log encoding module of the embedded device according to the encoding mapping table loaded in the memory is as follows:
and matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table, and replacing the character strings which are successfully matched with the corresponding coding values in the coding mapping table after the character strings are successfully matched with the character strings.
Further, after replacing the corresponding code value in the code mapping table with the character string of the data segment in the preprocessed log that is successfully matched, the method further includes:
adding verification information to the tail of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
And replacing the character string successfully matched with the corresponding code value in the code mapping table by the log coding module of the embedded equipment, and adding verification information indicating the offset of the code value relative to the starting position of the data segment of the character string replaced by the code value at the tail end of the character string.
The following specifically describes a process of encoding the preprocessed log data by the log encoding module of the embedded device with reference to fig. 5:
step 501: acquiring the preprocessed log data, and then executing step 502;
step 502: loading an encoding mapping table (reading the encoding mapping table) from a memory, starting to match log data (preprocessed log data) from a first character string in the encoding mapping table, wherein the encoding mapping table is a set of key value pairs formed by character strings to be replaced and corresponding encoding values, and then executing step 503;
Step 503: judging whether the mapping item exists in the currently traversed coding mapping table, namely judging whether the coding mapping table is traversed, if so, executing step 504, and if not, executing step 508;
step 504: if there is a mapping item in the coding mapping table currently, that is, if one character string in the coding mapping table is traversed, judging whether the character string to be replaced in the coding mapping table is a character string of log data (whether a character string field to be replaced belongs to log data), that is, whether the character string in the log data is successfully matched with the character string in the coding mapping table, if the character string field to be replaced belongs to log data, executing step 505, and if the character string field to be replaced does not belong to log data, executing step 507;
step 505: if the character string to be replaced in the coding mapping table is consistent with the character string of the log data, replacing the character string matched to the log data with the coding value corresponding to the mapping item, and then executing step 506;
step 506: after the encoded value is replaced, adding check information at the end of the log data and before a log ending symbol "\r\n", wherein the check information is the offset of the replaced encoded value relative to the starting position of a data segment of the log data to which the character string replaced by the encoded value belongs, and distinguishing the encoded value from the log data before the check information. For example:
The log data is: [ 01-11:39:19:846 ] [5] [ mnld ] mnld.cdo_gps_supported_hdlr 269mnl2hal_gps_status failed because of safe_sendto fail,strerror:No such file or directory \r\n
The code mapping item key value pair is: "mnl hal_gps_ status failed because of safe _sendto fail, strrror: no such file or directory", [02],
the encoded log is: [ 01-11:39:19:846 ] [5] [ mnld ] mnld.cdo_gps_stop_hdlr 269[02] r [62] r/n, if there are multiple encoded values to replace, then the relative offsets are distinguished by commas in the inspection information;
step 507 is then performed;
step 507: traversing the mapping item in the current coding mapping table to the next item, and continuously matching the character strings in the log data;
step 508: if the traversal in step 503 does not have the next mapping entry, i.e. the encoded mapping table has been traversed completely, the encoded log data is sent to the log storage module.
Optionally, the method further comprises:
under the condition that the size of the log file exceeds a preset size, modifying the name of the log file into a target name;
compressing the log file corresponding to the target name to obtain a compressed log file;
deleting the log file corresponding to the target name;
The log file is a file written into the coded log in the flash memory;
the target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
In the embodiment of the invention, if the size of the log file written into the encoded log does not exceed a set value (preset size) after the encoded log is stored into the flash, the encoded log is continuously waited for being written into the log file, if the size of the log file of the encoded log exceeds the set value, the log file is renamed into 'identification information of a first device (embedded device) plus time information (name modification timestamp) +sending identifier', the log file is compressed by a compression tool, the name of the compressed log file is unchanged, and the original log file is deleted.
Optionally, the method further comprises:
and deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
In the flash, if the number of the compressed log files exceeds the set upper limit (the maximum preset storage number) of the storable space of the log files, the compressed log files generated earliest are deleted according to the time information in the names of the compressed log files.
Optionally, the method further comprises:
when the first equipment is in an idle state, according to the sending identification, taking the compressed log file which is not sent to the second equipment by the first equipment as a target log file;
and sending the target log file to the second device.
When the embedded device belongs to an idle state, determining an undelivered compressed log file (the compressed log file which is not transmitted to the log server by the embedded device) in the compressed log files stored in the flash according to the transmission identification in the names of the compressed log files, and transmitting the undelivered compressed log file to the log server. And sending the log file when the embedded equipment is in an idle state, namely sending the log file when the embedded equipment is in a low-load state.
As shown in fig. 6, the embodiment of the present invention further provides a log storage method, which is applied to a second device, where the method includes:
Step 601: and acquiring a history log generated by the first equipment.
In the embodiment of the present invention, the first device is an embedded device or other devices, and in the embodiment of the present invention, the first device is an embedded device, and the second device is a log server, where the first device and the second device are linked through a Network (Network).
The embedded device is initialized through a network communication module of the embedded device and is connected with the log server.
In this step, the log server files the history log file produced by the embedded device and performs statistics. Preferably, the log server obtains the history log file from the embedded device according to a preset time period.
Step 602: generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the code mapping table comprises character strings of data segments and code values corresponding to the character strings.
In this step, the mapping table generating module of the log server counts the history log file, and generates the encoding mapping table by taking the redundancy of the character strings of the data segments in the history log data as the weight.
Step 603: and sending the coding mapping table to the first device.
In this step, after the code mapping table is generated, the code mapping table is sent to the embedded device, so that the embedded device performs coding processing on the obtained log according to the code mapping table, and a coded log is obtained.
In the embodiment of the invention, the mapping coding table is carried out in the log server instead of the embedded device, and statistics on each log data in the embedded device is not needed, so that the workload of the embedded device is reduced to a certain extent.
Optionally, the generating the coding mapping table according to the redundancy of the character strings of the data segments in the history log includes:
determining redundancy of the character strings according to the occurrence probability of the character strings of the data segments in the history log and the length of the character strings;
arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
forming the coding mapping table by the first M character strings and corresponding preset coding values respectively; m is an integer greater than or equal to 1.
The following describes a process of generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log: and taking the occurrence probability of the character strings of the data segments in the history log and the length of the character strings as the redundancy of the character strings in the standard calculation log, taking the first M groups according to the redundancy of the character strings, and arranging in a descending order, wherein each character string corresponds to a coding value to be replaced (a preset coding value) to form a coding mapping table.
Specifically, redundancy γ=pxlen of the character string in the log, p is the probability of occurrence of the character string, len is the character string length, and x represents multiplication.
Optionally, the method further comprises:
receiving a target log file sent by the first equipment;
decompressing the target log file to obtain a decompressed log file;
obtaining a log of the first device in the decompressed log file according to the coding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
the compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
After the log server receives the compressed log file sent by the embedded device in the idle state, a log decoding module of the log server decompresses the compressed log file and decodes the decompressed log file according to the coding mapping table to obtain the log of the embedded device. The log server determines according to which coding mapping table to decompress according to the time information in the file name of the decompressed log file. The name of the decompressed log file is consistent with the name of the compressed log file.
Optionally, the obtaining, according to the encoding mapping table and the decompressed log file, the log of the first device in the decompressed log file includes:
and replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
And when decoding operation is carried out, comparing the encoded value in the decompressed log file with the encoded value in the encoded mapping table, and replacing the encoded value in the decompressed log file with a character string corresponding to the encoded value in the encoded mapping table to obtain the log of the first device in the decompressed log file.
Optionally, replacing the encoded value in the decompressed log file with a string corresponding to the encoded value in the encoding mapping table, to obtain a log of the first device in the decompressed log file, where the log includes:
determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
And replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
That is, when decoding the encoded value of the encoded log in the decompressed log file, the encoded value to be replaced is confirmed by the check information added at the end of the encoded log at the time of encoding.
Optionally, the method further comprises:
and archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
After decoding the compressed log, the log server files the decompressed log file according to the identification information of the first device in the name of the decompressed log file.
And then, the technician can analyze according to the log file of the embedded device corresponding to the decompressed log file request filed in the log server, thereby solving the problem of equipment abnormality.
The overall flow of the log storage method provided by the embodiment of the present invention is described below with reference to fig. 7 and fig. 8, where fig. 7 shows an overall flow chart of the log storage method provided by the embodiment of the present invention, and fig. 8 shows block diagrams in the first device and the second device provided by the embodiment of the present invention:
Step 701: initializing a network communication module in the embedded equipment and establishing connection with a log server;
step 702: the network communication module judges whether the local coding mapping table is effective or not according to the current time and the generation time of the local coding mapping table, if not, the network communication module downloads the coding mapping table from the log server (the mapping table coding is carried out log statistics by the log server and is generated by the mapping table generation module of the log server);
step 703: the network communication module reads the downloaded coding mapping table file and loads the file into a process memory for reading when the log codes;
step 704: a log reading module in the embedded equipment circularly reads system log data in the kernel cache_log_buf and application log data (read through a klogctl function) in a target application log interface needing to be concerned;
step 705: the log reading module preprocesses the read log data, wherein the log data comprises a log priority data segment, and at least one operation of adding a time stamp to the log needing to be stored is performed by filtering the log needing not to be stored through priority;
step 706: the method comprises the steps that a log coding module in the embedded equipment codes a preprocessed log according to a coding mapping table in a loaded memory, and the coded log data is cached in a ring buffer;
Step 707: the log coding module writes the log data cached in the annular buffer area into the flash according to the storage condition;
step 708: the method comprises the steps that a complete log file written by a log coding module is compressed through a compression tool, and a compressed log file is obtained;
step 709: when the embedded equipment is idle, the network communication module sends the compressed log file to a log server;
step 710: and the log decoding module of the log server decompresses and decodes the received compressed log file according to the corresponding coding mapping table, and files the decompressed log file after decoding according to the identification information of the embedded equipment.
As shown in fig. 9, an embodiment of the present invention further provides a log storage device, applied to a first apparatus, where the device includes:
the first processing module 901 is configured to perform encoding processing on the obtained log according to the encoding mapping table sent by the second device, so as to obtain an encoded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
a first storage module 902, configured to cache the encoded log into a buffer;
a second storage module 903, configured to write the encoded log that is not written to the flash memory in the buffer into the flash memory when at least one of the following conditions is satisfied:
The number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
Optionally, the apparatus further comprises:
the third storage module is configured to, when a condition that a priority of the coded log that is newly cached in the buffer area is higher than or equal to a first preset priority is satisfied, write the coded log that is not written into the flash memory in the buffer area into the flash memory, and then write the coded log that is cached after the first coded log in the buffer area into the flash memory according to a first preset rule; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
N is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
Optionally, a ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
Optionally, the first processing module 901 includes:
the first acquisition unit is used for acquiring logs generated by the first equipment in real time;
the first processing unit is used for preprocessing the log generated in real time to obtain a preprocessed log;
and the second processing unit is used for carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
Optionally, the first processing unit is specifically configured to at least one of:
carrying out data segment segmentation on the log generated in real time;
screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
Optionally, the first obtaining unit is specifically configured to at least one of the following:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
Optionally, the second processing unit is specifically configured to:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
Optionally, the first processing module 901 further includes:
the third processing unit is used for adding verification information to the tail end of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
Optionally, the apparatus further comprises:
the name modification module is used for modifying the name of the log file into a target name under the condition that the size of the log file exceeds a preset size;
the compression module is used for compressing the log file corresponding to the target name to obtain a compressed log file;
the first deleting module is used for deleting the log file corresponding to the target name;
the log file is a file written into the coded log in the flash memory;
The target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
Optionally, the apparatus further comprises:
and the first deleting module is used for deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
Optionally, the apparatus further comprises:
the determining module is used for taking the compressed log file which is not transmitted to the second device by the first device as a target log file according to the transmitting identification when the first device is in an idle state;
and the log file sending module is used for sending the target log file to the second equipment.
It should be noted that, the log storage device applied to the first device provided in the embodiment of the present invention is a device capable of executing the log storage method applied to the first device, and all embodiments of the log storage method applied to the first device described above are applicable to the device, and the same or similar technical effects can be achieved.
As shown in fig. 10, an embodiment of the present invention further provides a log storage device, applied to a second apparatus, where the device includes:
an obtaining module 1001, configured to obtain a history log generated by a first device;
a second processing module 1002, configured to generate a coding mapping table according to redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
a mapping table sending module 1003, configured to send the encoding mapping table to the first device.
Optionally, the second processing module 1002 includes:
a first determining unit, configured to determine redundancy of a character string according to an occurrence probability of the character string of a data segment in the history log and a length of the character string;
the ordering unit is used for arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
a fourth processing unit, configured to form the first M strings into the code mapping table with corresponding preset code values respectively; m is an integer greater than or equal to 1.
Optionally, the apparatus further comprises:
the receiving module is used for receiving the target log file sent by the first equipment;
The decompression module is used for decompressing the target log file to obtain a decompressed log file;
a fifth processing unit, configured to obtain a log of the first device in the decompressed log file according to the encoding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
the compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
Optionally, the fifth processing unit is specifically configured to:
and replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the fifth processing unit is specifically configured to:
determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
And replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the apparatus further comprises:
and the archiving module is used for archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
It should be noted that, the log storage device applied to the second device provided in the embodiment of the present invention is a device capable of executing the log storage method applied to the second device, and all embodiments of the log storage method applied to the second device described above are applicable to the device, and the same or similar technical effects can be achieved.
As shown in fig. 11, the embodiment of the present invention further provides an apparatus, where the apparatus is a first apparatus, and includes: a processor 1100; and a memory 1110 connected to the processor 1100 through a bus interface, the memory 1110 storing programs and data used by the processor 1100 in performing operations, the processor 1100 calling and executing the programs and data stored in the memory 1110.
Wherein the receiving end device further comprises a transceiver 1120, the transceiver 1120 is connected to the bus interface, and is used for receiving and transmitting data under the control of the processor 1100;
specifically, the processor 1100 performs the following process:
according to the coding mapping table sent by the second equipment, coding the obtained log to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
caching the encoded log into a buffer area;
writing the encoded log in the buffer not written to flash memory to the flash memory when at least one of the following conditions is satisfied:
the number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
Optionally, the processor 1100 is further configured to: when the condition that the priority of the coded log which is cached in the latest buffer area is higher than or equal to a first preset priority is met, writing the coded log which is not written into the flash memory in the buffer area into the flash memory, and writing the coded log which is cached after the first coded log in the buffer area into the flash memory according to a first preset rule; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
Wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
n is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
Optionally, a ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
Optionally, the processor 1100 is specifically configured to:
acquiring a log generated by the first equipment in real time;
preprocessing the log generated in real time to obtain a preprocessed log;
and carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
Optionally, the processor 1100 is specifically configured to at least one of:
carrying out data segment segmentation on the log generated in real time;
Screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
Optionally, the processor 1100 is specifically configured to at least one of:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
Optionally, the processor 1100 is specifically configured to:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
Optionally, the processor 1100 is specifically configured to:
adding verification information to the tail of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
Optionally, the processor 1100 is further configured to:
under the condition that the size of the log file exceeds a preset size, modifying the name of the log file into a target name;
Compressing the log file corresponding to the target name to obtain a compressed log file;
deleting the log file corresponding to the target name;
the log file is a file written into the coded log in the flash memory;
the target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
Optionally, the processor 1100 is further configured to:
and deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
Optionally, the processor 1100 is further configured to:
when the first equipment is in an idle state, according to the sending identification, taking the compressed log file which is not sent to the second equipment by the first equipment as a target log file;
optionally, the transceiver 1120 is further configured to:
and sending the target log file to the second device.
Where in FIG. 11, a bus architecture may comprise any number of interconnected buses and bridges, with various circuits of the one or more processors, specifically represented by processor 1100, and the memory, represented by memory 1110, being linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides a user interface 1130. The transceiver 1120 may be a number of elements, i.e. comprising a transmitter and a receiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 1100 is responsible for managing the bus architecture and general processing, and the memory 1110 may store data used by the processor 1100 in performing operations.
As shown in fig. 12, the embodiment of the present invention further provides an apparatus, where the apparatus is a second apparatus, and includes: a processor 1200; and a memory 1210 connected to the processor 1200 through a bus interface, the memory 1210 being used for storing programs and data used by the processor 1200 when performing operations, the processor 1200 calling and executing the programs and data stored in the memory 1210.
Wherein the receiving-side device further comprises a transceiver 1220, the transceiver 1220 is connected to the bus interface, and is used for receiving and transmitting data under the control of the processor 1200;
specifically, the processor 1200 performs the following process:
acquiring a history log generated by first equipment;
generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
the transceiver 1220 performs the following process:
and sending the coding mapping table to the first device.
Optionally, the processor 1200 is specifically configured to:
determining redundancy of the character strings according to the occurrence probability of the character strings of the data segments in the history log and the length of the character strings;
arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
forming the coding mapping table by the first M character strings and corresponding preset coding values respectively; m is an integer greater than or equal to 1.
Optionally, the transceiver 1220 is further configured to:
receiving a target log file sent by the first equipment;
the processor 1200 is further configured to:
Decompressing the target log file to obtain a decompressed log file;
obtaining a log of the first device in the decompressed log file according to the coding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
the compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
Optionally, the processor 1200 is specifically configured to:
and replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the processor 1200 is specifically configured to:
determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
And replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
Optionally, the processor 1200 is further specifically configured to:
and archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
Wherein in fig. 12, a bus architecture may comprise any number of interconnected buses and bridges, and in particular, one or more processors represented by processor 1200 and various circuits of memory represented by memory 1210, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides a user interface 1230. The transceiver 1220 may be a number of elements, i.e. include a transmitter and a receiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 1200 is responsible for managing the bus architecture and general processing, and the memory 1210 may store data used by the processor 1200 in performing operations.
In addition, a specific embodiment of the present application also provides a readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the steps in the log storage method applied to the first device as set forth in any one of the above, or implements the steps in the log storage method applied to the second device as set forth in any one of the above.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the transceiving method according to the embodiments of the present invention. And the aforementioned storage medium includes: 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.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and changes can be made without departing from the principles of the present invention, and such modifications and changes are intended to be within the scope of the present invention.

Claims (22)

1. A method of log storage, for use with a first device, the method comprising:
according to the coding mapping table sent by the second equipment, coding the obtained log to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
Caching the encoded log into a buffer area;
writing the encoded log in the buffer not written to flash memory to the flash memory when at least one of the following conditions is satisfied:
the number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
2. The log storage method according to claim 1, wherein when a condition that a priority of the encoded log newly cached in the buffer is higher than or equal to a first preset priority is satisfied, after writing the encoded log in the buffer, which is not written to a flash memory, to the flash memory, the method further comprises:
writing the coded log cached after the first coded log in the buffer area into the flash memory according to a first preset rule; the first coded log is the coded log which is cached latest in the buffer area and has a priority higher than or equal to a first preset priority;
wherein, the first preset rule includes:
writing a first number of coded logs into the flash memory, updating the first number of coded logs, and writing the updated first number of coded logs into the flash memory until the first number of N updates is equal to or greater than the maximum storage number of the buffer area after the first number of N updates, and writing the maximum storage number of coded logs of the buffer area into the flash memory;
N is an integer greater than or equal to 1;
the first number of nth updates is greater than the first number of N-1 th updates.
3. The method of claim 2, wherein a ratio of the first number of nth updates to the first number of N-1 th updates is a preset value.
4. The method for storing a log according to claim 1, wherein the encoding the obtained log according to the encoding mapping table sent by the second device to obtain an encoded log includes:
acquiring a log generated by the first equipment in real time;
preprocessing the log generated in real time to obtain a preprocessed log;
and carrying out coding processing on the preprocessed log according to the coding mapping table sent by the second equipment to obtain a coded log.
5. The method of claim 4, wherein preprocessing the log generated in real time comprises at least one of:
carrying out data segment segmentation on the log generated in real time;
screening logs with priority higher than or equal to a second preset priority from the logs generated in real time;
and adding a log generation time stamp to the log generated in real time.
6. The method of storing logs in accordance with claim 4, wherein said obtaining logs generated in real time by said first device comprises at least one of:
acquiring a log cached by a kernel of the first device;
and acquiring a log from an application program interface API of the application log of the first device.
7. The method for storing a log according to claim 4, wherein the encoding the preprocessed log according to the encoding mapping table sent by the second device to obtain an encoded log includes:
matching the character strings of the data segments in the preprocessed log with the character strings in the coding mapping table;
and replacing the corresponding coding value in the coding mapping table with the character string of the data segment in the preprocessed log successfully matched to obtain the coding log.
8. The method according to claim 7, wherein after replacing the corresponding encoded value in the encoded mapping table with the character string of the data segment in the preprocessed log that is successfully matched, the method further comprises:
adding verification information to the tail of the preprocessed log after the encoded value is replaced; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs.
9. The log storage method of claim 1, wherein the method further comprises:
under the condition that the size of the log file exceeds a preset size, modifying the name of the log file into a target name;
compressing the log file corresponding to the target name to obtain a compressed log file;
deleting the log file corresponding to the target name;
the log file is a file written into the coded log in the flash memory;
the target name comprises identification information of the first device, a name modification timestamp of the target name and a sending identification; the transmission identifier is used for indicating whether the compressed log file is transmitted to the second device by the first device.
10. The log storage method as defined in claim 9, wherein the method further comprises:
and deleting the compressed log files corresponding to the earliest name modification timestamp according to the target name under the condition that the number of the log files in the flash memory exceeds the maximum preset storage number.
11. The log storage method as defined in claim 9, wherein the method further comprises:
When the first equipment is in an idle state, according to the sending identification, taking the compressed log file which is not sent to the second equipment by the first equipment as a target log file;
and sending the target log file to the second device.
12. A log storage method, applied to a second device, the method comprising:
acquiring a history log generated by first equipment;
generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
and sending the coding mapping table to the first device.
13. The method of claim 12, wherein generating the code mapping table according to the redundancy of the strings of the data segments in the history log comprises:
determining redundancy of the character strings according to the occurrence probability of the character strings of the data segments in the history log and the length of the character strings;
arranging the character strings according to the sequence from high redundancy to low redundancy of the character strings;
forming the coding mapping table by the first M character strings and corresponding preset coding values respectively; m is an integer greater than or equal to 1.
14. The log storage method as defined in claim 12, wherein the method further comprises:
receiving a target log file sent by the first equipment;
decompressing the target log file to obtain a decompressed log file;
obtaining a log of the first device in the decompressed log file according to the coding mapping table and the decompressed log file;
the target log file is a compressed log file which is not sent to the second device by the first device when the first device is in an idle state;
the compressed log file is obtained by compressing the log file by the first device;
the log file is a file of a coded log written in a flash memory of the first device;
the encoded log is obtained by the first device performing encoding processing on the obtained log according to the encoding mapping table.
15. The method for storing logs according to claim 14, wherein the obtaining the log of the first device in the decompressed log file according to the encoding mapping table and the decompressed log file includes:
And replacing the coded value in the decompressed log file with a character string corresponding to the coded value in the coding mapping table to obtain the log of the first device in the decompressed log file.
16. The method for storing logs according to claim 15, wherein replacing the encoded value in the decompressed log file with the string corresponding to the encoded value in the encoding mapping table, to obtain the log of the first device in the decompressed log file, includes:
determining a coding value in the coding log according to the verification information of the end of the coding log in the decompressed log file; the verification information is used for indicating the offset of the coding value relative to the starting position of the data segment to which the character string replaced by the coding value belongs;
and replacing the coding value with a corresponding character string in the coding mapping table to obtain the log of the first device in the decompressed log file.
17. The log storage method as defined in claim 14, wherein the method further comprises:
and archiving the decompressed log file according to the identification information of the first equipment in the target name corresponding to the decompressed log file.
18. A log storage apparatus for use with a first device, the apparatus comprising:
the first processing module is used for carrying out coding processing on the obtained log according to the coding mapping table sent by the second equipment to obtain a coded log; the code mapping table comprises character strings of data segments in the log and code values corresponding to the character strings;
the first storage module is used for caching the coding log to a buffer area;
the second storage module is used for writing the coded log which is not written into the flash memory in the buffer area into the flash memory when at least one of the following conditions is met:
the number of encoded logs in the buffer reaches a maximum storage number of the buffer;
the priority of the coded log cached latest in the buffer area is higher than or equal to a first preset priority.
19. A log storage apparatus for use with a second device, the apparatus comprising:
the acquisition module is used for acquiring a history log generated by the first equipment;
the second processing module is used for generating a coding mapping table according to the redundancy of the character strings of the data segments in the history log; the coding mapping table comprises character strings of data segments and coding values corresponding to the character strings;
And the mapping table sending module is used for sending the coding mapping table to the first equipment.
20. An apparatus, the apparatus being a first apparatus, comprising: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the log storage method of any of claims 1 to 11.
21. An apparatus, the apparatus being a second apparatus, comprising: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the log storage method of any of claims 12 to 17.
22. A readable storage medium, characterized in that the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of the log storage method according to any one of claims 1 to 11 or the steps of the log storage method according to any one of claims 12 to 17.
CN202211234901.8A 2022-10-10 2022-10-10 Log storage method, device and equipment Pending CN116954487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211234901.8A CN116954487A (en) 2022-10-10 2022-10-10 Log storage method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211234901.8A CN116954487A (en) 2022-10-10 2022-10-10 Log storage method, device and equipment

Publications (1)

Publication Number Publication Date
CN116954487A true CN116954487A (en) 2023-10-27

Family

ID=88455334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211234901.8A Pending CN116954487A (en) 2022-10-10 2022-10-10 Log storage method, device and equipment

Country Status (1)

Country Link
CN (1) CN116954487A (en)

Similar Documents

Publication Publication Date Title
US7281006B2 (en) System and method for dividing data into predominantly fixed-sized chunks so that duplicate data chunks may be identified
US6925467B2 (en) Byte-level file differencing and updating algorithms
US9454318B2 (en) Efficient data storage system
US10915247B2 (en) Efficient data management through compressed data interfaces
US7359956B2 (en) Data transfer scheme using caching and differential compression techniques for reducing network load
US9319489B2 (en) Nearstore compression of data in a storage system
US8135683B2 (en) Method and apparatus for data redundancy elimination at the block level
CN105009067B (en) Managing operations on units of stored data
US7065619B1 (en) Efficient data storage system
CN111190928A (en) Cache processing method and device, computer equipment and storage medium
US7680998B1 (en) Journaled data backup during server quiescence or unavailability
EP0981099A2 (en) A method of and an apparatus for merging a sequence of delta files
US20010042222A1 (en) System and method for reconstructing data associated with protected storage volume stored in multiple modules of back-up mass data storage facility
WO2007138461A2 (en) Method and a system for obtaining differential backup
WO2003092166A1 (en) An apparatus for continuous compression of large volumes of data
CN110888603B (en) High concurrency data writing method, device, computer equipment and storage medium
CN111104052A (en) Method, apparatus and computer program product for storing data
WO2002008956A1 (en) Focal point compression method and apparatus
CN116954487A (en) Log storage method, device and equipment
CN112948437B (en) Global frequency control system and method under high concurrency of big data
US8244677B2 (en) Focal point compression method and apparatus
CN111858490B (en) Distributed database storage communication compression method based on dbDedup
US20170048303A1 (en) On the fly statistical delta differencing engine
CN117527780A (en) Mirror image transmission method, device, equipment and storage medium
CN117170726A (en) Differential upgrading method of low resources and embedded equipment

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