CN111125338A - Book purchasing recommendation method and device based on convolutional neural network - Google Patents

Book purchasing recommendation method and device based on convolutional neural network Download PDF

Info

Publication number
CN111125338A
CN111125338A CN201911086187.0A CN201911086187A CN111125338A CN 111125338 A CN111125338 A CN 111125338A CN 201911086187 A CN201911086187 A CN 201911086187A CN 111125338 A CN111125338 A CN 111125338A
Authority
CN
China
Prior art keywords
book
data
neural network
history
training set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911086187.0A
Other languages
Chinese (zh)
Inventor
郭迟
余佩林
黄勇凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongshan Saibotan Intelligent Technology Co ltd
Original Assignee
Zhongshan Saibotan Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongshan Saibotan Intelligent Technology Co ltd filed Critical Zhongshan Saibotan Intelligent Technology Co ltd
Priority to CN201911086187.0A priority Critical patent/CN111125338A/en
Publication of CN111125338A publication Critical patent/CN111125338A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Evolutionary Computation (AREA)
  • Finance (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)

Abstract

The invention discloses a book purchasing recommendation method and device based on a convolutional neural network, and the method comprises the following steps of firstly, acquiring history book order data and historical order data; then matching the historical book order data with the historical order data, and dividing the books in the historical book order data into two categories of purchase and unpurchased according to the matching result; then, marking out a training set from the data of the history list with the label; then converting the information contained in the training set into a vector representation form; then, training a pre-constructed neural network model by using vectors corresponding to the training set; and finally, converting the information of the book to be processed into vectors, and transmitting the vectors into the trained neural network model to obtain a purchasing recommendation result of the book to be processed. The method can utilize the built neural network model to purchase and recommend the book, and improves the recommendation efficiency and the recommendation accuracy.

Description

