Advanced Quantum Based Neural Network Classifier and Its Application for Objectionable Web Content Filtering

In this paper, an Advanced Quantum-based Neural Network Classifier (AQNN) is proposed. The proposed AQNN is used to form an objectionable Web content filtering system (OWF). The aim is to design a neural network with a few numbers of hidden layer neurons with the optimal connection weights and the threshold of neurons. The proposed algorithm uses the concept of quantum computing and genetic concept to evolve connection weights and the threshold of neurons. Quantum computing uses qubit as a probabilistic representation which is the smallest unit of information in the quantum computing concept. In this algorithm, a threshold boundary parameter is also introduced to find the optimal value of the threshold of neurons. The proposed algorithm forms neural network architecture which is used to form an objectionable Web content filtering system which detects objectionable Web request by the user. To judge the performance of the proposed AQNN, a total of 2000 (1000 objectionable + 1000 non-objectionable) Website’s contents have been used. The results of AQNN are also compared with QNN-F and well-known classifiers as backpropagation, support vector machine (SVM), multilayer perceptron, decision tree algorithm, and artificial neural network. The results show that the AQNN as classifier performs better than existing classifiers. The performance of the proposed objectionable Web content filtering system (OWF) is also compared with well-known objectionable Web filtering software and existing models. It is found that the proposed OWF performs better than existing solutions in terms of filtering objectionable content.

network using an improved genetic algorithm. In this method, the authors use shift reverse logic crossover operation and improved genetic algorithm for optimizing Backpropagation algorithm. One more similar concept is introduced by Lu et. al. [12], in which the quantum computing concept is used to optimize connection weights and architecture of the neural network. In this method, the connection weights, and the number of connections have been decided using the quantum computing concept. However, in this approach, the number of neurons in the hidden layer is selected randomly, which is not the correct way to decide the number of neurons. Determining the number of neurons in an above-mentioned way increases the training time and also it may not guarantee to achieve the global optima. The problem of determining the appropriate number of hidden layer neurons can be solved by forming neural network architecture constructively by adding neurons one by one as per requirement. Kim and Park [13], proposed a neural network algorithm which forms neural network architecture constructively. In constructive neural network algorithm, the neurons are being added to the network during the learning process as per requirements. To determine the optimal connection weights and the number of hidden layer neurons, a quantum based binary neural network learning algorithm has been presented by Patel and Tiwari [14]. In this proposed algorithm, the connection weights have been decided using quantum computing concept, and neural network architecture is formed constructively.
As discussed above, the neural network has been widely used for pattern recognition or data classification [15], [16]. In pattern recognition, the neural network is used in the area of computer networks especially for providing network security in Web. Today, the information age is characterized by the continuous massive production and dissemination of information. Nowadays, the Internet is being used as one of the necessities of our mundane life, and it is more than just emails and web browsing. The number of Internet users is increasing day by day, for example from social networking to an e-commerce platform, a knowledge library to an e-market, Internet has captured everyone in its charisma. The boon of the worldwide Web is the openness and the accessibility that is provided to its users to access any information. However, the availability of all the information to all the users is inappropriate. There are lots of malicious content present on the Internet which may affect the users, especially children. A 2000 US congressional study shows that one in five of the 24 million children has been solicited online for porn when surfing on the Internet [17]. However, protection from objectionable Web and free speech on the Web are a contradictory issue and there must be a tradeoff between them. The following example can be understood with the help of a scenario. There are some websites which provide awareness about sex education, which is not objectionable. On the contrary, there are other websites which have objectionable pornographic content. Both kinds of websites may have objectionable words. When the analysis is done on the basis of keywords, it blocks both the types of websites which is a drawback in this case. Including these problems as mentioned above, there are many other issues like, websites which do not contain objectionable content as a whole but containing some hyperlinks which might contain objectionable content. In such cases, blocking of parent website is not an intelligent solution, the particular hyperlink must be blocked. All these issues belong to the features selected from website. Along with this, the dynamic nature of the Web is also an important issue. As discussed above, several new websites are launched every day. Analyzing all websites against objectionable and non-objectionable content at run time is not an intelligent solution. There should be a system which is able to identify new objectionable websites before any user access it. This system must regularly check the newly coming objectionable websites and make a database of those websites which helps to speed up the process of blocking objectionable websites. Apart from this, the classification of these features is also an important task. To classify accurately between objectionable contents and non-objectionable contents, there must be a proper selection mechanism for selecting the appropriate classifiers.
To overcome the issues and drawbacks discussed here, Patel et. al. [18] proposed a method in which quantum based neural network has been used to classify objectionable Web request. In this algorithm, the connection weights and threshold is evolved using quantum computing concept. Furthermore, the algorithm is tested on objectionable Web content. Although the performance of QNN-F is good still there are possible improvements that can be done in the proposed work [18]. Firstly, the threshold of neurons has been selected randomly in this method which may lead the algorithm to stuck into local minima or maxima. Secondly, the connection weights and threshold is evolved in one population using several generations in it. Finding neural network parameters in this way may lead to evolved locally optimal parameters. Therefore, to handle these issues of an improved algorithm, an Advanced Quantum based Neural Network Learning Algorithm (AQNN) is proposed here. The AQNN is used to form an Objectionable Web Content Filtering system (OWF). The proposed algorithm forms a neural network classifier constructively by adding the neuron at the hidden layer, whereas, the connection weights and threshold of a neuron is decided using the quantum computing concept. In this algorithm, the threshold boundary parameter is introduced which helps to find optimal value of threshold. The value of threshold is find out from a particular range rather than randomly. In this a minimum and maximum range of threshold are found which provide an optimal range of exploration. Thus, it reduces the number of iterations to find an optimal value of the threshold. Along with the threshold boundary parameter here, we find connection weights and threshold of a neuron using quantum and genetic concept in more than one population rather than a single population. Finding parameters in this way helps to find optimal parameters. The proposed algorithm is trained and tested on Web dataset to form objectionable Web content filtering system. In the proposed OWF, for accurate classification of objectionable Web content, some unique features have been added. These features have been extracted from the content of websites. This OWF mainly consists of five modules: Web crawler, requested Web page analyzer, hyperlink analyzer, the feature extractor, and the quantum neural network. The module Web crawler requested Web page analyzer, and hyperlink analyzer help to get websites for Web content analysis. The feature extractor module helps to extract features from websites contents, collected from the different modules. These features are given as input into the proposed AQNN to decide whether websites are objectionable or not.
This paper is organized as follows. The existing work related to blocking of objectionable Web content filtering system is discussed in Section II. The required preliminaries about the neural network and quantum computing concept are described briefly in Section III. In Section IV, the proposed algorithm is discussed in detail. In Section V, the proposed work AQNN and OWF is illustrated with the help of an example. The experimental work and results are discussed in detail in Section VI. Section VII, is presented with the concluding remarks.

