A fair recommendation method and device based on matrix decomposition and BP neural network

By combining matrix decomposition and BP neural network methods, the problem of fairness and situational factors of non-popular items in the recommendation system is solved, and the fair recommendation and accuracy of recommendation for non-popular items is improved.

CN114298780BActive Publication Date: 2025-01-03BEIJING KNOWLEDGE ATLAS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111371121.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2025-01-03
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

The existing recommendation algorithm ignores the issue of fairness in the process of improving recommendation accuracy, especially the recommendations for non-popular items are not fair enough and fails to effectively integrate situational factors.

Method used

Using a fair recommendation method based on matrix decomposition and BP neural network, two types were calculated by accessing relationship map information, data preprocessing, dividing popular and non-popular items, and integrating BP neural network training residuals and scenario factors into the matrix decomposition model. Recommended scores, and finally obtain the number of recommendations based on the score.

Benefits of technology

It has achieved fair recommendations for non-popular items and the integration of situational factors, improving the accuracy and fairness of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298780B_ABST
    Figure CN114298780B_ABST
Patent Text Reader

Abstract

The present invention discloses a fair recommendation method and device based on matrix decomposition and BP neural network, wherein the method comprises: accessing the relationship graph information required for recommendation, and based on the relationship graph information, using the string processing library to perform data preprocessing on the string to obtain a preprocessing function; based on the preprocessing function, using a predefined partitioning formula to divide all the items to be recommended into hot items and non-hot items; for the recommendation of hot items, using the BP neural network training residual for the hot items, and fusing the residual into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, using the information given in advance by the user, using the fair recommendation algorithm, calculating the second recommendation score; according to the first recommendation score and the second recommendation score, obtaining a preset number for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recommendation algorithms, and in particular to a fair recommendation method and device based on matrix decomposition and BP neural network. Background Art

[0002] Most existing recommendation algorithms are aimed at improving their recommendation accuracy. However, with the widespread application of recommendation algorithms, the fairness of recommendations has gradually emerged. The first is the problem of unfair display opportunities for recommended items in the recommendation system, and the second is the problem of recommendation accuracy based on fairness, which is specifically manifested as follows:

[0003] (1) The problem of fair recommendation of non-popular items is not solved.

[0004] There is a data sparsity problem for non-popular items, which results in a large number of potentially popular items among non-popular items being unable to be recommended or difficult to be recommended, seriously affecting the fairness of the recommendation system.

[0005] (2) The MF (Matrix Factorization) method does not include contextual information about recommended items.

[0006] The recommended items may be introduced by the current context, for example, the rating of a movie may be affected by factors such as price, actors, directors, etc. However, the current MF method cannot incorporate these contextual factors that affect item recommendations into the model. Summary of the invention

[0007] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0008] To this end, the purpose of the present invention is to solve the problem of fair recommendation of non-popular items and the lack of consideration of contextual factors in the prior art, and proposes a fair recommendation method based on matrix decomposition and BP neural network.

[0009] Another object of the present invention is to propose a fair recommendation device based on matrix decomposition and BP neural network.

[0010] To achieve the above object, the present invention proposes a fair recommendation method based on matrix decomposition and BP neural network, comprising the following steps:

[0011] S1, access the relationship graph information required for recommendation, and use the string processing library to preprocess the string data based on the relationship graph information to obtain a preprocessing function;

[0012] S2, based on the preprocessing function, uses a predefined classification formula to classify all the recommended items into popular items and non-popular items;

[0013] S3, for the recommendation of popular items, the BP neural network is used to train the residuals of the popular items, and the residuals are integrated into the MF algorithm to obtain the first recommendation score;

[0014] S4, for the recommendation of non-popular items, the second recommendation score is calculated using the information provided in advance by the user and the fair recommendation algorithm;

[0015] S5: Obtain a preset number for recommendation based on the first recommendation score and the second recommendation score.

[0016] The fair recommendation method based on matrix decomposition and BP neural network of the embodiment of the present invention, by accessing the relationship graph information required for recommendation, uses the string processing library to perform data preprocessing on the string based on the relationship graph information to obtain a preprocessing function; based on the preprocessing function, uses a predefined partitioning formula to divide all the items to be recommended into hot items and non-hot items; for the recommendation of hot items, uses the BP neural network training residuals for the hot items, and fuses the residuals into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, uses the information given in advance by the user, uses the fair recommendation algorithm to calculate the second recommendation score; according to the first recommendation score and the second recommendation score, obtains a preset number for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendations.