Book purchasing recommendation method and device based on convolutional neural network
Technical Field
The invention relates to the technical field of natural language processing in deep learning, in particular to a book purchasing recommendation method and device based on a convolutional neural network.
Background
Book interview in the book informatics refers to the purchasing and visiting of books and books, and is the work of gathering books in a library, wherein 'interview' refers to the wide acquisition through various channels, and 'interview' refers to the wide systematic research and investigation.
In the book purchasing method in the prior art, book information is generally collected through reader investigation, then the book information is analyzed and sorted according to the subject characteristics, and then a book purchasing plan is customized, so that book purchasing is performed.
The inventor of the present application finds that the method of the prior art has at least the following technical problems in the process of implementing the present invention:
according to the method in the prior art, book information is investigated and collected in a manual mode, on one hand, collection efficiency is low, collection is carried out by relying on manual experience, some information is easy to ignore, the collected information is incomplete, and the accuracy of making a purchasing plan is further influenced.
Therefore, the method in the prior art has the technical problems of low efficiency and accuracy.
Disclosure of Invention
The invention aims to assist library staff in screening books by using a deep learning method and achieve the purpose of improving recommendation efficiency and accuracy.
In order to achieve the purpose, the invention provides a book purchasing recommendation method based on a convolutional neural network, which comprises the following steps:
step S1: acquiring history book data and history order data;
step S2: matching the history list data with the history order data, and dividing books in the history list data into two categories of purchase and unpurchased books according to a matching result to be used as labels of the history list data;
step S3: marking out a training set from the data of the labeled historical book sheet;
step S4: converting the information contained in the training set into a vector representation form;
step S5: training a pre-constructed neural network model by using vectors corresponding to the training set;
step S6: and after converting the information of the book to be processed into vectors, transmitting the vectors into the trained neural network model to obtain a purchasing recommendation result of the book to be processed.
In one embodiment, step S2 specifically includes:
step S2.1: matching history book data with historical order data;
step S2.2: if the books contained in the history list data appear in the history order data, the category of the books contained in the history list data is marked as purchase, otherwise, the category of the books contained in the history list data is marked as insufficient purchase, and the history list data with the label is obtained.
In one embodiment, step S4 specifically includes:
step S4.1: matching information contained in the training set with a pre-constructed dictionary library, wherein the pre-constructed dictionary library contains Chinese characters and word vector representations corresponding to the Chinese characters;
step S4.2: and converting the information contained in the training set into corresponding word vector representation according to the matching condition.
In one embodiment, the construction method of the dictionary database comprises the following steps:
counting the occurrence times of Chinese characters in the single data of the history book;
and deleting the Chinese characters with the occurrence frequency less than the threshold value and the Chinese characters serving as stop words, and constructing a dictionary library by using the rest Chinese characters.
In one embodiment, the method for constructing the word vector representation corresponding to the Chinese character is as follows:
limiting the size of the dictionary database to contain a preset number of Chinese characters;
and generating a word vector corresponding to each Chinese character by adopting an initialization method in a tensorflow library.
In one embodiment, the information included in the training set is a text sequence, and step S4.2 specifically includes:
setting a text sequence to be a preset length;
and converting each Chinese character appearing in the text sequence into corresponding word vector representation in a dictionary library to generate a word vector matrix.
In one embodiment, the trained neural network model includes an input layer, at least one convolutional layer, a convergence layer, and a full-link layer, where convolutional kernels with different sizes are set in the convolutional layer, and the step S6 specifically includes:
step S6.1: the converted vector is processed by the input layer and then is sent to the convolution layer;
step S6.2: extracting feature maps with different lengths through convolution kernels with different sizes arranged in the convolution layer;
step S6.3: performing dimension reduction processing on the feature maps with different lengths through a convergence layer to obtain processed feature maps;
step S6.4: processing the processed characteristic diagram through a full connection layer to obtain a probability value;
step S6.5: outputting the probability value through an output layer;
step S6.6: and obtaining a book purchase recommendation result according to the output probability value.
Based on the same inventive concept, the second aspect of the present invention provides a book purchasing recommendation device based on a convolutional neural network, comprising:
the data acquisition module is used for acquiring historical book data and historical order data;
the data matching module is used for matching the history list data with the history order data, dividing books of the history list data into two categories of purchase and unpurchased according to a matching result and using the two categories as labels of the history list data;
the data dividing module is used for dividing a training set from the history list data with the labels;
the data conversion module is used for converting the information contained in the training set into a vector representation form;
the training module is used for training a pre-constructed neural network model by utilizing the vector corresponding to the training set;
and the recommendation module is used for converting the information of the books to be processed into vectors and then transmitting the vectors into the trained neural network model to obtain the purchase recommendation result of the books to be processed.
Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed, performs the method of the first aspect.
Based on the same inventive concept, a fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of the first aspect when executing the program.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the invention provides a book purchasing recommendation method based on a convolutional neural network, which comprises the following steps of firstly, acquiring history book order data and historical order data; then matching the historical book order data with the historical order data, and dividing the books in the historical book order data into two categories of purchase and unpurchased according to the matching result; then, marking out a training set from the data of the history list with the label; then converting the information contained in the training set into a vector representation form; then, training a pre-constructed neural network model by using vectors corresponding to the training set; and finally, converting the information of the book to be processed into vectors, and transmitting the vectors into the trained neural network model to obtain a purchasing recommendation result of the book to be processed.
The invention introduces deep learning technology into book interviewing technology, and provides a book purchasing recommendation method based on a convolutional neural network, firstly, according to the matching condition of history list data and history order data, labels are divided for the history list data, the labels are used as a training set for training a subsequent model, text information contained in the training set is converted into a vector representation form, and then a pre-constructed neural network model is trained by using a vector corresponding to the training set; and finally, purchasing recommendation can be carried out by utilizing the trained neural network model, on one hand, purchasing recommendation can be carried out by the neural network model in the method provided by the invention, the efficiency can be improved, on the other hand, as the training set of the model is selected after being matched with the historical order data according to the history list data, the neural network model with better effect can be obtained through training of the training set, and the recommendation accuracy can be improved.
Further, the text sequence is set to be a preset length, each Chinese character appearing in the text sequence is converted into corresponding word vector representation in a dictionary library, a word vector matrix is generated, and therefore training is conducted, namely a section of Chinese character with limited length is used for representing text characteristics of a book, and Chinese character-vector conversion is conducted on all the Chinese characters, so that the model can process Chinese character information.
Furthermore, the vector representation of each book is extracted by different convolution kernels to obtain feature maps with different lengths, so that the extracted features are more diversified, the feature maps are subjected to dimension reduction through the convergence layer, then spliced together and finally transmitted to the full-connection layer for processing, and finally the recommendation probability is obtained, so that the performance of the model can be further improved, and the accuracy is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a book purchasing recommendation method based on a convolutional neural network according to the present invention;
FIG. 2 is a technical framework diagram of book interview recommendation in an embodiment of the present invention;
FIG. 3 is a flow chart of data processing according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a model framework used in an embodiment of the invention;
FIG. 5 is a block diagram of a book purchasing recommendation apparatus based on a convolutional neural network according to an embodiment of the present invention;
FIG. 6 is a block diagram of a computer-readable storage medium according to an embodiment of the present invention;
fig. 7 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The applicant found through a great deal of research and practice that: the existing book interview recommendation is generally finished manually, and the efficiency and the accuracy cannot be guaranteed. In order to solve the problems, the invention introduces the idea of deep learning into a book interview recommendation method and provides a book purchase recommendation method based on a convolutional neural network. The specific application scenario is book ordering prediction in colleges and universities, namely libraries mainly aiming at professional requirements for book purchasing, such as Wuhan university libraries; the library is different from a public library and mainly aims at purchasing the knowledge popularization requirement, such as a library in Hubei province.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment provides a book purchasing recommendation method based on a convolutional neural network, please refer to fig. 1, and the method includes:
step S1: historical order data and historical order data are obtained.
Specifically, the history book data refers to the book information provided by all the book suppliers, and the history order data refers to the book information purchased by the library.
Step S2: and matching the historical book data with the historical order data, and dividing the books marked by the historical book data into two categories of purchase and unpurchased books according to the matching result to be used as the labels of the historical book data.
Specifically, step S2 is to label the books in the history list data for facilitating the subsequent training of the model.
In one embodiment, step S2 specifically includes:
step S2.1: matching history book data with historical order data;
step S2.2: if the books contained in the history list data appear in the history order data, the category of the books contained in the history list data is marked as purchase, otherwise, the category of the books contained in the history list data is marked as insufficient purchase, and the history list data with the label is obtained.
Specifically, referring to fig. 3, a specific implementation flow of data processing is shown, where an original book order is selected from history book order data, and an original order is selected from history order data, and after data cleaning is respectively performed, a book json file and an order json file are obtained (the json file is a file format and is used to store corresponding information). After the data matching is performed, the label of the book contained in the history list data, namely the purchased or unpurchased book is obtained, and the obtained labeled history list data label.
Step S3: the training set is partitioned from the labeled historian data.
Specifically, the data set may be divided according to the category of the label, where the label is a positive sample purchased and a negative sample not purchased, and then divided into a training set, a verification set, and a test set according to a preset ratio.
The test set can be used for adjusting the hyper-parameters of the model and carrying out preliminary evaluation on the capability of the model, and the verification set is used for evaluating the generalization capability of the model final model.
Step S4: the information contained in the training set is converted into a representation of a vector.
In particular, for better training, the information contained in the training set needs to be converted into a representation of a vector.
In one embodiment, step S4 specifically includes:
step S4.1: matching information contained in the training set with a pre-constructed dictionary library, wherein the pre-constructed dictionary library contains Chinese characters and word vector representations corresponding to the Chinese characters;
step S4.2: and converting the information contained in the training set into corresponding word vector representation according to the matching condition.
Specifically, the information contained in the training set is a text sequence, the Chinese characters are used as basic units, the text sequence is matched with a dictionary library, and then corresponding word vectors are obtained. The dictionary library can be composed of some common Chinese characters, and word vectors corresponding to the Chinese characters can be generated through the existing tools.
In one embodiment, the construction method of the dictionary database comprises the following steps:
counting the occurrence times of Chinese characters in the single data of the history book;
and deleting the Chinese characters with the occurrence frequency less than the threshold value and the Chinese characters serving as stop words, and constructing a dictionary library by using the rest Chinese characters.
Specifically, the threshold may be set according to actual situations, for example, 5 times, 8 times, 10 times, etc., some unusual Chinese characters and some stop words "are" deleted "," are ", etc., so that the remaining Chinese characters constitute the dictionary database.
In one embodiment, the method for constructing the word vector representation corresponding to the Chinese character is as follows:
limiting the size of the dictionary database to contain a preset number of Chinese characters;
and generating a word vector corresponding to each Chinese character by adopting an initialization method in a tensorflow library.
Specifically, tensoflow is a symbolic mathematical system based on data flow programming, and can be applied to programming realization of various machine learning (machine learning) algorithms, in the embodiment, word vectors of Chinese characters are generated by using a gloot _ normal _ inter () initialization method in a tensoflow library, and the dimension of the word vectors is set to 64.
In one embodiment, the information included in the training set is a text sequence, and step S4.2 specifically includes:
setting a text sequence to be a preset length;
and converting each Chinese character appearing in the text sequence into corresponding word vector representation in a dictionary library to generate a word vector matrix.
Specifically, the preset length may be determined according to actual conditions, such as 180, 200, 230, and the like. When the preset length is 200, if the actual text sequence length is less than 200, performing complementary 0 filling, and if the actual sequence length exceeds the length, truncating the exceeding part, and finally generating a 200x64 word vector matrix. The invention uses a section of Chinese characters with limited length to express the text characteristics of a book and carries out Chinese character-vector conversion on all Chinese characters in the book, so that the model can process Chinese character information.
Step S5: and training the pre-constructed neural network model by using the vector corresponding to the training set.
Step S6: and after converting the information of the book to be processed into vectors, transmitting the vectors into the trained neural network model to obtain a purchasing recommendation result of the book to be processed.
Specifically, the information of the books to be processed is the books to be recommended, such as book names and the like.
Referring to fig. 2, an overall technical framework diagram for book recommendation provided by the present invention integrally includes two parts, namely, offline training of models and online book recommendation. Wherein, steps S1-S5 correspond to an off-line training part, step S6 corresponds to an on-line recommending part, and CNN-BOOK is the name of the neural network model adopted by the invention. Through the processing of the neural network model, the purchase recommendation probability of the book can be finally obtained.
In one embodiment, the trained neural network model includes an input layer, at least one convolutional layer, a convergence layer, and a full-link layer, where convolutional kernels with different sizes are set in the convolutional layer, and the step S6 specifically includes:
step S6.1: the converted vector is processed by the input layer and then is sent to the convolution layer;
step S6.2: extracting feature maps with different lengths through convolution kernels with different sizes arranged in the convolution layer;
step S6.3: performing dimension reduction processing on the feature maps with different lengths through a convergence layer to obtain processed feature maps;
step S6.4: processing the processed characteristic diagram through a full connection layer to obtain a probability value;
step S6.5: outputting the probability value through an output layer;
step S6.6: and obtaining a book purchase recommendation result according to the output probability value.
Specifically, please refer to fig. 4, which is a schematic diagram of a model framework used in the embodiment of the present invention, wherein the maximum pooling layer is a convergence layer.
And the input layer randomly divides book data into a training set and a test set according to the proportion of 7:3, and transmits the training set into the model for training.
And the convolution layers are at least one layer, and four convolution kernels with different sizes are arranged in each convolution layer, and the sizes of the convolution kernels are 2,3,4 and 5 respectively.
The convergence layer is used for highly purifying the feature maps with different lengths extracted from the previous layer, namely performing dimensionality reduction treatment on the feature maps with different lengths extracted from the previous layer;
and the full-connection layer is used for transmitting the four characteristic graphs extracted from the previous layer into the full-connection layer for fitting after splicing, and outputting the purchase probability of each book through a softmax function.
And the output layer finally outputs the purchase probability of the book.
By the method, the model can automatically output the recommended purchase probability of each book only by transmitting the book list into the model. The working pressure of library staff can be greatly relieved, manual screening of the book is not needed, and the efficiency is also improved.
The book purchase recommendation method provided by the invention is described in detail by a specific example.
The data set used in this example is book procurement data for the library of Wuhan university in recent years, and includes two parts, the first part being the book order provided by each bookmaker, and the second part being the order for procurement of books by the library of Wuhan university. The book information formats provided by each bookseller are the same and different, the book information is stored in an Excel table form, and the information formats which most booksellers follow are selected as the standard in the example.
The whole experimental process frame is shown in fig. 2, the data processing process is shown in fig. 3, the attribute information of each book and the attributes of the first line of the Excel book list are ISBN, framing, price, culture, subject title, side title, edit number, edit title, first accountant, second accountant, version, publishing place, publishing company, publishing year, page number, size, cluster title, note, content introduction, reader object, subject term, subject score, form score, geographical score, middle map classification, edition, first accountant mode, second accountant mode, first group accountant mode, second group accountant mode, cataloguing organization, cataloguing date, catalog option number and 37 attributes in total.
In the specific implementation process, the data set is as follows: 1.5: the scale of 1.5 is divided into a training set, a validation set and a test set. Finding the best parameter in the training set, then bringing the parameter to the testing set to calculate loss, selecting the model parameter which makes the loss in the testing set minimum, and finally testing the generalization ability of the model on the verification set by the selected model. The environmental configuration of the experiment is shown in table 1:
TABLE 1
Figure BDA0002265475370000081
Figure BDA0002265475370000091
The model structure is shown in fig. 4, the input layer of the convolutional neural network is a 2016 text data set that is well managed by a text matrix (see table 2 for various parameter definitions of the model), the text representations of all books are processed by word count statistics, and the average length of the text information is 165.7 by statistical calculation. Therefore, the length Seq _ length of the input text message is set to 200, when the length of the input text message exceeds 200, the part exceeding 200 is cut off, and when the length of the input text message is less than 200, the part is filled with 0, and the method has the advantages that the position with the value of 0 is still 0 after the convolution layer processing, and when the input text message passes through the convergence layer, the Max _ posing operation cannot be influenced, so the final result cannot be influenced. Embedding _ dim is the dimension of each word, set to 64, and the input text matrix is 200x 64. To increase the training speed, 64 sets of data are input per Batch, and the Batch _ size is set to 64.
TABLE 2 parameter definitions
Figure BDA0002265475370000092
The convolution layer is used for extracting the characteristics of a local area, the characteristics of text information consisting of n continuous words are extracted in the model, and different convolution kernels are equivalent to different characteristic extractors.
In the present embodiment, four convolution kernels of different sizes are provided in the convolution layer, the sizes of the convolution kernels are 2,3,4 and 5, and when the convolution size is 5, for example, a convolution is performed for every 5 words to extract a feature value once. Performing convolution operations using convolution kernels of different sizes can extract features of text information of different lengths. Initialization of the convolution kernel uses a gloot _ uniform _ initializer initialization mode.
The specific implementation process is as follows: the method comprises the steps of performing one-dimensional convolution on input data, wherein the height of an x-th convolution Kernel is Kernel _ size _ x, the width of the x-th convolution Kernel is set to be equal to the width of a word vector, Embedding _ dim, the step size is set to be 1, the height of the convolution kernels means that each time characteristic extraction is performed on a window with the size of the Kernel _ size, one convolution Kernel slides on a characteristic representation sentence of one book, and finally two-dimensional vectors of [ Seq _ length-Kernel _ size +1,1] are generated, the number of the convolution kernels is Num _ filters, and therefore three-dimensional vectors of [ Num _ filters, Seq _ length-Kernel _ size +1,1], namely information extracted by the convolution kernels, can be generated.
The convergence layer mainly functions to compress the input feature mapping, so that the feature mapping (FeatureMap) is reduced, the network computation complexity is simplified, and the feature compression can be performed to extract main features.
Since the sizes of the feature maps obtained by the convolution kernels with different sizes are different, and the length calculation of the feature maps is, for example, as follows, setting parameters Seq _ length to 200 and kernel _ size to 2, and then after convolution, the length of the feature maps is 200-2+1 to 199, so that the sizes of the convolution kernels are different, the feature maps with different lengths are calculated, and in order to make the features extracted by the convolution kernels of each size occupy the same weight and reduce the parameters in the model, the present embodiment uses Max-pooling in the convergence layer to select the maximum value in the feature maps. The maximum value not only represents the feature extracted by a convolution kernel, but also can solve the problem of different sizes of the feature vectors extracted due to different sizes of the convolution kernels.
The Fully Connected Layers (FC for short) act as "classifiers" in the entire convolutional neural network model. The operations of the convolution layer, the convergence layer and the like used in the prior art are to map the original text data to the hidden layer feature space, and the fully-connected layer maps the learned distributed feature representations of the previous layers to the sample mark space.
After the height characteristic extraction of the previous convergence layer, the convolution kernels of the same size output characteristic values which are spliced together to form a vector with a fixed length and are transmitted into the full-connection layer. In order to prevent overfitting, a dropout function is used in the model, and in the deep learning field, half of Feature detectors (Feature detectors) stop working every time training, so that the generalization capability of the model can be improved.
The part of the full-link output is processed by using a Softmax function, the function can map the real number output by the full-link layer into a range of (0, 1), and the sum of two output values is 1, namely the probability output on the label. When the probability on a certain label is greater than 0.5, the label is judged to belong to the class, for example, when the probability on the purchasing label is greater than 0.5, the recommendation result is purchasing, otherwise, the recommendation result is not purchasing.
Generally speaking, in the data preprocessing stage, the method provided by the invention utilizes a section of Chinese characters with limited length to represent the text characteristics of a book and carries out Chinese character-vector conversion on all Chinese characters in the book, so that the model can process Chinese character information. And then, extracting feature maps with different lengths from the vector representation of each book by using different convolution kernels, so that the extracted features are more diversified, highly purifying the feature maps by a convergence layer, splicing the feature maps together, and finally transmitting the feature maps into a full-connection layer for training.
The accuracy of the experiment is 70% by adopting the traditional methods such as random forest, support vector machine and the like, the practical verification is carried out on the data set provided by Wuhan university library by adopting the method of the invention, and the experimental result shows that the accuracy of the method provided by the invention can reach 85% on the book interview task.
Example two
Based on the same inventive concept, the present embodiment provides a book purchasing recommendation apparatus based on convolutional neural network, please refer to fig. 5, the apparatus includes:
a data acquisition module 201, configured to acquire history list data and history order data;
the data matching module 202 is used for matching the history list data with the history order data, and dividing books in the history list data into two categories of purchase and unpurchased according to a matching result to be used as labels of the history list data;
the data dividing module 203 is used for dividing a training set from the history list data with the labels;
a data conversion module 204, configured to convert information included in the training set into a representation of a vector;
a training module 205, configured to train a pre-constructed neural network model with a vector corresponding to a training set;
and the recommending module 206 is configured to convert the information of the book to be processed into a vector, and transmit the vector to the trained neural network model to obtain a purchasing recommending result of the book to be processed.
Since the book purchasing recommendation device based on the convolutional neural network introduced in the second embodiment of the present invention is a device adopted in the book purchasing recommendation method based on the convolutional neural network in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, a person skilled in the art can know the specific group and the variation of the device, and thus details are not described herein. All devices adopted by the method based on the first embodiment of the invention belong to the protection scope of the invention.
EXAMPLE III
Based on the same inventive concept, the present application further provides a computer-readable storage medium 300, please refer to fig. 6, on which a computer program 311 is stored, which when executed implements the method as described in the first embodiment.
Since the computer-readable storage medium introduced in the third embodiment of the present invention is a readable storage medium used for implementing the book purchasing recommendation method based on the convolutional neural network in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, persons skilled in the art can understand the specific structure and deformation of the computer-readable storage medium, and thus details are not described here. Any computer readable storage medium used in the method of the first embodiment of the present invention is within the scope of the present invention.
Example four
Based on the same inventive concept, the present application further provides a computer device, please refer to fig. 7, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method according to the first embodiment.
Since the computer device introduced in the fourth embodiment of the present invention is a computer device used for implementing the book purchasing recommendation method based on the convolutional neural network in the first embodiment of the present invention, based on the method introduced in the first embodiment of the present invention, a person skilled in the art can understand the specific structure and deformation of the computer device, and thus details are not described herein. All the computer devices used in the method in the first embodiment of the present invention are within the scope of the present invention.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (10)

