{'fraction_non_alphanumeric': 0.025232403718459494, 'fraction_numerical': 0.005624560581204594, 'mean_word_length': 4.8925201380897585, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bernoulli Vacation Scheduling (BVS) Model for Energy efficient intrusion detection in WSN

Cutting-edge wireless sensor networks, security is the most important challenge that has to be considered. Most of the applications of WSN are vulnerable to attacks, as they are deployed in any kind of environment. So, the intrusion detection system is the second line of defense for WSN. The intruder should be detected in WSN more efficiently. We introduce the Bernoulli scheduling rule such that several trials are performed to get the detection of an intruder to be successful once. Since the sensor nodes are always active for detecting an intruder, the energy consumption becomes high. To reduce the consumption of energy, sleep/wakeup, also called small interval vacations are used for the sensors which are almost considered to be like the mechanism of fluid queues. In our proposed work, the vacations are introduced so that the energy used is minimized whenever the sensor is not required to be active. Thus, in our proposed work, since WSN is vulnerable to many harmful attacks, the Bernoulli scheduling rule is applied and the sensor nodes have a vacation state whenever the sensor need not be active, to save the energy consumed. The probability of detecting an intruder is calculated and performance is compared. We have applied a fluid queuing model for the vacations of small intervals in the sensor nodes to minimize the energy consumption and the obtained result is compared with the energy consumed when the vacations are not applied. Thus, the results are simulated for both energy consumed and the number of success rates of detection of an intruder, most importantly the comparison is analyzed with the past work of wsn.


Introduction
The sensor nodes are scattered in Wireless Sensor Network (WSN), which is an 'applicationspecific' network. It consists of tiny sensor nodes with energy limited and smart nodes of sensors. Every node in the network is capable of detecting a certain situation, processing some limited data, and communicating with each other [1]. WSN is mostly used in physical environments, which is collected by the small device called nodes; these nodes send information periodically to sink and retrieve information from the region in informationgathering apps and send it to the sink [2]. WSNs are often defined by resource-limited dense implementation in environments. However, the constraints are due to processing capacity, storage, and energy in particular because they are generally driven by batteries [3]. Recharging the batteries in the network of wireless sensors is sometimes impossible due primarily to the place of the nodes. Many sensor nodes are merged to create a wireless network of sensors that differ tightly within the critical areas [4]. This sensor position cannot be reconfigured and this particular sensor's battery cannot be charged in critical are such as battlefields, thick forests, disaster-prone fields, and much more [5,6]. These kinds of networks are used in many apps today, which vary in their goals and particular limitations. A sensor normally persists in these situations: an awake state and a sleeping state. A sensor in the waking state makes the size, some computations are performed and then the information is communicated to the center. The centers behave as a controller as well as a decision-maker. As sensors are energy-constrained (limited),a stringent requirement of the algorithm must be imposed encountering energy efficiency as the major factor. These imposed algorithms can be employed in the controller, i.e. fusion center.
The model of Intrusion detection [7] in WSN introduces some of the essential parameters like the range of sensing, node density, energy efficiency, accuracy, and so on. In the field of interest, the sensors are placed, where WSN can adapt to change in the topology of the network and the environmental conditions. The model can be designed for Intrusion detection based on a single node or multiple nodes of sensors and its sensing detection range, in WSN. One of the issues in WSN is the sensing coverage area and how accurately the monitored area is tracked or detected. Since, the analytical method is used to quantify the sensing range and other QoS parameters like buffer capacity, a period of sleep/wake of sensors, and also energy consumed during the process, other queuing models are used to limit the capacity of the buffer and schedule the vacation time of the sensor nodes.
Bernoulli's Rule Bernoulli's law stems basically from the theory of energy conservation. This states that at all stages in a streamline, the sum of all forms of energy in steady flow is the same at all. It means that there is a constant sum of kinetic energy, potential energy, and internal energy. The proposed scheduling algorithm determines the nodes of the sensors based on their active, idle, and sleep modes. In order to assign time slots to all cluster participant nodes, the time ON and time OFF variables are computed for nodes that are either in sleep or active mode. The waiting time for sensor nodes in the cluster member is computed on their listening, sleeping, and activation level status. Additionally, it is presumed that sensor nodes regarded are of mobile nature and that the clusters are reorganized as a function of time.

RELATED WORK
In [8], the authors modified LEACH (MODLEACH) one of the most efficient wireless sensor networking protocols. In [9], the authors proposed a technique in which the hop's highest energy node becomes a cluster-head. The size of each cluster is, therefore, less than and/or equivalent to hops. The head of the cluster sends information to the other cluster head or sink with a tree-based minimum energy transmission algorithm owing to the transmission range restriction of nodes. The authors conducted simulations to compare its efficiency with standard routing protocol performance, such as direct and minimal transmission energy, and different energy levels.
In [10], the authors considered network cardinality estimation schemes that use the calculation of bit-wise maxima over strings as their basic aggregation mechanism. Therefore, under frequent assumptions, they evaluate how to effectively and efficiently select the parameters of the data generation process on the estimate, obtain the resulting Maximum Likelihood (ML) estimator and characterize its statistical performance as a function of communication and memory requirements. The authors have then compared the bitwise-max based estimator numerically with the lexico graphic-max based estimators and obtain insights into their comparative performance according to the real cardinality. The authors proposed a new, effective algorithm to calculate IOP Publishing doi:10.1088/1757-899X/1049/1/012007 3 The area covered by sensors in a region with transparent and opaque barriers and explores the issue of identifying and eliminating redundant sensors to enhance energy efficiency while maintaining network coverage. The suggested algorithm [11] utilizes methods of computational geometry and applies to both homogeneous and heterogeneous WSNs.
The authors [12] considered the redundancy of sensors in WSN and they performed an experimental study to better emphasize the importance of its use. They also introduced OER' Redundancy-based Energy Optimization,' a protocol that takes advantage of redundancy to save energy. Besides, they also stretch OER through a mechanism of fault tolerance. They demonstrate how OER coupled with the FTMO route performs traditional routing protocols that do not exploit redundancy through comprehensive simulations. The first break down in the power usage of the typical sensor node parts is discussed as the primary power preservation guidelines in WSN's. Then they presented a systematic and thorough taxonomy of energy conservation systems. Special attention has been given to promising alternatives, such as methods for energy-efficient data acquisition.
In [13], the authors, have proposed for WSNs an A-star algorithm, a fresh energy-efficient routing protocol (EERP). By forwarding data packets via the ideal shortest path, the suggested routing system increases the network lifetime. In terms of the next-hop sensor node's highest remaining energy, elevated connection quality, buffer occupancy, and minimum hop counts, the ideal route can be found. Simulation findings showed that the system suggested by the authors increase the lifetime of the network compared to the protocol A-star and Fuzzy Logic (A&F). In [14], the creators, proposed a vitality productive rest arranging component with a closeness measure for remote sensor systems (ESSM) to design sensors in either dynamic or rest mode so as to proficiently diminish vitality utilization. Initially, to adjust vitality utilization, the ideal span of rivalry is assessed to arrange all sensor hubs into a few groups. Second, a fluffy grid can be accomplished to assess the level of similarity as per the data accumulated by part hubs, and the relationship work dependent on the fluffy hypothesis can be set up to part the sensor hubs into different classifications.

MOTIVATIONS AND PROBLEM STATEMENT
The issues of the past work have been analyzed and such issues have been motivated for various reasons that include the random deployment in any region, with randomly distributed sensor nodes. The efficient deployment can be obtained in the compulsory sensing attention. However, specifically, given the region for monitoring in WSN, what makes us assure that each contact of the specified region is provided security by the number of sensors needed and covered at that point in the region? Thus, to be specific, the areas where the required sensors need to be deployed have to be identified such that the probability of detecting an intruder can be increased, and also the intruder will not be able to exceed the threshold set for the distance. Additionally, the issue of conserving energy is the challenging factor in WSNs, mainly due to the regulated energy supply by the sensor nodes, computational Capacity, and the availability of storage space. Therefore, it implies that the sensor network should have the capability of self-organization. Importantly, the required number of sensor nodes must be selected and placed effectively in the region of network coverage. The sensor's power is put in a state of ON/OFF so that the sensors will be in sleep or wake state to enhance the lifetime of WSN.
The proposed work considers the fluid queuing model for efficient utilization of the server in the network and also vacation scheduling using Bernoulli rule to improve the energy consumption of the sensor nodes. This model is termed as Bernoulli Vacation Scheduling (BVS) Model.

INTRUSION DETECTION MODEL
Intrusion detection designed in WSN is defined as the technique to detect the abnormal activity in the network in a certain range of sensing and also to detect the unauthorized anomalous attackers in motion or intrusions. The deployment of deterministic nodes is determined by analyzing sufficiently, before the deployment of the network. However, IOP Publishing doi:10.1088/1757-899X/1049/1/012007 4 whenever a deployment is required is random, the deployment quality should be determined and is the challenging issue in WSN. Thus, the qualities of the deployment of sensor nodes can be assessed by applying appropriate measures and determine the weakness in the sensing coverage area of WSNs. This can be determined by calculating the probability of intrusion detection and the success ratio. One of the fundamental issues in WSN and its characteristics requires considering the parameters like sensing range and node density w.r.t high probability of detection. In this section, the model of probabilistic detection of intrusion is discussed which provides a high accuracy rate and thus obtains high energy saving.

4.1.
Probability and its Sensing Model A network topology deployed randomly is considered, with all the nodes deployed randomly in the area of interest. The quality of deployment increases as there is an increase in the probability of detection. The sensing model is designed and the probability is carefully coupled and the particular application of sensors. The type of the device used for sensing, and adopt a sensing model to compute the probability whereas the sensor node detects the occasions situated in the region of the sensing region. All the sensor nodes are unspecified that they have a similar sensing range. The node density λ with the number of sensor nodes 'N' are deployed in the sensor network distributed uniformly over the surface area S. For every sensor node, the probability of sensors within the sensing range RSENS is determined at a distance of point by using the Bernoulli experimental rule, where the likelihood of detecting success rate is given by, Thus, a binomial distribution is formed within the distance RSENS for the number of sensor nodes.
The probability calculated earlier is further represented by the succeeding equation: The single sensor is used for detection and the probabilityܲ = ݁ ିఒௌ , when no sensor can detect an event in the area within the sensing range is considered in the scenario. The complement of the probability ܲ is that, at least one node that is a sensor detects an event. Thus, the probability of sensing model is represented by, Agreeing to the scenario of intrusion, the starting point of an intruder is taken randomly in the area of sensing. Thus, the moves are made arbitrarily as demonstrated in figure 1. To calculate the probability of an intruder that cannot surpass the value set as the threshold distance l ୌୖ is as below Let us assume that a distance threshold ‫ܫ‬ ்ுோ = 0 The probability of detecting an intruder in WSN with N number of random nodes distributed in a region A with a length of edge L considering uniform distribution is represented with the equation below. We also consider that all the sensors those are deployed are static, thus immediately detection of an intruder can be obtained by the equation below: Thus,P ୲୦୰ୣୱ୦୭୪ୢ_ୱୣ୬ୱ୧୬ is depicted as the threshold probability. All the sensor nodes with its sensing range are set as follows: In the applications of WSN, the required numeral of sensors depends on the coverage IOP Publishing doi:10.1088/1757-899X/1049/1/012007 5 quality of the sensors. By the deployment of nodes, the degree k for specified coverage, fork>0, the probability that an intrusion detection P within the threshold of Intrusion distance l ୌୖ can be represented by the multi-sensing model as below: Here, the surface through which the intruder has swept is denoted by S, with a trajectory l as: The sum of partial densities λ is: As the sensing scale and the no. of nodes per elements are increased, the probability of detecting an intruder in both single sensing model and many-sensing model also increases. Thus, the formulae discussed above depict the optimal sensing range values and the node density to cover the total sensing area.
The distance of an intruder l can be calculated by the parametric curve length using, The intrusion detection probability where the threshold distance l ୌୖ exceeding in WSNs with the density of node λ, range of sensing R ୗୗ and node availability p in the single sensing is determined by P(n ≥ 1, 0 ≤ l < l ୌୖ ) = 1 − e ൫ଶୖ ుొ ୪ ౄ ାୖ ుొ మ ൯୮ (11) The probability P for detecting an intruder within its distance of intruder with thresholdl ୌୖ in the multi-sensing i.e. k-sensing in WSNs of compactness of nodeλ, range of sensingR ୗୗ with the availability of node, p is controlled by

4.2.
Working Vacation Scheduling of Sensor nodes Thus, the problem is to find the quickest change in the detection of an intruder by finding the minimal observations and builds the Bayesian framework using Markov Decision Process (MDP). This formulation takes the parameters as, cost caused due to delay in detection, false alarms, and cost estimated per unit of the network of sensor nodes. Thus, the sleep/wake state of the sensor node is best suitable when a threshold is applied, and many small working vacations can be performed between the time intervals, based on the probability of detection of an intruder.

4.3.
The Bernoulli working vacation Process The sink node selects any of the sensor nodes to begin the working vacation when there is no activity required within its range of sensing and thus the vacation time follows the distribution exponentially with the parameter 'h'. During the vacation period, if any data is being transmitted, then the node works at a very low speed. If any node finds that the service completion is needed or if it detects an abnormal behavior at a low-speed rate, in its vacation period, it switches its state from to the busy state, which means that the vacation is interrupted. If none of the nodes are in the completion of the vacation period, then the sink node either makes the sensor as idle or initiates a new transmission of data, with probability p, a single working vacation changing itself to the regular mode. Otherwise, it may also leave for the next working vacation with probability‫ݍ‬ = 1 − ‫,‬ i.e. multiple working vacations. Once the vacation period is nearly to the end, and if there is more service needed by the nodes, then the sensor node switches to the normal working mode. During the period of working vacation, the service time determines the most general random variable as ܵ ௩ , with its distribution function, ܵ ௩ ‫.)ݐ(‬ The primary objective of the proposed methodology as follows: x Quality in sensor data collection.
x Improve the network's lifetime. Our scheme uses a multi-sensing adaptive approach to use the positive points of both cluster and chain-based routing patterns. Redundant data traffic is reduced by correlation, so efficiency increased. PSN (Primary sensing node) uses a probabilistic method while sensing in which nodes with greater residual energy has a higher probability to sense and transmit data so that the energy utilization is equalized on each node. The redundancy or similarity between the sensed data can be found or related by GCA (Gray correlation analysis. Bernoulli identical sampling method is used to find the estimated average value of data characteristics.
In the proposed methodology, all nodes are classified into the following types: x Primary Sensor Node (PSN) x Secondary collection node (SCN) / Cluster Head Primary Sensor Nodes senses the environment and initiates transmission of data to sink.SCN or CH is the second level in the transmission methodology and which collects all data & optimizes the data by detecting duplicate data & tries to increase the accuracy and forwards it to the next intermediate nodes to connect the sink.

4.4.
Algorithms Designed Algorithm 1: Cluster head selection and association model Phase 1: Formation of clusters Sensor networks strongly alter topology without centralized control to embrace the shift in topology; Adaptable hierarchical cluster at the K-level is used. A k-level clustering chain of authority is primarily helpful in reducing the network's power utilization compared to Lowenergy Localized Clustering (LLC). This clustering is especially feasible in reducing the system's contrasting vitality usage (LLC) because it requires short-run transmission into account. It also ensures flexibility in the selection of routing for modifications that affect both the system and the environment. Thus, the X-LLC cluster is used as X-LLC enables the size of the cluster to be reduced by considering the radius by using separate energy concentrations. This delivers a significant benefit in terms of minimizing broadcast power consumption concerning standard cluster-forming hierarchical algorithms [10]. Phase II: Establishment stage The foundation stage starts after the summit of the political decision technique and ensnares k-explicit affiliation sub organizes that are practiced in the best down manner beginning from the Base Station to straight centers. At this stage, 1stkth-level group heads describe themselves to the BS, which comes back to TDMA table. At that reality, the (k− 1) th level bunch scrambles toward the closest kth -level group head, that answers by giving the TDMA table; the cycle rehashes down to the typical specially appointed hub level In adding up, the accompanying similarly remains constant. I. Each cluster head reins over scarce hubs. II.
Simple center points find the nearest bunch head with the withdrawing of a single hop. III.
The program extent of direct center points can be decreased with respect to the one required by LLC. Accordingly, broadcast needs a little measure of intensity and the bury group block diminishes.

Algorithm 2: Energy consumption model:
Every sensor node will have two stages active and sleep. Whereas working status is classified into three stages: working, the transition from active to sleep, and vice versa. The details can be shown as follows Where ܶ ௧ ൫‫ܤ‬ ൯represents the number of sensor Bj revolved on or turned off, ܲ ൫‫ܤ‬ ൯ and ܶ ‫ܤ(‬ ) are the power and operational time the sensor Bjis in active status, correspondingly. ݁ ௦ ‫ܤ(‬ )and ݁ ௦ ‫ܤ(‬ )are the energy utilization of node state alteration from energetic to sleep and sleep to active of sensor Bj, correspondingly. An energy utilization model of the transmission module is presumed as the same as that in sources.‫ܧ‬ ் (݆, ݀) and ‫ܧ‬ ோ (݆)are the energy utilization of communicating and obtaining j bits data done a distance d.
where ‫ܧ‬ ்ି and ‫ܧ‬ ோି *j represents the electronic circuit expenses of the transmitter and receiver, and they are independent with the communicating distance. ߝ [Joule/ (bit/ ma)] denotes the energy costs to send a bit over a distance d with a satisfactory signal to noise ratio and it's constant. ᾀ represents path loss interpreter which relays on the properties of the broadcasting channel. Generally, it is assumed that

DISCUSSION RESULTS AND NUMERICAL EXPERIMENTS
In the proposed work, we have evaluated the model for the probability of intrusion detection in WSN by using the simulation Software NS2. According to the model probability, the model is evaluated based on the node density, distance of an intrusion, and also the sensing range. We consider N number of static sensor nodes in the field of interest in WSN, which are uniformly distributed and are independent. The results show the probability of intrusion detection P having at smallest one sensor node that discovers in the detecting range RSENS and N number of sensor nodes. As the detecting range and the number of nodes increases, the probability of discovery of intruder also increases. The two possible cases are discussed to show the performance of WSN when intrusion is detected. detection-based model which is considered as a function with intrusion separate for distinct values of rate of availability of nodes, p. If the distance of intruder l increases, the probability of detection P also increases. When the network activity is in normal cycle mode, then the rate of node obtains probability p should be typically less than the value 1.0. It is required that it must be satisfied that the monitored area is to be considered effective without the overall area coverage to be diminished. If the detection of an intruder is successful by a node, a message with an alarm is broadcasted to the entire sensor network. Thus, the detection efficiency can be improved by assuring the effective connectivity of the network. This is illustrated by the rate of node availability p =1.0.
The comparison is performed and tabulated in table 1. The QoS parameters are considered for measuring the performance of the proposed algorithm based on Bernoulli scheduling vacation methodology. Our proposed work is compared with EEEACH and EDCSWS based on throughput, transmission delay, energy variance, sensing probability, probability of detection of an intruder. By the simulation and experimental results performed the proposed methodology BVS has obtained better performance results with minimum energy consumption and high throughput.

CONCLUSION
The energy-saving is an important factor for the efficient working any wireless sensor networks. Since the sensor nodes are always active for detecting an intruder, the energy consumption becomes high. To reduce the consumption of energy, sleep/wakeup, also called small interval vacations are used for the sensors which are almost considered to be like the mechanism of fluid queues. Here in the proposed work, we are introducing the Bernoulli scheduling rule and the sensor nodes have a vacation state whenever the sensor need not be active, to save the energy consumed. Based on the sensing coverage area, the intruder distance l is computed considering the probability of intrusion detection. The probability obtained shows the better performance of the network with high availability of node and also the working vacations set for every sensor node to save energy and lifetime of the network. The waiting time of the nodes is simulated and shown in the results. Also, server utilization is calculated as discussed. Results are being compared with EELEACH (energy-efficient and EDCSWS and found that our proposed algorithm is more efficient in comparison to the EELEACH and EDCSWS. Thus, our results of the proposed work enable us to propose and analyze the sensor network and help us for considering the diagnostic parameters of a network such that the network requirements are met.