[0017] In addition, the fair recommendation method based on matrix decomposition and BP neural network according to the above embodiment of the present invention may also have the following additional technical features:

[0018] Further, step S2 includes:

[0019] By calculating and dividing the popular item recommendations into non-popular item recommendations, the number of items recommended by the user is set to N, and the number of non-popular items is n unpopular = int(ω*N), the number of popular items is Nn unpopular .

[0020] Further, step S3 includes:

[0021] S31, based on the characterization of the scene information, the scene data is processed into data for deep learning model training by a normalized variance selection method;

[0022] S32, integrating scenario factors into the matrix decomposition MF model through bias training, where the bias training uses the data for deep learning model training after feature processing and is trained through a BP neural network;

[0023] S33 predicts the user's rating of the item by integrating the matrix decomposition MF model of the scene factors.

[0024] Further, step S32 includes:

[0025] S321, the evaluation deviation caused by the scene factors is integrated into the matrix decomposition MF model through offline neural network training. The process is as follows:

[0026]

[0027] S322, the calculation formula for predicting the user's rating of the item is as follows:

[0028]

[0029] S323, the update of parameters during the training process is as follows:

[0030] b u ←b u +γb u (err-λ)b u ,

[0031] b p ←b p +γb p (err-λ)b p , v u ←v u +γv u (err * q p -λv u ),

[0032] q p ←q p +γq p (err * v u -λq p );

[0033] S324, fitting the loss function, and calculating each scoring error in the training set as:

[0034]

[0035] S325, BP neural network is divided into input layer, hidden layer and output layer.

[0036] Further, step S4 includes:

[0037] S41, construct the item attribute vector S i =[a1, a2, ..., a j], construct the user preference vector U = [x i , x2, ..., x j ];

[0038] S42, based on the item attribute vector and the user preference vector, calculate whether the user likes the attribute of the item, the formula is: Cosine similarity is used to calculate the distance between user preferences and item features. The formula is:

[0039] S43, based on the distance between the user preference and the item feature, the fairness factor is modified to p i =cos(U, S i ) * f i , and for p i Normalize Get the recommended fairness factor p i ;

[0040] S44, based on the recommended fairness factor p i , the fair recommendation algorithm is obtained as follows:

[0041]

[0042] To achieve the above object, the present invention proposes a fair recommendation device based on matrix decomposition and BP neural network, comprising:

[0043] The data preprocessing module is used to access the relationship graph information required for recommendation. Based on the relationship graph information, the string processing library is used to perform data preprocessing on the string to obtain the preprocessing function;

[0044] A category classification module is used to classify all items to be recommended into popular items and non-popular items based on a preprocessing function using a predefined classification formula;

[0045] The hot item recommendation module is used to recommend hot items. The BP neural network is used to train the residuals of hot items and the residuals are integrated into the MF algorithm to obtain the first recommendation score.

[0046] The non-popular item recommendation module is used to recommend non-popular items, using the information provided in advance by the user and a fair recommendation algorithm to calculate the second recommendation score;

[0047] The recommendation acquisition module is used to acquire a preset number of recommendations based on the first recommendation score and the second recommendation score.

[0048] A fair recommendation device based on matrix decomposition and BP neural network in an embodiment of the present invention stores and accesses the relationship graph information required for recommendation, and based on the relationship graph information, uses a string processing library to perform data preprocessing on the string to obtain a preprocessing function; based on the preprocessing function, uses a predefined partitioning formula to divide all items to be recommended into hot items and non-hot items; for the recommendation of hot items, uses BP neural network training residuals for hot items, and fuses the residuals into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, uses the information given in advance by the user, and uses a fair recommendation algorithm to calculate a second recommendation score; based on the first recommendation score and the second recommendation score, obtains a preset number for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendations.

[0049] Beneficial effects of the present invention:

[0050] (1) For the fair recommendation problem of non-popular items, the present invention designs a fair recommendation method, which transforms the non-popular item recommendation problem into the problem of finding the best item combination under condition constraints, thereby achieving fair recommendation;

[0051] (2) The present invention incorporates situational factors into the matrix decomposition method, provides a recommendation method based on the matrix decomposition method and the BP neural network method, and solves the defects existing in the prior art;

[0052] (3) Based on the mechanism of fairness recommendation and integration of situational factors, the present invention can provide users with more accurate recommendations.

