WO2023155304A1 - 关键词推荐模型训练方法、推荐方法和装置、设备、介质 - Google Patents

关键词推荐模型训练方法、推荐方法和装置、设备、介质 Download PDF

Info

Publication number
WO2023155304A1
WO2023155304A1 PCT/CN2022/090746 CN2022090746W WO2023155304A1 WO 2023155304 A1 WO2023155304 A1 WO 2023155304A1 CN 2022090746 W CN2022090746 W CN 2022090746W WO 2023155304 A1 WO2023155304 A1 WO 2023155304A1
Authority
WO
WIPO (PCT)
Prior art keywords
keyword
word
word vector
recommendation model
index
Prior art date
Application number
PCT/CN2022/090746
Other languages
English (en)
French (fr)
Inventor
刘羲
舒畅
陈又新
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023155304A1 publication Critical patent/WO2023155304A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Definitions

  • the present application relates to the technical field of artificial intelligence, in particular to a keyword recommendation model training method, a recommendation method and device, equipment, and media.
  • the first one is an unsupervised learning scheme to obtain a recommendation model.
  • IDF inverse document frequency
  • the other is to get a recommendation model for a supervised learning scheme, such as a sequence labeling scheme, where the input is all the words of a text, through the long short-term memory artificial neural network or attention mechanism network structure, trying to find the relationship between each word and other words Degree, so as to find the words that users are most willing to learn.
  • a recommendation model for a supervised learning scheme such as a sequence labeling scheme
  • the input is all the words of a text
  • the long short-term memory artificial neural network or attention mechanism network structure trying to find the relationship between each word and other words Degree, so as to find the words that users are most willing to learn.
  • the inventor realized that when the recommendation model obtained by this scheme handles long texts, the amount of parameters is large, and the influence of too many irrelevant words is introduced, resulting in a greatly reduced keyword recommendation effect.
  • Another example is to directly predict a single word without considering the relationship between words. This scheme is simple and fast, but due to the lack of interaction with other words, it cannot accurately find the most suitable word for learning.
  • the recommendation model is obtained by using the unsupervised learning scheme, the calculation is relatively convenient, and the IDF can reflect the trend of word difficulty, but the words with higher IDF are often very rare words, which are not suitable for general User learning; when using a supervised learning scheme to obtain a recommendation model to process long texts, the number of parameters is large, and too many irrelevant words are introduced, resulting in a significant decline in the keyword recommendation effect. Therefore, how to improve the relevance and accuracy of keyword recommendation has become an urgent technical problem to be solved.
  • the embodiment of the present application proposes a keyword recommendation model training method, including:
  • the keyword training data set includes the index sample and classification labels
  • the index sample is input into the word embedding processing layer of the keyword recommendation model to perform word embedding operation to obtain the word vector of the word;
  • the keyword recommendation model is used for keyword recommendation processing.
  • the embodiment of the present application proposes a keyword recommendation model training device, including:
  • a text sample acquisition module configured to acquire at least one text sample, and generate an index sample containing index information of words according to the text sample
  • a training data set construction module configured to construct a keyword training data set according to the index sample, the keyword training data set including the index sample and classification labels;
  • a word vector processing module used to input the index sample into the word embedding processing layer of the keyword recommendation model to perform a word embedding operation to obtain the word vector of the word;
  • the primary environment word vector calculation module is used to input the word vector into the primary environment information extraction layer of the keyword recommendation model to extract the primary environment information to obtain the primary environment word vector;
  • the input environment word vector calculation module is used to use the input environment information extraction layer of the keyword recommendation model to perform the first splicing process on the primary environment word vector and the word vector to generate the input environment corresponding to the word word vector;
  • a keyword vector generating module configured to perform a second splicing process according to the input environment word vector and the word vector, to obtain a keyword vector
  • a classification prediction module configured to input the keyword vector into the prediction classification layer of the keyword recommendation model to obtain a recommended prediction value
  • a parameter adjustment module configured to adjust the parameters in the keyword recommendation model according to the detection error between the recommended predicted value and the classification label, until the loss function satisfies the convergence condition, and obtain the keyword recommendation model , the keyword recommendation model is used for keyword recommendation processing.
  • the embodiment of the present application provides an electronic device, including: at least one memory; at least one processor; at least one program; the program is stored in the memory, and the processor executes the at least one program to realize a A keyword recommendation model training method, or a keyword recommendation method; wherein, the keyword recommendation model training method includes: obtaining at least one text sample, and generating an index containing word index information according to the text sample Sample; Build keyword training data set according to described index sample, described keyword training data set comprises described index sample and classification label;
  • the word embedding processing layer of described index sample input described keyword recommendation model carries out word embedding Operate to obtain the word vector of the word; input the word vector into the primary environment information extraction layer of the keyword recommendation model to extract the primary environment information, and obtain the primary environment word vector; utilize the input environment of the keyword recommendation model
  • the information extraction layer performs the first splicing process on the primary environment word vector and the word vector to generate the input environment word vector corresponding to the word; performs the second splicing according to the input environment word vector
  • the embodiment of the present application provides a storage medium, the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to Making a computer execute a keyword recommendation model training method, or a keyword recommendation method; wherein, the keyword recommendation model training method includes: obtaining at least one text sample, and generating a text message containing words according to the text sample An index sample of index information; construct a keyword training data set according to the index sample, the keyword training data set includes the index sample and classification labels; input the index sample into the word embedding process of the keyword recommendation model
  • the layer carries out word embedding operation, obtains the word vector of described word;
  • the primary environment information extraction layer of described word vector input described keyword recommendation model carries out primary environment information extraction, obtains primary environment word vector; Utilizes described keyword recommendation
  • the input environment information extraction layer of the model performs the first splicing process on the primary environment word vector and the word vector to generate the input environment word vector corresponding to
  • the keyword recommendation model training method, recommendation method and device, equipment, and medium proposed in the embodiments of the present application obtain index samples, construct keyword training data sets according to the index samples, and input the index samples into the word embedding processing layer of the keyword recommendation model, Get the word vector of the word, input the word vector into the primary environment information extraction layer, get the primary environment word vector, then input the primary environment word vector into the input environment information extraction layer, get the input environment word vector, and then according to the input environment word vector and word vector
  • the keyword vector is generated, and the keyword vector is input into the prediction classification layer to obtain the recommended prediction value. According to the detection error between the recommended prediction value and the classification label, the parameters in the keyword recommendation model are adjusted to obtain the keyword recommendation model.
  • the keyword recommendation model trained by the keyword recommendation model training method of this embodiment obtains the input environment word vector related to the word vector, combines the learning difficulty of the keyword itself and the environmental information corresponding to the keyword, so that the selected keyword conforms to the user's preference. Learning needs, improving the relevance and accuracy of keyword recommendations.
  • FIG. 1 is a flow chart of a keyword recommendation model training method provided by an embodiment of the present application.
  • FIG. 2 is another flow chart of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a pre-selected word selection method of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 4 is another flow chart of the keyword recommendation model training method provided by the embodiment of the present application.
  • Fig. 5 is a schematic diagram of obtaining pre-selected words according to the displacement structure of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a keyword recommendation model of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of the prediction flow of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 8 is another flow chart of the keyword recommendation model training method provided by the embodiment of the present application.
  • FIG. 9 is a flowchart of a keyword recommendation method provided by an embodiment of the present application.
  • Fig. 10 is a structural block diagram of a keyword recommendation model training device provided by an embodiment of the present application.
  • Fig. 11 is a structural block diagram of a keyword recommendation device provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • IDF Inverse text frequency
  • TF-IDF Term Frequency–Inverse Document Frequency
  • IDF Inverse Document Frequency Frequency, inverse text frequency
  • the word frequency TF refers to the number of times that the feature word appears in the selected text, which means that when calculating the word frequency, it is necessary to divide the word combinations in the text, and then count the number of words after the division.
  • IDF refers to the measure of the universal importance of feature words. Estimating the inverse text frequency of feature words is by counting the occurrence degree of feature words in the established corpus.
  • IDF can effectively reduce the weight of high-frequency feature words with less effect, thereby weakening the impact on text classification. At the same time, it can also evaluate the feature words with relatively low word frequency and relatively large effect and give them a larger weight to improve the accuracy of text classification. sex.
  • the first one is an unsupervised learning scheme to obtain a recommendation model.
  • the IDF of each word is obtained, and the IDF is used to represent the difficulty of the word, and the IDF is sorted from high to low. Afterwards, it is recommended to users.
  • the calculation of the recommendation model obtained by this scheme is relatively convenient, and the IDF can reflect the trend of word difficulty, words with higher IDF are often very rare words, which are not suitable for ordinary users to learn.
  • the other is to get a recommendation model for a supervised learning scheme, such as a sequence labeling scheme, where the input is all the words of a text, through the long short-term memory artificial neural network or attention mechanism network structure, trying to find the relationship between each word and other words Degree, so as to find the words that users are most willing to learn.
  • a recommendation model for a supervised learning scheme such as a sequence labeling scheme
  • the input is all the words of a text
  • the long short-term memory artificial neural network or attention mechanism network structure trying to find the relationship between each word and other words Degree, so as to find the words that users are most willing to learn.
  • the recommendation model obtained by this scheme deals with long texts, the amount of parameters is large, and the influence of too many irrelevant words is introduced, resulting in a greatly reduced keyword recommendation effect.
  • Another example is to directly predict a single word without considering the relationship between words. This scheme is simple and fast, but due to the lack of interaction with other words, it cannot accurately find the most suitable word for learning.
  • embodiments of the present application provide a keyword recommendation model training method, recommendation method and device, electronic equipment, and storage media, which can realize automatic extraction of keywords in text, and improve the relevance and accuracy of keyword recommendation.
  • the embodiment of the present application provides a keyword recommendation model training method, recommendation method and device, electronic equipment, and storage medium, which are specifically described through the following embodiments. First, the keyword recommendation model training method and recommendation method in the embodiment of the present application are described.
  • AI artificial intelligence
  • the embodiments of the present application may acquire and process relevant data based on artificial intelligence technology.
  • artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • the keyword recommendation model training method and recommendation method provided in the embodiments of the present application relate to the technical field of artificial intelligence, in particular to the technical field of artificial intelligence.
  • the keyword recommendation model training method and recommendation method provided in the embodiments of the present application can be applied to a terminal, can also be applied to a server, and can also be software running on a terminal or a server.
  • the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer or a smart watch, etc.
  • the server can be an independent server, or can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage , network services, cloud communications, middleware services, domain name services, security services, content delivery network (Content Delivery Network, CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms
  • software can be the key word for implementation Recommended model training methods, application of recommended methods, etc., but not limited to the above forms.
  • the application can be used in numerous general purpose or special purpose computer system environments or configurations. Examples: personal computers, server computers, handheld or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, including A distributed computing environment for any of the above systems or devices, etc.
  • This application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.
  • FIG. 1 is an optional flow chart of a keyword recommendation model training method provided by an embodiment of the present application.
  • the method in FIG. 1 may include, but is not limited to, step S101 to step S108.
  • step S101 at least one text sample is obtained, and an index sample including index information of words is generated according to the text sample.
  • training the keyword recommendation model requires a large number of text samples
  • the text samples are English articles, and English articles are composed of words, so the index information of each word is generated according to the English article, according to the The index information can locate all the words in the English article.
  • a word database can be generated, and then the text sample can be converted into an index sample, and the position of the word in the database is used to represent the word in the index sample, so as to improve the processing efficiency of the sample.
  • Step S102 constructing a keyword training data set according to the index samples, and the keyword training data set includes index samples and classification labels.
  • a large number of index samples are used to form a keyword training data set.
  • the purpose of the training is to enable the trained keyword recommendation model to output the text to be recommended after inputting an index text corresponding to a text to be recommended.
  • the recommendation probability that all the words in are keywords.
  • the keyword training data set constructed in this embodiment includes: index samples and classification labels, and the classification labels are the probability of each word in the index samples as a keyword, such as represented by "01", "0 " means that the word will not be selected as a keyword, and "1" means that the word will be selected as a keyword.
  • Step S103 input the index sample into the word embedding processing layer of the keyword recommendation model to perform word embedding operation to obtain the word vector of the word.
  • the index samples are input to the word embedding processing layer in the keyword recommendation model, and word embedding operations are performed on all words in the index samples to obtain word vectors of corresponding words.
  • the word embedding operation is to perform vectorized representation of words, and express a single word as a real number vector in a predefined vector space, and each word is mapped to a word vector.
  • a text contains several words such as “cat”, “dog”, and “love”, and these several words are mapped into the vector space, and the word vector corresponding to cat is (0.1, 0.2, 0.3), The word vector corresponding to "dog” is (0.2,0.2,0.4), the word vector corresponding to "love” is (-0.4,-0.5,-0.2), etc.
  • the above word vector representation is only for illustration.
  • words are vectorized to obtain word vectors, which can improve the efficiency and accuracy of computer word processing. For example, “cat” and “dog” represent animals, and “love” represents an emotion, but for computers, this The three words are all expressed as binary strings with 0 and 1, and cannot be directly calculated.
  • words are converted into word vectors through word embedding, and the machine computer can directly calculate the words.
  • This process of mapping words into vector representations is the word embedding operation in this embodiment.
  • the word embedding processing layer in the keyword recommendation model is used to implement word embedding operations on all words in the index sample.
  • Step S104 input the word vector into the primary environment information extraction layer of the keyword recommendation model to extract the primary environment information, and obtain the primary environment word vector.
  • the supplementary light considers the difficulty of the word itself, and also selects the relevant words in the current visual receptive field, that is, the user will compare the words he sees with the Compare the words before and after the word to determine whether to choose the word to learn.
  • the difficulty of word A itself is not high, but the difficulty of several words around this word is relatively low, and the user will choose this word with a high probability; conversely, the difficulty of word B itself is relatively high, but the difficulty of the surrounding words is also high, then the user There is a high probability that the word will not be selected.
  • the word vector is input into the primary environment information extraction layer of the keyword recommendation model through the range of the user's visual receptive field to obtain the primary environment word vector, which is used to reflect the surrounding words of the word (ie word vector) information, as a primary environmental factor to determine whether the word will be selected as a learning word, combined with the learning difficulty of the keyword itself and the environmental information corresponding to the keyword, so that the selected keyword meets the user's learning needs, and the keyword Relevance and accuracy of recommendations.
  • the primary environment word vector which is used to reflect the surrounding words of the word (ie word vector) information, as a primary environmental factor to determine whether the word will be selected as a learning word, combined with the learning difficulty of the keyword itself and the environmental information corresponding to the keyword, so that the selected keyword meets the user's learning needs, and the keyword Relevance and accuracy of recommendations.
  • the word vector is input into the primary environmental information extraction layer of the keyword recommendation model for primary environmental information extraction to obtain the primary environmental word vector, referring to FIG. 2 , including but not limited to steps S1041 to S1043:
  • Step S1041 using the primary environment information extraction layer to obtain the pre-selected words of the word vector according to the index information.
  • the pre-selected words are the surrounding words of the word.
  • the pre-selected words can be the first number of words adjacent to the word corresponding to the word vector. Set the first number of sliding windows, and intercept the first number of words before and after the word position as the pre-selected words, or take the word position as the center and take the first number as the radius, and intercept the words at the front and back positions as the pre-selected words.
  • the pre-selected words do not specifically limit the selection method of the pre-selected words here, and its purpose is mainly to select words within the range of the word's visual receptive field as primary environmental factors.
  • the word vector corresponding to the preselected word is the preselected word vector.
  • FIG. 3 it is a schematic diagram of a method for selecting preselected words in an embodiment of the present application.
  • the first number is 5, and the selection method is the front and rear positions for example, that is, with the word as the center, 5 words on the left and right are selected as pre-selected words.
  • the word "shot” in the picture the first five words are "Surgeon”, “Genaral”, “defends”, “US” and “booster”, and the next five words are "plan”, “as”, “much “, “of” and “the”, then "Surgeon”, “Genaral”, “defends", "US”, “booster”, "plan”, “as", “much”, “of” and “the” is a preselected word for the word "shot".
  • this embodiment provides a way to obtain pre-selected words according to the displacement structure, referring to Figure 4, including but not limited to step S401 to step S404:
  • step S401 the words of the index sample are copied to obtain a second number of copied words.
  • Fig. 5 it is a schematic diagram of obtaining pre-selected words according to the displacement structure in an embodiment of the present application.
  • the words and copied words are represented by numbers. When the first number is 5, the second number is 11, that is, all words of the text are copied 11 times .
  • Step S402 performing a shift operation column by column on the second quantity of copied words to obtain a shifted word matrix.
  • the copied words obtained by copying are shifted column by column, that is, the first word of the latter text is aligned with the previous word corresponding to the word in the previous text, and so on, to obtain
  • the shifted word matrix after column-by-column shifting if the word length of the text is 1000, that is, each text can be expressed as a 1*1000 row vector, and the length of the obtained shifted word matrix is 11*1000.
  • Step S403 obtaining column words of the shifted word matrix.
  • the displacement word matrix is divided into columns to obtain column words corresponding to each column.
  • Step S404 obtain the column word corresponding to the column where the word vector is located as the pre-selected word.
  • Step S1042 obtaining the inverse text frequency of the preselected word.
  • the IDF for a word W can be divided by the total number of texts in the corpus (such as a keyword training data set) by the number of texts containing the word, and then the obtained quotient can be obtained by taking the logarithm. If it contains The less text the word W has, and the larger the IDF, it means that the word W has a good category discrimination ability.
  • calculate the IDF of pre-selected word express as:
  • IDF w represents the inverse text frequency of word W
  • represents the total number of texts in the keyword training data set
  • M represents the number of texts containing word W
  • the purpose of adding 1 to the denominator is to avoid the denominator being 0 caused by the word not being in the corpus Case.
  • Step S1043 calculating the primary environment word vector corresponding to the word vector according to the preselected word vector and the inverse text frequency.
  • the preselected word vector can be multiplied by the corresponding inverse text frequency, and then weighted and summed to obtain the primary environment word vector corresponding to the word vector.
  • Step S105 using the input environment information extraction layer of the keyword recommendation model to perform the first splicing process on the primary environment word vector and the word vector to generate the input environment word vector corresponding to the word.
  • the primary environment word vector is further extracted to obtain the input environment word vector.
  • the primary environment word vector and the word vector are first spliced to generate the input environment word vector corresponding to the word.
  • the primary environment word vector, the square of the primary environment word vector, and the word vector Splicing with the square of the word vector to get the input environment word vector.
  • step S106 a second splicing process is performed according to the input environment word vector and the word vector to obtain the keyword vector.
  • the inverse text frequency of the word vector is first obtained, and then the input environment word vector, the word vector and the IDF corresponding to the word vector are subjected to the second splicing process to generate the keyword vector , for subsequent classification predictions.
  • step S107 the keyword vector is input into the prediction classification layer of the keyword recommendation model to obtain a recommendation prediction value.
  • Step S108 according to the detection error between the recommended predicted value and the classification label, until the loss function satisfies the convergence condition, adjust the parameters in the keyword recommendation model to obtain the keyword recommendation model.
  • the keyword vector is input into the predictive classification layer of the keyword recommendation model to obtain the recommended predicted value y', and the recommended predicted value y' is compared with the classification label (i.e. the real value y) corresponding to the word to obtain the recommended The detection error between the predicted value and the classification label.
  • Both the recommended predicted value y' and the real value y can be represented by a sequence of numbers, for example, the number sequence of the number of words in the text sample. Whether each word is used as a keyword is represented by "0" or "1", and "0" Indicates that the word will not be selected as a keyword, and "1" indicates that the word is selected as a keyword. For example, if a text sample contains 1000 words, the recommended predicted value y' and the actual value y are both expressed as 1000 "0" " or "1" sequence of numbers.
  • the parameters in the keyword recommendation model are adjusted until the loss function reaches the convergence condition.
  • the convergence condition can be that the loss value of the loss function is less than the preset threshold , to get the keyword recommendation model, the loss function that can be selected is the cross entropy loss function.
  • the cross-entropy loss function is a logarithmic likelihood function.
  • the commonly used activation function is the sigmoid activation function. This loss function can solve the problem of slow weight update. When the error is large, the weight update is fast. When the error is small, the weight update Slow, can be used in binary classification and multi-classification tasks.
  • FIG. 6 it is a schematic structural diagram of a keyword recommendation model in an embodiment of the present application.
  • the keyword recommendation model of this embodiment at least includes:
  • a word embedding processing layer receive the index sample, perform word embedding operation on it, and output the word vector of the word in the index sample;
  • a primary environmental information extraction layer receive the word vector of the word in the index sample, extract the primary environmental information on it, and obtain the primary environmental word vector;
  • An input environment information extraction layer receives the primary environment word vector, extracts the input environment information from it, and obtains the input environment word vector;
  • a splicing layer input the input environment word vector and word vector to generate keyword vector;
  • a prediction classification layer it can be a binary prediction classification layer, or a classification layer for other types of predictions, receiving keyword vectors, and outputting recommended prediction values.
  • the parameters in the keyword recommendation model are adjusted, and finally the keyword recommendation model is obtained.
  • FIG. 7 it is a schematic diagram of a prediction flow in an embodiment of the present application.
  • the word sequence in the text sample is: “Surgeon”, “Genaral”, “defends”, “US”, “booster”, “shot”, “plan”, “as”, “much”, “of”, “the”, “world”, “awaits”, “vaccines”..., first use the word embedding processing layer to obtain the word vector of each word in the text sample, and then input the primary environmental information extraction layer. Use the sliding window of the set first number (5 as an example in the figure) to extract the pre-selected words.
  • the first five words are “Surgeon”, “Genaral”, and “defends” respectively , “US” and “booster”
  • the next five words are "plan”, “as”, “much”, “of” and “the”
  • “Surgeon”, “Genaral”, “defends”, “US “, “booster”, “plan”, “as”, “much”, “of” and “the” are preselected words for the word "shot”.
  • the primary environment word vector into the input environment information extraction layer of the keyword recommendation model to obtain the input environment word vector, such as the primary environment word vector shown in the figure, the square of the primary environment word vector, the word vector and the square of the word vector for splicing Get the input environment word vector.
  • the input environment word vector such as the primary environment word vector shown in the figure, the square of the primary environment word vector, the word vector and the square of the word vector for splicing Get the input environment word vector.
  • “0" or “1” indicates the prediction result
  • "1" means that the word will be selected as a keyword.
  • data compression processing is performed on the text samples, referring to FIG. 8 , specifically steps S801 to S804 are included:
  • Step S801 acquiring at least one user keyword sample and a corresponding classification label, where the classification label is a target label or a non-target label.
  • the keywords selected by different users are different, that is, each text sample corresponds to a plurality of user keyword samples of different users (the difference is only in the classification label corresponding to each word) .
  • Step S802 calculate the probability that each classification label is the target label, and obtain the label probability distribution.
  • the probability calculation is performed on the classification label of each word in the text sample. For example, the first word of a certain article has been read by 10 users and selected by 3 people, then the real keyword of the word The probability is 0.3. In this way, the label probability distribution is obtained according to the classification labels of the user keyword samples, which includes the probability that each word in the text sample is selected as a keyword.
  • step S803 the user keyword samples are combined by using the label probability distribution to obtain index samples corresponding to the text samples.
  • Step S804 constructing a keyword training data set according to the index samples.
  • all user keyword samples in the same text sample are combined into one text sample according to the probability classification label, and an index sample of the text sample is obtained, that is, a text sample only corresponds to one index sample regardless of its user , and then generate a keyword training data set based on the index samples.
  • the classification label in this data set is no longer the above-mentioned "0" or "1" sequence, but the probability value of the word as a keyword. It is understandable that even though the representations of the classification labels are different, the model training methods are the same. In this embodiment, for example, there are 20,000 pieces of text, and the keyword selection information of 1,000 users is selected to generate 20 million text samples.
  • the method of this embodiment is mathematically equivalent in loss, can reduce the number of samples, and speed up training without losing processing accuracy.
  • the keyword prediction model in order to speed up the inference process of the keyword prediction model, is enabled to process text samples in batches. Since the word lengths of different texts are different, inputting it into the keyword prediction model will cause changes in model parameters and output, and can only support the input and prediction of a single article. Therefore, this embodiment adds text to the keyword prediction model
  • the mask layer obtains the text mask, and performs length filling processing on the index samples according to the text mask (for example, if the length is insufficient, it is completed with 0, etc., which is not specifically limited here), and the keyword training data set is obtained; the keyword The text length of the index samples in the training data set is consistent, so that the keyword prediction model supports batch input of multiple texts, and accelerates the reasoning process of the keyword prediction model.
  • the keyword recommendation model training method proposed in the embodiment of the present application obtains index samples, constructs a keyword training data set according to the index samples, inputs the index samples into the word embedding processing layer of the keyword recommendation model, obtains word vectors of words, and converts the word vectors to Input the primary environmental information extraction layer to obtain the primary environmental word vector, and then input the primary environmental word vector into the input environmental information extraction layer to obtain the input environmental word vector, and then generate a keyword vector according to the input environmental word vector and word vector, and convert the keyword vector Input the predicted classification layer to obtain the recommended predicted value, and adjust the parameters in the keyword recommendation model according to the detection error between the recommended predicted value and the classification label to obtain the keyword recommended model.
  • the selected keyword meets the user's learning needs, and the relevance and accuracy of keyword recommendation are improved.
  • a keyword recommendation method is also provided, referring to FIG. 9 , including but not limited to steps S901 to S903:
  • Step S901 acquiring text to be recommended
  • Step S902 generating index text according to the text to be recommended
  • step S903 the index text is input into the keyword recommendation model to obtain the classification result of keyword recommendation.
  • the keyword recommendation model is trained by using the keyword recommendation model training method described in the above-mentioned embodiments. It is also possible to sort the keywords obtained in the index text according to classification probabilities according to the user's demand for learning words, for example, recommend the top 20 words to the user for learning.
  • the keywords selected by the keyword recommendation model meet the user's learning needs, and improve the relevance and accuracy of keyword recommendation.
  • the embodiment of the present application also provides a keyword recommendation model training device, which can realize the above-mentioned keyword recommendation model training method.
  • the device includes:
  • a text sample acquisition module 101 configured to acquire at least one text sample, and generate an index sample containing index information of words according to the text sample;
  • Training data set construction module 102 for constructing keyword training data set according to index sample, keyword training data set includes index sample and classification label;
  • the word vector processing module 103 is used to input the index sample into the word embedding processing layer of the keyword recommendation model to perform the word embedding operation to obtain the word vector of the word;
  • the primary environment word vector calculation module 104 is used to input the word vector into the primary environment information extraction layer of the keyword recommendation model to extract the primary environment information to obtain the primary environment word vector;
  • the input environment word vector calculation module 105 is used to utilize the input environment information extraction layer of the keyword recommendation model to carry out the first splicing process of the primary environment word vector and the word vector to generate the input environment word vector corresponding to the word;
  • the keyword vector generation module 106 is used to carry out the second splicing process according to the input environment word vector and the word vector to obtain the keyword vector;
  • the classification prediction module 107 is used to input the keyword vector into the prediction classification layer of the keyword recommendation model to obtain the recommended prediction value;
  • the parameter adjustment module 108 is configured to adjust the parameters in the keyword recommendation model according to the detection error between the recommended prediction value and the classification label until the loss function meets the convergence condition, and obtain the keyword recommendation model.
  • the primary environment word vector calculation module 104 of the keyword recommendation model training device uses the primary environment information extraction layer to obtain the pre-selected words of the word vector according to the index information, then obtain the inverse text frequency of the pre-selected words, and finally obtain the inverse text frequency of the pre-selected words according to the Vector and inverse text frequency calculation word vector corresponding primary environment word vector.
  • the primary environment word vector calculation module 104 of the keyword recommendation model training device is also used to copy the words in the index sample according to the second number, and perform a displacement operation on the copied words column by column to obtain a displacement word matrix , to obtain the column word of the displacement word matrix, and finally obtain the column word corresponding to the word vector as the pre-selected word according to the index information.
  • the input environment word vector calculation module 105 of the keyword recommendation model training device uses the input environment information extraction layer to perform the first splicing process on the primary environment word vector and the word vector to generate the input environment word vector corresponding to the word.
  • the keyword vector generation module 106 of the keyword recommendation model training device acquires the inverse text frequency of the word vector, performs the second splicing process on the input environment word vector, the word vector and the inverse text frequency of the word vector, and generates the keyword word vectors.
  • the specific implementation manner of the keyword recommendation model training device of this embodiment is basically the same as the specific implementation manner of the above-mentioned keyword recommendation model training method, and will not be repeated here.
  • the embodiment of the present application also provides a keyword recommendation device, which can implement the above keyword recommendation method.
  • the device includes:
  • the text to be recommended acquisition module 111 is used to obtain the text to be recommended;
  • Index text generating module 112 for generating index text according to the text to be recommended
  • the keyword recommendation module 113 is configured to input the index text into the keyword recommendation model to obtain classification results of keyword recommendation.
  • the keyword recommendation model is trained by using the keyword recommendation model training method described in the above-mentioned embodiments.
  • the specific implementation manner of the keyword recommendation device in this embodiment is basically the same as the specific implementation manner of the above-mentioned keyword recommendation method, and will not be repeated here.
  • the embodiment of the present application also provides an electronic device, including:
  • the program is stored in a memory, and the processor executes the at least one program to implement a keyword recommendation model training method, or a keyword recommendation method; wherein, the keyword recommendation model training method includes: Obtain at least one text sample, and generate an index sample containing word index information according to the text sample; construct a keyword training data set according to the index sample, and the keyword training data set includes index samples and classification labels; input the index sample into the keyword recommendation model
  • the word embedding processing layer performs the word embedding operation to obtain the word vector of the word; input the word vector into the primary environment information extraction layer of the keyword recommendation model to extract the primary environment information, and obtain the primary environment word vector; use the input environment of the keyword recommendation model
  • the information extraction layer performs the first splicing process on the primary environment word vector and the word vector to generate the input environment word vector corresponding to the word; performs the second splicing process according to the input environment word vector and the word vector to obtain the keyword vector; input the keyword vector
  • the prediction classification layer of the keyword recommendation model obtains the
  • the electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA for short), a vehicle-mounted computer, and the like.
  • a mobile phone a tablet computer
  • PDA personal digital assistant
  • FIG. 12 illustrates a hardware structure of an electronic device in another embodiment.
  • the electronic device includes:
  • the processor 1201 may be implemented by a general-purpose CPU (Central Processing Unit, central processing unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs to realize The technical solutions provided by the embodiments of the present application;
  • a general-purpose CPU Central Processing Unit, central processing unit
  • a microprocessor an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute related programs to realize The technical solutions provided by the embodiments of the present application;
  • ASIC Application Specific Integrated Circuit
  • the memory 1202 may be implemented in the form of a ROM (ReadOnly Memory, read only memory), a static storage device, a dynamic storage device, or a RAM (Random Access Memory, random access memory).
  • the memory 1202 can store operating systems and other application programs.
  • the relevant program codes are stored in the memory 1202 and called by the processor 1201 to execute a key Word recommendation model training method, recommendation method;
  • the communication interface 1204 is used to realize the communication interaction between the device and other devices, and the communication can be realized through a wired method (such as USB, network cable, etc.), or can be realized through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.); and
  • bus 1205 for transferring information between various components of the device (such as processor 1201, memory 1202, input/output interface 1203 and communication interface 1204);
  • processor 1201, the memory 1202, the input/output interface 1203 and the communication interface 1204 realize the communication connection among each other within the device through the bus 1205.
  • the embodiment of the present application also provides a storage medium, the storage medium is a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make the computer perform a keyword recommendation A model training method, or a keyword recommendation method; wherein, the keyword recommendation model training method includes: obtaining at least one text sample, and generating an index sample containing index information of words according to the text sample; constructing an index sample according to the index sample
  • the keyword training data set, the keyword training data set contains index samples and classification labels; input the index samples into the word embedding processing layer of the keyword recommendation model for word embedding operation, and obtain the word vector of the word; input the word vector into the keyword recommendation model
  • the primary environmental information extraction layer extracts primary environmental information to obtain primary environmental word vectors; uses the input environmental information extraction layer of the keyword recommendation model to first concatenate primary environmental word vectors and word vectors to generate corresponding input environmental words Vector; perform the second splicing process according to the input environment word vector and word
  • the computer-readable storage medium may be non-volatile or volatile.
  • the keyword recommendation model training method and device, keyword recommendation method and device, electronic equipment, and storage medium proposed in the embodiment of the present application, the keyword recommendation model combines the learning difficulty of the keyword itself by obtaining the input environment word vector related to the word vector And the environment information corresponding to the keywords, so that the selected keywords meet the user's learning needs, and improve the relevance and accuracy of keyword recommendations.
  • memory can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices.
  • the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供关键词推荐模型训练方法、推荐方法和装置、设备、介质,涉及人工智能技术领域。该关键词推荐模型训练方法,包括:获取索引样本,根据索引样本构建关键词训练数据集,根据索引样本得到单词的词向量,根据词向量得到初级环境词向量,然后根据初级环境词向量得到输入环境词向量,再根据输入环境词向量和词向量生成关键词向量,将关键词向量输入预测分类层,得到推荐预测值,根据推荐预测值与分类标签之间的检测误差,对参数进行调整,得到关键词推荐模型。本实施例通过获取词向量相关的输入环境词向量,结合关键词本身学习难度以及关键词对应的环境信息,使得选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。