1. A book purchasing recommendation method based on a convolutional neural network is characterized by comprising the following steps:
step S1: acquiring history book data and history order data;
step S2: matching the history list data with the history order data, and dividing books in the history list data into two categories of purchase and unpurchased books according to a matching result to be used as labels of the history list data;
step S3: marking out a training set from the data of the labeled historical book sheet;
step S4: converting the information contained in the training set into a vector representation form;
step S5: training a pre-constructed neural network model by using vectors corresponding to the training set;
step S6: and after converting the information of the book to be processed into vectors, transmitting the vectors into the trained neural network model to obtain a purchasing recommendation result of the book to be processed.
2. The method according to claim 1, wherein step S2 specifically comprises:
step S2.1: matching history book data with historical order data;
step S2.2: if the books contained in the history list data appear in the history order data, the category of the books contained in the history list data is marked as purchase, otherwise, the category of the books contained in the history list data is marked as insufficient purchase, and the history list data with the label is obtained.
3. The method according to claim 1, wherein step S4 specifically comprises:
step S4.1: matching information contained in the training set with a pre-constructed dictionary library, wherein the pre-constructed dictionary library contains Chinese characters and word vector representations corresponding to the Chinese characters;
step S4.2: and converting the information contained in the training set into corresponding word vector representation according to the matching condition.
4. The method of claim 3, wherein the dictionary base is constructed by:
counting the occurrence times of Chinese characters in the single data of the history book;
and deleting the Chinese characters with the occurrence frequency less than the threshold value and the Chinese characters serving as stop words, and constructing a dictionary library by using the rest Chinese characters.
5. The method of claim 3, wherein the word vector representation corresponding to a Chinese character is constructed by:
limiting the size of the dictionary database to contain a preset number of Chinese characters;
and generating a word vector corresponding to each Chinese character by adopting an initialization method in a tensorflow library.
6. The method according to claim 1, wherein the information contained in the training set is a text sequence, and step S4.2 specifically comprises:
setting a text sequence to be a preset length;
and converting each Chinese character appearing in the text sequence into corresponding word vector representation in a dictionary library to generate a word vector matrix.
7. The method of claim 1, wherein the trained neural network model comprises an input layer, at least one convolutional layer, a convergence layer and a fully-connected layer, convolutional kernels with different sizes are set in the convolutional layer, and the step S6 specifically comprises:
step S6.1: the converted vector is processed by the input layer and then is sent to the convolution layer;
step S6.2: extracting feature maps with different lengths through convolution kernels with different sizes arranged in the convolution layer;
step S6.3: performing dimension reduction processing on the feature maps with different lengths through a convergence layer to obtain processed feature maps;
step S6.4: processing the processed characteristic diagram through a full connection layer to obtain a probability value;
step S6.5: outputting the probability value through an output layer;
step S6.6: and obtaining a book purchase recommendation result according to the output probability value.
8. A book purchasing recommendation device based on a convolutional neural network is characterized by comprising:
the data acquisition module is used for acquiring historical book data and historical order data;
the data matching module is used for matching the history list data with the history order data, dividing books in the history list data into two categories of purchase and unpurchased according to a matching result and using the two categories as labels of the history list data;
the data dividing module is used for dividing a training set from the history list data with the labels;
the data conversion module is used for converting the information contained in the training set into a vector representation form;
the training module is used for training a pre-constructed neural network model by utilizing the vector corresponding to the training set;
and the recommendation module is used for converting the information of the books to be processed into vectors and then transmitting the vectors into the trained neural network model to obtain the purchase recommendation result of the books to be processed.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed, implements the method of any one of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the program.
CN201911086187.0A 2019-11-08 2019-11-08 Book purchasing recommendation method and device based on convolutional neural network Pending CN111125338A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911086187.0A CN111125338A (en) 2019-11-08 2019-11-08 Book purchasing recommendation method and device based on convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911086187.0A CN111125338A (en) 2019-11-08 2019-11-08 Book purchasing recommendation method and device based on convolutional neural network