[0053] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0055] Figure 1 A flowchart of a fair recommendation method based on matrix decomposition and BP neural network according to an embodiment of the present invention;

[0056] Figure 2 4 is a schematic diagram of the structure of a fair recommendation device based on matrix decomposition and BP neural network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0057] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0058] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0059] The following describes a fair recommendation method and device based on matrix decomposition and BP neural network according to an embodiment of the present invention with reference to the accompanying drawings.

[0060] Figure 1 It is a flowchart of a fair recommendation method based on matrix decomposition and BP neural network according to an embodiment of the present invention.

[0061] like Figure 1 As shown, the fair recommendation method based on matrix decomposition and BP neural network includes the following steps:

[0062] Step S1, access the relationship graph information required for recommendation, and based on the relationship graph information, use the string processing library to perform data preprocessing on the string to obtain a preprocessing function.

[0063] Specifically, in the data preprocessing stage, MongoDB is used to store and access the relationship graph information required for recommendation, and Python's string processing library is used to clean the strings and clean them into functions suitable for subsequent processing.

[0064] S2, based on the preprocessing function, uses a predefined partitioning formula to divide all the recommended items into hot items and non-hot items.

[0065] Specifically, we divide the popular item recommendations into non-popular item recommendations by calculation. If the number of items recommended by the user is N, then the number of non-popular items is n. unpopular = int(ω*N), the number of popular items is Nn unpopular .

[0066] S3, for the recommendation of popular items, the BP neural network is used to train the residuals of the popular items, and the residuals are integrated into the MF algorithm to obtain the first recommendation score.

[0067] Specifically, step S3 includes:

[0068] S31, based on the characterization of the scene information, the scene data is processed into data for deep learning model training by a normalized variance selection method;

[0069] S32, integrates scenario factors into the matrix decomposition MF model through bias training. Bias training uses the data for deep learning model training after feature processing and trains it through BP neural network, including:

[0070] S321, the evaluation deviation caused by the scene factors is integrated into the matrix decomposition MF model through offline neural network training. The process is as follows:

[0071]

[0072] S322, the calculation method for predicting the user's rating of the item is described as follows:

[0073]

[0074] S323, during the training process, the parameters are updated using the following formula:

[0075] b u ←b u +γb u (err-λ)b u ,

[0076] b p ←b p +γb p (err-λ)b p , v u ←v u +γv u (err * q p -λv u ),

[0077] q p ←q p +γq p (err * v u -λq p );

[0078] S324, fitting the loss function, and calculating each scoring error in the training set as:

[0079]

[0080] S325, BP neural network is divided into input layer, hidden layer and output layer.

[0081] S33 predicts the user's rating of the item by integrating the matrix decomposition MF model of the scene factors.

[0082] S4, for the recommendation of non-popular items, use the information provided in advance by the user and a fair recommendation algorithm to calculate a second recommendation score.

[0083] Specifically, step S4 includes:

[0084] S41, construct the item attribute vector S i =[a1, a2, ..., a j ], construct the user preference vector U = [x i , x2, ..., x j ];

[0085] S42, based on the item attribute vector and the user preference vector, calculate whether the user likes the attribute of the item, the formula is: Cosine similarity is used to calculate the distance between user preferences and item features. The formula is:

[0086] S43, based on the distance between user preferences and item features, the fairness factor is modified to p i =cos(U, S i )*f i , and for p i Normalize Get the recommended fairness factor p i ;

[0087] S44, based on the recommended fairness factor p i , the fair recommendation algorithm is obtained as follows:

[0088]

[0089] S5: Obtain a preset number for recommendation based on the first recommendation score and the second recommendation score.

[0090] Through the above steps, the relationship graph information required for recommendation is accessed, and based on the relationship graph information, the string is preprocessed using the string processing library to obtain a preprocessing function; based on the preprocessing function, all the items to be recommended are divided into hot items and non-hot items using a predefined division formula; for the recommendation of hot items, the BP neural network is used to train the residuals of the hot items, and the residuals are integrated into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, the information given in advance by the user is used to calculate the second recommendation score using a fair recommendation algorithm; according to the first recommendation score and the second recommendation score, a preset number is obtained for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendations.

[0091] It should be noted that there are many ways to implement accurate recommendations of popular items and fair recommendations of non-popular items. However, no matter what the specific implementation method is, as long as the method improves the accuracy and fairness of item recommendations, it is a solution to the existing technical problems and has corresponding effects.

