1 Introduction

Data transfers through high-quality communications and intelligent cellular equipment are required to boost the current communication model. Fifth-generation (5G) technologies offer reliable and practical solutions. Both 5G and 6G use higher frequencies to transmit data. Furthermore, 5G enables IoT, and 6G speeds things up [1].

Mobile networks can interact directly without base stations using device-to-device (D2D) communications. System and application expansion and the use of position as a means to identify and communicate with surrounding devices are one of the most significant tasks of D2D, which keeps communication costs low [2].

To improve system efficiency, D2D Communication faces several challenges that must be addressed in a systematic manner using various approaches, including the internet of things (IoT), V2V, artificial intelligence (AI), and millimeter-wave technology (mmW) [3]. The adoption of D2D technology also causes mobile customers to interact, since they receive access to the same assets in the same region. Among the other challenges associated with D2D technologies are peer identification, delivery, radio assignment administration, optimization, and energy security [4].

The D2D concept has therefore become a focus of several academics and mobile carriers, to improve network efficiency without violating service standards [5]. D2D seeks to improve the signal of smartphones in scattered environments with the actual variety of communication equipment [6]. D2D connectivity must operate with mobile network solutions to complement one other [7].

In the development of D2D, the critical element is the sharing of the capabilities of D2D and cellular links in terms of capacity and frequency [8]. Among the advantages of D2D is that the security and freedom of the material is maintained. Since the centralized storage unit does not store shared information, D2D connectivity can improve energy consumption, production, equity, and time [9]. For this innovation to take hold, D2D communication technology faces many obstacles [10]. D2D requires resource management strategies, device discovery mechanisms, intelligent mode selection algorithms, security, standards, and data transmission methods [11].

Machine learning is one of the most promising methods to understand the influencing factors and specific aspects of communication systems, as it provides the best solution for communication networks. The use of artificial intelligence and machine learning in computer networks has been the subject of many studies, focusing on issues related to regulating system performance based on latency and low traffic density. Much research has been done to use a machine learning-based resource allocation method to monitor or regulate system performance. The performance of 5G mobile networks will be improved by machine learning [12, 13].

Without prior knowledge or information about the environment, reinforcement learning allows the system to learn about the environment through trial and error. Resource allocation and power control solve the interference coordination problem in deep Q networks (DQN) [14]. D2D can meet many of the 5G criteria by supporting high data rates and minimizing delays between D2D user equipment (UE). D2D links can improve performance, energy consumption, time delays, spectrum efficiency equality, capacity redistribution, and interference reduction. D2D can also reduce the power consumption for interconnecting D2D devices since the communication range is shorter [15].

D2D can enable user usage emotion; therefore, it can be generally assumed that non-D2D UEs can benefit from the elimination of mobile usage, as they thus have access to greater capacity and less congestion for communication between them [16]. Similarly, several difficulties need to be addressed, including device discovery, mode selection, power regulation, voltage regulation, security, radio resource distribution, cell compaction and downloading, as well as quality of service (QoS) and path selection, mm-wave connectivity, non-cooperative customers, and strategic handover planning to fully implement D2D [17].

However, in recent years, explanatory artificial intelligence (XAI) has played a significant role in being transparent and interpretable. The development of fuzzy structures (EFS) and XAI is also the solution to complicated analysis and definition solutions; including concurrent learning, rule selection, rule teaching, a database that needs to learn, and variable setting [18]. The 5G study uses many methods, such as supervised, unsupervised, and AI-based extension learning [19, 20].

In this paper, we present an improved D2D communication model for 5G networks called Deep Learning-based Improved D2D Communication (DLID2DC). The approach maximizes spectrum utilization by analyzing communication demand and applying deep learning methods for resource allocation. Throughput, end-to-end delay, fairness, and energy efficiency are all areas where the DLID2DC model has been shown to outperform conventional approaches. Therefore, this paper proposes new techniques in conjunction with existing AI approaches to integrate XAI and improve the efficiency of D2D communication systems.

The study’s primary aims are as follows;

  • Deep learning-based improved D2D communication (DLID2DC) architecture for 5G communications is proposed and evaluated in terms of spectral efficiency, delay, index fairness, and accuracy and compare with D2D and wireless sensor network (WSN) systems.

  • To maximize the spectral efficiency of the DLID2DC system compared with the WSN system.

  • To minimize the delay, energy consumption and maximize the lifetime of the network.

  • To minimize energy consumption and maximize energy efficiency (power analysis)

  • To maximize the packet delivery ratio and minimize the end-to-end delay

  • To compare and analyze the performance of the proposed protocols in terms of spectral efficiency, delay, index fairness, and accuracy

The contributions to this paper are listed below:

  • Deep learning-based improved D2D communication (DLID2DC) architecture for 5G communications is proposed, evaluated, and compared with WSN and D2D Systems.

  • A mathematical model to analyze the transmitted power for a message is proposed. The mathematical model of the proposed DLID2DC system is utilized to predict the necessary power to transmit a message.

  • The convolutional neural network (CNN) model for the learning process of D2D communication is designed.