II. EXISTING WORK
In 1995, to resolve the problem of blocking objectionable content, a set up named as Netscape Communications and Progressive Networks was established by the coalition of Microsoft Corporation [19]. In addition to this, several international organizations and countries have taken similar action to protect the public and children from accessing objectionable websites [20]. The Internet content filtering software (ICFS) became very popular and widely adopted by the school, parents and some governments to protect children from the harmful effect of objectionable content [21], [22]. These Softwares prevent objectionable Web content by monitoring data flow between end-user and Internet connection. The existing work in this area is done by many researchers and can be categorized mainly into two categories that are text-based filtering, and other is text and image-based filtering.
The first category is text-based search in which searching of objectionable content is done with the help of objectionable keywords [23]. In this approach, some objectionable keywords are defined by the administrator which is to be searched in Web content or request website. If it is found then, website is blocked otherwise it is not blocked. However, the drawback of this method is that it blocks the whole Website rather than a particular page or hyperlink in the website which is objectionable. As there are several Web contents available which account as objectionable like sex education but it is useful for students and society. This approach also blocks such type of contents.
The other filtering objectionable content methods are based on image and text feature. Several researchers have proposed various methods based on text and image [24]- [28]. Filtering based on text is done on the basis of objectionable keywords. In addition to this, the filtering of objectionable images is done using skin features. Here, we discuss related work in this field.
An approach is proposed based on text and visual features for filtering objectionable contents by Hammami et. al. [24]. In this approach, text features along with visual feature based on skin color detection are taken. However, objectionable image detection on the basis of skin based features is not sufficient to judge nudity or objectionability in the image. Thus, the classification accuracy achieved for visual objectionable content is not promising. Also, the way text and visual features are combined is not clear. Chen et. al. [27], also proposed a method of filtering objectionable content on the basis of textual and visual contents. This approach is categorized by three filtering techniques that are based on keywords, based on sentences, and based on images. In these methods, the ROI method is used in place of skin segmentation for objectionable image classification. Classification of objectionable Web content on the basis of image classification, the filtering rate is also not very high. For most of the approaches, skin detection is an initial step for finding nudity in the image. Jones et. al. [31], proposed an approach in which emphasis on the correlation between the percentage of skin and the possibility of nudity in the image. For skin detection in the image, two methods are common. One of them is pixel-based and another is region based. In pixel based, pixels are considered as features and in the region based, the classification is done on the basis of spatial information of pixels. However, finding an objectionable image on the basis of these features is not an optimal method. The features based on skin vary due to illumination, the background of a person, age, angle, etc. To solve this issue, several methods have been proposed. A statistical skin detection method has been proposed by Zeng et. al. [32]. A region based approach is proposed by Xu et. al. [33], in which texture and image features are taken from arbitrary-shaped segmented. To judge nudity in an image, the skin detection is done on the basis of YCbCr color space by Shih et. al. [34]. To detect objectionable image online, a BHO (browser helper object) is proposed by Girgis et. al. [26]. The BHO works with Internet Explorer (IE5) in the background which extracts all the images and links of the image and checks against nudity. To judge nudity in this method, the skin color is checked using YUV technique.
Along with textual and visual based filtering, some more techniques like semantic analysis of Web content were also proposed. Several approaches have been proposed using machine learning algorithm which checks website content semantically [35]- [37]. The classification model used for filtering the objectionable Web content are SVM, Logistic Regression, and K-nearest neighbor. A lot of research has been done, and many methods have been proposed by researchers to block objectionable images and video, but they have failed to block entire objectionable content because of 85% of the information, present are in the form of text [38]- [41]. VOLUME 7, 2019

