## 1 Introduction  
In modern data outsourcing systems, owing to the rapid development and popularization of video surveillance technology, video anomaly detection [1] and event recognition have become hot research directions in computer vision. These technologies are important in improving public safety and optimizing urban operations. However, with the dramatic increase in data volume and diversification of access requirements, ensuring the security and privacy of video data has become particularly critical [2]. Attribute-based encryption (ABE) and public key searchable encryption (PEKS) technologies have shown unique advantages in this context, enabling data owners to securely encrypt data based on specific user attributes [3] or predetermined access policies while ensuring the searchability of the encrypted content [4]. Although these encryption schemes offer flexible data access control, they face challenges in dynamic environments, especially when user attributes or permissions change frequently [5, 6]. For example, in video surveillance, when abnormal behavior or significant events are detected [7], it is essential to rapidly update access rights and search conditions [8, 9] so that only authorized users can access and analyze the relevant video clips. Traditional ABE and PEKS schemes often require re-encrypting data or updatingencryption keys for all affected users, increasing system complexity [10] and reducing operational efficiency. To address these issues, this paper proposes a new ciphertext and keyword index update mechanism, which could be especially important in the context of video anomaly detection and behavior understanding. We utilize a user-managed tree structure to efficiently handle attribute and keyword revocation and updates, allowing the methodology to respond quickly to dynamic needs without sacrificing security or flexibility. This approach mitigates the limitations of traditional ABE and PEKS schemes and enhances the search efficiency of encrypted video data using inverted indexing. In addition, considering that video data may contain personal private and sensitive information [11], this paper also explores how to effectively protect video content and prevent unauthorized access and data leakage through fine-grained permission control and encryption technology. This is especially important for anomaly detection and behavior analysis in public safety fields [12; 13; 14] such as urban monitoring and traffic management systems. The widespread use of video surveillance systems has intensified the need for effective video data access control and privacy protection. The increase in the use of cloud services further complicates this, as dynamic changes in user attributes and search permissions demand rapid responses. In this context, we face the following two primary challenges:  
* _Dynamic permission update._ How do we update the ciphertext and keyword index in an efficient and timely manner without degrading the overall performance? In video surveillance systems, it is crucial to quickly adjust access rights after event detection. * _Data security and privacy protection._ How do we maintain strong data security and privacy protection during user attribute or keyword revocation, especially in an untrusted third-party environment? These challenges require us to not only optimize the encryption and index update mechanism but also ensure that we can handle the high-speed video data stream generated while protecting privacy. Compared to existing ABE-based revocation schemes that typically support either attribute-level or keyword-level revocation independently, our approach integrates both of these mechanisms into a unified framework suitable for dynamic environments like video surveillance. Unlike prior works that rely on time synchronization, periodic re-encryption, or static policies, our scheme supports real-time revocation and efficient encrypted searching without significant computational overhead.