Cell indexes of cells that keep link information between cells are interleaved with data items on the channel. This constraint makes the proposed scheme different from other schemes that use a space partition. In the proposed scheme, each cell of the partition is restricted to its number of data items. In this paper, we propose a novel indexing scheme for spatial data items that adopts multi-leveled grid partition to support window queries in non-flat data broadcasting that considers clients’ skewed data access patterns. Wireless data broadcasting provides effective information services due to its own high scalability. In ubiquitous computing, it is critical to allow a great number of clients to access information simultaneously at any place and at any time. As a result, it would be able to get accuracy similarity by applying to the proposed algorithms about 69.072 % without weight and also 95.322 % accuracy in case it has a specific weight. This paper has suggested named context-based pattern measurement method including weight defines for higher accuracy. Low accuracy gives invisible services to users. Now, the existing methods that find the similarity usually have an accuracy problem. They assume that all contexts have the same features when they process. It means that another algorithm may be needed to get the similarity depending on the contexts, because the existing similarity search algorithms usually perform the similarity process without the contexts’ characteristics analysis. Also, the users usually want to use the two types to get quickly what they want at the same time. However, according to the characteristics of the registered contexts, they are classified into two types, a rank-definitional context and a rank-undefined context. While it processes to compare, if they find some users who have similarities with them, they surely may be interested in the users, because they know that they can share their information without the time wasting to search, finally getting what they want. To measure the similarity of contexts in smart devices, comparison is made of the user-defined contexts and another context which is defined in a server or in a network device that a user has (Segev and Toch IEEE Trans Serv Comput 2(3):210–222, 2009). Consequently, users are able to be protected under tailored security modules based on circumstances of network, smart devices, and types of services. Therefore, this paper investigates tailored smart security algorithm, which is taking into account scenarios within smart cities. Conventionally, every service including different servers, network, and users employs the same security algorithm so that sensitive information could be traced and revealed by using counter tracing method. Each customised service usually keeps tailored security policy and algorithm.
However, the provided services are to be secured and well protected. Currently, there are numbers of different types of security algorithms related to those activities moreover, under such complexity of digital environment including various network devices and users, selective and customised services need to be provided for suitable purposes. Users are constantly moving around within Smart City according to their plans and consequently receive various network services from hosting devices adjacent. Recently, a great number of smart devices associated with their users exist within Smart City.