The invention discloses a
log data compression and retrieval method and
electronic equipment, and the method comprises the steps: obtaining to-be-compressed
log data, dividing vocabularies, traversing the vocabularies, and searching a current traversed vocabulary in a dictionary tree; if so, obtaining a target ID mapped in the dictionary tree; determining a target hash value and searching a corresponding
linked list; if a node for recording the storage information of the
log data exists in the
linked list, triggering compression, otherwise, adding a corresponding node in the
linked list and then triggering compression, and generating an alarm when abnormity occurs based on the frequency of vocabularies in the dictionary tree; when the compression is triggered, replacing the current vocabulary with the target ID; and traversing the next vocabulary until traversing is finished, updating corresponding storage information, determining an ID in the dictionary tree according to the retrieved vocabulary during retrieval, searching the corresponding linked
list, and decompressing log data corresponding to the storage information in the linked
list by utilizing mapping of the ID recorded in the linked
list to the vocabulary. Therefore, the problems of complex
data management and high maintenance cost caused by separation of compression and index in the prior art are solved.