CNN is a deep-learning neural network that processes the devices and other organized input fields. CNN shows good performance in recognizing layout elements such as lines, gradients, circles, and even eyes and faces in the input data.

To resolve the problems of D2D networks and fulfill the requirements of IMT-2020 [38], this study proposes deep learning-based improved D2D communication (DLID2DC). In the proposed architecture, XAI-based D2D technologies are utilized to expand and adapt existing approaches and methods relating to D2D and XAI based on the specific needs of the 5G D2D network. By combining AI and CNN models with a mathematical error-detecting model,

DLID2DC system, the results show higher spectral utilization of the proposed DLID2DC system than WSN. This is because the proposed DLID2DC system with CNN architecture and artificial intelligence uses higher spectrum in 5G communication. The proposed DLID2DC system reduces the complexity and overall delay. In order to compare the proposed DLID2DC system with the existing one, the power required to transmit a single message is analyzed. In the proposed DLID2DC system, the mathematical model is used to predict how much power is required to transmit a message. Index fairness analysis can be used to evaluate resource distribution in wireless networks. AI and CNN models ensure better fairness in the proposed DLID2DC system. As the simulation area increases, the index fairness also increases. In the context of D2D communication, an accuracy graph evaluates the predictive efficacy of both the baseline D2D model and the suggested DLID2DC model.

The remainder of the research article is organized as follows: Sect. 2 illustrates the Related Work and background of device-to-device communication. The proposed Deep Learning-based enhanced D2D communication model (DLID2DC) is discussed in Sect. 3. The result analysis and performance of the proposed model are presented in Sect. 4. The conclusion and future application area are discussed in Sect. 5.

2 Related Work

In general, the networking assault is only detected if the behavior of the data flow deviated from practically applicable norms. Furthermore, while the application and capacity increase, a typical tracking system made managing an extensive network hard [21]. Moreover, the capacity of the current network should not be affected by network protection systems deployment. A unique method, such as the artificial intelligence safety system, was crucial to the 5G systems’ security problems to oversee and comply with these standards.

In addition, the suggested AI architectural system does not provide adequate security measures to fulfill the 5G Network requirement [22]. The 5G framework connected to the total transmission rate was 1000 times greater than the 4G Networks. This identical amount of information that the connectivity served in bits per sec/area, containing a collection of information signals per Hertz suggested by Gaba et al. [23]. The power efficiency was ten times greater than that of the 4G networks. The 5G system included the full connection speed. Spectral efficiencies were the number of bits sent per Hertz, the power efficiency of the play must be ten times greater, and the data transfer rate is multi-gigabits per minute and the delay of 0.2 s [24]. The result was the quantity communicated per play. 5G network included a communication environment, the humongous spectroscopy of multiple input multiple output (MIMO), and the D2D conversation used the spectral range of 5G mmWave to form short-distance connectivity among data user equipment (DUE) 5G network with a heterogeneous environment, a spectrum of millimeters suggested by Zhang et al. [25]. Because of the low interference between several users, several mmWave D2D connections worked simultaneously, improving internet bandwidth. Subsidiary CRN users also utilized D2D communications to minimize the interference among the significant users to enhance spectrum utilization and increase data speeds suggested by Zhang et al. [26]. D2D HetNets and base stations (BS) were supported with MIMO support to improve spectrum performance and data speeds [27]. But various as- saults, including espionage or impersonation, could damage D2D and the internet protocol (IP), and numerous viruses block D2D connectivity. The adversary could be extrinsic or intrinsic. However, this implied that the adversary modified the data once it had been transferred, or if the adversary was proactive, the adversary might be inactive [28]. It intruded on the information, or the assault might be local or network-wide.

The two central and decentralized methods were coupled because of the hybrid architecture provided by D2D communications. Therefore, some safety and confidentiality issues discovered by wireless and cellular systems can be harmfully suggested by Choudhury et al. [29]. The privacy, dependability, and accessibility of the D2D and the network’s security were affected. Thus, it required efficient information security, enabling a dependable and secure data flow between networking and mobile applications and direct connection between convergent gadgets without mobile network support [30].

One of the difficulties they mention was that the access point was not interfered with by trustworthy devices to gather data properly. That was why a particular technique had been established to enable symmetrical encrypting to preserve data security. This method enhanced the distribution and usage of resources in the D2D networks and their Safety and stability. In addition, a dynamic group privacy-key agreement method was employed in the communications with a group of D2Ds to strengthen their integrity, suggested Shang et al. [31].

A high-temperature group data packet was utilized to interact with the D2D grouping. The concerns highlighted were that in D2D connections, there was no safety system capable of maintaining privacy in conversations, so use a mutual verification and two procedures for assurance of confidentiality. It enhanced the security of the procedure and boosted performance and competitiveness. The major drawback in D2D communication is data security; privacy during the data transmission needs to be maintained. In addition, the accessibility of data among the different networks needs to be preserved. The challenges faced by existing methods are the power consumption during the data transmission and the overall energy efficiency.

