American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 30 | P a g e ENERGY EFFICIENT TECHNIQUE AND ALGORITHM BASED ON ARTIFICIAL INTELLIGENCE IN CONTENT DELIVERY NETWORKS Bakhtiyor Makhkamov, Nazirjon Khasanov Tashkent University of Information Technologies Named after Muhammad al-Khwarizmi Abstract: Due to the large number of servers and network infrastructure required to deliver content to users, content delivery networks (CDN) consume a large amount of energy. CDN use several strategies to reduce energy consumption, such as server consolidation, dynamic provisioning, and load balancing. However, these strategies do not take into account the popularity of the content being presented. Therefore, a mechanism to improve energy efficiency based on content popularity has been developed in CDN. The main function of the mechanism is to make maximum use of the cache servers' memory capacity at the expense of optimal service to user requests and to increase the service performance of cache servers to user requests. To achieve this, based on machine learning algorithms using user requests and attributes of video files, predicting the probability of video content becoming popular and storing videos with the highest popularity index on edge cache servers is caught. Keywords: Content delivery network (CDN), cache, content, Artificial intelligence, Machine learning, predicting, optimizing. Introduction Cache Placement and Cache Offloading processes are important in CDN to ensure the speed and reliability of content delivery to users around the world. Cache deployment is the distribution of CDN cache across geographic regions to increase content availability and reach for users. Cache swapping is the process of transferring cached data from a central CDN server to servers closer to end users. These are detailed below. Caching technologies are used in content delivery networks to distribute video services in network segments that are maximally close to users. Since the capacity of caches is limited compared to the capacity of servers, they need to store the most requested content. Caching highly requested content significantly reduces access latencies, server overload, the amount of data to be cached, and resource costs required for caching [1]. Figure 1 shows the steps involved in delivering content by caching video services. In the typical case of video services, a user makes a video request to a server, and if the requested American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 31 | P a g e video is available in the cache serving the user, the user retrieves the video from that cache. If the video is not available in the cache, then the user's video request is forwarded to the remote server. Here, the first case is called caching, and the second case is called non- caching. The cache server updates its caches by replacing existing cached videos with newly requested videos, which is controlled by the cache update policy. Figure 1. Content delivery process The content delivery process described above has a simple structure and is appropriately designed for simple cache servers. In the event that the content of the provided service is not available in the local cache server, the user's request is directed directly to the main server, and in the process of making such a request, the resources of the network and other related elements costs. In the case of caching with a complex structure, the process of caching the content of the provided service is carried out hierarchically, which maximizes the caching priorities. Caching has been widely used in content-based networks. Content placement algorithms are used to determine the order of routers from the actual content source to the user. Operational cache placement algorithms are important for Internet Service Providers (ISP) to reduce traffic and achieve good CDN performance. LCE (Leave Copy Everywhere), LCD (Leave Copy Down) and Prob algorithms are the last caches to determine the best in terms of lead time. American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 32 | P a g e Materials and methods Energy efficient VoD in content delivery network. Caching content locally results in a shorter route to content and lower power consumption as a result. However, this strategy leads to increased device power consumption by deploying local caches. Therefore, the optimal cache size is a function of the above two metrics, and the optimal value between them should be found. This evaluation aims to minimize the power consumption of the video service by optimizing the size of the caches deployed in the nodes. This considers a Video- on-Demand (VoD) service combining IP over a WDM network with the network architecture illustrated in Figure 2. Figure 2. WDM-based content delivery architecture VoD is an energy-intensive service due to the high energy consumption associated with the storage and delivery of large multimedia files. Keeping the most popular content close to the network boundary is one effective way to reduce the energy consumption of video services. We have estimated the energy consumption of video over IP in a WDM network. It explores the power savings introduced by using caches in the core nodes. Using a linear programming model, it is designed to optimize the size of the cache at each node in the network in order to minimize power consumption. The linear programming model is extended to account for variable caches, meaning that caches equipped with sleep capabilities allow inactive parts to be turned off when traffic is low. The model finds the optimal cache size for each node for different times of the day, which allows to achieve the best energy efficiency [2-3]. A variable-cache linear programming model finds the optimal cache size of each node that varies throughout the day. In the model, caches are assumed to have sleep capabilities, so American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 33 | P a g e inactive portions of the cache can be put to sleep. The goal is to explore potential additional power savings while using fixed caches and analyze changes in the optimal cache size that minimizes power consumption as network traffic changes. This linear programming model finds the optimal cache size to be placed at each node in the network to minimize power consumption. Caches are assumed to have full working memory throughout the day. The router ports required for each band wavelength at time t are determined by expression (1):              + Ni ji ijtitp Nmj i CAPP : (1) where: 𝐴𝑃𝑖𝑡 – aggregation ports on node i at time t; 𝐶𝑥𝑦𝑡 – the wavelengths in the virtual connection from node x to node y at time t. The power consumption of the optical switch at time t is determined by expression (2): it i N Po   (2) where: 𝑃𝑜𝑖𝑡 – the power consumption of optical switch i at time t. transponders at time t: i ijt i N i Nm Pt w     (3) amplifiers at time t: i ijt ijt i N i Nm Pa Amp f     (4) Multiplexers/demultiplexers at time t: i ij i N Pmd i Nm f     (5) Caches installed at time t: i N M   (6) It should be noted that the model does not assume a simple symmetric case, and therefore the number of lightpaths from node i to node j may differ from the number of lightpaths in the opposite direction. Basically, fij, wijt, and Cijt are not necessarily equal to fji, wjit, and Cjit, respectively. In this case, uplink traffic is video traffic uploaded from nodes to video servers, downlink traffic is video traffic downloaded from video servers to nodes, and regular traffic is traffic that cannot be cached (e-mail, live video, dynamic content, etc.) The objective of the proposed integrated linear programming model is to minimize the daily power consumption of the network while overcoming a number of current and power constraints. A complete linear programming model is defined as: American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 34 | P a g e : i i i i p it ijt it ijt i N i N i Ni j t T itij ij ij i N i N i N Pt j Nm j Nm Pa Pmd j Nm j Nm C Po WP AP Amp f f M             + + + +        + +                  (7) Through expression (7), the power consumption of the network can be calculated by summing the power consumption of different network components at each time point. The calculation of the optimal value of this analytical model is carried out based on the mechanism presented in Figure 3. Figure 3. Energy efficiency technique based on content popularity in CDN As can be seen from the expression (7), all indicators except M are constant parameters and depend on the parameters of the data transmission network. For the most part, these parameters are fixed and almost impossible to change. The solution of the problem from this point of view is related to the problem of optimization of Mit - the amount of caches installed at time t. From this point of view, the main result of the mechanism presented in Figure 3 is to maximize the use of cache servers' memory capacity at the expense of optimal service to user requests and to increase the performance of cache servers to user requests. To achieve this, based on machine learning algorithms using user requests and attributes of video files, predicting the probability of video content becoming popular and storing videos with the highest popularity index on edge cache servers is caught [4-6]. American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 35 | P a g e A network consists of a central server, N:={1,...,N} cache servers, and a number of users associated with each cache. To simplify the process, we consider the case where each user is connected to a single cache server. Although only one central server is considered, the existing formula can be easily extended to a network infrastructure with multiple central servers. File requests from users are received on cache servers and served locally or forwarded to a central server depending on file availability. Each cache server stores only a portion of the entire content library. The purpose of this is to define the set of files that should be stored on the cache servers. Below is a general CDN setup consisting of a central server and N cache servers. i – storage size of the cache server is denoted by Mi and is measured in bits. The central server has a library of files indexed as 𝑓𝜖𝐹: = {1, . . . 𝐹}. The size of an f file is defined in sf, which is also measured in bits. File sizes are collected into a 𝑠𝜖𝑅𝐹++ vector. The time is divided into slots and the time slot is indexed as t=1,2,.... The set of files stored in the i-cache at time t is denoted by 𝐹𝑖(𝑡)𝜖𝐹. Alternatively, the storage vector 𝑚𝑖(𝑡) for the i-cache is defined as 𝑚𝑖𝑓(𝑡) = 1 for 𝑓𝜖𝐹𝑖(𝑡), otherwise zero. If the storage vector mi(t) satisfies 𝑠𝑇𝑚𝑖(𝑡) ≤ 𝑀𝑖, it is considered valid for i-cache. Let Ui be the set of users who send requests to i-cache. Since different servers may have limited network capacity and service ratio, it is assumed that users in Ui can receive Cc i bits and Cr i bits from the central server in each time slot from the i-cache at the maximum total rate in each time slot. The total cache request i for file f in each time interval t is given by dif(t), which is measured in bits and summed into the vector 𝑑𝑖(𝑡)𝜖𝑅𝐹 +. Given a given demand dif(t), if mif(t)=1, the service policy performs service locally and redirects the request otherwise. Assuming that all requirements are subsequently satisfied, the total flow rate from the i-cache server is given by 𝑚𝑇𝑖(𝑡)𝑑𝑖(𝑡), and the flow rate from the central server to users at Ui is given by the expression 1𝑇 𝑑𝑖(𝑡) − 𝑚𝑇𝑖(𝑡)𝑑𝑖(𝑡) is given, measured in bits in both timeslots. If user requirements are known in advance, optimal content placement involves solving an integer programming problem in mi(t). The idea is to associate relevant costs with network flows and find the file placement that minimizes the overall cost. In the present context, we define the cost functions corresponding to the flows in the last mile connections connected to the i-cache server as χi:R→R and corresponding to the flows between the user connected to the i-cache server and the central server φi:R→R must be determined (blue dotted lines in Figure 3). On the other hand, for the topology presented in Figure 3, φi(.) represents the cumulative cost function that penalizes the flows in the backlinks and last-mile connections connected to the i-cache. Since the cost functions can usually be arbitrary, this approach is significantly more general and provides more flexibility than traditional displacement-based policies. As an example, the quadratic penalty 𝜒𝑖(𝑥) = 𝑐1𝑥2 + 𝑐2 imposes a base cost in addition to the square of the network usage, which prevents very high usage on any single server, thereby preventing buffer overflows or requests prevents the possibility of deletion. Another example is a simple linear cost that is multiplied by 𝜒𝑖(𝑥) = 𝑤𝑥 + 1 2x2, with a strict American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 20, Sep., 2023 36 | P a g e convex regularization in addition to penalizing large file downloads. Finally, the Kleinrock average delay function for a narrow link with capacity Ci is given by the expression 𝜒𝑖(𝑥) = 𝑥/(𝐶𝑖 − 𝑥) for 0