III. PRELIMINARIES
In this section, preliminaries related to the neural network, and quantum computing concept is discussed in brief, which helps to illustrate the proposed algorithm.

A. NEURAL NETWORK
The proposed algorithm forms a three-layer neural network architecture consists of an input layer, a hidden layer, and output layer. Let X = {X 1 , X 2 , X 3 , ...., X u }, where u is the number of input samples and X l = (x l 1 , x l 2 , x l 3 , ...., x l n ) where n is the number of attributes in one instance of the input sample. Thus, in the proposed neural network architecture the input nodes equal to n. For j th hidden layer neuron, connection weights are denoted as follows: The number of hidden layer neurons is decided constructively. The number of neurons in the output layer is one, which helps to identify whether the input is objectionable or not. For forming a neuron, we make use of the step function which is given as follows: The value of net j is compared with the threshold to find out whether the input is objectionable or not. In the proposed algorithm the weights (W real j ) and threshold (λ real j ) are decided using the quantum computing concept. The required preliminary for the quantum computing concept is presented subsequently.

B. QUANTUM COMPUTING
The quantum computing concept uses quantum bits Q in place of classical bits. The weight matrix and the threshold of j th hidden layer neuron corresponding to Eqs (1), and (3) in the form of quantum bit Q can be represented as: The quantum bit (Q j ) of weight matrix and threshold Q Th j is being decided by the quantum concept, where any quantum bit (Q j ) and Q Th j are represented by several qubits (q).
Here, the k number of qubits represents a quantum bit (Q). The quantum bits uses probabilistic features for its representation [42].
where, α and β is a complex number representing the probability of qubit in ''0'' state and in ''1'' state.
However, the proposed algorithm works on a classical computer, therefore, these qubits are converted into real coded value using a conversion process which is discussed next.

1) CONVERSION FROM QUANTUM BITS TO REAL VALUE
This process starts by taking random number matrix R j , where The value of r ji is selected with the help of random function which generates a uniform number between 0 to 1. Then, further mapping is done by using binary matrix S j where S j = [s j1 s j2 ....s jk ] [42]. The value of the matrix S j is generated as follows: where j = 1, 2, ..., k and k denote the number of qubits.
To get the real coded value of the required parameter from binary matrix S j , we have used a uniform random number generator (urg). The individual quantum bit with k qubits can represent the linear superposition of 2 k states. Thus, to get an optimal value of the real coded value of the qubit q ji from 2 k subspaces, we use a formula bin2dec(S j ) + 1. This formula helps to get a real-coded value from a particular subspace from the available 2 k subspaces. The whole conversion process has been described in terms of pseudo-code as follows :

Algorithm 1 Conversion Process begin
Step-1 : q ji , link=0 and random number matrix r ji for i = 1:k q ji = α ji ; 0 ≤ α ji ≤ 1 r ji = rand(); This rand function generate uniform value between 0 and 1. endfor Step-2 : for i = 1:k if (r ji <(α ji *α ji )) s ji = 1; else The conversion process is explained with the help of an example. Let us consider a quantum bit having the length of two qubit Q = 0.807|.45 . Now, take any random number matrix having two random numbers R = [0.330.18]. Using Eq. (8) the binary matrix is achieved as S = [11]. After obtaining the binary matrix, a formula (bin2dec(S)+1) is used to obtain decimal value from a binary value which is achieved as 4. A quantum bit having two qubits will provide 4 search subspaces. Let for example, four search subspaces are (0, 0.25), (0.25, 0.5), (0.5, 0.75), and (0.75, 1). The binary to the decimal value achieved as 4 it means the qubit will explore fourth subspaces, i.e., (0.75, 1). Thus, quantum bits of connection weights W j and quantum threshold λ j are converted into real coded values of connection weight W real j and threshold λ real j . Once, the real coded value of connection weights and threshold are achieved, these are applied to the learning process. However, the value achieved in the first generation may or may not produce optimal results. Therefore, there is the requirement of updating the qubits.

