The application discloses a
virus searching and killing method and
system for distributed energy safety data, relates to the field of
virus processing, and comprises the following steps: acquiring a
virus original characteristic code, splitting the original characteristic code into N discontinuous but sequentially fixed segments F i , calculating the starting offset S i of each segment F i relative to the first segment F1, and constructing a virus characteristic
database; then, the
data stream is divided into multiple data blocks B i of fixed size, a fixed-size sliding window is adopted to perform scanning and matching association, and finally, threshold judgment is performed; the original virus characteristic code is subjected to fragmentation
processing, the storage requirement of the virus characteristic
database is reduced; the sliding window scanning can ensure that any characteristic combination is covered, and a matching event FP i is recorded instead of
full data, so that the memory occupation is reduced; through comparison of the absolute offset SB i with an expected position, the correct sequence of the segment in the virus is ensured, a state
machine can track the matching progress in real time, and the weight of only the segment with correct sequence is accumulated, so that the detection reliability is improved.