Publications (1)

Publication Number Publication Date
CN111125338A true CN111125338A (en) 2020-05-08

Family

ID=70495696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911086187.0A Pending CN111125338A (en) 2019-11-08 2019-11-08 Book purchasing recommendation method and device based on convolutional neural network

Country Status (1)

Country Link
CN (1) CN111125338A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241785A (en) * 2020-10-12 2021-01-19 中国科学技术大学 Book interview method based on deep reinforcement learning
CN113781139A (en) * 2020-10-19 2021-12-10 北京沃东天骏信息技术有限公司 Item recommendation method, item recommendation device, equipment and medium
CN116468255A (en) * 2023-06-15 2023-07-21 国网信通亿力科技有限责任公司 Configurable main data management system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145518A (en) * 2017-04-10 2017-09-08 同济大学 Personalized recommendation system based on deep learning under a kind of social networks
CN107392644A (en) * 2017-06-19 2017-11-24 华南理工大学 A kind of commodity purchasing predicts modeling method
CN108806785A (en) * 2018-05-29 2018-11-13 四川长虹电器股份有限公司 A kind of diagnosis and treatment section office recommendation method and system based on convolutional neural networks
US20190147509A1 (en) * 2017-11-16 2019-05-16 Coupa Software Incorporated Using transaction data to identify computing devices capable of performing transactions subject to transaction parameters
CN109902201A (en) * 2019-03-08 2019-06-18 天津理工大学 A kind of recommended method based on CNN and BP neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145518A (en) * 2017-04-10 2017-09-08 同济大学 Personalized recommendation system based on deep learning under a kind of social networks
CN107392644A (en) * 2017-06-19 2017-11-24 华南理工大学 A kind of commodity purchasing predicts modeling method
US20190147509A1 (en) * 2017-11-16 2019-05-16 Coupa Software Incorporated Using transaction data to identify computing devices capable of performing transactions subject to transaction parameters
CN108806785A (en) * 2018-05-29 2018-11-13 四川长虹电器股份有限公司 A kind of diagnosis and treatment section office recommendation method and system based on convolutional neural networks
CN109902201A (en) * 2019-03-08 2019-06-18 天津理工大学 A kind of recommended method based on CNN and BP neural network

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241785A (en) * 2020-10-12 2021-01-19 中国科学技术大学 Book interview method based on deep reinforcement learning
CN112241785B (en) * 2020-10-12 2022-09-06 中国科学技术大学 Book interview method based on deep reinforcement learning
CN113781139A (en) * 2020-10-19 2021-12-10 北京沃东天骏信息技术有限公司 Item recommendation method, item recommendation device, equipment and medium
CN116468255A (en) * 2023-06-15 2023-07-21 国网信通亿力科技有限责任公司 Configurable main data management system
CN116468255B (en) * 2023-06-15 2023-09-08 国网信通亿力科技有限责任公司 Configurable main data management system

