# How Can We Achieve Query Keyword Frequency Analysis in Privacy-Preserving Situations?
## 1 Introduction  
With the exponential growth in massive data generated by the internet of things [1; 2], traditional storage systems are struggling to meet the storage demands. As a result, cloud storage technology [3] based on cloud computing has gained popularity among businesses and individuals for its scalability and flexibility.  
Despite the rapid and recent development of cloud storage technology, most businesses and individuals prefer to encrypt their important data before uploading it to a cloud server, due to concerns about data security. This does effectively guarantee the security of data; however, it also makes it difficult to retrieve and analyze the encrypted data.  
Searchable encryption (SE) is a robust solution that addresses the challenge of searching encrypted data while preserving data confidentiality. The concept of public key encryption with keyword search (PEKS) was introduced by [PERSON] [4] et al. in their seminal work. A PEKS scheme typically involves three entities: a data owner, a data user, and a cloud server. To share data with data users, the data owner extracts keywords from files and encrypts them with the public key of the designated data user, thereby generating searchable ciphertexts. The data owner then sends the searchable ciphertext, together with the corresponding files, to the cloud server. Subsequently, the designated data user is the only entity capable of generating a query trapdoor, by using their private key and specifying a keyword of interest. The generated query trapdoor is then sent to the cloud server to retrieve the associated file. Finally, the cloud server will match the searchable ciphertext with the query trapdoor one-by-one, and send the matching result to the datauser. Since SE was proposed, it has been applied in many fields, such as online medical care [5; 6], cloud manufacturing [7], etc.  
In many instances of cloud storage applications, counting the frequency of keyword queries is important to improve the search experience of users. For example, in a cloud manufacturing system [7], an upstream supplying plant (the data owner) will encrypt some production data from its workshop and store the ciphertext on a cloud server. Subsequently, the service platform providing the ciphertext retrieval service can respond to the search request of the purchasing company (the data users), and provide the supply factory that meets their needs. If another service platform that provides keyword frequency analysis services can analyze the frequency of the query keywords while ensuring the privacy of the purchasing company, the user's search experience can be significantly optimized (e.g., by placing the data of the most frequent keywords in the best position in the database). Meanwhile, the cloud server shares analysis results with upstream supply factories, which can also help factories to make targeted production adjustments, thus greatly improving production efficiency. In our solution, the query token used by the purchasing company (the data users) to query is embedded with a timestamp specified by the user themselves, which is similar to the user setting a validity period for their query records, during which the query operation will not compromise the user's privacy. After this validity period, a third party can recover the keyword information of the query token, but cannot associate this keyword information with the user's identity. In this way, we propose a PEKS scheme that perfectly combines security with keyword frequency analysis. Meanwhile, the scheme has many advantages: it is multi-user, has the capacity for multi-keyword queries, and can resist KGA (keyword-guessing attack).