CN114416995A - Information recommendation method, device and equipment - Google Patents

Information recommendation method, device and equipment Download PDF

Info

Publication number
CN114416995A
CN114416995A CN202210070050.1A CN202210070050A CN114416995A CN 114416995 A CN114416995 A CN 114416995A CN 202210070050 A CN202210070050 A CN 202210070050A CN 114416995 A CN114416995 A CN 114416995A
Authority
CN
China
Prior art keywords
read
knowledge point
text
user
knowledge
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
CN202210070050.1A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202210070050.1A priority Critical patent/CN114416995A/en
Publication of CN114416995A publication Critical patent/CN114416995A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to the technical field of recommendation, and discloses an information recommendation method, device and equipment, wherein the method comprises the following steps: acquiring a document to be read; performing text recognition on the document to be read to obtain a text to be read; carrying out named entity recognition on the text to be read, and determining knowledge points in the text to be read; determining a knowledge point list to be recommended in the document to be read according to the long-term preference and the short-term preference of a user, and marking and displaying the knowledge point list in the document to be read; and recommending the learning content matched with the target knowledge point list to the user in response to an event triggered by the position of the target knowledge point in the document to be read. The method and the device have the advantages that the long-term preference and the short-term preference of the user are combined to recommend the knowledge point list, the knowledge points of the recommended knowledge points in the document are marked, and the user can know the knowledge points in the document clearly.

Description

Information recommendation method, device and equipment
Technical Field
The present application relates to the field of recommendation technologies, and in particular, to an information recommendation method, apparatus and device.
Background
The insurance field, whether an agent or a client, has a need for learning insurance knowledge. The existing insurance knowledge learning mode is to actively learn by searching product knowledge through an app or a search engine by a user (an agent or a client), but users unfamiliar with the insurance field may not know what knowledge to search, so insurance knowledge needs to be extracted and displayed to the user, the requirements of different users on knowledge points are different, and if the knowledge points are randomly recommended to the user, the user cannot be attracted, and therefore a method for recommending the knowledge points according to the preference of the user is needed.
Disclosure of Invention
The invention aims to provide an information recommendation method, device and equipment, which combine long-term preference and short-term preference of a user to recommend a knowledge point list, label the knowledge points of the recommended knowledge points in a document, and facilitate the user to know the knowledge points in the document clearly.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to a first aspect of embodiments of the present application, there is provided a data annotation method, including:
acquiring a document to be read;
performing text recognition on the document to be read to obtain a text to be read;
carrying out named entity recognition on the text to be read, and determining knowledge points in the text to be read;
determining a knowledge point list to be recommended in the document to be read according to the long-term preference and the short-term preference of a user, and marking and displaying the knowledge point list in the document to be read;
and recommending the learning content matched with the target knowledge point list to the user in response to an event triggered by the position of the target knowledge point in the document to be read.
In some embodiments of the application, based on the foregoing scheme, the performing text recognition on the document to be read to obtain a text to be read includes:
based on an FPN algorithm, processing a feature map of the document to be read to obtain a probability map;
carrying out differentiable binarization on the probability map to obtain a binary map;
searching a connected region on the binary image to obtain a text box data set, wherein the text box data set comprises position information of a plurality of text boxes;
and identifying the text information in the text boxes to obtain the text to be read.
In some embodiments of the present application, based on the foregoing scheme, the performing named entity recognition on the text to be read and determining knowledge points in the text to be read includes:
converting the text to be read into a token sequence meeting preset conditions;
based on a SPAN-BERT model, carrying out hierarchical calculation processing on the token sequence to obtain coded context expression;
and processing the context representation based on a pointer network, predicting to obtain the position of the knowledge point, and determining the knowledge point in the text to be read.
In some embodiments of the present application, based on the foregoing scheme, the pointer network comprises a first classifier and a second classifier; the predicting the position of the knowledge point according to the context representation based on the pointer network comprises the following steps:
obtaining a starting position candidate set of the knowledge points and corresponding probability according to the context expression through the first classifier;
obtaining an end position candidate set of the knowledge point and a corresponding probability according to the context expression through the second classifier;
and determining the position of the knowledge point according to the probability of the starting position and the probability of the ending position based on a maximum likelihood function.
In some embodiments of the present application, based on the foregoing solution, the information recommendation method further includes:
constructing an entity binary model based on the span model and the binary model;
enhancing the data by using a preset entity positive sample to obtain an entity negative sample;
training the entity binary classification model according to the entity positive sample and the entity negative sample to obtain a trained entity binary classification model;
determining the confidence coefficient of the knowledge point according to the position of the knowledge point through the trained entity classification model;
and determining the knowledge points in the document to be read according to the confidence degrees of the knowledge points.
In some embodiments of the present application, based on the foregoing solution, the determining, according to the long-term preference and the short-term preference of the user, a knowledge point list to be recommended in response to an event triggered by the location of the user at the knowledge point includes:
constructing a recommendation model, wherein the recommendation model comprises an embedding layer, an attention layer, an LSTM network and a fusion layer;
taking the knowledge point sequence triggered by the user history as a long-term sequence, and taking the knowledge point sequence triggered by the user recently as a short-term sequence;
through the embedding layer, the feature information of the long-term sequence and the corresponding knowledge points and the feature information of the short-term sequence and the corresponding knowledge points are coded and converted into low-dimensional dense vectors;
obtaining the weight of each corresponding knowledge point to the user according to the low-dimensional dense vector corresponding to the long-term sequence through the attention layer, and obtaining the long-term preference of the user by multiplying the weight by the vector formed by the feature information of the long-term sequence and the corresponding knowledge point and accumulating the multiplied weight;
obtaining the short-term preference of the user according to the low-dimensional dense vector corresponding to the short-term sequence through the LSTM network;
and through the fusion layer, performing weighted fusion on the long-term preference and the short-term preference of the user to obtain the final preference of the user, determining the next reading probability of the user for each knowledge point according to the final preference, and generating the knowledge point list according to the reading probability from high to low.
In some embodiments of the present application, based on the foregoing scheme, the feature information of the knowledge point includes a text recognition confidence level, an entity recognition confidence level, a font size, a location of the knowledge point, a number of documents containing the knowledge point, and a type of the knowledge point.
In some embodiments of the present application, based on the foregoing solution, the information recommendation method further includes:
embedding vectorization processing is carried out on each knowledge point through a SimBERT model to obtain a semantic vector of each knowledge point;
based on a cosine similarity algorithm, determining the similarity between the knowledge points according to the semantic vectors of the knowledge points;
and removing the duplication of the knowledge points according to the similarity among the knowledge points.
According to a second aspect of embodiments of the present application, there is provided an information recommendation apparatus, the apparatus including:
the document acquisition unit is used for acquiring a document to be read;
the text recognition unit is used for performing text recognition on the document to be read to obtain a text to be read;
the entity identification unit is used for carrying out named entity identification on the text to be read, determining knowledge points in the text to be read, and marking and displaying the knowledge points;
the recommending unit is used for responding to an event triggered by the position of the knowledge point of the user and determining a knowledge point list to be recommended according to the long-term preference and the short-term preference of the user;
the recommending unit is further used for recommending the learning content matched with the knowledge point list to the user according to the knowledge point list.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, including:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to carry out the method of the first aspect.
According to the method and the device, the long-term preference and the short-term preference of the user are combined to recommend the knowledge point list, the knowledge points of the recommended knowledge points in the document are labeled, the user can know the knowledge points in the document clearly, and the explanation video is recommended according to the target knowledge points which are being read by the user, so that the user can be helped to quickly understand the learning target knowledge points.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The above and other features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
FIG. 2 shows a flow diagram of an information recommendation method according to an embodiment of the present application.
FIG. 3 shows a flow diagram of a method of text recognition according to one embodiment of the present application.
FIG. 4 illustrates a flow diagram of a method of named entity identification, according to one embodiment of the present application.
FIG. 5 shows a schematic diagram of information recommendation according to one embodiment of the present application.
Fig. 6 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application.
Fig. 7 shows a schematic diagram of a program product for implementing the above method according to an embodiment of the present application.
FIG. 8 shows a schematic diagram of an electronic device according to one embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is also noted that the terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or described herein.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a terminal device (such as one or more of the smartphone 101, tablet 102, and portable computer 103 shown in fig. 1), a network 104, and a server 105. The network 104 serves as a medium for providing communication links between terminal devices and the server 105. The terminal devices and the server 105 are connected via a network 104, which may include various connection types, such as wired communication links, wireless communication links, and so forth.
The information recommendation method provided by the embodiment of the application can be executed by the server 105, and the result of the knowledge recommendation of the document to be read is sent to the terminal device through the network, so that the user can read the document to be read through the terminal device.
It should also be noted that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. According to implementation needs, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (content distribution network), a big data and artificial intelligence platform, and the like. The terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart television, and the like, but is not limited thereto, and the application is not limited thereto.
It should be explained that cloud computing (cloud computing) as above is a computing model that distributes computing tasks over a resource pool of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the cloud can be infinitely expanded to users, and can be acquired at any time, used as required and expanded at any time. The cloud computing resource pool mainly comprises computing equipment (which is a virtualization machine and comprises an operating system), storage equipment and network equipment.
The following detailed description is performed on implementation details of the technical solution of the embodiment of the present application:
FIG. 2 shows a flow diagram of a data annotation process according to one embodiment of the present application. As shown in fig. 2, the method includes at least the following steps.
Step 210: and acquiring the document to be read.
The document to be read may be a document in a format such as PPT or PDF containing pictures, for example, a PPT or PDF document related to insurance introduction referred by a user, the document contains many professional insurance knowledge points, and the user may not understand how to ask while looking.
Step 220: and performing text recognition on the document to be read to obtain the text to be read.
Documents to be read in formats such as PPT or PDF documents may contain not only texts but also pictures, and therefore text recognition technology is required to be used to recognize texts in the texts and the pictures in the documents to be read, so as to prepare for subsequent recognition of named entities in the texts.
Step 230: and carrying out named entity recognition on the text to be read, and determining knowledge points in the text to be read.
The method and the device extract the knowledge points in the text to be read through named entity identification, and the entities needing to be identified comprise insurance terms, insurance product names, disease names and other knowledge points in insurance related documents.
Step 240: and determining a knowledge point list to be recommended in the document to be read according to the long-term preference and the short-term preference of the user, and marking and displaying the knowledge point list in the document to be read.
According to the long-term preference (namely the knowledge points which are interested in the user history and comprise the knowledge points triggered by the user in all documents read by the user in the history) and the short-term preference (namely the knowledge points which are interested in the user recently and comprise the preset number of triggered knowledge points in the documents read by the user recently), a knowledge point list which needs to be recommended to the user is determined in a targeted mode, and the knowledge points in the recommendation list are marked and displayed in the documents, for example, the knowledge points are subjected to differentiation processing such as thickening, underlining, font color changing and lightening on the documents, and the reading by the user is facilitated.
Step 250: and recommending the learning content matched with the target knowledge point to the user in response to an event triggered by the position of the target knowledge point in the document to be read.
Combining the position information of the text box corresponding to the knowledge point on the screen in the text recognition in the step 220, the position of the knowledge point on the screen can be determined, an event triggered by the user at the position of the knowledge point is monitored, for example, the user moves a mouse to the position of the target knowledge point or clicks the position of the target knowledge point, for example, based on a fuzzy matching principle, an explanation video corresponding to the target knowledge point is recommended to the user from a video database, the target knowledge point is explained to the user in a short video mode, and the user can learn quickly.
According to the method and the device, the long-term preference and the short-term preference of the user are combined to recommend the knowledge point list, the knowledge points of the recommended knowledge points in the document are labeled, the user can know the knowledge points in the document clearly, and the explanation video is recommended according to the target knowledge points which are being read by the user, so that the user can be helped to quickly understand the learning target knowledge points.
FIG. 3 shows a flow diagram of a method of text recognition according to one embodiment of the present application. As shown in fig. 3, the text recognition method includes at least the following steps.
Step 310: and based on the FPN algorithm, processing the characteristic diagram of the document to be read to obtain a probability diagram.
Step 320: and carrying out differentiable binarization on the probability map to obtain a binary map.
Step 330: and searching a connected region on the binary image to obtain a text box data set, wherein the text box data set comprises position information of a plurality of text boxes.
The text recognition comprises two parts of text detection and text recognition, in the specific implementation, a text detection model based on DB can be adopted to realize the text detection method, and the text detection model comprises a feature extraction module, a probability map prediction module and a binarization module; the feature extraction module can adopt ResNet-18 or ResNet-50 deep convolution neural network, and adopts the form of Feature Pyramid (FPN) to fuse feature maps with different sizes, so as to extract features from the segmented image of the input document; inputting the extracted features into a probability map prediction module to obtain a probability map; the probability map prediction module can be formed by adopting a convolution layer with 3 x 3 and two deconvolution layers with stride of 2; then inputting the probability map into a binarization module to obtain a binary map; and finally finding a connected region for the binary image to obtain a text box.
Step 340: and identifying the text information in the text boxes to obtain the text to be read.
In a specific implementation, text recognition may be implemented by using a CRNN model, and a document and a text box data set corresponding to the document are input into a CRNN text recognition network model to determine text information in each text box. The CRNN text recognition network comprises a CNN module, a BilSTM (Bi-directional Long Short-Term Memory) module and a CTC network structure. The CNN module part adopts a MobileNet V3-small structure and is used for extracting the characteristics of the text image; the BilSTM module uses the extracted feature image for feature vector fusion, and further extracts context features of the character sequence to obtain probability distribution of each row of features; the CTC network structure inputs the hidden vector probability distribution, thereby predicting to obtain a text sequence.
FIG. 4 illustrates a flow diagram of a method of named entity identification, according to one embodiment of the present application. As shown in fig. 4, the named entity recognition method at least includes the following steps.
Step 410: and converting the text to be read into a token sequence meeting a preset condition.
The text to be read contains a plurality of sentences in the document to be read, for example, a sentence "the second party should be administered strictly according to the principle of 3 days of acute diseases, 7 days of chronic diseases and no more than 24 days of maximum. ", the" acute disease "and" chronic disease "in this sentence belong to named entities and need to be identified. Before the model is used for named entity recognition, each sentence needs to be converted into a token sequence in a single character form. In a specific implementation, converting the text to be read into a token sequence satisfying a preset condition may include:
converting characters in the text into a form of number token, replacing characters which cannot be matched with the characters by using < UNK >, and finishing primary conversion;
adding start and end marks [ CLS ] and [ SEP ] before and after the sentence token;
and truncating and filling the sentence token according to the set length, wherein the filled token is 0.
The above sentences are converted into the formula of 'CLS' B, and the formula is administered according to the principle of 3 days acute diseases, 7 days chronic diseases and no more than 24 days. [ SEP ]) "
Step 420: and carrying out hierarchical calculation processing on the token sequence based on a SPAN-BERT model to obtain the coded context expression.
In a specific implementation, the performing hierarchical computation processing on the token sequence based on the SPAN-BERT model to obtain the encoded context representation may include:
taking a sentence token sequence as input, and calculating the context expression of the sentence in a hierarchical mode through bidirectional Transformer connection in SPAN-BERT; and taking the output of the last layer of the Transformer as a final context expression.
The Transformer itself is also a structure of Seq2Seq, and the conventional LSTM is replaced by the Attention as an encoder to realize parallel computation. The encoder is composed of N identical layers, each layer containing two sublayers, namely a multi-head self-attention mechanism (multi-head self-attention mechanism) and a fully connected feed-forward network (fully connected feed-forward network). Each sub-layer also contains a residual and normalization layer.
Step 430: and processing the context representation based on the pointer network, predicting the position of the knowledge point, and determining the knowledge point in the text to be read.
For example, for a sentence "prescription B should be administered strictly on the basis of 3 days for acute disease, 7 days for chronic disease, and no more than 24 days for maximum. ", the pointer network predicts that an entity has a beginning position of 8 and an ending position of 10 in the sentence," it can be determined that "the acute disease" is an entity.
It should be noted that before performing hierarchical computation processing on the token sequence to obtain the encoded context representation, a training process for the SPAN-Bert model is further included, and the training process for the model may include the following steps:
(1) obtaining a data set according to a preset entity type and a manual marking result of a part of documents;
for insurance domain documents, named entity types include insurance terms, product names, disease names. Bert is based on supervised training model, so that before training, the text content of a part of documents is manually marked, the knowledge points in the text content are marked, named entities and corresponding positions of the named entities are obtained, and a data set in a format of < text, entity > is generated. For example, a sentence "the second prescription should be administered strictly on the basis of the amount of the acute disease for 3 days, the amount of the chronic disease for 7 days, and the maximum amount of the chronic disease for not more than 24 days" in the document generates data in the format of "the second prescription should be administered strictly on the basis of the amount of the acute disease for 3 days, the amount of the chronic disease for 7 days, and the maximum amount of the chronic disease for not more than 24 days, and the acute disease, the chronic disease >.
By adopting the method for training by utilizing the document to be recognized, the Bert model can keep certain generalization capability when having stronger feature extraction capability on the document to be recognized, and the accuracy of feature extraction of the Bert model can be improved.
(2) The resulting data set is cleaned and structured.
The method specifically comprises the steps of data cleaning, and deleting illegal characters, spaces and line feed characters in a text; dividing the text by taking the characters as granularity to construct a dictionary; and constructing an entity type dictionary.
Before the training samples are generated by using the data set, the data set is cleaned so as to avoid introducing unnecessary noise in the subsequent model training process. At this point, a dictionary is constructed, which facilitates mapping each character in the token sequence to an index value in the dictionary through the dictionary between the above-mentioned step 410 and step 420, and the characters are converted into the input parameters in a number form that can be recognized by SPAN-Bert. As previously described, for insurance domain documents, one entity type dictionary is { insurance terms, product names, disease names }.
(3) And constructing a positive sample set and a negative sample set according to the cleaned and structured data set.
The samples are represented using the Span format, with a positive sample set consisting of labeled entity datasets. For example, an "acute disease" in the above sentence is an entity of a disease name type, the corresponding positive sample of the Span format is a triplet (8,10, 3), the first two bits represent a Span, specifically, the start and end positions of the entity in the sentence, and the third bit represents the type of the entity, specifically, the position of the entity in the entity type dictionary.
And randomly masking ten percent of characters in the sentence pair to obtain a negative sample set. Here, a mask mechanism trained by the Bert model is used, wherein the masked character can be predicted by using a pre-trained prediction model. By adopting the random character masking mode, the model can be judged in the training process, so that the trained model has stronger generalization capability and stronger feature extraction capability. And inputting the sample set into an initial Bert model for training, and obtaining the Bert model by adopting a gradient descent algorithm.
In some embodiments of the present application, based on the foregoing scheme, the pointer network comprises a first classifier and a second classifier; predicting the position of the knowledge point according to the context representation based on the pointer network, comprising:
obtaining a starting position candidate set of the knowledge points and corresponding probability according to the context expression through a first classifier;
obtaining an end position candidate set of the knowledge points and corresponding probability according to the context expression through a second classifier;
and determining the position of the knowledge point according to the probability of the starting position and the probability of the ending position based on the maximum likelihood function.
The traditional Seq2Seq model does not solve the problem that the vocabulary of the output sequence changes with the change of the length of the input sequence, for which the output is often a subset of the input set. The idea of the pointer network is to operate the input sequence directly instead of setting the output vocabulary, so that the pointers are mapped to the elements of the input sequence. The nature of such output elements from input elements makes pointer networks well suited for copying some elements of an input sequence directly to an output sequence. This is a very effective idea for the extraction task, and predicting only the start and end positions can easily solve the problem of the consistency of the classification that was solved in the previous sequence marking task.
The beginning and ending positions of the sentence are marked, for example, with the beginning and ending layer tags in binary form, the token in the beginning layer tag if it has "1" tag indicates that the token is the beginning position of the knowledge point, and the token in the ending layer tag if it has "0" tag indicates that the token is the ending position of the knowledge point. The classifier can obtain the probability that each token in the sentence is "1" or "0", that is, the probability of each element in the candidate set and the candidate set of the starting position.
In some embodiments of the present application, based on the foregoing solution, the information recommendation method further includes:
constructing an entity binary model based on the span model and the binary model;
enhancing the data by using a preset entity positive sample to obtain an entity negative sample;
training an entity binary classification model according to the entity positive sample and the entity negative sample to obtain a trained entity binary classification model;
determining the confidence coefficient of the knowledge point according to the position of the knowledge point through the trained entity binary classification model;
and determining the knowledge points in the document to be read according to the confidence degrees of the knowledge points.
The implementation of the method is based on a Bert model and a binary classification model to construct an entity binary classification model, and the entity binary classification model can judge whether the input entity is a real entity or a false entity, namely the confidence coefficient of the input entity. The data in the existing entity database is used as an entity positive sample for training, a large number of negative samples are generated as entity negative samples for training by combining a data enhancement technology based on the existing entity database, and the entity binary classification model is trained through the entity positive sample and the entity negative sample to obtain the trained entity binary classification model.
According to the embodiment of the application, the output of the pointer network is not directly used as a final entity recognition result, but a trained entity binary model is connected with the output end of the pointer network, a knowledge point can be obtained through the position of the knowledge point output by the pointer network in a sentence sequence, the entity binary model can further obtain the confidence coefficient of the knowledge point, if the confidence coefficient of the knowledge point is greater than or equal to a preset threshold value, the knowledge point is determined to be a real entity, and if the confidence coefficient of the knowledge point is smaller than the preset threshold value, the knowledge point is determined to be a false entity. For example, for the above sentence, the entity two classification model determines that the confidence of the entity "acute disease" output by the pointer network is 95%, then the entity is finally determined to be a true entity, and the entity two classification model determines that the confidence of the entity "b side" output by the pointer network is 30%, then the entity is finally determined to be a false entity.
It should be noted that, in the training process of the SPAN-BERT model and the pointer network, the trained entity two-classification model can be combined to perform multi-task joint training, and entity confidence output by the entity two-classification model promotes iterative training of the SPAN-BERT model and the pointer network, so that the entity identification accuracy of the SPAN-BERT model and the pointer network is improved.
In some embodiments of the present application, based on the foregoing solution, in response to an event triggered by a location of a knowledge point of a user, determining a knowledge point list to be recommended according to long-term preference and short-term preference of the user, including:
constructing a recommendation model, wherein the recommendation model comprises an embedding layer, an attention layer, an LSTM network and a fusion layer;
taking a knowledge point sequence triggered by the history of the user as a long-term sequence, and taking a knowledge point sequence triggered by the latest user as a short-term sequence;
through an embedding layer, the long-term sequence and the feature information of the corresponding knowledge points, the short-term sequence and the feature information of the corresponding knowledge points are coded and converted into low-dimensional dense vectors;
through the attention layer, according to the low-dimensional dense vector corresponding to the long-term sequence, the weight of each corresponding knowledge point to the user is obtained, and the long-term preference of the user is obtained by multiplying the weight by the vector formed by the long-term sequence and the feature information of the corresponding knowledge point and accumulating the product;
obtaining the short-term preference of the user according to the low-dimensional dense vector corresponding to the short-term sequence through an LSTM network;
and through the fusion layer, performing weighted fusion on the long-term preference and the short-term preference of the user to obtain the final preference of the user, determining the next reading probability of the user for each knowledge point according to the final preference, and generating a knowledge point list from high to low according to the reading probability.
One-time viewing behavior of a document by a user is called a Session, and each-time viewing behavior of the user is performed based on explicit requirements, so that different sessions have a large gap. But if only one Session is considered, the long-term preference of the user cannot be well utilized for recommendation modeling. Fig. 5 is a schematic diagram illustrating another information recommendation method according to an embodiment of the present application. As shown in fig. 5, in the embodiment of the present application, a recommendation model that combines long-term memory and short-term preference of a user is constructed, feature engineering is performed first to obtain feature information corresponding to a long-term sequence and a short-term sequence, and then knowledge point recommendation is performed to the user through an embedding layer, an attention layer, an LSTM network, and a fusion layer of the model.
In some embodiments of the present application, based on the foregoing scheme, the feature information of the knowledge point may include a text recognition confidence of the knowledge point, an entity recognition confidence, a font size, a location of the knowledge point, a number of documents containing the knowledge point, and a type of the knowledge point.
The knowledge points contain multi-dimensional characteristic information, and the recommendation model can better learn the characteristics of the knowledge points learned by the user in a long term and a short term through the multi-dimensional characteristic information of the knowledge points, and output a recommendation list closer to the real preference of the user.
The text recognition confidence, namely the confidence of the result output by the text recognition model, is one of factors influencing the clicking of the knowledge point by the end user, and although the influence weight is not high, the text recognition confidence is used as the feature information participating in recommendation.
The entity recognition confidence is the confidence of the entity output by the entity classification model, which has a greater influence on the click of the subsequent user, because the words with higher confidence are more likely to be the professional terms in the insurance field, and therefore, the entity recognition confidence is taken as the feature information participating in the recommendation.
The font size can be determined by the size of the text box obtained in the text detection, the part with larger font in the document is usually the content emphasized by the author, and the remarked content with small font is likely to be ignored by the user and is not attractive in recognition in time, so that the font size is taken as the feature information participating in recommendation.
The position of the knowledge point can be determined by the position of the text box obtained in the text detection, according to the viewing experience, the center position of the screen is more obvious and is easier to focus on, and the edge position is scored and is easier to ignore, so that the knowledge point is used as the feature information participating in recommendation.
The number of documents referring to knowledge points can be determined according to the knowledge point statistics of each document, if a knowledge point is referred to in a plurality of documents, it is indicated that the knowledge point is a more frequently referred knowledge point, and if the number of times the knowledge point is referred to is less, it is indicated that the knowledge point is a cooler knowledge point, so that the information is taken as the feature information participating in recommendation.
In addition to the above dimensional feature information, other dimensional feature information, for example, features such as the type of a knowledge point and the page number where the knowledge point is located, may be used as the feature information participating in recommendation.
In some embodiments of the present application, based on the foregoing solution, the method further comprises:
embedding vectorization processing is carried out on the knowledge points through a SimBERT model to obtain semantic vectors of the knowledge points;
determining the similarity between knowledge points according to the semantic vectors of the knowledge points based on a cosine similarity algorithm;
and removing the duplication of the knowledge points according to the similarity among the knowledge points.
The knowledge points to be compared are led into a Bert model trained in advance to obtain semantic vectors of the knowledge points, the semantic vectors can dynamically express relationships among words, word position relationships and sentence relationships in the knowledge points by means of the characteristic of feature extraction of the Bert model, the features of the knowledge points are reflected from multiple aspects of words, sentences and the like, and the accuracy of subsequent text similarity calculation can be improved. By adopting cosine similarity, the similarity of the text can be highlighted by taking the direction as a key point for measuring the similarity, and the accuracy of the similarity of the text is improved.
According to the method and the device, the long-term preference and the short-term preference of the user are combined to recommend the knowledge point list, the knowledge points of the recommended knowledge points in the document are labeled, the recommended knowledge points are not repeated in the document, the user can conveniently and clearly know the knowledge points in the document, and the explanation video is recommended according to the target knowledge points which are being read by the user, so that the user can be helped to quickly understand the learning target knowledge points.
Embodiments of the information recommendation apparatus of the present application are described below, which can be used to execute the information recommendation method in the above embodiments of the present application. For details that are not disclosed in the embodiments of the information recommendation device of the present application, please refer to the embodiments of the information recommendation method described above in the present application.
Fig. 6 is a schematic structural diagram of an information recommendation device according to an embodiment of the present application. As shown in fig. 6, the information recommendation apparatus includes at least a document acquisition unit 610, a text recognition unit 620, an entity recognition unit 630, and a recommendation unit 640.
A document acquiring unit 610, configured to acquire a document to be read;
the text recognition unit 620 is configured to perform text recognition on the document to be read to obtain a text to be read;
an entity identification unit 630, configured to perform named entity identification on the text to be read, determine a knowledge point in the text to be read, and mark and display the knowledge point;
the recommending unit 640 is configured to determine a knowledge point list to be recommended according to the long-term preference and the short-term preference of the user in response to an event triggered by the position of the knowledge point of the user;
the recommending unit 640 is further configured to recommend, to the user, learning content matched with the knowledge point list according to the knowledge point list.
It should be noted that although several units of the information recommendation method and the information recommendation apparatus are mentioned in the above detailed description, such division is not mandatory. Indeed, two or more of the units and functions described above may be embodied in one unit according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units. The components displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As another aspect, the present application also provides a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the present application may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present application described in the "exemplary methods" section above of this specification, when the program product is run on the terminal device.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present application is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
As another aspect, the present application further provides an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the application is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 830 that couples the various system components including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code, which can be executed by the processing unit 810, to cause the processing unit 810 to perform the steps according to various exemplary embodiments of the present application described in the section "example methods" above in this specification.
The storage unit 820 may include readable media in the form of volatile storage units, such as a random access storage unit (RAM)821 and/or a cache storage unit 822, and may further include a read only storage unit (ROM) 823.
Storage unit 820 may also include a program/utility 824 having a set (at least one) of program modules 825, such program modules 825 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 800, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present application.
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An information recommendation method, characterized in that the method comprises:
acquiring a document to be read;
performing text recognition on the document to be read to obtain a text to be read;
carrying out named entity recognition on the text to be read, and determining knowledge points in the text to be read;
determining a knowledge point list to be recommended in the document to be read according to the long-term preference and the short-term preference of a user, and marking and displaying the knowledge point list in the document to be read;
and recommending the learning content matched with the target knowledge point list to the user in response to an event triggered by the position of the target knowledge point in the document to be read.
2. The information recommendation method according to claim 1, wherein the text recognition of the document to be read to obtain a text to be read comprises:
based on an FPN algorithm, processing a feature map of the document to be read to obtain a probability map;
carrying out differentiable binarization on the probability map to obtain a binary map;
searching a connected region on the binary image to obtain a text box data set, wherein the text box data set comprises position information of a plurality of text boxes;
and identifying the text information in the text boxes to obtain the text to be read.
3. The information recommendation method according to claim 1, wherein the performing named entity recognition on the text to be read and determining knowledge points in the text to be read comprises:
converting the text to be read into a token sequence meeting preset conditions;
based on a SPAN-BERT model, carrying out hierarchical calculation processing on the token sequence to obtain coded context expression;
and processing the context representation based on a pointer network, predicting to obtain the position of the knowledge point, and determining the knowledge point in the text to be read.
4. The information recommendation method of claim 3, wherein the pointer network comprises a first classifier and a second classifier; the predicting the position of the knowledge point according to the context representation based on the pointer network comprises the following steps:
obtaining a starting position candidate set of the knowledge points and corresponding probability according to the context expression through the first classifier;
obtaining an end position candidate set of the knowledge point and a corresponding probability according to the context expression through the second classifier;
and determining the position of the knowledge point according to the probability of the starting position and the probability of the ending position based on a maximum likelihood function.
5. The information recommendation method according to claim 3, further comprising:
constructing an entity binary model based on the span model and the binary model;
enhancing the data by using a preset entity positive sample to obtain an entity negative sample;
training the entity binary classification model according to the entity positive sample and the entity negative sample to obtain a trained entity binary classification model;
determining the confidence coefficient of the knowledge point according to the position of the knowledge point through the trained entity classification model;
and determining the knowledge points in the document to be read according to the confidence degrees of the knowledge points.
6. The information recommendation method according to claim 1, wherein the determining the knowledge point list to be recommended according to the long-term preference and the short-term preference of the user in response to an event triggered by the location of the knowledge point at which the user is located comprises:
constructing a recommendation model, wherein the recommendation model comprises an embedding layer, an attention layer, an LSTM network and a fusion layer;
taking the knowledge point sequence triggered by the user history as a long-term sequence, and taking the knowledge point sequence triggered by the user recently as a short-term sequence;
through the embedding layer, the feature information of the long-term sequence and the corresponding knowledge points and the feature information of the short-term sequence and the corresponding knowledge points are coded and converted into low-dimensional dense vectors;
obtaining the weight of each corresponding knowledge point to the user according to the low-dimensional dense vector corresponding to the long-term sequence through the attention layer, and obtaining the long-term preference of the user by multiplying the weight by the vector formed by the long-term sequence and the feature information of the corresponding knowledge point and accumulating the multiplied weights;
obtaining the short-term preference of the user according to the low-dimensional dense vector corresponding to the short-term sequence through the LSTM network;
and through the fusion layer, performing weighted fusion on the long-term preference and the short-term preference of the user to obtain the final preference of the user, determining the next reading probability of the user for each knowledge point according to the final preference, and generating the knowledge point list according to the reading probability from high to low.
7. The information recommendation method according to claim 6, wherein the feature information of the knowledge point includes a text recognition confidence, an entity recognition confidence, a font size, a location of the knowledge point, a number of documents containing the knowledge point, and a type of the knowledge point.
8. The information recommendation method according to claim 1, further comprising:
embedding vectorization processing is carried out on each knowledge point through a SimBERT model to obtain a semantic vector of each knowledge point;
based on a cosine similarity algorithm, determining the similarity between the knowledge points according to the semantic vectors of the knowledge points;
and removing the duplication of the knowledge points according to the similarity among the knowledge points.
9. An information recommendation apparatus, characterized in that the apparatus comprises:
the document acquisition unit is used for acquiring a document to be read;
the text recognition unit is used for performing text recognition on the document to be read to obtain a text to be read;
the entity identification unit is used for carrying out named entity identification on the text to be read, determining knowledge points in the text to be read, and marking and displaying the knowledge points;
the recommending unit is used for responding to an event triggered by the position of the knowledge point of the user and determining a knowledge point list to be recommended according to the long-term preference and the short-term preference of the user;
the recommending unit is further used for recommending the learning content matched with the knowledge point list to the user according to the knowledge point list.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to carry out the method of any one of claims 1-8.
CN202210070050.1A 2022-01-20 2022-01-20 Information recommendation method, device and equipment Pending CN114416995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210070050.1A CN114416995A (en) 2022-01-20 2022-01-20 Information recommendation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210070050.1A CN114416995A (en) 2022-01-20 2022-01-20 Information recommendation method, device and equipment

Publications (1)

Publication Number Publication Date
CN114416995A true CN114416995A (en) 2022-04-29

Family

ID=81275412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210070050.1A Pending CN114416995A (en) 2022-01-20 2022-01-20 Information recommendation method, device and equipment

Country Status (1)

Country Link
CN (1) CN114416995A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383372A (en) * 2023-04-14 2023-07-04 信域科技(沈阳)有限公司 Data analysis method and system based on artificial intelligence
CN117573891A (en) * 2023-12-08 2024-02-20 广东信聚丰科技股份有限公司 Knowledge point generation method and system based on text understanding model
CN117807270A (en) * 2024-02-29 2024-04-02 中国人民解放军国防科技大学 Video recommendation method, device, equipment and storage medium based on news content

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383372A (en) * 2023-04-14 2023-07-04 信域科技(沈阳)有限公司 Data analysis method and system based on artificial intelligence
CN116383372B (en) * 2023-04-14 2023-11-24 北京创益互联科技有限公司 Data analysis method and system based on artificial intelligence
CN117573891A (en) * 2023-12-08 2024-02-20 广东信聚丰科技股份有限公司 Knowledge point generation method and system based on text understanding model
CN117573891B (en) * 2023-12-08 2024-05-10 广东信聚丰科技股份有限公司 Knowledge point generation method and system based on text understanding model
CN117807270A (en) * 2024-02-29 2024-04-02 中国人民解放军国防科技大学 Video recommendation method, device, equipment and storage medium based on news content
CN117807270B (en) * 2024-02-29 2024-05-07 中国人民解放军国防科技大学 Video recommendation method, device, equipment and storage medium based on news content