There was insufficient security to protect consumers from droppings by utilizing mobile devices. They recommended using a D2D user optimizing-based access scheduling algorithm since it enhanced physical safety and smartphone security and boosted privacy productivity. The existing WiFi systems interacted with D2D and long term evaluation (LTE) users, resulting in unlawful communication links. Thus, this method employed the user substantial matching algorithm provided to LTE and D2D customers. A D2D communication network and an LTE-A network can use an unlicensed spectrum. In the unlicensed band, other technologies may suffer as a result of this initiative. Multi-users of an unlicensed band will diminish their benefits if they operate simultaneously [32]. A trust-based D2D communication mechanism was proposed by the authors for accessing different services to meet the growing transaction demand. IoT device-to-device communication to analyze the effect of adaptive trust parameters [33]

It reviewed various existing rules and ways to protect the privacy of 4G and 5G networks. The difficulty was that no particular network limitations led to data confidentially and safety vulnerabilities such as anonymity. That was due to 5G vulnerabilities because internet protocol (IP) production depended on it. To ensure privacy and trustworthiness, the authors provided six sorts of solutions. Therefore, they suggested six alternative ways of maintaining confidentiality and secured networking in 4G and 5G. Bahonaret al. showed the connection between devices and networking D2D [35]. It was necessary not to know user relationships to enhance effectiveness, involvement, and Safety during data exchange. A new method for automated decision-making when assigning better system resources was implemented. A new architecture was developed whereby the data were exchanged utilizing a blockchain technique that operated via the deployment of access points.

The communication process between gadgets was crucial at these times due to the demands arising from the growing number of mobile consumers. For major cellular networks, this became impossible to fulfill increasing requests for data transfer, thereby opening the way for connectivity technologies for D2D [34]. Then the complete D2D relaying data transmission showed an excellent way to send large amounts of data. Notably, in-band and out-of-band wavelengths were used for D2D communications [35]. In addition, the D2D system enabled proximity capabilities for efficient data transmissions, such as D2D discovery and D2D communications. Within a short period, D2D communications technology undoubtedly constituted the foundation of wireless communications worldwide [36]. Gandotra et al. developed device-to-device (D2D) [34] communication to keep up with expanding needs. This paper provides a high-level overview of device-to-device (D2D) communication, discussing its many advantages, some of the key open issues related to it (including peer discovery and resource allocation), and some of its integrant technologies, including millimeter wave D2D (mmWave), ultra-dense networks (UDNs), cognitive D2D, the handover procedure in D2D, and the many use cases. Gandotra P et al. [37] introduced device-to-device (D2D) communications to permit users to communicate peer-to-peer while increasing system throughput, energy efficiency, and spectrum efficiency. To meet the demands of subscribers, a new architecture has been proposed that guarantees success in implementing D2D communication despite its many obstacles. Security in D2D communication and the types of attacks that can be launched over direct connections are the main topics of this study. A solution based on Internet Protocol Security has been presented to provide safe D2D exchanges.

Without massive MIMO technologies, it wasn't easy to deliver IMT-2020 standards [38]. MIMO systems methods were classified individually for indoor and outdoor situations to improve performance. Peak amplitude, larger bandwidth, capacity doubling, and power savings were among the notable achievements of massive MIMO above traditional MIMO. Therefore the forthcoming 5G networks require massive MIMO. From the literature analysis, designing a new D2D system with higher processing speed and lower error was necessary.

The proposed work addresses the following main research gaps:

  • To maximize the spectral efficiency of the proposed system compared to the existing WSN system.

  • Optimize network lifetime, minimize network delay, and reduce energy consumption.

  • Maximizing energy efficiency by minimizing energy consumption.

  • To maximize the packet delivery ratio and minimize the end-to-end delay.

  • To maximize Resource distribution in wireless networks that can be evaluated with index fairness analysis.

  • Compare and analyses the performance of the proposed protocols in terms of spectral efficiency, delay, Index fairness, and accuracy.

As part of our work,

We proposed deep learning-based improved D2D communication (DLID2DC) architecture for 5G communications. The proposed system is intended to use the exterior public cloud to replace automation with an explainable artificial intelligence (XAI) method to analyze the communication needs, select a methodology and practice, and transfer machine language from the remote server to the smartphone as needed functioning. The proposed system also uses CNN to improve its effectiveness and evaluated in terms of spectral efficiency, delay, index fairness, and accuracy and compare with D2D and wireless sensor network (WSN) system.

3 Deep Learning-Based Improved D2D Communication Model

The primary elements that determine efficiency for D2D communications are network identification and interruption control. The effectiveness of current D2D networks is problematic. However, due to the diverse requirements of dynamic mobile device methods and protocols, the significance depends mainly on the range among nodes within the network of customers in the vicinities. Moreover, the methods and their respective algorithms can be defined beforehand without considering the existing circumstances and needs. Direct device-to-device (D2D) communication ‘eliminates the requirement for a central base station or access point by directly allowing devices to exchange data. Interference control, resource allocation, and beamforming are examples of where deep learning can be applied in D2D communications. Deep learning has the potential to be especially helpful in interference management. Other devices using the same frequency band as D2D communications can cause disruptions. The performance of D2D communication can be enhanced by applying deep learning to understand the interference patterns and develop interference control solutions.