2) QUBIT UPDATE PROCESS
To generate a new value of qubit for quantum weights W j and quantum threshold λ j , qubit update process is used which utilizes the fitness value (F) and a binary bit (S) corresponding to each qubit. By using fitness value and binary bits, the rotation angle θ is decided. Now using Eq (9), Eq (10), and Table 1, the qubits are updated [12]. The learning process of AQNN with pseudo code and QWF architecture is discussed in detail in the next section.

IV. PROPOSED APPROACH
In this section, an advanced quantum based neural network classifier (AQNN) is proposed and it is used to form objectionable Web filtering system (OWF) is presented. First, the proposed algorithm AQNN is discussed in detail, then each module of OWF is discussed.

A. INPUT DATASET
Firstly, the database has been created for training and testing of proposed AQNN. In database preparation, total 2000 websites contents have been taken, out of which 1000 are objectionable websites and the remaining 1000 are non-objectionable websites. To uniquely identify objectionable and non-objectionable content, in all total 8 features have been selected as mentioned in Table 2. The dataset is prepared on the basis of the above-mentioned features. The dataset extracted from objectionable websites is called as class ''A'' dataset, and dataset belongs to non-objectionable websites called as class '

B. LEARNING OF AQNN
As discussed above the input dataset is X (i) belongs to class ''A'' and Y (j) belongs to class ''B''. Once processing of input dataset is done, then initialization of neural network parameters like connection weights, threshold, and objective functions are done. As discussed in section I, to evolve neural network parameters optimally, we use quantum computing concept along with the genetic concept. In the neural network, hidden layer neurons are added incrementally, therefore first, a hidden layer neuron is taken in the hidden layer. The connection weights (W g ) h of a hidden layer neuron in terms of quantum bits are represented in three different populations (h = 1, 2, 3). Here, g represents the number of generations needed to evolve connection weights in each population. Finding neural network parameters from three different populations genetically helps to achieve the optimum values. Once, the initialization of quantum weights are done for this neuron, some more parameters are also initialized. Here, F global is the objective function value corresponding to the whole population (h = 1, 2, 3), (F * g ) h is the objective function value corresponding to each population (h), and (F g ) h is objective function corresponding to each generation (g). Similarly, initialize the binary bit matrix S * global , (S * g ) h , and (S g ) h of qubits corresponding to the objective function values F global , (F * g ) h , and (F g ) h , respectively. The binary bit matrix S j corresponding to quantum bit Q j is discussed in subsection III-B.1. To evolve the connection weights, these parameters are required to update qubit using qubit update process which is discussed in subsection III-B.2. Once all the parameters are defined, the generation g is initialized as 1 for all three populations (h = 1, 2, 3) and then the conversion process is called to convert quantum weights into the real coded value of connection weights. Thus, in this generation, (W 1 ) h is converted into the real value weight matrix (W real 1 ) h . Here, after converting weights into real coded value, the quantum threshold function is called.
Once, the initialization and conversion of connection weights are done, the initialization of quantum threshold (λ t ) h in terms of qubits is done for all three populations (h = 1, 2, 3). Along with the initialization of quantum threshold Here, using the conversion process the real coded value of the threshold (λ real t ) h con is generated. Here, the parameter con is added in the subscript to represent the real coded value of the threshold which is generated using the conversion process. However, the real coded value of the threshold (λ real t ) h con generated using the conversion process is not a final value of the threshold. To get an optimal value of the threshold, a threshold boundary parameter is proposed here. The threshold boundary parameter helps to find the threshold value of a neuron in a particular range. Thus, the chance of getting an optimal value of the threshold is more.

1) THRESHOLD BOUNDARY PARAMETER
The selection of the boundary parameter is done with the help of connection weight and input dataset of each class. Here, parameters (net A (i)) max h , and (net B (j)) max h are initialized as 0 and parameters (net A (i)) min h , and (net B (j)) min h are initialized as ∞. In this process, multiplication of the real coded value of connection weights and input dataset as shown in Eq (2), are done for both the classes, then the minimum and maximum values are found from that. Now, the threshold value of the neuron is decided within the range of this minimum and maximum value. The selection of the boundary parameter for the threshold of each class is done using the following formulation:

Boundary Parameter Selection of Each Class (CLASS B)
for h=1 to 3 for j=1 to Here, (λ real t ) h con is a value of threshold achieved after the conversion process. As discussed above the selection of the objective function value is discussed next.

2) SELECTION OF OBJECTIVE FUNCTION
As discussed above the objective function for weights and threshold in each generation are (F g ) h and (F t λ ) h respectively. The objective function for weights and threshold in each population are (F * g ) h and (F * λ ) h , respectively. Whereas, the global objective function for weight and threshold are F global and (F global λ ). The (F * g ) h and (F * λ ) h having the best value of the objective function in a particular population. The calculation of these values is done as follows: The calculation of the global parameter, which shows the value of the best objective function in all whole populations and generation are calculated as follows:

3) LEARNING PROCESS
The threshold value of neuron (λ real t ) h evolved through Eqs (11), (12), and Eqs (13) and connection weights are used to learn the neuron for input samples. Here, a multiplication value of an input dataset of both classes and connection weights are compared with threshold (λ real t ) h . Using these calculations, count1, and count2 values are achieved which shows the number of samples learned of class ''A'' and class ''B'' respectively by objective function (F t λ ) h . Now, if the number of samples learned using connection weights and threshold value are not equal to the total number of samples of class ''A'' and class ''B'', then the qubits of quantum threshold (λ t ) h are updated using quantum update process, which is discussed in subsection III-B.2. For updation of qubits of threshold of the objective functions and (F t λ ) h and their corresponding binary bits are required. Now, for (W real 1 ) h , (g = 1) the threshold is updated from (λ real 1 ) h , (t = 1) to (λ real z ) h (t = z) or till the whole sample learned of both the classes. After completion of this process, the best objective functions and corresponding binary bit matrix of quantum threshold (λ real t ) h are stored. Here, to get an optimal value of the threshold and connection weights, the concept of the genetic algorithm is used. After some predefined interval, the qubits of quantum threshold and quantum weights are exchanged with its adjacent population and mutated. Finding the solution in this way gives large subspace to get optimal value of connection weights and threshold. If there are unlearned sample remain after completion of the whole generation of the quantum threshold, then quantum weights (W 1 ) h are evolved in the next generation to get (W 2 ) h using the quantum update function discussed in subsection III-B.2. To update quantum bits of connection weights, the objective function value (F g ) h , (F * g ) h , F global and corresponding binary bits matrix are used.
If there are still samples remains, which not learned after updating weights (W g ) h (g = 1 to m) and the threshold of the neuron (t = 1 to z) for all three populations, then one more neuron is added in the hidden layer. The learning of this hidden layer neuron for the number of unlearned samples of both classes is done in the same way as done for the first hidden neuron at hidden layer by evolving connection weights and threshold using quantum computing concept. The AQNN in the form of pseudo code is presented next :

4) PSEUDO CODE OF AQNN
In this section, the pseudo code of the learning algorithm is discussed. The algorithm mainly divided into two parts, the first part shows AQNN algorithm and the second part shows the quantum threshold function.

C. TESTING OF MALICIOUS WEB REQUEST
Once, the hidden layer formation is done, the formation of the output layer starts. The connection weights between the hidden layer and output layer are initialized as unity. The threshold of the output layer neuron is kept in such a way that, if the input to the output neuron is positive then the dataset belongs to an objectionable class. If the input to the output neuron is negative, then the dataset belongs to non-objectionable class. Here, hidden layer neuron is trained in such a way to fire output accordingly.
The proposed AQNN is used to develop an objectionable Web filtering system (OWF). The AQNN works as a classifier for the objectionable and non-objectionable Web content collected from different modules of OWF. The basic architecture along with the working of each module of OWF is discussed next.

D. OWF ARCHITECTURE
OWF has five basic module. These modules are the Web crawler, requested Web page analyzer, hyperlink analyzer,

Algorithm AQNN Algorithm
Step-1 : Take input dataset as X(i) and Y(j) Take first neuron at hidden layer and initialize the population by specifying quantum weights (W g ) h in terms of qubits.
..., m; m is the number of generations to update weights in each population. i = 1......n; n is the number of features of sample. Initialization of more parameters.
Step-2 : for h = 1 to 3 for g = 1 to m Call conversion process ((W g ) h ).
)) Add new neuron for unlearned sample ((c 1 + c 2 )-(F * g ) h ) and finalize its weight by using Step-1 and Step-2. F global = max(F global , (F * g ) h ) endif endfor endfor a feature extractor, and AQNN as shown in Fig. 1. The module Web crawler, requested Web page analyzer, and hyperlink analyzer fetches the content from the requested website on the basis of objectionable keywords. It does not fetch each requested website data, but only those website content which having objectionable keywords. Having objectionable keywords in the websites content does not certify that they are objectionable as discussed in section I. Now, the feature extraction module extract all the features as described in Table 2 from Web content. Once, all the features are extracted, these are provided as the input to the AQNN. The AQNN classifies it into objectionable or non-objectionable website. If the website is found objectionable, then the objectionable website/URL's database is updated by adding the

Quantum Threshold Function()
Step-1 : Initialization of different parameters for t = 1 to z z is user defined variable to update ((λ ) t ) h .

