Search

CN-121996629-A - Log data processing method, device, terminal and computer readable storage medium

CN121996629ACN 121996629 ACN121996629 ACN 121996629ACN-121996629-A

Abstract

The embodiment of the application discloses a log data processing method, a device, a terminal and a computer readable storage medium, wherein the method comprises the steps of obtaining a target original log generated by a target object and a log operation type of the target original log, then determining a target storage log jointly related with the target object and the log operation type, obtaining operation time information from the target original log, performing target system mapping processing on the operation time information to obtain time merging data, and finally performing time merging processing on the time merging data by utilizing time merging codes in the target storage log to store the log information of the target original log, thereby solving the technical problem that a large amount of time dimension change often occupies a large disk space when the target original log is stored.

Inventors

  • LIANG JINGBIAO

Assignees

  • 三六零数字安全科技集团有限公司

Dates

Publication Date
20260508
Application Date
20241105

Claims (10)

  1. 1. A log data processing method, wherein the method comprises: Acquiring a target original log generated by a target object and a log operation type of the target original log; Determining a target storage log which is commonly associated with the target object and the log operation type, acquiring operation time information from the target original log, and performing target system mapping processing on the operation time information to obtain time to-be-merged data; and carrying out time merging processing on the time to-be-merged data by utilizing the time merging code in the target storage log so as to store log information of the target original log.
  2. 2. The method of claim 1, wherein the performing the target binary mapping process on the operation time information to obtain time to-be-merged data comprises: Determining year information, month information, and date information based on the operation time information; performing first binary mapping processing on the year information to obtain year information to-be-merged data, performing second binary mapping processing on the month information to obtain month information to-be-merged data, and performing third binary mapping processing on the date information to obtain date information to-be-merged data; And carrying out data splicing processing on the annual information to-be-merged data, the month information to-be-merged data and the date information to-be-merged data to obtain time to-be-merged data.
  3. 3. The method of claim 2, wherein the performing the first binary mapping process on the year information to obtain year information to-be-merged data includes: determining a first binary code of 4 multiplied by N bits, and performing code separation processing on the first binary code according to a code sequence to obtain four binary code segments sequenced in sequence in the first binary code, wherein N is a positive integer greater than or equal to 9, the total bit number of the binary code segments is N, and the codes on all code bits in the binary code segments are 0; Determining four year bit information sequentially ordered in the year information, and determining binary coding segments and year bit information which are matched with each other based on the ordering sequence of the binary coding segments and the ordering sequence of the year bit information; And determining a first target coding bit number based on the numerical value of the year bit information, assigning 1 to the coding of the first target coding bit number in the binary coding segments matched with the year bit information, and determining the data to be merged of the year information by utilizing each assigned binary coding segment.
  4. 4. The method of claim 2, wherein the performing the second binary mapping process on the month information to obtain month information to-be-merged data includes: Determining a second binary code of M bits, wherein M is a positive integer greater than or equal to 12, and the codes on all code bits in the second binary code are 0; And determining a second target coding bit based on the value of the month information, assigning 1 to the second target coding bit in the second binary code, and determining month information to-be-merged data by using the assigned second binary code.
  5. 5. The method of claim 2, wherein performing a third mapping process on the date information to obtain date information to-be-merged data, includes: Acquiring the total number of month corresponding to the month information, determining a target value corresponding to the total number of month, and generating a third binary code of the target value bit, wherein the code on each code bit in the third binary code is 0; And determining a third target coding bit number based on the value of the date information, assigning a value of 1 to the third target coding bit number in the third binary code, and determining date information to be merged data by using the assigned third binary code.
  6. 6. The method of claim 2, wherein the time-merging the time-to-be-merged data with the time-merging code in the target storage log comprises: Performing binary conversion processing on the time merging codes in the target storage log to obtain time merging binary codes; Information updating processing is carried out on the time merging binary code based on the time merging data to obtain a target time merging binary code; and performing decimal conversion processing on the target time merging decimal code to obtain a target time merging decimal code, and taking the target time merging decimal code as a time merging code.
  7. 7. The method of claim 6, wherein the time merging binary code comprises a year information merging code segment, a month information merging code segment, a date information merging code segment and an associated information merging code segment, wherein the processing of information updating the time merging binary code based on the time to-be-merged data to obtain a target time merging binary code comprises the following steps: Determining a first coding bit number in the year information merging coding section based on the year information to-be-merged data, and updating the coding of the first coding bit number; determining a second coding bit in the month information merging coding section based on the month information merging data, and updating the coding of the second coding bit; determining a third coding bit in the date information merging coding section based on the date information to-be-merged data, and updating the coding of the third coding bit; Performing coding bit correlation processing on the first coding bit, the second coding bit and the third coding bit to obtain coding bit correlation information, and updating the correlation information merging coding section based on the coding bit correlation information; And determining a target time merging binary code based on the updated year information merging coding section, month information merging coding section, date information merging coding section and associated information merging coding section.
  8. 8. A log data processing apparatus, wherein the apparatus comprises: the acquisition module is suitable for acquiring a target original log generated by a target object and a log operation type of the target original log; The determining module is suitable for determining a target storage log which is commonly associated with the target object and the log operation type, acquiring operation time information from the target original log, and performing target system mapping processing on the operation time information to obtain time to-be-merged data; and the storage module is suitable for carrying out time merging processing on the time merging data by utilizing the time merging code in the target storage log so as to store log information of the target original log.
  9. 9. A terminal, wherein the terminal comprises: processor, and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1 to 7.