[0092] The fair recommendation method based on matrix decomposition and BP neural network of the embodiment of the present invention, by accessing the relationship graph information required for recommendation, uses the string processing library to perform data preprocessing on the string based on the relationship graph information to obtain a preprocessing function; based on the preprocessing function, uses a predefined partitioning formula to divide all the items to be recommended into hot items and non-hot items; for the recommendation of hot items, uses the BP neural network training residuals for the hot items, and fuses the residuals into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, uses the information given in advance by the user, uses the fair recommendation algorithm to calculate the second recommendation score; according to the first recommendation score and the second recommendation score, obtains a preset number for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendations.

[0093] In order to implement the above embodiment, Figure 2 As shown, this embodiment also provides a fair recommendation device 10 based on matrix decomposition and BP neural network, and the device 10 includes: a data processing module 100, a category classification module 200, a hot item recommendation module 300, a non-hot item recommendation module 400, and a recommendation acquisition module 500.

[0094] The data preprocessing module 100 is used to access the relationship graph information required for recommendation, and to perform data preprocessing on the string using the string processing library based on the relationship graph information to obtain a preprocessing function;

[0095] A category classification module 200 is used to classify all the items to be recommended into hot items and non-hot items based on a preprocessing function and using a predefined classification formula;

[0096] A hot item recommendation module 300 is used to recommend hot items, train residuals of the hot items using a BP neural network, and fuse the residuals into the MF algorithm to obtain a first recommendation score;

[0097] The non-hot item recommendation module 400 is used to recommend non-hot items, using information provided in advance by the user and a fair recommendation algorithm to calculate a second recommendation score;

[0098] The recommendation acquisition module 500 is used to acquire a preset number of recommendations based on the first recommendation score and the second recommendation score.

[0099] According to the fair recommendation device based on matrix decomposition and BP neural network of the embodiment of the present invention, the relationship graph information required for recommendation is accessed, and based on the relationship graph information, the string is preprocessed using the string processing library to obtain a preprocessing function; based on the preprocessing function, all the items to be recommended are divided into hot items and non-hot items using a predefined partitioning formula; for the recommendation of hot items, the BP neural network training residuals are used for the hot items, and the residuals are integrated into the MF algorithm to obtain a first recommendation score; for the recommendation of non-hot items, the information given in advance by the user is used to calculate the second recommendation score using the fair recommendation algorithm; according to the first recommendation score and the second recommendation score, a preset number is obtained for recommendation. The present invention realizes fair recommendation for non-hot items, incorporates situational factors into the recommendation system, and improves the accuracy of recommendations.

[0100] It should be noted that the above explanation of the embodiment of the fair recommendation method based on matrix decomposition and BP neural network is also applicable to the fair recommendation device based on matrix decomposition and BP neural network in this embodiment, which will not be repeated here.

[0101] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0103] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A fair recommendation method based on matrix decomposition and BP neural network, characterized in that: The following steps are involved: S1, accessing the relationship graph information required for recommendation, and based on the relationship graph information, using the string processing library to perform data preprocessing on the string to obtain a preprocessing function; S2, based on the preprocessing function, using a predefined classification formula to classify all the items to be recommended into popular items and non-popular items; S3, for the recommendation of the hot items, using the BP neural network training residual for the hot items, and fusing the residual into the MF algorithm to obtain a first recommendation score; S4, for the recommendation of the non-popular item, using the information provided in advance by the user and a fair recommendation algorithm, calculating a second recommendation score; S5, obtaining a preset number for recommendation according to the first recommendation score and the second recommendation score; The S4 comprises: S41, construct the item attribute vector S i =[a1,a2,...,a j ], construct the user preference vector as U = [x i ,x2,...,x j ]; S42, based on the item attribute vector and the user preference vector, calculate whether the user likes the attribute of the item, the formula is: Cosine similarity is used to calculate the distance between user preferences and item features. The formula is: S43, based on the distance between the user preference and the item feature, the fairness factor is modified to p i =cos(U,S i )*f i , and for p i Normalize Get the recommended fairness factor p i ; S44, based on the recommended fairness factor p i , the fair recommendation algorithm is obtained as follows:

2. The fair recommendation method based on matrix decomposition and BP neural network according to claim 1, characterized in that: The S2 comprises: By calculating and dividing the popular item recommendations into non-popular item recommendations, the number of items recommended by the user is set to N, and the number of non-popular items is n unpopular = int(ω*N), the number of popular items is Nn unpopular .