Deep learning can also be used to improve resource allocation. For example, direct-to-device (D2D) connectivity uses scarce assets like bandwidth and energy. To maximize the effectiveness of D2D communication, deep learning can be utilized to devise strategies for allocating available resources in the most efficient way possible. The use of deep learning in D2D communication also extends to beamforming. Beamforming is a technique whereby many antennas focus a signal in a certain direction. Beamforming methods that maximize signal quality while minimizing interference can be learned using deep learning. By providing smart interference control, resource allocation, and beamforming, deep learning has the potential to greatly boost D2D communication's performance.

To handle the different needs concerning the situation: first of all, it needed to assess the current needs of the networks. Secondly, cost estimates play an essential part in the reference architecture. Therefore, using biorthogonal spline wavelets, an acceptable cost evaluation method for the spectral processing of filtering based on AI, is used. Thirdly, the appropriate, cost-effective technology and its protocol are selected for implementation in the D2D networks. In the smartphone in the 5G-based D2D networks, the right technology and related protocols are ultimately used to achieve optimum efficiency. Given that the portable device's processing computing and memory space are insufficient, the smartphone's challenging procedure for software defined radio (SDR) is complicated.

The proposed system is intended to use the exterior public cloud to replace automation with an explainable artificial intelligence (XAI) method to analyze the communication needs, select a methodology and practice, and transfer machine language from the remote server to the smartphone as needed functioning.

The architecture of the proposed DLID2DC model is illustrated in Fig. 1. It has a base station, user equipment, and an aggregator server. The aggregator server is connected to the database, analysis module, protocols, learning process, and network security module. But on the other side, XAI aggregators in the super-fast distant central server control and regularly monitor the whole activity. This XAI aggregator unit links and controls four aggregator sites: auto-learning and Processor, the network databases, transmission of techniques and procedures (TTP), and performance assessment. The TTP comprises all the protocols and techniques for improving system effectiveness. In addition, profound Q-learning, together with supervised methods, is used in the assessment to make final decisions. In addition, AI-based path search techniques are utilized to analyze the current Internet traffic effectiveness.

Fig. 1
figure 1

The architecture of the DLID2DC model

Because of the difficulties of linking each D2D Networks node to the XAI aggregate unit, the transitional masters node (TMN) via aggregator by linear programming is picked as one device in various D2D networks. TMN is able, using the IEEE802.11b specifications and the MIMO- based 5G data Networks, to relevant questions namespaces to the XAI aggregating unit. This TMN connectivity aims to decrease the danger of interfering and to improve D2D effectiveness.

3.1 XAI Aggregation Unit

Explainable artificial intelligence (XAI) processes and methods enable humans to trust and comprehend machine learning algorithms. An AI model that can be explained refers to its biases and impacts. It refers to the accuracy, fairness, transparency, and outcomes of an AI-powered decision-making process. Aggregator operates as the core of the whole XAI Aggregation site unit and makes its final choices. The activities and methods provided in each system model's aggregators are shown below.

3.1.1 Security Connection

The AI processor improves safety on the D2D connection and analyses of the 3-step aggregators.

3.1.1.1 Gathering Network information

Efficient routing as saults like eavesdropping, tapping, and denial of service (DoS) are tracked regarding the data collection methodology. Data collection is monitored. In particular, AI management, which improves the surveillance system’s effectiveness, is implemented to capture attackers or capture their tactics. AI analyzed even the content written in social networks to examine ads or traps used by attackers to draw attention to their virus connection or program.

3.1.1.2 Information organization

It is difficult to arrange computer security data effectively without deep learning after data collection. Therefore, massive data storage and Organizations based on artificial intelligence and cloud computing are recommended. In addition, other blocks of safety aggregation can utilize massively parallel techniques to increase the system organization skills through algorithms and approaches applied in the big data platform.

3.1.1.3 Implementation of crosschecks and protocols

Crosschecks are conducted regularly to assess interruptions of perceived attacks and identify problems in existing networks. Appropriate security procedures are subsequently applied using AI through the algorithms of the tree structure, as choices based on the classification values are required.

3.1.2 Network Database

D2D subscriber profiling, subscriber's outlook, radio access network (RAN) viewpoint, and subscriber’s mobility patterns are the most frequent metrics to monitor and save for additional reference. Cellular radius, capacity, ground station transmitters power, radio environmental mapping, transport profile, subscriber-centered wireless offloading, and submitter power are also used. Noise in primary user, thermal sound power D2D pair length, carriers frequency, the expression for path loss among sensors, the indication for path loss among base station (BS) devices, loss of coefficient of determination between equipment, loss of pathway between BS operating systems, efficiency enhancement, independent loading energy in BS, BS antenna energy, cellphone power per customer device are analyzed. The database saves all parameters. The integrated AI concept in a big data lagoon is utilized efficiently in network connectivity. It refers to administrative systems engineering based on the lengthy descriptions of variables, customer satisfaction, data from various connections, local entrances, SDRs, routers, and more. Data are collected from several servers, gates, and outcomes that allow the 5G cloud-based SDR system to be founded using the same approach.