Description

关键词推荐模型训练方法、推荐方法和装置、设备、介质
本申请要求于2022年02月16日提交中国专利局、申请号为202210143648.9,发明名称为“关键词推荐模型训练方法、推荐方法和装置、设备、介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及关键词推荐模型训练方法、推荐方法和装置、设备、介质。
背景技术
随着外语在人们生活工作中应用越来越广泛,快速、便捷、高效的进行语言学习成为人们的不断追求,伴随着人工智能的发展,出现越来越多利用人工智能提升语言学习效率的研究成果。例如对于英语学习来说,单词学习是基础,当用户阅读完一篇英文文本后,利用人工智能系统,自动提取该文本的重点单词(即关键词)供用户进行学习,根据对用户群体的英语阅读历史信息研究,提供20个用户最有可能学习的单词,并按照学习概率从大到小进行推荐排序。
相关技术中有两种解决方案,第一种为无监督学习方案得到推荐模型,通过统计所有文本的词频,得到每个单词的逆文本频率IDF(inverse document frequency),用IDF代表单词的难易程度,IDF从高到低排序后推荐给用户,发明人意识到虽然该方案得到的推荐模型计算比较便捷,IDF可以反映单词难度趋势,但IDF较高的单词往往是非常罕见的单词,不适合一般用户学习。另一种为监督式学习方案得到推荐模型,例如序列标注方案,输入为一篇文本的所有单词,通过长短期记忆人工神经网络或注意力机制网络结构,试图寻找每个单词与其他单词的关系度,从而找到用户最意愿学习的单词。发明人意识到这种方案得到的推荐模型处理长文本时,参数量较大,且引入了过多无关单词的影响,导致关键词推荐效果大大下降。又比如对单个单词直接预测,不考虑单词间的关系,此方案简单快捷,但由于缺乏与其他单词的交互作用,不能准确的找到最适合学习的单词。
技术问题
以下是发明人意识到的现有技术的技术问题:采用无监督学习方案得到推荐模型,计算比较便捷,IDF可以反映单词难度趋势,但IDF较高的单词往往是非常罕见的单词,不适合一般用户学习;采用监督式学习方案得到推荐模型处理长文本时,参数量较大,且引入了过多无关单词的影响,导致关键词推荐效果大大下降。因此,如何提升关键词推荐的关联性以及准确性,成为了亟待解决的技术问题。
技术解决方案
第一方面,本申请实施例提出了一种关键词推荐模型训练方法,包括:
获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理。
第二方面,本申请实施例提出了一种关键词推荐模型训练装置,包括:
文本样本获取模块,用于获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
训练数据集构建模块,用于根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
词向量处理模块,用于将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
初级环境词向量计算模块,用于将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
输入环境词向量计算模块,用于利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
关键词向量生成模块,用于根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
分类预测模块,用于将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
参数调整模块,用于根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理。
第三方面,本申请实施例提出了一种电子设备,包括:至少一个存储器;至少一个处理器;至少一个程序;所述程序被存储在存储器中,处理器执行所述至少一个程序以实现一种关键词推荐模型训练方法,或一种关键词推荐方法;其中,所述一种关键词推荐模型训练方法包括:获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理;其中,所述一种关键词推荐方法包括:获取待推荐文本;根据所述待推荐文本生成索引文本;将所述索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,所述关键词推荐模型利用如所述一种关键词推荐模型训练方法训练得到。
第四方面,本申请实施例提出了一种存储介质,所述存储介质为计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计 算机执行一种关键词推荐模型训练方法,或一种关键词推荐方法;其中,所述一种关键词推荐模型训练方法包括:获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理;其中,所述一种关键词推荐方法包括:获取待推荐文本;根据所述待推荐文本生成索引文本;将所述索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,所述关键词推荐模型利用如所述一种关键词推荐模型训练方法训练得到。
有益效果
本申请实施例提出的关键词推荐模型训练方法、推荐方法和装置、设备、介质,获取索引样本,根据索引样本构建关键词训练数据集,将索引样本输入关键词推荐模型的词嵌入处理层,得到单词的词向量,将词向量输入初级环境信息提取层,得到初级环境词向量,然后将初级环境词向量输入输入环境信息提取层,得到输入环境词向量,再根据输入环境词向量和词向量生成关键词向量,将关键词向量输入预测分类层,得到推荐预测值,根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,得到关键词推荐模型。本实施例关键词推荐模型训练方法训练得到的关键词推荐模型通过获取词向量相关的输入环境词向量,结合关键词本身的学习难度以及关键词对应的环境信息,使得选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。
附图说明
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。
图1是本申请实施例提供的关键词推荐模型训练方法的流程图。
图2是本申请实施例提供的关键词推荐模型训练方法的又一流程图。
图3是本申请实施例提供的关键词推荐模型训练方法的预选词选择方法示意图。
图4是本申请实施例提供的关键词推荐模型训练方法的又一流程图。
图5是本申请实施例提供的关键词推荐模型训练方法的根据位移结构获取预选词示意图。
图6是本申请实施例提供的关键词推荐模型训练方法的关键词推荐模型结构示意图。
图7是本申请实施例提供的关键词推荐模型训练方法的预测流程示意图。
图8是本申请实施例提供的关键词推荐模型训练方法的又一流程图。
图9是本申请实施例提供的键词推荐方法的流程图。
图10是本申请实施例提供的关键词推荐模型训练装置的结构框图。
图11是本申请实施例提供的关键词推荐装置的结构框图。
图12是本申请实施例提供的电子设备的硬件结构示意图。
本发明的实施方式
首先,对本申请中涉及的若干名词进行解析:
逆文本频率IDF(inverse document frequency):即TF-IDF(Term Frequency–Inverse  Document Frequency),是一种分词算法,由两部分构成:TF(Term Frequency,特性项频率即词频)和IDF(Inverse Document Frequency,逆文本频率)。其中,词频TF指的是特征词在所选取的文本中出现的次数,这就说明当计算词频时,需要对文本中的词语组合进行划分,划分后再统计词语的个数。IDF指的是特征词普遍重要性的度量。估量特征词的逆文本频率是通过对建立的语料库统计特征词出现的程度。IDF可以有效降低作用较小的高频特征词的权值,从而削弱对文本分类的影响,同时也对词频比较低而作用比较大的特征词进行评估赋予较大权值,提高文本分类的准确性。
随着外语在人们生活工作中应用越来越广泛,快速、便捷、高效的进行语言学习成为人们的不断追求,伴随着人工智能的发展,出现越来越多利用人工智能提升语言学习效率的研究成果。例如对于英语学习来说,单词学习是基础,当用户阅读完一篇英文文本后,利用人工智能系统,自动提取该文本的重点单词(即关键词)供用户进行学习,根据对用户群体的英语阅读历史信息研究,提供20个用户最有可能学习的单词,并按照学习概率从大到小进行推荐排序。
相关技术中有两种解决方案,第一种为无监督学习方案得到推荐模型,通过统计所有文本的词频,得到每个单词的IDF,用IDF代表单词的难易程度,IDF从高到低排序后推荐给用户,虽然该方案得到的推荐模型计算比较便捷,IDF可以反映单词难度趋势,但IDF较高的单词往往是非常罕见的单词,不适合一般用户学习。另一种为监督式学习方案得到推荐模型,例如序列标注方案,输入为一篇文本的所有单词,通过长短期记忆人工神经网络或注意力机制网络结构,试图寻找每个单词与其他单词的关系度,从而找到用户最意愿学习的单词。这种方案得到的推荐模型处理长文本时,参数量较大,且引入了过多无关单词的影响,导致关键词推荐效果大大下降。又比如对单个单词直接预测,不考虑单词间的关系,此方案简单快捷,但由于缺乏与其他单词的交互作用,不能准确的找到最适合学习的单词。
基于此,本申请实施例提供一种关键词推荐模型训练方法、推荐方法和装置、电子设备、存储介质,可以实现对文本中关键词的自动提取,提升关键词推荐的关联性以及准确性。
本申请实施例提供关键词推荐模型训练方法、推荐方法和装置、电子设备、存储介质,具体通过如下实施例进行说明,首先描述本申请实施例中的关键词推荐模型训练方法、推荐方法。
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
本申请实施例提供的关键词推荐模型训练方法、推荐方法,涉及人工智能技术领域,尤其涉及人工智能技术领域。本申请实施例提供的关键词推荐模型训练方法、推荐方法可应用于终端中,也可应用于服务器端中,还可以是运行于终端或服务器端中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机或者智能手表等;服务器可以是独立的服务器,也可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器;软件可以是实现关键词推荐模型训练方法、推荐方法的应用等,但并不局限于以上形式。
本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶 盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
图1是本申请实施例提供的关键词推荐模型训练方法的一个可选的流程图,图1中的方法可以包括但不限于包括步骤S101至步骤S108。
步骤S101,获取至少一个文本样本,并根据文本样本生成包含单词的索引信息的索引样本。
在一实施例中,以英语学习为例,训练关键词推荐模型需要大量的文本样本,文本样本即英文文章,英文文章由单词构成,因此根据该英文文章生成每个单词的索引信息,根据该索引信息能够定位到该英文文章中的所有单词。例如,可生成单词数据库,然后将文本样本转化为索引样本,索引样本中用单词在数据库中的位置代表该单词,提高样本的处理效率。
步骤S102,根据索引样本构建关键词训练数据集,关键词训练数据集包含索引样本和分类标签。
在一实施例中,利用大量的索引样本构成关键词训练数据集,训练的目的是使得训练后的关键词推荐模型,在输入一篇待推荐文本对应的索引文本后,能够输出该待推荐文本中所有单词为关键词的推荐概率。基于此训练目标,该实施例中构建的关键词训练数据集包括:索引样本和分类标签,该分类标签即对索引样本中每个单词作为关键词的概率,例如用“01”表示,“0”表示该单词不会被选中作为关键词,“1”表示该单词被选中作为关键词。
步骤S103,将索引样本输入关键词推荐模型的词嵌入处理层进行词嵌入操作,得到单词的词向量。
在一实施例中,训练关键词推荐模型时,将索引样本输入到关键词推荐模型中的词嵌入处理层,对索引样本中的所有单词进行词嵌入操作得到对应的单词的词向量。词嵌入操作是将单词进行向量化表示,将单个单词在预定义的向量空间中表示为实数向量,每个单词都映射到一个词向量。
在一实施例中,例如一个文本中包含“cat”、“dog”、“love”等若干单词,而这若干单词映射到向量空间中,cat对应的词向量为(0.1,0.2,0.3),“dog”对应的词向量为(0.2,0.2,0.4),“love”对应的词向量为(-0.4,-0.5,-0.2)等,上述词向量表示仅作示意。本实施例将单词进行向量化得到词向量,能够提高计算机对单词处理的效率和准确率,例如“cat”、“dog”表示动物,“love”表示一种情感,但是对于计算机而言,这三个词都是用0,1表示成二进制的字符串而已,无法对其直接进行计算。因此本实施例通过词嵌入这种方式将单词转变为词向量,机器计算机便可对单词进行直接计算。这种将单词映射成向量表示的过程即本实施例中的词嵌入操作,利用关键词推荐模型中的词嵌入处理层实现对索引样本中所有单词的词嵌入操作。
步骤S104,将词向量输入关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量。
由于实际语言学习过程中,用户选取一篇文章中的单词进行学习时,补光考虑单词本身的难度,也会根据当前的视觉感受野中的相关单词进行选择,即用户会将看到的单词与该单词周围前后几个单词进行比较,来确定是否选择该单词学习。
例如:A单词本身难度不高,但该单词周围几个单词难度都偏低,用户大概率会选择该单词;反之,B单词本身难度较高,但该单词周围单词难度也较高,则用户大概率不会选择该单词。因此,在一实施例中,通过用户的视觉感受野范围,将词向量输入关键词推荐模型的初级环境信息提取层,得到初级环境词向量,用于反映该单词(即词向量)的周围单词信息,, 作为初级环境影响因素,以决定该单词是否会被选择为学习单词,结合关键词本身的学习难度以及关键词对应的环境信息,使得选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。
在一实施例中,将词向量输入关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量,参照图2,包括但不限于步骤S1041至步骤S1043:
步骤S1041,利用初级环境信息提取层根据索引信息获取词向量的预选词。
在一实施例中,预选词即该单词的周围单词,例如预选词可以是与词向量对应的单词邻接的第一数量的单词,单词周围可以是该单词的前后位置或者前后上下位置,即前后设定第一数量的滑动窗口,截取以该单词位置为中心的前后各第一数量的单词作为预选词,或者以该单词位置为中心,以第一数量为半径,截取前后上下位置的单词作为预选词,在此不对预选词的选取方式做具体限定,其目的主要是选取单词视觉感受野范围内的单词作为初级环境影响因素。其中,预选词对应的词向量为预选词向量。
参照图3,为本申请一实施例中预选词的选择方法示意图。
图中以第一数量为5,且选取方式为前后位置进行示例,即以该单词为中心,选取其左右各5各单词作为预选词。例如图中单词“shot”,前面五个单词分别是“Surgeon”、“Genaral”、“defends”、“US”和“booster”,后面五个单词分别是“plan”、“as”、“much”、“of”和“the”,则“Surgeon”、“Genaral”、“defends”、“US”、“booster”、“plan”、“as”、“much”、“of”和“the”为单词“shot”的预选词。
本申请一实施例中,由于需要对于索引样本中每个单词均选取其对应的预选词,例如第一数量为5时,以每个单词为中心,以5个单词为半径进行选取,例如文本的平军单词长度为1000个单词,则需要处理1000次,当文本数量较多,或者文本较长时,计算的时间复杂度较高,计算性能较低,因此为了进一步提高选取预选词的效率,本实施例提供一种根据位移结构获取预选词,参照图4,包括但不限于步骤S401至步骤S404:
步骤S401,将索引样本的单词进行复制,得到第二数量的复制单词。
在一实施例中,第二数量由第一数量计算得到,例如第二数量=第一数量*2+1。参照图5,为本申请一实施例中根据位移结构获取预选词示意图,图中以数字表示单词和复制单词,第一数量为5时,第二数量为11,即将文本的所有单词复制11次。
步骤S402,将所述第二数量的复制单词逐列进行位移操作,得到位移单词矩阵。
在一实施例中,参照图5,将复制得到的复制单词逐列进行位移,即后一个文本的第一个单词与前一个文本中该单词对应的前一个单词进行对齐,以此类推,得到逐列位移后的位移单词矩阵,若文本的单词长度为1000个,即每个文本均可表示为1*1000的行向量,得到的位移单词矩阵的长度为11*1000。
步骤S403,获取位移单词矩阵的列单词。
在一实施例中,将位移单词矩阵按列进行划分,得到对应每一列的列单词。
步骤S404,根据索引信息获取词向量所在列对应的列单词作为预选词。
参照图5,由于第一数量的值是5,因此选取第6行的单词,按列取值,每一个单词对应的列单词即该单词的预选词,例如“6”的预选词为“1”、“2”、“3”、“4”和“5”以及“7”、“8”、“9”、“10”和“11”,则第6行的“6”在位移单词矩阵中对应的列,即是“6”的预选词,以此类推。按照这样的方法,能够明显降低时间复杂度,对于每个单词选取预选词只需要将其复制第二数量即可。
步骤S1042,获取预选词的逆文本频率。
在一实施例中,对于一单词W的IDF,可以由语料库(例如关键词训练数据集)中总文本数目除以包含该词语的文本的数目,再将得到的商取对数得到,如果包含单词W的文本越少,而IDF越大,则说明单词W具有很好的类别区分能力。
本实施例中,计算预选词的IDF,表示为:
Figure PCTCN2022090746-appb-000001
其中,IDF w表示单词W的逆文本频率,|D|表示关键词训练数据集中文本总数,M表示包含单词W的文本数量,分母加1的目的是避免该词语不在语料库中导致的分母为0的情况。
步骤S1043,根据预选词向量和逆文本频率计算词向量对应的初级环境词向量。
在一实施例中,可以将预选词向量乘以对应的逆文本频率,然后进行加权求和,即可得到词向量对应的初级环境词向量。
步骤S105,利用关键词推荐模型的输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量。
在一实施例中,为了进一步提取环境信息,针对初级环境词向量进一步提取得到输入环境词向量。例如利用输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量,该实施例中,将初级环境词向量、初级环境词向量的平方、词向量和词向量的平方进行拼接得到输入环境词向量。
步骤S106,根据输入环境词向量和词向量进行第二拼接处理,得到关键词向量。
在一实施例中,为了引入词向量本身的词频信息,首先获取词向量的逆文本频率,然后将输入环境词向量、词向量和该词向量对应的IDF进行第二拼接处理,生成关键词向量,用于后续分类预测。
步骤S107,将关键词向量输入关键词推荐模型的预测分类层,得到推荐预测值。
步骤S108,根据推荐预测值与分类标签之间的检测误差,直至损失函数满足收敛条件,对关键词推荐模型中的参数进行调整,得到关键词推荐模型。
在一实施例中,将关键词向量输入关键词推荐模型的预测分类层,得到推荐预测值y’,推荐预测值y’和该单词对应的分类标签(即真实值y)进行比较,得到推荐预测值与分类标签之间的检测误差。其中推荐预测值y’和真实值y均可以用数字序列表示,例如该文本样本中包干单词个数的数字序列,每个单词是否作为关键词用“0”或“1”表示,“0”表示该单词不会被选中作为关键词,“1”表示该单词被选中作为关键词,例如一文本样本中包含1000个单词,则推荐预测值y’和真实值y均表示为1000个“0”或“1”组成的数字序列。
该实施例中,根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,直至损失函数达到收敛条件,收敛条件可以是损失函数的损失值小于预设的阈值,得到关键词推荐模型,可以选用的损失函数为交叉熵损失函数。交叉熵损失函数是一种对数似然函数,常用的激活函数为sigmoid激活函数,该损失函数能够解决权重更新过慢的问题,误差大的时候,权重更新快,误差小的时候,权重更新慢,可用于二分类和多分类任务中。
参照图6,为本申请一实施例中关键词推荐模型结构示意图。
图中可见,该实施例的关键词推荐模型至少包括:
一个词嵌入处理层:接收索引样本,对其进行词嵌入操作,输出该索引样本中单词的词向量;
一个初级环境信息提取层:接收索引样本中单词的词向量,对其进行初级环境信息提取,得到初级环境词向量;
一个输入环境信息提取层:接收初级环境词向量,对其进行输入环境信息提取,得到输入环境词向量;
一个拼接层:输入输入环境词向量和词向量,生成关键词向量;
一个预测分类层:可以是二预测分类层,也可以是进行其他类型预测的分类层,接收关键词向量,输出推荐预测值。
训练过程中,根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,最终得到关键词推荐模型。
参照图7,为本申请一实施例中预测流程示意图。
图中假设文本样本中单词序列是:“Surgeon”、“Genaral”、“defends”、“US”、“booster”、“shot”、“plan”、“as”、“much”、“of”、“the”、“world”、“awaits”、“vaccines”...,首先利用词嵌入处理层得到该文本样本中每个单词的词向量,然后输入初级环境信息提取层。利用设定的第一数量(图中以5为例进行说明)的滑动窗口进行预选词的提取,例如对于单词“shot”,前面五个单词分别是“Surgeon”、“Genaral”、“defends”、“US”和“booster”,后面五个单词分别是“plan”、“as”、“much”、“of”和“the”,则“Surgeon”、“Genaral”、“defends”、“US”、“booster”、“plan”、“as”、“much”、“of”和“the”为单词“shot”的预选词。通过计算每个预选词的IDF,将预选词向量乘以对应的逆文本频率,然后进行加权求和,即可得到词向量对应的初级环境词向量(见图中示意)。然后将初级环境词向量输入关键词推荐模型的输入环境信息提取层,得到输入环境词向量,例如图中示意的初级环境词向量、初级环境词向量的平方、词向量和词向量的平方进行拼接得到输入环境词向量。再将输入环境词向量、词向量和该词向量对应的IDF进行拼接,生成关键词向量,用于分类预测,得到推荐预测值,图中以“0”或“1”表示预测结果,“0”表示该单词不会被选中作为关键词,“1”表示该单词被选中作为关键词。
在一实施例中,为了提高关键词预测模型的训练效率,对文本样本进行数据压缩处理,参照图8,具体包括步骤S801至S804:
步骤S801,获取至少一个用户关键词样本和对应的分类标签,所述分类标签为目标标签或者非目标标签。
在一实施例中,同一个文本样本中,不同用户选取的关键词是不同的,即每一个文本样本均对应多个不同用户的用户关键词样本(区别仅在于每个单词对应的分类标签)。
步骤S802,计算每一分类标签是目标标签的概率,得到标签概率分布。
在一实施例中,对该文本样本中每个单词的分类标签进行概率计算,例如某篇文章的第一个单词,被10个用户阅读过,被3个人选中了,则该单词真实关键词概率为0.3。按照这种方式根据用户关键词样本的分类标签得到标签概率分布,即包含该文本样本中每个单词被选为关键词的概率。
步骤S803,利用标签概率分布对用户关键词样本进行合并,得到文本样本对应的索引样本。
步骤S804,根据索引样本构建关键词训练数据集。
在一实施例中,将同一文本样本中所有的用户关键词样本根据概率分类标签合并成一个文本样本,并得到该文本样本的索引样本,即一个文本样本不考虑其用户,仅对应一个索引样本,再根据索引样本生成关键词训练数据集。该数据集中的分类标签就不再是上述的“0”或“1”序列,而是该单词作为关键词的概率值。可以理解的是,即使分类标签的表现形式不同,但是模型训练方法相同。该实施例中,例如有2万篇文本,选取1000个用户的关键词选择信息,生成2000万个文本样本,按照该方法将2000万份数据压缩成2万份数据,即最终得到2万个文本样本(分类标签是单词作为关键词的概率值),按照该实施例的方法在数学上损失等价,能够减少样本数量,加速训练的同时,不损失处理精度。
在一实施例中,为了加速关键词预测模型的推理过程,使得关键词预测模型能够对文本样本进行批量处理。由于不同文本的单词长度不同,将其输入到关键词预测模型中会导致模型参数和输出都进行变动,只能支持单篇文章的输入与预测,因此本实施例在关键词预测模型中增加文本掩模层,获取文本掩模,根据文本掩模对索引样本进行长度填充处理(例如长度不足的利用0进行补全等,在此不做具体限定),得到关键词训练数据集;其中关键词训练数据集中索引样本的文本长度一致,使得关键词预测模型支持多篇文本的批量输入,加速关键词预测模型的推理过程。
本申请实施例提出的关键词推荐模型训练方法,获取索引样本,根据索引样本构建关键词训练数据集,将索引样本输入关键词推荐模型的词嵌入处理层,得到单词的词向量,将词 向量输入初级环境信息提取层,得到初级环境词向量,然后将初级环境词向量输入输入环境信息提取层,得到输入环境词向量,再根据输入环境词向量和词向量生成关键词向量,将关键词向量输入预测分类层,得到推荐预测值,根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,得到关键词推荐模型。本实施例通过获取词向量相关的输入环境词向量,结合关键词本身的学习难度以及关键词对应的环境信息,使得选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。
在本申请一实施例中,还提供一种关键词推荐方法,参照图9,包括但不限于步骤S901至步骤S903:
步骤S901,获取待推荐文本;
步骤S902,根据待推荐文本生成索引文本;
步骤S903,将索引文本输入关键词推荐模型,得到关键词推荐的分类结果,关键词推荐模型利用上述实施例中描述的关键词推荐模型训练方法训练得到。也可以根据用户学习单词的需求,将该索引文本中得到的关键词按照分类概率进行排序,例如将排序前20个单词推荐给用户进行学习。利用该关键词推荐模型选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。
本申请实施例还提供一种关键词推荐模型训练装置,可以实现上述关键词推荐模型训练方法,参照图10,该装置包括:
文本样本获取模块101,用于获取至少一个文本样本,并根据文本样本生成包含单词的索引信息的索引样本;
训练数据集构建模块102,用于根据索引样本构建关键词训练数据集,关键词训练数据集包含索引样本和分类标签;
词向量处理模块103,用于将索引样本输入关键词推荐模型的词嵌入处理层进行词嵌入操作,得到单词的词向量;
初级环境词向量计算模块104,用于将词向量输入关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
输入环境词向量计算模块105,用于利用关键词推荐模型的输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量;
关键词向量生成模块106,用于根据输入环境词向量和词向量进行第二拼接处理,得到关键词向量;
分类预测模块107,用于将关键词向量输入关键词推荐模型的预测分类层,得到推荐预测值;
参数调整模块108,用于根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到关键词推荐模型。
在一实施例中,关键词推荐模型训练装置的初级环境词向量计算模块104利用初级环境信息提取层,根据索引信息获取词向量的预选词,然后获取预选词的逆文本频率,最后根据预选词向量和逆文本频率计算词向量对应的初级环境词向量。
在一实施例中,关键词推荐模型训练装置的初级环境词向量计算模块104还用于将索引样本中单词按照第二数量进行复制,将复制得到的单词逐列进行位移操作,得到位移单词矩阵,获取位移单词矩阵的列单词,最后根据索引信息获取词向量对应的列单词作为预选词。
在一实施例中,关键词推荐模型训练装置的输入环境词向量计算模块105利用输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量。
在一实施例中,关键词推荐模型训练装置的关键词向量生成模块106获取词向量的逆文本频率,将输入环境词向量、词向量和词向量的逆文本频率进行第二拼接处理,生成关键词向量。
本实施例的关键词推荐模型训练装置的具体实施方式与上述关键词推荐模型训练方法的具体实施方式基本一致,在此不再赘述。
本申请实施例还提供一种关键词推荐装置,可以实现上述关键词推荐方法,参照图11,该装置包括:
待推荐文本获取模块111,用于获取待推荐文本;
索引文本生成模块112,用于根据待推荐文本生成索引文本;
关键词推荐模块113,用于将索引文本输入关键词推荐模型,得到关键词推荐的分类结果,关键词推荐模型利用上述实施例中描述的关键词推荐模型训练方法训练得到。
本实施例的关键词推荐装置的具体实施方式与上述关键词推荐方法的具体实施方式基本一致,在此不再赘述。
本申请实施例还提供了一种电子设备,包括:
至少一个存储器;
至少一个处理器;
至少一个程序;
所述程序被存储在存储器中,处理器执行所述至少一个程序以实现一种关键词推荐模型训练方法,或一种关键词推荐方法;其中,所述一种关键词推荐模型训练方法包括:获取至少一个文本样本,并根据文本样本生成包含单词的索引信息的索引样本;根据索引样本构建关键词训练数据集,关键词训练数据集包含索引样本和分类标签;将索引样本输入关键词推荐模型的词嵌入处理层进行词嵌入操作,得到单词的词向量;将词向量输入关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;利用关键词推荐模型的输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量;根据输入环境词向量和词向量进行第二拼接处理,得到关键词向量;将关键词向量输入关键词推荐模型的预测分类层,得到推荐预测值;根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到关键词推荐模型,关键词推荐模型用于进行关键词推荐处理;其中,所述一种关键词推荐方法包括:获取待推荐文本;根据待推荐文本生成索引文本;将索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,关键词推荐模型利用如一种关键词推荐模型训练方法训练得到。
该电子设备可以为包括手机、平板电脑、个人数字助理(Personal Digital Assistant,简称PDA)、车载电脑等任意智能终端。
请参阅图12,图12示意了另一实施例的电子设备的硬件结构,电子设备包括:
处理器1201,可以采用通用的CPU(CentralProcessingUnit,中央处理器)、微处理器、应用专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本申请实施例所提供的技术方案;
存储器1202,可以采用ROM(ReadOnlyMemory,只读存储器)、静态存储设备、动态存储设备或者RAM(RandomAccessMemory,随机存取存储器)等形式实现。存储器1202可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1202中,并由处理器1201来调用执行一种关键词推荐模型训练方法、推荐方法;
输入/输出接口1203,用于实现信息输入及输出;
通信接口1204,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;和
总线1205,在设备的各个组件(例如处理器1201、存储器1202、输入/输出接口1203和通信接口1204)之间传输信息;
其中处理器1201、存储器1202、输入/输出接口1203和通信接口1204通过总线1205实 现彼此之间在设备内部的通信连接。
本申请实施例还提供了一种存储介质,该存储介质是计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令用于使计算机执行一种关键词推荐模型训练方法,或一种关键词推荐方法;其中,所述一种关键词推荐模型训练方法包括:获取至少一个文本样本,并根据文本样本生成包含单词的索引信息的索引样本;根据索引样本构建关键词训练数据集,关键词训练数据集包含索引样本和分类标签;将索引样本输入关键词推荐模型的词嵌入处理层进行词嵌入操作,得到单词的词向量;将词向量输入关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;利用关键词推荐模型的输入环境信息提取层将初级环境词向量和词向量进行第一拼接处理,生成单词对应的输入环境词向量;根据输入环境词向量和词向量进行第二拼接处理,得到关键词向量;将关键词向量输入关键词推荐模型的预测分类层,得到推荐预测值;根据推荐预测值与分类标签之间的检测误差,对关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到关键词推荐模型,关键词推荐模型用于进行关键词推荐处理;其中,所述一种关键词推荐方法包括:获取待推荐文本;根据待推荐文本生成索引文本;将索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,关键词推荐模型利用如一种关键词推荐模型训练方法训练得到。
所述计算机可读存储介质可以是非易失性,也可以是易失性。
本申请实施例提出的关键词推荐模型训练方法和装置、关键词推荐方法和装置、电子设备、存储介质,关键词推荐模型通过获取词向量相关的输入环境词向量,结合关键词本身的学习难度以及关键词对应的环境信息,使得选取的关键词符合用户的学习需求,提升关键词推荐的关联性以及准确性。
存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
本申请实施例描述的实施例是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着技术的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本领域技术人员可以理解的是,图1-9中示出的技术方案并不构成对本申请实施例的限定,可以包括比图示更多或更少的步骤,或者组合某些步骤,或者不同的步骤。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、设备中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上参照附图说明了本申请实施例的优选实施例,并非因此局限本申请实施例的权利范围。本领域技术人员不脱离本申请实施例的范围和实质内所作的任何修改、等同替换和改进,均应在本申请实施例的权利范围之内。

Claims (20)

  1. 一种关键词推荐模型训练方法,其中,包括:
    获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
    根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
    将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
    将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
    利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
    根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
    将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
    根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理。
  2. 根据权利要求1所述的关键词推荐模型训练方法,其中,所述将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量,包括:
    利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,所述预选词是与所述词向量对应的所述单词邻接的第一数量的单词,所述预选词对应的词向量为预选词向量;
    获取所述预选词的逆文本频率;
    根据所述预选词向量和所述逆文本频率计算所述词向量对应的初级环境词向量。
  3. 根据权利要求1所述的关键词推荐模型训练方法,其中,所述根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量,包括:
    获取所述词向量的逆文本频率;
    将所述输入环境词向量、所述词向量和所述词向量的逆文本频率进行第二拼接处理,生成所述关键词向量。
  4. 根据权利要求2所述的关键词推荐模型训练方法,其中,所述利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,包括:
    将所述索引样本的单词进行复制,得到第二数量的复制单词,所述第二数量由所述第一数量计算得到;
    将所述第二数量的复制单词逐列进行位移操作,得到位移单词矩阵;
    获取所述位移单词矩阵的列单词;
    根据所述索引信息获取所述词向量对应的所述列单词作为所述预选词。
  5. 根据权利要求1至4任一项所述的关键词推荐模型训练方法,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取至少一个用户关键词样本和对应的分类标签,所述分类标签为目标标签或者非目标标签
    计算每一分类标签是目标标签的概率,得到标签概率分布;
    根据所述标签概率分布对所述用户关键词样本进行合并处理,得到所述文本样本对应的所述索引样本;
    根据所述索引样本构建关键词训练数据集。
  6. 根据权利要求1至4任一项所述的关键词推荐模型训练方法,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取文本掩模;
    根据所述文本掩模对所述索引样本进行长度填充处理,得到所述关键词训练数据集;其中所述关键词训练数据集中所述索引样本的文本长度一致。
  7. 一种关键词推荐方法,其中,包括:
    获取待推荐文本;
    根据所述待推荐文本生成索引文本;
    将所述索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,所述关键词推荐模型利用如权利要求1至6任一项所述的关键词推荐模型训练方法训练得到。
  8. 一种关键词推荐模型训练装置,其中,包括:
    文本样本获取模块,用于获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
    训练数据集构建模块,用于根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
    词向量处理模块,用于将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
    初级环境词向量计算模块,用于将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
    输入环境词向量计算模块,用于利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
    关键词向量生成模块,用于根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
    分类预测模块,用于将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
    参数调整模块,用于根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理。
  9. 一种电子设备,其中,包括:
    至少一个存储器;
    至少一个处理器;
    至少一个程序;
    所述程序被存储在存储器中,处理器执行所述至少一个程序以实现一种关键词推荐模型训练方法,或一种关键词推荐方法;
    其中,所述一种关键词推荐模型训练方法包括:
    获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
    根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
    将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
    将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
    利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
    根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
    将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
    根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理;
    其中,所述一种关键词推荐方法包括:
    获取待推荐文本;
    根据所述待推荐文本生成索引文本;
    将所述索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,所述关键词推荐模型利用如所述一种关键词推荐模型训练方法训练得到。
  10. 根据权利要求9所述的一种电子设备,其中,所述将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量,包括:
    利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,所述预选词是与所述词向量对应的所述单词邻接的第一数量的单词,所述预选词对应的词向量为预选词向量;
    获取所述预选词的逆文本频率;
    根据所述预选词向量和所述逆文本频率计算所述词向量对应的初级环境词向量。
  11. 根据权利要求9所述的一种电子设备,其中,所述根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量,包括:
    获取所述词向量的逆文本频率;
    将所述输入环境词向量、所述词向量和所述词向量的逆文本频率进行第二拼接处理,生成所述关键词向量。
  12. 根据权利要求10所述的一种电子设备,其中,所述利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,包括:
    将所述索引样本的单词进行复制,得到第二数量的复制单词,所述第二数量由所述第一数量计算得到;
    将所述第二数量的复制单词逐列进行位移操作,得到位移单词矩阵;
    获取所述位移单词矩阵的列单词;
    根据所述索引信息获取所述词向量对应的所述列单词作为所述预选词。
  13. 根据权利要求9至12任一项所述的一种电子设备,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取至少一个用户关键词样本和对应的分类标签,所述分类标签为目标标签或者非目标标签
    计算每一分类标签是目标标签的概率,得到标签概率分布;
    根据所述标签概率分布对所述用户关键词样本进行合并处理,得到所述文本样本对应的所述索引样本;
    根据所述索引样本构建关键词训练数据集。
  14. 根据权利要求9至12任一项所述的一种电子设备,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取文本掩模;
    根据所述文本掩模对所述索引样本进行长度填充处理,得到所述关键词训练数据集;其中所述关键词训练数据集中所述索引样本的文本长度一致。
  15. 一种存储介质,所述存储介质为计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行一种关键词推荐模型训练方法,或一种关键词推荐方法;
    其中,所述一种关键词推荐模型训练方法包括:
    获取至少一个文本样本,并根据所述文本样本生成包含单词的索引信息的索引样本;
    根据所述索引样本构建关键词训练数据集,所述关键词训练数据集包含所述索引样本和分类标签;
    将所述索引样本输入所述关键词推荐模型的词嵌入处理层进行词嵌入操作,得到所述单词的词向量;
    将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量;
    利用所述关键词推荐模型的输入环境信息提取层将所述初级环境词向量和所述词向量进行第一拼接处理,生成所述单词对应的所述输入环境词向量;
    根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量;
    将所述关键词向量输入所述关键词推荐模型的预测分类层,得到推荐预测值;
    根据所述推荐预测值与所述分类标签之间的检测误差,对所述关键词推荐模型中的参数进行调整,直至损失函数满足收敛条件,得到所述关键词推荐模型,所述关键词推荐模型用于进行关键词推荐处理;
    其中,所述一种关键词推荐方法包括:
    获取待推荐文本;
    根据所述待推荐文本生成索引文本;
    将所述索引文本输入关键词推荐模型进行关键词推荐处理,得到目标关键词,所述关键词推荐模型利用如所述一种关键词推荐模型训练方法训练得到。
  16. 根据权利要求15所述的一种存储介质,其中,所述将所述词向量输入所述关键词推荐模型的初级环境信息提取层进行初级环境信息提取,得到初级环境词向量,包括:
    利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,所述预选词是与所述词向量对应的所述单词邻接的第一数量的单词,所述预选词对应的词向量为预选词向量;
    获取所述预选词的逆文本频率;
    根据所述预选词向量和所述逆文本频率计算所述词向量对应的初级环境词向量。
  17. 根据权利要求15所述的一种存储介质,其中,所述根据所述输入环境词向量和所述词向量进行第二拼接处理,得到关键词向量,包括:
    获取所述词向量的逆文本频率;
    将所述输入环境词向量、所述词向量和所述词向量的逆文本频率进行第二拼接处理,生成所述关键词向量。
  18. 根据权利要求16所述的一种存储介质,其中,所述利用所述初级环境信息提取层,根据所述索引信息获取所述词向量的预选词,包括:
    将所述索引样本的单词进行复制,得到第二数量的复制单词,所述第二数量由所述第一数量计算得到;
    将所述第二数量的复制单词逐列进行位移操作,得到位移单词矩阵;
    获取所述位移单词矩阵的列单词;
    根据所述索引信息获取所述词向量对应的所述列单词作为所述预选词。
  19. 根据权利要求15至18任一项所述的一种存储介质,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取至少一个用户关键词样本和对应的分类标签,所述分类标签为目标标签或者非目标标签
    计算每一分类标签是目标标签的概率,得到标签概率分布;
    根据所述标签概率分布对所述用户关键词样本进行合并处理,得到所述文本样本对应的所述索引样本;
    根据所述索引样本构建关键词训练数据集。
  20. 根据权利要求15至18任一项所述的一种存储介质,其中,所述根据所述索引样本构建关键词训练数据集,包括:
    获取文本掩模;
    根据所述文本掩模对所述索引样本进行长度填充处理,得到所述关键词训练数据集;其中所述关键词训练数据集中所述索引样本的文本长度一致。
PCT/CN2022/090746 2022-02-16 2022-04-29 关键词推荐模型训练方法、推荐方法和装置、设备、介质 WO2023155304A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210143648.9A CN114492669A (zh) 2022-02-16 2022-02-16 关键词推荐模型训练方法、推荐方法和装置、设备、介质
CN202210143648.9 2022-02-16

Publications (1)

Publication Number Publication Date
WO2023155304A1 true WO2023155304A1 (zh) 2023-08-24

Family

ID=81482362

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090746 WO2023155304A1 (zh) 2022-02-16 2022-04-29 关键词推荐模型训练方法、推荐方法和装置、设备、介质

Country Status (2)

Country Link
CN (1) CN114492669A (zh)
WO (1) WO2023155304A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951390B (zh) * 2024-03-25 2024-06-11 中外运创新科技有限公司 一种基于大语言模型的个性化内容推荐方法及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985228A (zh) * 2020-07-28 2020-11-24 招联消费金融有限公司 文本关键词提取方法、装置、计算机设备和存储介质
CN112417866A (zh) * 2020-12-03 2021-02-26 上海明略人工智能(集团)有限公司 一种分词推荐值的确定方法、装置、电子设备及存储介质
CN112464656A (zh) * 2020-11-30 2021-03-09 科大讯飞股份有限公司 关键词抽取方法、装置、电子设备和存储介质
WO2021096150A1 (ko) * 2019-11-13 2021-05-20 팬 후앙고든 언어 학습을 위한 커스텀 레슨 모듈을 생성하는 방법
CN113111163A (zh) * 2021-05-17 2021-07-13 南京贝湾信息科技有限公司 一种单词推荐方法、装置及计算设备
CN113887206A (zh) * 2021-09-15 2022-01-04 北京三快在线科技有限公司 一种模型训练及关键词提取方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008342A (zh) * 2019-04-12 2019-07-12 智慧芽信息科技(苏州)有限公司 文献分类方法、装置、设备及存储介质
CN111488462B (zh) * 2020-04-02 2023-09-19 中国移动通信集团江苏有限公司 基于知识图谱的推荐方法、装置、设备及介质
CN111507099A (zh) * 2020-06-19 2020-08-07 平安科技(深圳)有限公司 文本分类方法、装置、计算机设备及存储介质
CN112667800A (zh) * 2020-12-21 2021-04-16 深圳壹账通智能科技有限公司 关键词生成方法、装置、电子设备及计算机存储介质
CN113869044A (zh) * 2021-10-12 2021-12-31 平安科技(深圳)有限公司 关键词自动提取方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021096150A1 (ko) * 2019-11-13 2021-05-20 팬 후앙고든 언어 학습을 위한 커스텀 레슨 모듈을 생성하는 방법
CN111985228A (zh) * 2020-07-28 2020-11-24 招联消费金融有限公司 文本关键词提取方法、装置、计算机设备和存储介质
CN112464656A (zh) * 2020-11-30 2021-03-09 科大讯飞股份有限公司 关键词抽取方法、装置、电子设备和存储介质
CN112417866A (zh) * 2020-12-03 2021-02-26 上海明略人工智能(集团)有限公司 一种分词推荐值的确定方法、装置、电子设备及存储介质
CN113111163A (zh) * 2021-05-17 2021-07-13 南京贝湾信息科技有限公司 一种单词推荐方法、装置及计算设备
CN113887206A (zh) * 2021-09-15 2022-01-04 北京三快在线科技有限公司 一种模型训练及关键词提取方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
REN BINGHUA; BU FANLIANG; FU YIHUI; HOU ZHIWEN: "Named-entity recognition method of key population information based on improved BiLSTM-CRF model", 2021 IEEE INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND COMPUTER APPLICATIONS (ICAICA), IEEE, 28 June 2021 (2021-06-28), pages 1 - 5, XP033950997, DOI: 10.1109/ICAICA52286.2021.9497963 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951390B (zh) * 2024-03-25 2024-06-11 中外运创新科技有限公司 一种基于大语言模型的个性化内容推荐方法及系统

Also Published As

Publication number Publication date
CN114492669A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
CN110162593B (zh) 一种搜索结果处理、相似度模型训练方法及装置
US11086912B2 (en) Automatic questioning and answering processing method and automatic questioning and answering system
CN111753060B (zh) 信息检索方法、装置、设备及计算机可读存储介质
CN108304911B (zh) 基于记忆神经网络的知识抽取方法以及系统和设备
WO2023060795A1 (zh) 关键词自动提取方法、装置、设备及存储介质
CN110909182B (zh) 多媒体资源搜索方法、装置、计算机设备及存储介质
CN110019794B (zh) 文本资源的分类方法、装置、存储介质及电子装置
CN111159485B (zh) 尾实体链接方法、装置、服务器及存储介质
US11604981B2 (en) Training digital content classification models utilizing batchwise weighted loss functions and scaled padding based on source density
CN112819023A (zh) 样本集的获取方法、装置、计算机设备和存储介质
WO2023134083A1 (zh) 基于文本的情感分类方法和装置、计算机设备、存储介质
CN111581923A (zh) 文案生成方法、装置、设备和计算机可读存储介质
WO2023108993A1 (zh) 基于深度聚类算法的产品推荐方法、装置、设备及介质
CN111753167B (zh) 搜索处理方法、装置、计算机设备和介质
CN111985228A (zh) 文本关键词提取方法、装置、计算机设备和存储介质
CN115455171B (zh) 文本视频的互检索以及模型训练方法、装置、设备及介质
CN113407814B (zh) 文本搜索方法、装置、可读介质及电子设备
CN112148831B (zh) 图文混合检索方法、装置、存储介质、计算机设备
CN110717038A (zh) 对象分类方法及装置
CN114064948A (zh) 基于广义平均池化策略的哈希图像检索方法及装置
CN112667780A (zh) 一种评论信息的生成方法、装置、电子设备及存储介质
CN107111607A (zh) 用于语言检测的系统和方法
CN112149410A (zh) 语义识别方法、装置、计算机设备和存储介质
CN113408282B (zh) 主题模型训练和主题预测方法、装置、设备及存储介质
CN114239730A (zh) 一种基于近邻排序关系的跨模态检索方法