Similar Documents

Publication Publication Date Title
CN112131350B (en) Text label determining method, device, terminal and readable storage medium
CN110688854B (en) Named entity recognition method, device and computer readable storage medium
KR101754473B1 (en) Method and system for automatically summarizing documents to images and providing the image-based contents
CN114416995A (en) Information recommendation method, device and equipment
CN111324696B (en) Entity extraction method, entity extraction model training method, device and equipment
CN113392209B (en) Text clustering method based on artificial intelligence, related equipment and storage medium
CN112188312B (en) Method and device for determining video material of news
CN111881292B (en) Text classification method and device
CN114897060B (en) Training method and device for sample classification model, and sample classification method and device
CN114626097A (en) Desensitization method, desensitization device, electronic apparatus, and storage medium
WO2023108993A1 (en) Product recommendation method, apparatus and device based on deep clustering algorithm, and medium
WO2022174496A1 (en) Data annotation method and apparatus based on generative model, and device and storage medium
CN114722069A (en) Language conversion method and device, electronic equipment and storage medium
CN114358007A (en) Multi-label identification method and device, electronic equipment and storage medium
CN113051356A (en) Open relationship extraction method and device, electronic equipment and storage medium
CN111145914B (en) Method and device for determining text entity of lung cancer clinical disease seed bank
US20230114673A1 (en) Method for recognizing token, electronic device and storage medium
CN113961666B (en) Keyword recognition method, apparatus, device, medium, and computer program product
CN114492661A (en) Text data classification method and device, computer equipment and storage medium
CN114637847A (en) Model training method, text classification method and device, equipment and medium
CN114491076B (en) Data enhancement method, device, equipment and medium based on domain knowledge graph
CN113704466B (en) Text multi-label classification method and device based on iterative network and electronic equipment
CN115796141A (en) Text data enhancement method and device, electronic equipment and storage medium
CN115269781A (en) Modal association degree prediction method, device, equipment, storage medium and program product
CN115186085A (en) Reply content processing method and interaction method of media content interaction content

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