The application discloses a
content security protection method, an electronic device and a computer readable storage medium, relates to the technical field of
artificial intelligence security, and comprises the following steps: dividing to-be-protected content into at least one slice of binding
metadata, solving the problem of extensive
pollution positioning, and realizing accurate positioning at the slice level; determining the comprehensive judgment result of the slice through multi-factor quantitative scoring and a
multiple injection detection mechanism, solving the problem of high detection missing rate, and realizing quantifiable and accurate detection; performing reservation, marking or isolation
processing on the slice according to the comprehensive judgment result, extracting factual elements from the isolated slice to construct a safe context, solving the problems of detection interruption and
information loss, and realizing the isolation of
pollution without interrupting the task; while continuing to execute the task under the safe context, implementing gating on tool calling, output content and memory writing, solving the problems of
pollution cross-round
diffusion and tool chain risk amplification, and realizing adaptive protection of risk
perception.