3. The fair recommendation method based on matrix decomposition and BP neural network according to claim 1, characterized in that: The S3 includes: S31, based on the characterization of the scene information, the scene data is processed into data for deep learning model training by a normalized variance selection method; S32, integrating scenario factors into the matrix decomposition MF model through deviation training, wherein the deviation training uses the data for deep learning model training after characterization processing and performs training through a BP neural network; S33 predicts the user's rating of the item by integrating the matrix decomposition MF model of the scene factors.

4. The fair recommendation method based on matrix decomposition and BP neural network according to claim 3 is characterized in that: The S32 includes: S321, the evaluation deviation caused by the scene factors is integrated into the matrix decomposition MF model through offline neural network training. The process is as follows: S322, the calculation formula for predicting the user's rating of the item is as follows: S323, the update of parameters during the training process is as follows: b u ←b u +γb u (err-λ)b u , b p ←b p +γb p (err-λ)b p ,v u ←v u +γv u (err*q p -λv u ), q p ←q p +γq p (err * v u -l qp ); S324, fitting the loss function, and calculating each scoring error in the training set as: S325, BP neural network is divided into input layer, hidden layer and output layer.

5. A fair recommendation device based on matrix decomposition and BP neural network, characterized in that: include: A data preprocessing module is used to access the relationship graph information required for recommendation, and based on the relationship graph information, use the string processing library to perform data preprocessing on the string to obtain a preprocessing function; A category classification module, used for classifying all the items to be recommended into popular items and non-popular items using a predefined classification formula based on the preprocessing function; A hot item recommendation module, used for recommending the hot items, using a BP neural network training residual for the hot items, and fusing the residual into the MF algorithm to obtain a first recommendation score; A non-hot item recommendation module, used for recommending the non-hot item, using information provided in advance by the user and a fair recommendation algorithm to calculate a second recommendation score; A recommendation acquisition module, used to acquire a preset number of recommendations based on the first recommendation score and the second recommendation score; The non-hot item recommendation module includes: Attribute building module, used to build item attribute vector S i =[a1,a2,...,a j ], construct the user preference vector as U = [x i ,x2,...,x j ]; The distance calculation module is used to calculate whether the user likes the attributes of the item based on the item attribute vector and the user preference vector. The formula is: Cosine similarity is used to calculate the distance between user preferences and item features. The formula is: A factor calculation module is used to modify the fairness factor to p based on the distance between the user preference and the item feature. i =cos(U,S i )*f i , and for p i Normalize Get the recommended fairness factor p i ; An algorithm determination module for determining a fairness factor p based on the recommendation i , the fair recommendation algorithm is obtained as follows:

6. The fair recommendation device based on matrix decomposition and BP neural network according to claim 5, characterized in that: The category classification module is also used for: By calculating and dividing the popular item recommendations into non-popular item recommendations, the number of items recommended by the user is set to N, and the number of non-popular items is n unpopular = int(ω*N), the number of popular items is Nn unpopular .

7. The fair recommendation device based on matrix decomposition and BP neural network according to claim 5, characterized in that: The popular item recommendation module includes: A characterization processing module is used to process scene data into data for deep learning model training through a normalized variance selection method based on the characterization of scene information; A model training module, used to incorporate scenario factors into the matrix decomposition MF model through deviation training, wherein the deviation training uses the data for deep learning model training after characterization and is trained through a BP neural network; The rating prediction module is used to predict the user's rating of the item by integrating the matrix decomposition MF model with scene factors.

8. The fair recommendation device based on matrix decomposition and BP neural network according to claim 7, characterized in that: The model training module includes: The training fusion module is used to integrate the evaluation deviation caused by scene factors into the matrix decomposition MF model through offline neural network training. The process is as follows: The rating prediction module is used to predict the calculation formula of the user's rating of the item, which is the following formula: The parameter update module is used to update the parameters during the training process, which is the following formula: b u ←b u +γb u (err-λ)b u * b p ←b p +γb p (err-λ)b p ,v u ←v u +γv u (err*q p -λv u ), q p ←q p +γq p (err * v u -λq p ); The error calculation module is used to fit the loss function and calculate the error of each score in the training set as: The neural network module is used for BP neural network, which is divided into input layer, hidden layer and output layer.