1) WEB CRAWLER
The efficiency of our OWF can further be enhanced by speeding up the process of finding objectionable websites and making our objectionable URLs database rich. For this task, a web crawler is added to our proposed OWF. The primary objective of this Web crawler is to generate a list of suspicious websites with the help of objectionable keywords. Crawler works by searching on known search engines like Google, Yahoo, and Ask on the basis of objectionable keywords, thus, augmenting the list of websites. Consequently, the contents of these websites are fetched for feature selection and analysis. After extracting all the features of these selected websites, it is given to AQNN for classification of these websites as objectionable or non-objectionable. If a website is found objectionable, then it is added to the objectionable website/URL's database. Thus, if a user tries to access any objectionable website, then there is a higher chance of it to be present in our objectionable URLs database.

2) REQUESTED WEB PAGE ANALYSIS MODULE
This module works by analyzing the source code of the web pages requested by the user. The website requested by the user is first searched in the objectionable database. If the website is found in the database, then the message is sent back to the user specifying that this website is blocked and cannot be accessed. Otherwise, its content is extracted for features analysis. These features are provided as input to AQNN which classifies it into objectionable or non-objectionable website depending upon the results. If the website is found objectionable, then the objectionable website/URL's database is updated with this website.

3) HYPERLINK WEB PAGE ANALYSIS MODULE
Hyperlinks often referred to as just ''links'', are common in Web pages. These links act the same way as they do on the Web, allowing the user to jump from page to page. There are many websites which contain hyperlinks redirected to other websites. Therefore, to make our system more efficient, analyzing these hyperlinks for objectionable content has become an essential task. Therefore, each hyperlinked are extracted from Web content. After extracting these hyperlinks, this module fetches the content one by one. Once, the features are extracted from these hyperlinks, it is given to AQNN. If the hyperlink is found objectionable, then it is added to the objectionable URLs database. Many of the times it might be the case that a website may contain an objectionable hyperlink. Therefore, it will not be justified to block parent websites. During such situations, this module comes in handy as it only blocks the hyperlinks irrespective of their parent websites.

4) DETECTION OF MALICIOUS WEB REQUEST USING AQNN
This module with the help of AQNN, classify websites in the category of objectionable and non-objectionable. The classification into an objectionable and non-objectionable website is done on the basis of features extracted from the modules discussed above. The proposed AQNN is already discussed in detail in this section.