3.1.3 Techniques and Protocols for Transmission

Signal noise ratio (SNR) based D2D development, cell orthogonal receptive disclosure (pull), and proactive, reactive institutional development techniques are the most commonly used. In addition, federally funded intervention canceled flights, BS-based minimum electronic systems, genetic algorithm (GA) based user-assignment and worksheet, marketing techniques, and centralized power electronics are used to interference-mitigation ways. The TPT encodes all such techniques required for executable files. Moreover, the created processes are also kept in TPT after the authorization of the aggregator to continue the implementation. Cloud computing pond is also utilized for server installation.

3.1.4 Performance Assessment

The D2D systems' findings are considered in two different techniques and are improved frequently by the aggregator and database.

3.1.4.1 Self-Evaluation

The q-learn method combined with adaptive-greedy is used to assess strategies of the transmission control protocol (TCP) based D2D networks, which contain many complex methodologies such as TCP Tahoe, TCP NewReno, TCP Westwood, TCP compound, TCP Vegas, etc. In this circumstance, it is now impossible to determine specific approaches from the necessary network needs. The adaptive greedy system based on Q-learning is used for quick evaluation and understanding.

3.1.4.2 Behavioral Analysis

The analysis is compelling and similar to the false emotional patterns as the D2D systems behave in identical situations and settings in many respects. The choice of artificial conduct is made following a moral assessment. In addition, brain structure is formed, and the same self-learning approach is utilized afterward for emotional network psychology.

3.1.4.3 Evaluation of Feedback

Increasing the use of D2D cellular telephones is unavoidable. Proper feedback systems are necessary to handle these network activities. The critical feedback aspects, such as the continuous rate adaptation method, QoS, which increases the efficiency of the D2D system, are evaluated.

3.1.4.4 Self-Learning and Processing

An understandable, deep-learning architecture is created to understand cellular user equipment (CEU) behavior and grasp the primary theoretical conventions on D2D systems to utilize XAI for self-learning. In addition, the D2D self-paradigm offers the framework for adaptive advanced analytics and AI, which contribute to complex activities such as resource optimization, data-based coverage, etc. A stochastic convergence technique is also created to finalize the processing procedures.

3.1.5 Main Server Aggregation

Main server aggregation (MSA) takes the last option to select an optimal approach based on profound enhanced training through many Deep Q-Networks for outstanding system functioning aside from choices advised by aggregation in specific PA and SLP. Moreover, MAS retains precedence for decision-making based on D2D network performances based on bargaining strategy from multiple collections.

3.2 Convolutional Neural Networks (CNN)

The proposed method uses CNN to improve its effectiveness. Border Node (BN) processing is the method of normalizing each node in the CNN structure that adapts the digital output values of each layer’s kernel function to the correct range. Techniques such as droppings are substituted through BN, increasing the acquisition rate. The BN system can therefore increase the learning pace and address the weight reduction and losing weight issue. The D2D communication model of the DLID2DC system is depicted in Fig. 2. It has user and user equipment. The user equipment receives a signal from a direct signal and an interference signal.

Fig. 2
figure 2

D2D communication model of the DLID2DC system

The channel power is denoted cxy and the expected value is denoted as E. Figure 3 shows that the outcome is normalized by connecting additional BN procedures in a basic convolutional approach. Equations (1) and (2) show each batch's convolutional and normalization functions for transferring the information.

$$E=\frac{{C}_{xy}+{B}_{x}}{{C}_{xy}+{J}_{xy}}$$
(1)
$${G}_{\alpha \beta }=\delta {C}_{xy}+{J}_{xy}-{\beta }_{x}$$
(2)

where α, β, and δ are a median mini-batch, mini-batch default, and a numerator value that does not reach 0. \({C}_{xy}\) represents the channel power, \({\beta }_{x}\) represents the normalization procedure. \({J}_{xy}\) represents the convolutional function.

Fig. 3
figure 3

Architecture of CNN based on improved D2D communication model

In the failure functions, Y determines what is most important in the optimum Sx and optimal Hx of the CNN and 0 < β < 1. The bias variable is denoted β. The incoming and outgoing variable input is denoted Sx and Hx.

The CNN architecture of the proposed model is shown in Fig. 3. It has eight layers. Each layer has batch normalization, fully connected functions, and sigmoid functions. In particular, when β is near 1, the transmitting power of the gadget is selected without regard to fairness, but when β is near 0, total equity might prevail. At the same time, maximizing system efficiency (SE) is complex. The way of maximizing the system efficiency is shown in Eq. (3)

$$E=\left.\begin{array}{c}{S}_{x}+\beta \\ {H}_{x}+\beta +\gamma \end{array}\right\}$$
(3)

The system efficiency is represented as E, \({H}_{x}\) represents the outgoing variable, \({S}_{x}\) denotes the incoming variable. To maximize Hx, the Hx value of the suggested model would be one. In other words, it requires discovering β# to meet the optimum Hx. Upon discovering all feasible β# values, it selects the highest β# values to maximize the SE number while at the same time attaining full equality. Following the above-mentioned approach, the suggested CNN-based learning scheme has been taught. The training set can calculate the transmission rate by monitoring the stream instantaneously. Note that, even on a trained network, the suggested model offered adequate transmitting power for multiple channels; the well-trained weights and binocular values of BD and wD in CNN are used. The following algorithm cleans and normalizes data.