Description

Log data processing method, device, terminal and computer readable storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a log data processing method, device, terminal, and computer readable storage medium. Background With the rapid development of computer technology, a large number of specific target original logs are generated by the application on the terminal in the running process, and the target original data of the same class are basically consistent with other data except for the change in the time dimension, however, a large number of target original logs often occupy a large disk space to be stored. Disclosure of Invention The embodiment of the application provides a log data processing method, a log data processing device, a log data processing terminal and a log data processing computer readable storage medium, which can solve the technical problem that a large amount of time dimension change target original logs are stored to occupy a large disk space. In a first aspect, an embodiment of the present application provides a log data processing method, where the method includes: Acquiring a target original log generated by a target object and a log operation type of the target original log; Determining a target storage log which is commonly associated with the target object and the log operation type, acquiring operation time information from the target original log, and performing target system mapping processing on the operation time information to obtain time to-be-merged data; and carrying out time merging processing on the time to-be-merged data by utilizing the time merging code in the target storage log so as to store log information of the target original log. Optionally, the performing the target binary mapping processing on the operation time information to obtain time to-be-merged data includes: Determining year information, month information, and date information based on the operation time information; performing first binary mapping processing on the year information to obtain year information to-be-merged data, performing second binary mapping processing on the month information to obtain month information to-be-merged data, and performing third binary mapping processing on the date information to obtain date information to-be-merged data; And carrying out data splicing processing on the annual information to-be-merged data, the month information to-be-merged data and the date information to-be-merged data to obtain time to-be-merged data. Optionally, the performing a first binary mapping process on the year information to obtain year information to-be-merged data includes: determining a first binary code of 4 multiplied by N bits, and performing code separation processing on the first binary code according to a code sequence to obtain four binary code segments sequenced in sequence in the first binary code, wherein N is a positive integer greater than or equal to 9, the total bit number of the binary code segments is N, and the codes on all code bits in the binary code segments are 0; Determining four year bit information sequentially ordered in the year information, and determining binary coding segments and year bit information which are matched with each other based on the ordering sequence of the binary coding segments and the ordering sequence of the year bit information; And determining a first target coding bit number based on the numerical value of the year bit information, assigning 1 to the coding of the first target coding bit number in the binary coding segments matched with the year bit information, and determining the data to be merged of the year information by utilizing each assigned binary coding segment. Optionally, the performing a second binary mapping process on the month information to obtain month information to-be-merged data includes: Determining a second binary code of M bits, wherein M is a positive integer greater than or equal to 12, and the codes on all code bits in the second binary code are 0; And determining a second target coding bit based on the value of the month information, assigning 1 to the second target coding bit in the second binary code, and determining month information to-be-merged data by using the assigned second binary code. Optionally, performing a third mapping process on the date information to obtain date information to-be-merged data, including: Acquiring the total number of month corresponding to the month information, determining a target value corresponding to the total number of month, and generating a third binary code of the target value bit, wherein the code on each code bit in the third binary code is 0; And determining a third target coding bit number based on the value of the date information, assigning a value of 1 to the third target coding bit number in the third binary code, and determining date information to be merged data by using the assigned