V. ILLUSTRATION OF AQNN AND OWF A. WORKING OF AQNN
Working of AQNN can be understood by taking a simple example. Let us consider a database of three objectionable and three non-objectionable websites. The number of features of each website is two. The dataset belongs to objectionable websites is class A, which generate output 1 and dataset belongs to non-objectionable websites is class B which generate output 0. Thus class A dataset is ((0.23, 0.38 = (0.3|0.6). After that conversion process is called and use boundary parameter to get the appropriate value of the threshold. The value achieved as real coded value of the threshold are (λ real 1 ) 1 = (0.256), (λ real 1 ) 2 = (0.277), and (λ real 1 ) 3 = (0.504). Now by using the threshold boundary parameter, the final value of threshold is achieved. Once, the threshold value is achieved, the weights are applied to input dataset, and it is compared with a threshold. The objective functions values achieved after comparison as (F 1 λ ) 1 = 4, (F 1 λ ) 2 = 4, and (F 1 λ ) 3 = 6. It can be observed from the results that, the whole sample is learned for the third population. Thus the connection weights and threshold of the third population is considered as final parameters for the neural network. The above example is a minor depiction of the bigger problem; therefore a proper solution is achieved in only one generation. If the sample is not learned in the first generation of the threshold, then it is updated until all samples are learned, or counter reaches to the user-defined number. The exchange of qubit is also done in this duration after some user-defined interval, which helps to get optimal value for connection weights and threshold.

B. WORKING OF OWF
The working of OWF starts from the Web crawler. The Web crawler fetches all the objectionable websites on the basis of objectionable keywords mentioned in the list. There may be a possibility that all the websites fetched by Web crawler may not be objectionable, therefore, to properly investigate websites, their contents are extracted into a separate file. Now, all the hyperlinks are separate out from this content. The feature extraction module extract features from these contents. To check whether the website is objectionable or not, the value of the features are given as input to AQNN. If the website is found objectionable then, the database of objectionable Website/URL is updated by adding this particular website. Thus, on the basis of objectionable keywords, and semantic analysis by AQNN, the database will have the number of objectionable links. Now, if any user request for any website first it is checked in the database of objectionable website. If the requested website is found in the database, then an error message is delivered else it is forwarded to Internet Service Provider (ISP). The response from ISP is forwarded to the user and requested Web page analyzer also keeps its content. Now, the requested Web page analyzer separates all hyperlink from content and forwarded to hyperlink module. The feature extraction module finds features from content extracted by requested Web page analyzer and gives input to AQNN. If it is found objectionable, then the database of objectionable websites is updated by the requested website. The hyperlink extractor module also accesses the content of each website/hyperlink one by one and its feature are extracted from the feature extraction module. These all features from hyperlink are given to AQNN to check whether hyperlink content is objectionable or not. If it is found objectionable, then the database of objectionable websites is updated by these hyperlinks. In this way, each module of OWF help to filter objectionable Web content.

VI. EXPERIMENT AND RESULTS
In this section, the experimental setup and results are discussed in detail. Firstly, the experimental setup, the description of the system, and the experimental dataset are discussed. In the next subsection, after the experimental setup, the results of experiments on several evaluation parameters are discussed. Firstly, the evaluation of AQNN as the classifier is done, and then the performance of OWF is checked with existing software and objectionable content filtering models.

A. EXPERIMENT SETUP
The proposed AQNN and OWF are implemented in Java (Version7) and on a computer with an i7 processor, 2.5GHz, and 8GB RAM. For the testing and training purpose, total 1000 objectionable and 1000 non-objectionable websites have been randomly selected. The dataset has been prepared in two classes, one is objectionable, and another is nonobjectionable, both are having eight numbers of features as described in Table 2. In the proposed algorithm, objectionable content has been considered as pornographic. In the machine learning field, it is common to partition the dataset into two separate sets: a training set and a testing set. To evaluate the efficiency of AQNN, the dataset has been divided into the training and testing data in three different partitions. VOLUME 7, 2019 Here, the first partition is done by 60-40, where 60 % of the samples are used for training of the AQNN and the rest of 40% for testing. The second partition is 70-30, 70 % of the samples are used for training and the remaining 30% used for testing. In addition to this, a 10-fold cross validation scheme is also used. In this method, the entire dataset is divided into ten blocks of approximately equal size. During the implementation of our algorithm, 90% of the data is used to train AQNN while the rest 10% data is used for testing. The details of the training and testing partitions are given in Table 3.

B. RESULTS AND DISCUSSION
To evaluate the performance of proposed algorithm AQNN, the measures as mean classification accuracy, sensitivity, specificity, confusion matrix are calculated using the parameters such as true positive, true negative, false positive, and false negative [43] as shown in Table 4. Along with these evaluation parameters some more statical evaluation parameters like precision, recall, and F1 score is calculated.  Table 5, for 60-40 training-testing partition, the mean classification accuracy achieved by the proposed (AQNN) algorithm is 96.875% which is very remarkable, it shows that even for smaller training samples, AQNN has good adaptation and generation capability and can provide better solutions. The mean classification accuracy of the proposed models for 70-30 training-testing partition is 98%, and for 10-fold cross-validation, the classification accuracy achieved is 99% which confirms the importance of proper training data. AQNN achieves maximum accuracy of 97.9%, 98.6%, and 100% for 60-40, 70-30 training-testing partition and 10-fold cross validation, respectively. The minimum, maximum, and mean values of sensitivity and specificity of all training and testing partitions for AQNN are presented in Table 6. It shows a comparison between sensitivity and specificity. For the 60-40 training-testing partition, the best value achieved by the neural network for sensitivity and specificity is reported in terms of mean and standard deviation (std. dev.) is 99.75%, 0.16, and 94%, 0.44, respectively.  For the 70-30 training-testing partition, the best value achieved by the neural network for sensitivity and specificity is reported in terms of mean and std. dev. is 99.34%, 0.29 and 96.67%, 0.15, respectively. For the 10-fold cross validation, the best value achieved by the neural network for sensitivity and specificity is reported in terms of mean and std. dev. are 99%, 0.13 and 99%, 0.84, respectively. Table 7, represents the classification accuracies of AQNN in the form of the confusion matrix. It is clear from Table 7, the sum of true positive and true negative increases with the increase in training data. Especially, for 70-30 training-testing partition and 10-fold cross validation, the true positive rate and the true negative rate is around 100.  In Table 8, The performance of the proposed algorithm is compared with other classification algorithms in terms of parameters like precision, recall, and F1 score. Here, it can be observed that the value of precision and recall and score for the data partition 60-40 and 70-30 are 0.988, 0.9975, 0.9927 and 0.989, 0.9934, 0.9912. The value of precision, recall, and F1 score for 10-fold cross validation scheme are 0.99, 0.99, and 0.99.

C. COMPARISON AND DISCUSSION
To judge the performance of proposed AQNN, it is compared with QNN-F algorithm [18], machine learning algorithms like Backpropagation, Support Vector Machine (SVM), multilevel perceptron, decision tree algorithm, artificial neural network, and quantum neural network algorithm. Since, AQNN is an advanced version of QNN-F [18], it is observed that AQNN is improving results significantly which is discussed subsequently. dev., and max are 99%, 0.76 and 100% respectively. The of mean, std. dev., and max for QNN-F are 98%, 0.57, and 98.5% respectively. This clearly shows that AQNN performs better than QNN-F, and other existing classifiers. Similarly, the comparison is made in terms of sensitivity and specificity as discussed in Table 6. It shows that, for the dataset ratio of 60-40, 70-30, and 10-fold cross validation are 99.75%, 94%, 99.34%, 96.67%, and 99%, 99% respectively. The mean value of sensitivity and specificity of QNN-F for dataset ratio of 60-40, 70-30, and 10-fold validation are 98%, 92.75%, 98.75%, 95.67%, and 97.05%, 98.9% respectively. Table 7 shows the confusion matrix corresponding to all methods. The results show that with respect to the objectionable dataset, each algorithm performs well, but corresponding to the non-objectionable dataset, AQNN performs better than other classification algorithms in both the data partitions.
The performance of the proposed AQNN is better than QNN-F and existing classifiers, this is mainly due to two reasons. Firstly, introducing here threshold boundary parameter, which helps to find an optimal value of threshold within a particular range. As finding an optimal value of the threshold VOLUME 7, 2019 is important for any neural network architecture. Due to improper selection of this parameter, the algorithm may get trapped into local minima or maxima. Thus, with an optimal value of the threshold, a neural network is formed which gives high classification accuracy. Secondly, in the AQNN finding the connection weights and threshold using genetic concept with three different populations. Thus, it gives the better value of connection weights and threshold from one population without genetic concept. As in QNN-F the connection weights and the threshold of the neurons are searched in one population using several generations. In AQNN the parameters of the neural network are found in more than one population in several generations in each population. The genetic concept is used here to exchange and muted qubits of connection weights and threshold thus, it helps to find the optimal value of connection weights and threshold globally.
However, the proposed AQNN is compared with QNN-F, Backpropagation, Support Vector Machine (SVM), multilevel perceptron, decision tree algorithm, artificial neural network, and quantum neural network algorithm but it is hard to make a practical comparison between the existing work of filtering objectionable Web content with the proposed OWF. There are some reasons for this. Firstly, the unavailability of the standard dataset on which the other algorithms are tested. These datasets are prepared in different-different ways from the Web. Secondly, the number of features of extracted Web content is not uniform. Many researchers have opted their own methodology to extract features from the content. Thirdly, many researchers used standard or library classifier like Backpropagation, Support Vector Machine (SVM), multilevel perceptron, decision tree algorithm for classification their Web contents [45]- [47]. Therefore, to judge the performance of the OWF, the comparison is done with existing well known objectionable Web blocking Softwares as URLfilterDB, DansGuardian, and Net Nanny [48]- [50] and existing some objectionable Web blocking model Webshield and QNN-F [18], [23]. First, the features of the Softwares and existing model is compared with our proposed OWF in Table 9. The comparison is made on the basis of features like Location (user/admin), URL Block, Keyword based, Content analysis, and Filtering domain. To evaluate the performance of the proposed OWF with existing well-known Softwares and existing model, the testing is done by taking 800 (400 objectionable + 400 non-objectional) websites. Table 10, shows the testing results in terms of confusion matrix and accuracy. It can be easily observed from Table 10, that the proposed OWF achieves the highest accuracy that is 96.87% in comparison to existing Softwares and existing method.

VII. CONCLUSION
In this paper, an Advanced Quantum based Neural Network Classifier (AQNN) is presented, and it is used to form an Objectionable Web filtering system (OWF). The proposed algorithm uses quantum computing and genetic concept to decide connection weights of the neural network and threshold of neurons. The quantum concept is characterized by the representation of the individual and the population dynamics. It gives better population diversity to get the optimal value of required parameters (connections weights and threshold). The network architecture is formed constructively by adding neurons one by one at the hidden layer. The proposed AQNN architecture is used to form OWF. The OWF analyzes the content of websites collected from the different module like Web crawler, requested Web page analyzer, and hyperlink analyzer. The requested Web page analyzer gives the content of websites which are requested by users, and the hyperlink analyzer helps to find out the content from hyperlink available in websites content. To avoid repeat analysis of each requested websites, the collection of all objectionable Websites declared by AQNN is done, and a database is created as objectionable Website/URL database. The Web crawler module helps to speed up the process of blocking objectionable Web request by updating the database of objectionable Website/URLs.
To judge the performance of the proposed AQNN algorithm and OWF, these are tested on objectionable and non-objectionable Web dataset. The performance of the AQNN is also checked against well-known classifiers with the parameters like accuracy, specificity, sensitivity, precision, recall, and F1 score. Here, the performance of proposed OWF is also compared with objectionable Web filtering Softwares as URLfilterDB, DansGuardian, and Net Nanny and existing methods. It is found from the result that both AQNN and OWF performs better than existing solutions.