figure a

The initial stage of the algorithm has the input and the output variables. The collection of data is given as \(cd\left(\right)\). The data \({Z}_{x}\left(s\right)\) is was then cleaned by a separate function called \(cp\). For each x value, the data cleaning stages are done. If the input variable is given with the integer E, cleaning is done with cd () #. The bais variable conditions are performed for normalizing the data. At last, a tool called normalized data nd is used to standardize the cleaned data for input.

3.3 Methodology

Mobile customers can connect without going through a ground station, which could result in higher bandwidth usage. The D2D connection can also cause interference with online services if not built correctly. This study studied an optimization problem of network performance by ensuring customer satisfaction for both D2D clients and conventional wireless users throughout the research. All intelligent devices can be linked via a mobile ad hoc network (MANET) in a decentralized manner. MANET is a self-organized collection of mobile communication nodes that establish a transitory network even without the help and centralization of fixed network facilities.

The D2D decision-making model of the proposed system is shown in Fig. 4. It has perception, D2D environmental analysis model, behavioral decision, and artificial internal emotion module estimation. Texts with a source outside this neighborhood zone must be skipped or sent by those neighbors who function as gateways to the right destination. As implied by using physically connected devices, raising resource usage, and improving cell wireless coverage, the D2D interactions underlying a cell network were recommended. D2D use scenarios are divided into two broad regions. In the first segment, the pair-in-peer method is termed where the D2D devices are transmitters and recipients of the transmitted information. The second portion of the transmission example involves the transmission to the targeted gadgets of data disseminated by one of the participating D2D gadgets to the Nodes.

Fig. 4
figure 4

D2D decision-making model

3.3.1 Intelligent Gadgets Probabilities

Suppose that the probability-based system has MANET architecture. The internet of things (IoT) module has three-dimensional orientations on the functioning, y-axis, and z-axis. The entire area is split into cells across the cellular network. This area is maintained to allow intelligent gadgets to move inside the cell. IoT nodes will detect neighboring devices in the same cell field in hexadecimal numbers. The licensed intelligent device limits data to another gadget. The findings perceived demonstrate that only among neighboring cells can conscious movement happen. Furthermore, data are distributed with a weighted particular angle and motion likelihood. The angle advantages from the easiness of an IoT device, which monitors the objective, splits the designated target and adjusts the inclination.

3.3.2 Discover the Clever Gadgets of the Markov Chain

In the 2-dimensional planar area, the secret Markov algorithm is utilized to find intelligent gadgets. The modeling is linked to the working environment and devices moving in the neighborhood, and the modeling is included in the spectrum of neighborhood gadgets. It built the transition probability matrices through the wireless connection, detecting and converting all intelligent objects.

3.3.3 Find the Intelligent Gadgets Utilizing Gradient Models

The gradation model identifies the gadgets and shares knowledge to create and send data to find the connected devices. This trend is maintained via communication between the intelligent Android phones and simply through the adaptability of the intelligent Android phone intrinsic in the MANET. The gradation value set to 1 is also used to identify Android-connected devices in an area where an ad hoc connection is formed and where the destination is recognized by an Android computing phone. Its gradient data is the field in which some time has been concentrated. It utilized the intelligent gadget to reduce this power exponentially over time.

Thus, while evaluating the gradient systems, the performance rate of the proposed model is better. Consequently, it utilized the gradient model to define the ad hoc network between intelligent Android phones. The WiFi association has launched emerging innovations such as WiFi Direct, which seek to enhance direct D2D interaction in wireless internet. The efficient use of enormous capacity to increase data circulation is essential to allow D2D communication through directed millimeter-wave technologies.

The proposed DLID2DC system is designed with a CNN model and artificial intelligence. The proposed is explicitly intended for 5G networks; the operation and the error probability of the received signal are shown in this section.

4 Result and Analysis

This subsection examines the efficiency of this suggested method. Simulations are performed using Java and MATLAB. Scenarios include a surface area of 1500 × 1500 m, one BS, and user equipment ranging from 10 to 1000. In the middle of the square is the BS of the experiments. The experiment is based on the data collection and the area occupied by the number of devices. The number of devices varies according to the area occupied by the minimum number of devices. The surface area around certain meters with the user equipment is connected utilizing WiFi Connect, and LTE Direct. The number of devices with a large amount of area increases the system's performance. Table 1, shows the simulation parameter.

Table 1 Simulation parameter

Figures 5 and 6 show the spectral efficiency and required power analysis of the proposed DLID2DC system, respectively. The simulation analysis is carried out by varying the number of devices in the simulation area from a minimum of 10 to 1000 devices. The respective spectral efficiency and required power of the proposed DLID2DC system are analyzed and plotted. As the number of devices in the simulation area increases, the individual performance of the system increases. The increased number of devices helps to better communication and coverage.

Fig. 5
figure 5

Spectral efficiency analysis

Fig. 6
figure 6

Required power analysis

Table 2, shows the spectral efficiency of the proposed DLID2DC system. The simulation analysis changes the number of nodes from a minimum to a maximum level. Concerning the number of nodes, the spectral efficiency of the WSN and the proposed DLID2DC system are analyzed and tabulated. The results show a higher spectral utilization of the proposed DLID2DC system than the WSN. This is because the proposed DLID2DC system with CNN architecture and artificial intelligence uses a higher spectrum in 5G communication.

Table 2 Spectral efficiency of the proposed DLID2DC system

The delay analysis of the WSN model and the proposed DLID2DC system are shown in Figs. 7 and 8.

Fig. 7
figure 7

Delay analysis of the WSN model

Fig. 8
figure 8

Delay analysis of the proposed DLID2DC

The delay of the proposed and existing models is analyzed by varying the number of nodes in the simulation area from 10 to 1000. Then, the individual results are analyzed and plotted. The proposed DLID2DC system with AI and CNN model with error analyzing mathematical model reduces the complexity and overall delay. However, as the number of devices increases due to processing delay in every node, the overall delay of the system increases. Table 3, indicates the required power analysis of the proposed DLID2DC system. The number of nodes in the simulation area changes to 10, 20, 30, 40, 50, to 100, 200, 300, 400, 500, and 1000. The power required to transmit a single message is analyzed for the proposed DLID2DC system and compared with the existing one. The proposed DLID2DC system with CNN model and artificial intelligence reduces error, thus results in lower utilization of power. The mathematical model of the proposed DLID2DC system is utilized to predict the necessary power to transmit a message.

Table 3 Required power analysis of the proposed DLID2DC system

The delay analysis of the WSN model is high when compared with the DLID2DC system. By changing the number of nodes in the simulation domain from 10 to 1000, we compare the proposed and existing models' latency. The accuracy analysis ratio is high when compared with D2D communication in networks.

Resource distribution in wireless networks can be evaluated with index fairness analysis as shown in the above Fig. 9. Distribution analysis determines whether the system’s resources, such as time slots or frequency bands, are allocated fairly among the various users. When applied to a wireless sensor network (WSN) model, index fairness analysis can determine how fairly distributed network resources are distributed to individual sensor nodes. In particular, index fairness analysis can assess the WSN model's resource allocation algorithm's fairness.

Fig. 9
figure 9

Index fairness analysis of the WSN model

The index fairness analysis of the existing WSN and the proposed DLID2DC system are depicted in Figs. 9 and 10. The simulation area for the research is varied from a minimum of 10 m to a maximum of 100 m. The respective fairness index of the system is analyzed for the same number of nodes, and the results are compared with the existing WSN model. The proposed DLID2DC system exhibits higher index fairness. The proposed DLID2DC system with artificial intelligence and CNN model assures better fairness. As the simulation area increases, the index fairness also increases.

Fig. 10
figure 10

Index fairness analysis of the proposed DLID2DC system

The proposed DLID2DC system is designed and tested in this section. The simulation outcome shows the better results of the proposed DLID2DC system with the CNN model, artificial intelligence, and mathematical model in the 5G communication area. In the above Fig. 10. the Fairness of resource allocation among devices implementing the proposed DLID2DC system for D2D communication may be evaluated with index fairness analysis. In particular, the system's resource allocation mechanism based on deep learning may be evaluated for fairness using index fairness analysis.

The above Fig. 11 visually represents a model's prediction accuracy. In the context of D2D communication, an accuracy graph evaluates the predictive efficacy of both the baseline D2D model and the suggested DLID2DC model. The accuracy graph demonstrates that the DLID2DC model outperforms the baseline D2D model in forecasting the efficacy of D2D communications under different conditions. The graph also shows the DLID2DC model operates best, which is useful information for improving D2D communication system design.

Fig. 11
figure 11

Accuracy analysis

4.1 Discussion

D2D communications face numerous challenges that need to be addressed in an organized manner by using various approaches to improve system efficiency, such as the internet of things (IoT), vehicle-to-vehicle (V2V) technology, and artificial intelligence (AI) [3]. Several difficulties need to be addressed, including device discovery, mode selection, power control, voltage control, security, radio resource distribution, cell compaction and downloading, and quality of service (QoS) selection[4, 5]. In the development of D2D, the critical element is the sharing of the capabilities of D2D and cellular links in terms of capacity and frequency [8]. D2D connectivity can improve energy consumption, production, equity, and time [9]. For this innovation to take hold, D2D communication technology faces many obstacles [10]. D2D requires resource management strategies, device discovery mechanisms, intelligent mode selection algorithms, security, standards, and data transmission methods [11].