Similar Documents

Publication Publication Date Title
CN110287320B (en) Deep learning multi-classification emotion analysis model combining attention mechanism
Ozdemir et al. Feature Engineering Made Easy: Identify unique features from your dataset in order to build powerful machine learning systems
CN105608477B (en) Method and system for matching portrait with job position
CN111581376B (en) Automatic knowledge graph construction system and method
CN111125338A (en) Book purchasing recommendation method and device based on convolutional neural network
CN110083700A (en) A kind of enterprise's public sentiment sensibility classification method and system based on convolutional neural networks
CN110765260A (en) Information recommendation method based on convolutional neural network and joint attention mechanism
CN109766424A (en) Filtering method and device for reading understanding model training data
CN112487291B (en) Big data-based personalized news recommendation method and device
CN110046356B (en) Label-embedded microblog text emotion multi-label classification method
CN116703328B (en) Project review method and system
KR20200010672A (en) Smart merchandise searching method and system using deep learning
CN112559860A (en) Massage program intelligent recommendation method and system based on deep learning
CN107247753A (en) A kind of similar users choosing method and device
CN117807232A (en) Commodity classification method, commodity classification model construction method and device
CN113515699B (en) Information recommendation method and device, computer readable storage medium and processor
CN116737922A (en) Tourist online comment fine granularity emotion analysis method and system
CN113409157B (en) Cross-social network user alignment method and device
CN118247821A (en) Personnel emotion recognition method based on mixed attention mechanism and multi-scale feature fusion
CN112241785A (en) Book interview method based on deep reinforcement learning
CN111966828A (en) Newspaper and magazine news classification method based on text context structure and attribute information superposition network
CN111666375A (en) Matching method of text similarity, electronic equipment and computer readable medium
CN114936327B (en) Element recognition model acquisition method and device, computer equipment and storage medium
CN113128235A (en) Semantic understanding method
CN114708127A (en) Student point system comprehensive assessment method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination