Novel Scheme for Enhancing Storage Management and Performance and Saving Energy of Mobile Cloud Computing

Corresponding Author: Ali A. Yassin Depertment of Computer, Education College for Pure Sciences, University of Basrah, Basrah, 61004, Iraq Email: ali.yassin@uobasrah.edu.iq aliadel79yassin@gmail.com Abstract: Modern industries for smart mobile devices, such as smartphones, provide end users with interactive features that consider network accessibility, computation performance, storage usage, energy saving and limited battery resources. The combination of cloud and mobile computing capabilities has introduced a new technology called Mobile Cloud Computing (MCC), which has extended smartphones and modern mobile devices beyond their core capacities. Many studies have focused only on offloading virtualised applications whilst granting limited consideration on offloading original codes. Moreover, researchers have ignored the main requirements of multimedia, such as photos and videos, in applying the MCC framework in many applications. In this study, we propose a new scheme in the MCC environment to remove duplicated photos received by the mobile device through social network applications. These repeated photos cause loss of large volumes of mobile memory or cloud storage, which leads to difficulty in communication, loss of flexibility to handle more than one application, slow mobile completion and mobile response to orders from another devices and great power consumption due to slow performance. The proposed scheme can overcome the above-mentioned issues, increase the performance of the mobile device and operate at the rest time of the device without affecting the efficiency of its performance. The proposed architecture is based on the management storage from mobile devices to the cloud and uses an efficient search index file to control the addition and deletion operations for repeated photos. Our experiments show that the proposed scheme increases the performance of a certain mobile’s application from 1,967,708 ns to 1,708,250 ns, saves energy consumption from 68% to 74% and provides storage space from 10,130 MB to 9,130 MB.


Introduction
Mobile devices are commonly used in people's daily lives (Hurbungs et al., 2016;Lundquist et al., 2014). They are called smart mobile devices because they can implement many important tasks simultaneously. Despite the rapid progress in the field of smart mobile technology, mobile resources are more limited than the non-mobile counterparts because of limitations associated with weight, touch capability, storage capacity, battery life and heat dissipation. Limited battery capacity and storage also cannot meet the requirements of current complex applications. Therefore, power-saving techniques, performance computing and management storage are actively being studied to expand the usage time of smartphones. High speed that fully consumes device memory is still the major cause of nerve damage for smartphone users. Although many storage management methods have been proposed, customers are not satisfied with their phone's storage. The power consumption problem of mobile devices indicates the same degree of suffering to the user. When the user interacts with the smartphone, the current system assumes that the user is interactive and must keep the device in active mode. Nevertheless, when the user enters the interaction mode, the device processes the request and displays the result on the device and all the pre-orders if the device is working for some time without connecting to the Internet. During this time, the user cannot obtain any information for understanding and analysing using the phone (Roy et al., 2011;Korhonen, 2011). Current technologies are developing the performance of smart mobile devices in terms of storage capability, battery life and speed to suit the requirements of users. However, the processing power of these devices still cannot reach the performance of computers. Limited battery life and computing resources, which depend on the number of applications completed and the remaining space of the storage, are the main challenges. The overall performance of smart mobile devices also depends on the memory, that is, the performance is low when the memory is fully consumed (Danova, 2015;Lewis et al., 2014). Mobile Cloud Computing (MCC) tries to solve some of these issues. MCC bridges the gap amongst the limited storage and computing resources of smart mobile devices and the processing requirements of exhaustive applications on these devices (Akherfi et al., 2016). The most common mobile cloud architecture is connected with the remote cloud (a sturdy server and software/application), which presents the services to the mobile device over communication channels, such as WAN connection.
Under this structure, mobile devices can access cloud services via the access points or cellular network (Verbelen et al., 2012). At present, foremost research topics in MCC are the limited power consumption of mobile devices and the enhancement in users' knowledge through improved lateral application and users' ability in making precise offloading decisions based on multiple elements. Unfortunately, in most states, the size of storage space is increased without considering the memory of the devices and resource utilisation on the cloud service. The main cause in the increase in the size of the mobile space is the receipt of multimedia files of all formats, such as photos, textual data and videos, through social network applications. Social networking has developed considerably in recent years and becomes an important engine for obtaining and disseminating information in different fields, such as science, business, bioinformatics, politics, crisis management and forensics (Verbelen et al., 2012;Schober et al., 2016). The high prevalence and use of social media is due to the opportunity to send/receive and exchange public messages with low cost anywhere and anytime. Social media platforms accumulate various types of data, including photos, geolocations, videos and audios (Saha and Srivastava, 2014;Shah et al., 2015). Therefore, the mobile device receives many files with different formats through social network applications, such as Facebook, WhatsApp and Twitter. Over time, these accumulated data consume a large amount of space allocated to the Mobile Memory (MM) and Cloud Storage (CS). These data fully consume storage space despite the use of an MCC technique, thereby requiring extra cost based on cloud's feature called 'pay as you go.' As a result, accumulated data slow down the computing speed of the mobile device and its capability to operate more than one application simultaneously. Most data associated with multimedia, such as photos and video clips, affect the storage unit. Same photos can be received through a group of users of the same social network or through other applications. The same device can save these same data in many places of storage.
In this study, we aim to solve the aforementioned problems on duplicated photos received by the mobile device through different social networks, which consume the storage space of the device and thus adversely affect its performance. We present a new scheme in the MCC environment to remove such duplicated photos.
The proposed work generates a Search Index File (SIF) on the basis of creating a unique code for each photo by using a crypto-hash function. All photos are grouped by code and only one photo is retained for each group by deleting duplicated photos. The proposed scheme selects the sleeping time of the mobile device depending on its owner's behavior and can thus be applied daily in a smart manner. A Temporary Table (TT) is generated when any photo is added to or removed from the mobile device. During sleeping time, each photo in the TT is checked in the SIF. If it exists in there, then it is deleted from the MM. Otherwise, it is added to the SIF.
Our work has the following essential contributions. Firstly, we identify the sleeping time of the device to perform the owner's request whilst the device is resting. This process aims to remove duplicated photos without affecting the performance of the mobile device. Secondly, we propose the output-oriented power-saving mode of the mobile device. Thirdly, we reduce the processing time of the mobile device by removing unnecessary photos. Fourthly, we create a good foundation to remove unnecessary photos received by the mobile device via social media networks. Fifthly, we implement the sleeping time mode with the Android system that allows to running the proposed scheme without effecting on mobile's system. Sixthly, we describe the challenges in MCC storage. Seventhly, we theoretically analyses the performance, storage management, flexible and efficient search and accuracy of our scheme and conduct extensive experiments on real-world data for validation. Our work focuses on important parts in computation offloading of an MCC organization, such as mobile specifications (available memory and CS, CPU speed and battery level) and application specifications (execution time).    Figure 2 demonstrates our contributions in the diagram of power-saving API. Nearly full memory affects the CPU performance in executing any application and the power of the mobile device. The memory becomes full when the mobile device receives duplicated photos from various social networks.
The rest of the paper is structured as follows. The next section reviews related works on performance, storage management and power saving in mobile devices. Next, we describe the proposed scheme and develop suggestions. The research methodology is then described, followed by a discussion of the key findings in performance, power saving and storage management. The experimental results are presented with the data analysis. The last section shows the contributions of this study.

Related Works
The commonly used scheduling in mobile devices and MCC environment aims to increase performance and save energy. In the information technology era, many studies support remote implementation for mobile phone applications on the cloud to increase performance and reduce power consumption (Shen et al., 2016;Shiraz et al., 2013). The customisable task scheduler is suggested in (Lu et al., 2005) to manage tasks between the mobile device and CS. It is customisable because the user can arrange his or her main goals (such as power consumption and performance) depending on the function in scheduling tasks and determining their importance. Magurawalage et al. (2014) proposed a scheme based on two points: (1) Delay task, which is consists of execution time and queuing time at the processing device in the network with communication time; and (2) power saving, which is composed of computation power consumed at the processing device and communication energy along the path. This scheme provides an accurate offloading code to achieve the highest energy. It uses dynamic lateral application and partitioning policy for offloading. As a result, this lateral process causes an overhead on the smartphone. Sprecher (2016) proposed an algorithm to select whether the application will execute internally or remotely using the cloud. This algorithm considers the mobile application as a single component that cannot be divided into multiple approaches. However, some approaches should be executed internally and others should be offloaded to the cloud service provider. Shiraz et al. (2015) presented a flexible framework for detecting offloading processes. This framework uses services based on the remote server nodes and virtual devices to implement offloading of mobile applications. It needs synchronisation between the mobile and virtual devices in the first round and synchronisation between the virtual device and server node in the second round, thereby requiring many resources.
Most parts of everyday life can be influenced by the usage of smartphones (McDaniel and Coyne, 2016;Misra et al., 2016). Smartphones can impact individuals' relational life (Mok et al., 2014;Beloglazov et al., 2012) and the redundant use of smartphones can lead to intemperance and decreased capacity to enjoy comfort. The exchange of dialogues, pictures and videos can be useful and harmful at the same time. Many of these exchanged messages will be repeated, occupy areas in memory and even go beyond the capacity of the CS (Beloglazov et al., 2012).
As mentioned earlier, our work focuses on eliminating repeated photos that occupy a large space of the MM and CS. We design a smart and fast way to build an index file for all photos on the device by building a code for each image. A mathematical equation is suggested to build a unique code for each photo. The photos are then categorised using the codes to group similar images. All identical photos are then erased, such that one remains in the MM and another backup is stored in the CS. Next, the proposed scheme detects the sleeping time of the smartphone. Any photo supplied to the device via social networks will then be assigned its own code and placed in a TT. After the sleeping time is determined, each photo in the temporary file is searched within the indexed file. If it is found in there, then it is removed from the MM; otherwise, it is added to the index file and sent to the cloud service provider. Experimental results indicate that the proposed work manages the reservoir area in an intelligent manner by removing redundant data, increasing the performance of any application's response and reducing energy consumption.

Proposed Scheme
Our proposed scheme is composed of four phases: Initialisation, building effective SIFs, provision of storage and sleeping time. The first phase prepares and detects all photos inside the MM and CS, whereas the second phase generates the main SIF. The index file is generated in two parts: The first part is produced using the photos stored inside the memory of the mobile device (such as smartphone), whereas the second part is related to the CS provider. The provision of storage phase removes all the repeated photos in different folders within the MM. The main work of this phase depends on the index file of the MM. The fourth phase focuses on rebuilding an effective SIF that is related to the MM. Thus, the processing time of this phase uses a sleeping time algorithm that detects the appropriate time for running this phase without affecting the operation of the smartphone. The algorithm works smartly depending on the sleeping time of the smartphone.
The fourth also phase rearranges the index file again when the smartphone receives new images or when the mobile owner deletes images from the smartphone. The symbols used in our proposed scheme are shown in Table 1. Figure 3 shows the architecture of our proposed scheme.

Initialisation Phase
Mobile's Data Owner (MDO) has a collection of photos distributed in different folders in MM, such as Gallery, Facebook and WhatsApp. Let S = {Pho 1 ,…, Pho n } refer to the set of n photos in MDO's collection in different places inside MM. S includes a set of photos that are outsourced from the MM to CS. In Samsung mobile devices, the outsourcing folder that saves photos in the CS is called Auto Backup. Google offers the same service known as Photos service inside Google Drive, which is used by many mobile companies, such as Samsung and Huawei. In this phase, our objective is to scan all photos saved in MM and CS and then detect the path and size of each photo. The main steps of this phase are summarised as follows: • Scan and accumulate all O's photos in S = {Pho 1 ,…,Pho n } • Let P = {P 1 ,…, P 1 } denote the set of photos' paths Compute the total size of MDO's photos by using Equation 1 and then determine the ratio of storage space occupied by the photos from the MM by using Equation 2: Size MM CS T RS Size MM CS where, Size(CS) represents the storage space that is reserved by MDO from the cloud service provider.

Building Effective Search Index File Phase
The memory and processor of mobile devices are limited. Thus, the process of disposal of repeated photos needs to consider this fact. Therefore, image matching methods that rely on feature extraction of images are unsuitable for the aforementioned task. Image matching methods involve many stages, such as pre-processing, feature extraction and other phases, in achieving the final characteristics depending on the generated index file for finding match ratios. These methods are difficult to apply to mobile devices. Accordingly, the proposed scheme depends on the construction of an index file in a fast and efficient manner. This index file will be used to remove repeated photos in the subsequent phases without affecting the performance of the mobile device.
Two sets (S,P) are obtained from the first phase to build an effective SIF and the file is divided into two parts depending on the photos' paths P. The file is divided into two parts due to two reasons. Firstly, Flndex is linked to the MM, whereas Slndex is associated with the cloud service provider, which requires connecting to the Internet when we need to modify the file (SIF) as a result of the insertion or deletion operation for photos from the mobile. Secondly, we store a backup version of each photo in the user's CS provider. This photo will be repeated inside the SIF. The process of removing the redundancy from the file completely will result in the loss of the outsourced photos in the CS. The following steps describe the mechanism of this phase.
Classify mobile photos into two groups depending on the storage type (path set).

Algorithm 1 of Classification
Part (Slndex) of SIF is connected to the Internet via the presence of its photos in the CS side. Therefore, Algorithm 1 is applied on the photos stored in MM marked Slndex and then works on the Slndex photos depending on the connection to the Internet.
An effective SIF is built by using Algorithm 2 in the subsequent phases. Algorithm 2 is applied to Equations (3) and (4) to generate a unique code for each mobile photo: where, L is the length of h i , ASCII is the function for computing ASCII code for each symbol inside h i and Weight is the function for assigning each symbol in h i a numeric serial value depending on its appearance in the symbolic string h i . Figure 4 shows the working mechanism of Equation 4 for real-world data extracted from a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone.  (3) Compute Code i as in Equation (4) SIF(Code i , P i , Size(Pho i )) End for End Algorithm 2 of Search Index File

Provision of Storage Phase
The major challenge in mobile devices is to provide sufficient storage space for applications and multimedia data, such as photos, videos and audios. With the fast increase in required data storage, providing high efficiency for the mobile whilst maintaining and managing the capacity of the memory of the device becomes difficult. The repeated photos saved in the MM or CS fully consume the memory space of the mobile device, which leads to its slowdown. In this phase, we focus on removing repeated images either on the MM or CS. The removal of repeated images depends on the image code computed in the previous phase. We notice that the SIF contains (Code i ) and P i . It will extract and accumulate photos into groups depending on the image code (Code i ). Each group contains similar images and are in different paths (P) depending on social media networks' folders. The following steps demonstrate the basic mechanism of this phase: 1. Detect all repeated photos from SIF based on Code i .
As a result, the records inside SIF distribute in blocks depending on the value of Code i 2. Delete all repeated photos from SIF whilst saving the version of photo on MM and CS. Algorithm 3 explains the mechanism of removing repeated photos. Figure 5 illustrates the mechanism of this phase based on real-word data obtained from a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone

Sleeping Time Phase
The smartphone receives hundreds of photos through social media network applications every day. Many of these photos are duplicated, thereby affecting the storage spaces of the MM and CS. This phase works smartly as it monitors device usage of the device owner for each week to detect sleeping time. The device usage refers to the times the mobile is turned on and off by the owner and determines the times that the device is left for hours by the owner during his or her bedtime or other works. Here, a table is built on the basis of a statistical procedure (Algorithm 4) on the hours of device usage by the owner to determine the approximate sleeping time of the device. This phase determines whether a new image is added in the mobile device via social media networks and decides whether a photo will be added in the index file. This phase also modifies the index file if the deletion of a single photo or a set of photos is carried out by the owner of the mobile device. The following steps illustrate the mechanism of this phase.
Determine the sleeping time by using Algorithm 4. This algorithm works in an intelligent manner on the basis of the behaviour of the mobile's owner. Assume the owner has left his or her mobile from 12:00 am to 5:00 am. The time execution of the current phase is exclusive during this period. After 10 days, if the owner leaves the mobile device from 3:00 am to 7:00 am, then the execution time changes automatically.
Detect Here, this step generates a TT that consists of S * and P * (Table 2).
Update SIF depending on TT. Algorithm 5 is responsible for updating SIF. The addition occurs after confirming that a new photo * i Pho is not found in SIF based on computing the photo code Code i by using Equations (3) and (4). Lastly, a new photo will be added to MM and CS. The deletion process is continuously performed depending on P * to remove all photos from SIF. The proposed work gives an explanatory message to the owner of the device if he or she wishes to remove the same photos from the CS. Compute h i as in Equation (3)

Analysis and Experimental Results of the Proposed Scheme
We analyse our proposed scheme and demonstrate its properties, such as effectiveness and flexibility. We also calculate the computational and communication costs of our work.

Theorem 1
Our work conducts flexible and efficient search.

Proof
Our proposed scheme constructs the main SIF to accelerate the image search process inside MM and CS. In the initialisation phase, the data owner first executes the proposed scheme to extract a descriptor component for searching {S i , P i } each of which requires the computation of O(n). This phase also computes the percentage of storage space occupied by images in the MM and CS. The device owner receives a warning message in case RS >= 50. SIF consists of each photo's path (P i ), size, code (Code i ) and type of storage: Flndex for MM's photos and Slndex for CS's photos. SIf has flexibility to work on photos saved in the MM and CS.
SIF works first on images stored in the mobile device and then moves on to those stored in the cloud. If the device is connected to the Internet, then SIF is built completely. Otherwise, it only works on MM's photos and then handles CS's photos directly when the Internet is available. This flexible processing also works the same way when deleting duplicated photos from CS regardless of the availability of the Internet. The deletion is postponed until the availability of the Internet. The initialisation phase works only once when the proposed method starts running at the sleep time of the mobile device. This phase does not affect the effectiveness of the search process in real time. Improvements in the implementation may be made through customising it towards the procedure of SIF updating through adding/deleting photos to the mobile device, which leads to updating SIF partially. Therefore, our proposed scheme has flexibility and efficiency features.

Theorem 2
Our proposed scheme provides a unique code for each photo in the mobile device.

Proof
An image matching method is applied due to numerous practically applicable computational challenges in obtaining the similarity between entities demonstrated in digital images. Therefore, the proposed scheme focuses on building a unique code Code i for each photo inside the MM. The purpose of Code i is to decrease the processing time of image matching to suit the limited possibilities of mobile devices. By applying Equations (3) and (4), we obtain Code i based on hash function MD5, which is adopted to ensure fast processing time and accuracy in retrieving the desired image. Figure 6 shows the processing time of MD5, SHA-256 and SHA-512 on a set of images stored on a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone. In Phase 3, the proposed scheme groups photos through code matching to remove all duplicated photos. When inserting any photo Pho i to the mobile device, Code i is first computed and then searched inside SIF to ensure Pho i exists on the mobile device. If it exists, then it is deleted from MM and CS. Otherwise, it is added to SIF. The same situation is observed in deleting any photo Pho i from the mobile by MDO. Our work in Phase 4 keeps the code of this photo and then deletes the information of Pho i in the sleeping time phase based on Code i . Hence, Code i is important for the efficiency of our proposed scheme.

Theorem 3
Our proposed scheme provides high-precision and high-performance search to any photo.

Proof
The proposed work needs very high-precision search for a photo and should reach 100%. The receipt of a new photo * i Phot by the mobile device through social networks generates a TT containing the name of the photo and its path * i P . In the sleeping time phase, the search for each photo in TT begins by computing Code i of * i Phot and then determining whether it is present within Sif. If Code i is found in SIF, then Pho i is deleted from MM and CS. Otherwise, * i Phot and its details will be added to SIF. The high-performance search for each * i Phot is due to that Code i is obtained using Equations (3) and (4), thereby resulting in the error rate in accuracy of up to zero. Table 2 shows the sample of TT from real data obtained from a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone. TT has been created on December 2, 2018 and the processing time for generating TT is 1,378,425,250 ns. Figure 7 shows the accuracy of results for photos in TT. Figure 8 presents

Theorem 4
Our proposed scheme provides search linkability.

Proof
In the second phase, the photos are aggregated in groups depending on similarity in codes as a first link step. Consequently, this process is executed once in the first moments of operating the proposed scheme and returns all photos associated with the same code. This step is highly efficient because all the linked images are grouped together with the same code once. Table 3 views the mechanism of linkability feature in the second phase. The same applies to new photos from the mobile device through social networks in the third and fourth stages. The search query for duplicated photos have the same code despite coming from different social networks, thereby guaranteeing the linkability of different search queries.

Theorem 5
Our proposed scheme is maintained on SIF in a smart manner.

Proof
The proposed work monitors the photos added to the mobile device or deletes them intelligently without impacting the performance of the device. In the fourth phase, a TT will be created, including the name and path of each photo and the type of operation performed on it (added or deleted), for the received photos through social networks or the deleted photos by MDO.
Algorithm 4 is used to determine the sleeping time. This algorithm works intelligently depending on the resting time of the mobile device obtained using the behaviour of the mobile's owner. The maintenance of SIF is done by deleting or adding photos from the storage area without impacting the effectiveness and completeness of the device. Our proposed scheme provides green computing.

Proof
The principle of our proposed scheme supports green computing because it aims to primarily reduce energy consumption, which meets with the features of green computing as an energy-aware characteristic (Gai et al., 2016). The methods of accessing green computing are from hardware and software to managing, strategy and authorised issues. Our work focuses on the computing side that uses dynamic programming with mobile cloud computing. Our proposed work can be used to reduce energy consumption in mobile devices. The proposed scheme can also measure the steadfastness of the system, which guarantees its performance. Green computing is performed to enable the use of our proposed scheme to reduce energy consumption in mobile devices without weakening the performance of cloud services. In the sleeping time phase, the maintenance of the MM is run during the rest time of the mobile device. This process aims to remove all duplicated photos from the mobile device, which increases the performance of the mobile and spaces of ram, MM and CS. Algorithms 3, 4, 5 and 6 are used to maintain such storage spaces.
We examine the performance 10 days after applying the proposed work to a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone. The proposed scheme exhibits high performance when receiving new photos via social media applications and then ensures no repeated photos are stored through the SIF. High efficiency is also observed for photos deleted by the owner of the device. Table 4 and 5 show the performance of the mobile device during deletion and insertion operations before and after executing the proposed scheme. Overall, our work reduces costs and resource consumption and is desirable for preserving the battery energy of mobile devices.

Complexity Analysis
We measure the complexity of our proposed scheme in terms of computing time cost. The time requirement of our proposed scheme is briefly listed in Table 6, where the following notations are used:  Table 7 shows the time complexity for each algorithm.

Experimental Results
We evaluate the performance of our proposed scheme in terms of search efficiency, SIF maintenance, search precision, flexibility, effectiveness, battery power consumption and CPU performance. We report the practical results of our work on a real-world data based on coloured photos (10,000) saved in different folders, such as Viber, Facebook and WhatsApp, on a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone. Furthermore, back up photos are uploaded to the CS.
Our experiments are conducted on a 2.2 GHz Intel i7-4702MQ processor with a Windows 10 Home Single operating system of 64 bits (10.0, Build 16299) and 8 GB. Furthermore, the mobile device used is Samsung Galaxy S5(SM-G900H) with the following specifications: Board universal 5422, screen size of 5.01 inches, RAM of 16 MB android version 6.0.

Scenario
To achieve the objectives of the proposed work, we conduct a series of practical experiments on a 'Samsung SM-G900H 4d0079e94bb9413f' smartphone. The work scenario can be summarised as follows.
The smartphone contains a set of repeated photos in the MM or CS. All these photos have reached the phone through different social network applications, which may lead to repeated storage of the same photos in more than one place.
We rely on a set of measurements before and after the proposed work is applied. These measurements are the power consumption of the mobile phone, the response time to run an application from the moment it is touched (launch) to the moment of completion of the process (resume) and the calculation of the storage size. We implement the experiment five times then find the mean of results which considered the final result of our proposed scheme as shown in Table 8. The details of the experiments are before applying the proposed work, we conduct the following tasks. Power Consumption: We charge the device to 100% to determine the power consumption of the mobile device with repeated images and then leave the device for 24 h without charging. Response Time (CPU): We operate any application (from its launch to resume moment). Storage Space: We compute the total storage space. After applying the proposed work, we perform the following tasks. All duplicated photos have been removed. Power Consumption: We recharge the device to 100% and leave it for 24 h to detect the power consumption. Response Time (CPU) Storage Space Table 8 illustrates the potential and importance of the proposed work and the objectives achieved.

Conclusion
The mobile industry focuses on maintaining the efficiency of mobile devices in terms of storage and performance. Repeated photos received by these devices through social networks, such as Twitter and Facebook, consume much space of its memory and CS. In the long run, the processing and storage capabilities of these devices will slow down. Thus, we utilise a hash function-based SIF to design a scheme for removing duplicated photos from the device without affecting its capability to run the proposed scheme. The rest time of the device is intelligently determined using Algorithm 4. Our proposed framework for image recognition is based on building a unique code for each photo by generating a SIF and then deleting the repeated photos. The TT plays a main role in the performance of our work because it keeps the name, path and type of operation for removing all photos from the MM or CS. We use hash, ASCII and Weight functions to obtain a representative code for each photo. This code accumulates or retrieves duplicated photos in high performance and consequently decreases matching costs. Our formula implementation over 1,000 photos confirm that our proposed scheme results in only minimal losses in search time and precision compared with existing image search methodologies for plain texts. The proposed work also supports green computing by saving storage space through eliminating repeated photos and thus automatically increasing the CPU performance of the device.