Machine learning is one of the most promising methods to understand the influencing factors and specific aspects of communication systems, as it provides the best solution for communication networks. The use of artificial intelligence and machine learning in computer networks has been the subject of many studies, focusing on issues related to regulating system performance based on latency and low traffic density [12]. Resource allocation and power control solve the interference coordination problem in deep Q networks (DQN) [14]. D2D can meet many of the 5G criteria by supporting high data rates and minimizing delays between D2D user equipment (UE). D2D can meet many of the 5G criteria by supporting high data rates and minimizing delays between D2D user equipment (UE). D2D links can improve performance, energy consumption, time delays, spectrum efficiency equality, capacity redistribution, and interference reduction. D2D can also reduce the power consumption for interconnecting D2D devices since the communication range is shorter [15].In recent years, explanatory artificial intelligence (XAI) has played a significant role in being transparent and interpretable. The development of fuzzy structures (EFS) and XAI is also the solution to complicated analysis and definition solutions; including concurrent learning, rule selection, rule teaching, a database that needs to learn, and variable setting [18]. The 5G study uses many methods, such as monitored, unmonitored, and AI-based enhancement learning [19, 20].

In this paper, we present an improved D2D communication model for 5G networks called deep learning-based improved D2D communication (DLID2DC). The approach maximizes spectrum utilization by analyzing communication demand and applying deep learning methods for resource allocation. Throughput, end-to-end delay, fairness, and energy efficiency are all areas where the DLID2DC model has been shown to outperform conventional approaches. Therefore, this paper proposes new techniques in conjunction with existing AI approaches to integrate XAI and improve the efficiency of D2D communication systems.

Spectral efficiency, end-to-end delay, fairness, and energy efficiency are all areas where the DLID2DC model has been shown to excel compared to conventional approaches. In terms of the number of nodes, spectral efficiency of WSN and the proposed DLID2DC system, the results show higher spectral utilization of the proposed DLID2DC system than WSN. This is because the proposed DLID2DC system with CNN architecture and artificial intelligence uses higher spectrum in 5G communication. The proposed DLID2DC system with CNN model and artificial intelligence reduces errors and thus results in lower power consumption. Comparing the WSN model with the DLID2DC system, the delay analysis is higher for the WSN model. To compare the latency of the proposed model and the existing model, the simulation range was extended from 10 to 1000 nodes. Compared with D2D communication in networks, the ratio of accuracy analysis is high. DLID2DC has higher index fairness than other systems. With AI and CNN, DLID2DC ensures a fairer system.

The fairness indicator, like fairness index, to determine whether resources have been distributed fairly across the network. The proposed DLID2DC model compared with the WSN, D2D, end-to-end delay is less for the proposed method, and index fairness analysis also depends on the area used by the number of devices. The results of the proposed DLID2DC model were compared with those of conventional approaches and it was found that the former model has a fairer distribution. Measuring the energy consumption of individual network nodes using the DLID2DC model and conventional approaches to evaluate energy efficiency. The results show that energy efficiency was improved by using the DLID2DC model. An accuracy plot is used to evaluate both the baseline D2D model and the proposed DLID2DC model in terms of their predictive power.

The accuracy plot shows that the DLID2DC model outperforms the baseline D2D model in predicting the effectiveness of D2D communications under various conditions. The DLID2DC model performs best, which provides useful information for improving D2D communication system design. The claim that the DLID2DC model is superior to conventional approaches in terms of spectral efficiency, throughput, end-to-end delay, fairness, and energy efficiency is most likely based on experimental tests and analysis of data obtained from these experiments. An AI framework managed by D2D systems for reliable 5G-based networks has been proposed to solve D2D network problems and meet IMT-2020 criteria. Potential XAI-based aggregations were presented with suitable technologies and methods that best fit current D2D networks. The proposed architecture is a suitable XAI-based D2D platform for extending and modifying the presented approaches and methods related to D2D and XAI depending on the specific requirements of the upcoming 5G D2D network.

5 Conclusion and Future Scope

This study proposed an AI framework managed by the D2D systems for reliable 5G-based networks to resolve D2D-network problems and fulfill IMT-2020 criteria. Potential XAI-based aggregations were presented with appropriate technology and methods that best match the current D2D networks. This article has proposed deep learning-based improved D2D communication (DLID2DC) in 5G networks. The suggested architecture is an appropriate XAI-based D2D platform for expanding and modifying the approaches and methods presented concerning D2D and XAI depending on the specific needs of the forthcoming 5G D2D network. The new D2D and AI methods with the following guidelines enhanced the proposed work on the suggested platform. In addition to developing middle-range theories through this research, researchers are able to refine theory through an alternative philosophical paradigm. However, the recommended approaches and procedures for aggregator sites cannot be limited to these methods. Future deep learning methods may be modified or extended based on simulations and real investigations in some notable ways.

Symbol Table

Symbol

Name

E

System efficiency

cxy

Channel power

α

Median

β

Mini-batch

δ

Mini-batch default

\({\upbeta }_{\mathrm{x}}\)

Normalization procedure

\({\mathrm{J}}_{\mathrm{xy}}\)

Convolutional function

Y

Failure functions

Sx

Incoming variable input

Hx

Outgoing variable input

β

Bias variable

BD

Binocular values

wD

Well-trained weights

\(\mathrm{cd}\left(\right).\)

Collection of data

\(\mathrm{cp}\)

Separate function