Method and device for extracting keywords from objects
Through the combination of pointer generation network and coverage factor, the problem of inefficient acquisition of commodity keywords in the prior art is solved, and fast and accurate keyword extraction is achieved, repetitive and non-original vocabulary emerges, and the efficiency and accuracy of keyword extraction are improved.
Patent Information
- Application Number
- CN202010915868.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-03
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2040-09-03
AI Technical Summary
In the prior art, the acquisition of commodity keywords is inefficient, and the operation efficiency is inefficient by relying on manual audits. In addition, the extracted keywords are not the vocabulary and keyword duplication in the original text.
The pointer-generator network is used to combine coverage factors and generation probability, and the similarity and probability of candidate keywords are determined by processing text information, and candidate keywords with high similarity are merged to avoid duplicate and non-original vocabulary extraction.
It realizes the automatic extraction of keywords from text information quickly and efficiently, ensuring the accuracy and simplicity of extracted keywords, and avoiding the emergence of duplicate and non-original vocabulary.
Smart Images

Figure CN113779977B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and device for extracting keywords from an object. Background Art
[0002] Currently, online shopping has become a very important shopping method. Keywords of products can usually be provided on a graphical user interface so that users can quickly understand the characteristics of the products.
[0003] Among them, the extraction of product keywords is particularly important. In the current existing technology, when extracting product keywords, the keywords of the products are usually received from the seller, and the submitted keywords are manually reviewed, and the keywords that pass the review are used as keywords to be displayed.
[0004] However, the implementation method of relying on manual submission to obtain keywords for products will result in low efficiency in the operation of obtaining keywords. Summary of the Invention
[0005] The embodiments of the present application provide a method and apparatus for extracting keywords from an object to overcome the problem of low efficiency in obtaining keywords.
[0006] In a first aspect, an embodiment of the present application provides a method for extracting keywords from an object, comprising:
[0007] Acquire text information corresponding to a first object, where the text information is used to describe the first object;
[0008] determining, based on the text information, a plurality of candidate keywords corresponding to the first object;
[0009] At least one keyword of the first object is determined from the plurality of candidate keywords according to similarities of the plurality of candidate keywords and probabilities that the candidate keywords are keywords.
[0010] In one possible design, determining multiple candidate keywords corresponding to the first object based on the text information includes:
[0011] Processing the text information using a first model to obtain the plurality of candidate keywords;
[0012] The first model is obtained by learning multiple groups of samples, each group of samples includes sample text information and sample candidate keywords, and the multiple groups of samples are generated by the second model.
[0013] In one possible design, the process of the second model generating the multiple groups of samples includes:
[0014] Obtaining the sample text information;
[0015] Performing word segmentation processing on the sample text information using the second model to obtain a plurality of sample words and a probability that each sample word is a keyword;
[0016] According to the probability that each sample word is a keyword, sample candidate keywords are determined from the plurality of sample words, and the probability that the sample candidate keywords are keywords is greater than a first threshold.
[0017] In one possible design, determining at least one keyword of the first object from the plurality of candidate keywords based on similarities of the plurality of candidate keywords and probabilities that the candidate keywords are keywords includes:
[0018] For each two candidate keywords among the plurality of candidate keywords, determining whether the similarity between the two candidate keywords is greater than a preset threshold;
[0019] If so, merging the two candidate keywords into one keyword based on the probability that each of the two candidate keywords is a keyword;
[0020] If not, both of the two candidate keywords are determined as keywords of the first object.
[0021] In a possible design, merging the two candidate keywords into one keyword according to the probability that each of the two candidate keywords is a keyword includes:
[0022] The two candidate keywords are merged into a target keyword, wherein the target keyword is a keyword with a higher probability of being a keyword among the two candidate keywords.
[0023] In one possible design, determining multiple candidate keywords corresponding to the first object based on the text information includes:
[0024] Segmenting the text information to obtain a plurality of short sentences;
[0025] Determining whether each of the short sentences includes a keyword through a binary classification model, and determining the short sentences including the keyword as target short sentences to obtain at least one target short sentence;
[0026] Performing word segmentation processing on each of the target short sentences to obtain a plurality of first words;
[0027] Performing stop word filtering on the first vocabulary to obtain a plurality of second vocabulary;
[0028] Keyword prediction processing is performed on the plurality of second words to obtain the plurality of candidate keywords.
[0029] In one possible design, the first model is a pointer generation network;
[0030] The output layer of the pointer generation network includes a generation probability, wherein the generation probability is used to indicate the probability that the next output word of the decoder at each time step is from a preset vocabulary; and
[0031] The attention distribution function of the pointer generation network includes a coverage factor.
[0032] In one possible design, the text information includes at least one of the following:
[0033] Network data corresponding to the first object, the network data including description information of the first object;
[0034] The data in the details page corresponding to the first object is a web page introducing the first object.
[0035] In a second aspect, an embodiment of the present application provides a keyword extraction device for an object, comprising:
[0036] An acquisition module, configured to acquire text information corresponding to a first object, wherein the text information is used to describe the first object;
[0037] a determination module, configured to determine a plurality of candidate keywords corresponding to the first object based on the text information;
[0038] The determining module is further configured to determine at least one keyword of the first object from among the plurality of candidate keywords based on similarities among the plurality of candidate keywords and probabilities that the candidate keywords are keywords.
[0039] In one possible design, the determining module is specifically configured to:
[0040] Processing the text information using a first model to obtain the plurality of candidate keywords;
[0041] The first model is obtained by learning multiple groups of samples, each group of samples includes sample text information and sample candidate keywords, and the multiple groups of samples are generated by the second model.
[0042] In one possible design, the process of the second model generating the multiple groups of samples includes:
[0043] Obtaining the sample text information;
[0044] Performing word segmentation processing on the sample text information using the second model to obtain a plurality of sample words and a probability that each sample word is a keyword;
[0045] According to the probability that each sample word is a keyword, sample candidate keywords are determined from the plurality of sample words, and the probability that the sample candidate keywords are keywords is greater than a first threshold.
[0046] In one possible design, the determining module is specifically configured to:
[0047] For each two candidate keywords among the plurality of candidate keywords, determining whether the similarity between the two candidate keywords is greater than a preset threshold;
[0048] If so, merging the two candidate keywords into one keyword based on the probability that each of the two candidate keywords is a keyword;
[0049] If not, both of the two candidate keywords are determined as keywords of the first object.
[0050] In one possible design, the determining module is specifically configured to:
[0051] The two candidate keywords are merged into a target keyword, wherein the target keyword is a keyword with a higher probability of being a keyword among the two candidate keywords.
[0052] In one possible design, the determining module is specifically configured to:
[0053] Segmenting the text information to obtain a plurality of short sentences;
[0054] Determining whether each of the short sentences includes a keyword through a binary classification model, and determining the short sentences including the keyword as target short sentences to obtain at least one target short sentence;
[0055] Performing word segmentation processing on each of the target short sentences to obtain a plurality of first words;
[0056] Performing stop word filtering on the first vocabulary to obtain a plurality of second vocabulary;
[0057] Keyword prediction processing is performed on the plurality of second words to obtain the plurality of candidate keywords.
[0058] In one possible design, the first model is a pointer generation network;
[0059] The output layer of the pointer generation network includes a generation probability, wherein the generation probability is used to indicate the probability that the next output word of the decoder at each time step is from a preset vocabulary; and
[0060] The attention distribution function of the pointer generation network includes a coverage factor.
[0061] In one possible design, the text information includes at least one of the following:
[0062] Network data corresponding to the first object, the network data including description information of the first object;
[0063] The data in the details page corresponding to the first object is a web page introducing the first object.
[0064] In a third aspect, an embodiment of the present application provides a keyword extraction device for an object, comprising:
[0065] Memory, used to store programs;
[0066] A processor is used to execute the program stored in the memory. When the program is executed, the processor is used to execute the method described in the first aspect and any one of the various possible designs of the first aspect.
[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any one of the various possible designs of the first aspect.
[0068] An embodiment of the present application provides a keyword extraction method and device for an object, the method comprising: obtaining text information corresponding to a first object, the text information being used to describe the first object. Based on the text information, determining a plurality of candidate keywords corresponding to the first object. Based on the similarity of the plurality of candidate keywords and the probability that the candidate keywords are keywords, determining at least one keyword for the first object from the plurality of candidate keywords. By determining the plurality of candidate keywords corresponding to the first object through the text information, it is possible to quickly and efficiently automatically extract the candidate keywords from the text information, and filtering the candidate keywords based on the phase velocity of the plurality of candidate keywords and the probability that the candidate keywords are keywords, thereby ensuring the accuracy of the keywords of the first object finally determined. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0070] Figure 1 A schematic diagram of the keywords provided for this application;
[0071] Figure 2 A flowchart of a keyword extraction method for an object provided in one embodiment of the present application;
[0072] Figure 3 A flowchart of a keyword extraction method for an object provided in an embodiment of the present application;
[0073] Figure 4 A schematic diagram of the network structure of the first model provided in an embodiment of the present application;
[0074] Figure 5 A flowchart of a keyword extraction method for an object provided in yet another embodiment of the present application;
[0075] Figure 6 A schematic diagram of a process unit for keyword extraction of an object provided in an embodiment of the present application;
[0076] Figure 7 A schematic diagram of keywords extracted according to an embodiment of the present application;
[0077] Figure 8 A schematic diagram of the structure of a keyword extraction device for an object provided in an embodiment of the present application;
[0078] Figure 9 Schematic diagram of the hardware structure of the keyword extraction device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0079] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0080] To facilitate understanding, first, the relevant concepts involved in this application are explained:
[0081] seq2seq generation network: The sequence-to-sequence (seq2seq) generation network is an end-to-end generation method based on the assumption of minimizing sequence structure. It is designed to solve the sequence-to-sequence generation problem that traditional deep neural networks (DNNs) cannot complete. The seq2seq generation network can use a multi-layer long short-term memory (LSTM) network to encode the input sequence into an intermediate vector and use another deep LSTM to decode the intermediate vector into the target sequence.
[0082] oov: Out-of-vocabulary (OOV) means that in natural language processing or text processing, there is usually a vocabulary. This vocabulary can be pre-loaded, customized, or extracted from the current first dataset. Assuming that there is another second dataset later, some words in this second dataset are not in the existing vocabulary. These words can be called Out-of-vocabulary, abbreviated as OOV.
[0083] Pointer-generator network: A pointer-generator network is a generative model for abstract extraction. It improves on traditional sequence-to-sequence models in two ways. By introducing pointers, the model is able to copy words from the source text while retaining the generator's ability to generate new words. By using a covarage mechanism to record previously generated content, the same word is prevented from being repeatedly generated.
[0084] LSTM: A long short-term memory (LSTM) network is a time-recursive neural network with long-term memory capabilities. Its key components include the Forget Gate, Input Gate, and Output Gate, which are responsible for determining whether the current input is adopted, whether it is memorized for a long time, and whether the input in memory is currently output. This model can better capture the dependencies between longer sentences.
[0085] Hyperparameter: In the context of machine learning, a hyperparameter is a parameter whose value is set before starting the learning process, rather than being learned through training data.
[0086] Levenshtein distance: also known as edit distance, is used to measure the similarity between two string sequences. Simply put, it calculates the minimum number of edits required to transform a string into another string through addition, deletion, and substitution operations.
[0087] N-Gram language model: is an algorithm based on a statistical language model. The model is based on an assumption that the appearance of the Nth word in a sentence is only related to the previous N-1 words. The probability of the entire sentence is the product of the probabilities of the appearance of each word, that is,
[0088] p(w1,w2,...,w m )=p(w1)*p(w2|w1)*p(w3|w1,w2)...p(w m |w1,...,wm-1 ),
[0089] Taking into account the trade-off between effect and time and space overhead, only the n words closest to the current word are considered as related words, resulting in the Uni-Gram model, Bi-Gram model, and Tri-Gram model. Their common application is to calculate the rationality of sentences.
[0090] The following is a further detailed introduction to the technical background involved in this application:
[0091] At present, with the continuous development of online shopping, users' shopping experience also needs to be improved accordingly. When users browse products through terminal devices, if an overly long product introduction is directly provided to users, it will make it difficult for users to determine the characteristics of the products in time. At the same time, the space in the graphical user interface of the terminal device is also limited. Therefore, keywords of the products can be provided in the graphical user interface so that users can quickly determine the characteristics of the products.
[0092] The display method of the product keywords can be as follows: Figure 1 As shown, Figure 1 Schematic diagram of the keywords provided for this application.
[0093] See also Figure 1 , assuming that the current user is browsing the "mobile phone" product through a terminal device, the graphical user interface of the current terminal device provides information about product A and product B, which may include product keywords. For example, the keywords of product A are "support wireless charging" and "face recognition" as indicated by 101, and the keywords of product B are "super long battery life", "shocking loud volume" and "AI face recognition" as indicated by 102.
[0094] based on Figure 1 It can be understood that the keywords of a product can be used to indicate the characteristics of the product.
[0095] Currently, in the prior art, when extracting selling points, in one possible implementation, keywords of products submitted by sellers may be received, the submitted keywords may be manually reviewed, and the keywords that pass the review may be used as keywords to be displayed.
[0096] However, relying on manual reporting will lead to low efficiency in obtaining keywords, and the keywords submitted by merchants cover a small number of product categories and stock keeping units (SKUs), which cannot support calls from multiple application parties, resulting in a waste of platform resources. In addition, some application parties receive keywords submitted by sellers in the form of emails, which will result in the platform being unable to update product keywords in a timely manner.
[0097] In another possible implementation, keywords may be generated based on a seq2seq generation network.
[0098] For example, the seq2seq generative network can perform the following steps: data extraction, data labeling, data preprocessing, model training, and keyword generation.
[0099] Among them, data extraction can obtain a data source including keywords, data labeling can manually label the keywords in the data source, data preprocessing can perform operations such as word segmentation and stop word filtering, and the model training part can divide the data set into a training set and a validation set, and train the seq2seq generation network according to the data set to obtain a trained model, and keyword generation is used to input the data source into the trained model to obtain the extracted keywords.
[0100] However, the only connection between encoding and decoding in the seq2seq generative network is a fixed-length semantic vector, that is, the encoder compresses the information of the entire sequence into a fixed-length vector.
[0101] Therefore, seq2seq generative networks have two drawbacks: first, the semantic vector cannot fully represent the information of the entire sequence; second, the information carried by the first input is diluted by the later input. The longer the input sequence, the more severe this information dilution becomes. This information dilution results in insufficient information from the input sequence during decoding, resulting in reduced decoding accuracy. Furthermore, seq2seq generative networks rely on the target dictionary, making them unable to handle out-of-vocabulary (OOV) problems and prone to generating repeated words.
[0102] That is to say, there are two problems in extracting keywords based on the seq2seq generation network: the first is that the extracted keywords are not the words in the original text. For example, the keyword "drying and energy saving" is currently extracted, but "drying and energy saving" is not a word in the original text; the other is that the extracted keywords are repeated, for example, the keyword "comfortable and comfortable" is extracted.
[0103] Based on the problems in the prior art, the present application provides a keyword extraction method for an object, which processes the original text through a first model to achieve fast and efficient extraction of the object's keywords, and by adding generation probability and coverage factor to the first model, it can effectively solve the problems in the prior art that the keywords extracted are not the words in the original text and the extracted keywords are repeated.
[0104] The keyword extraction method of the object provided by this application is described in detail below with reference to specific embodiments. Figure 2 To explain, Figure 2 This is a flowchart of a keyword extraction method for an object provided in one embodiment of the present application. Figure 2 The execution subject of the embodiment may be, for example, a server, or a processor, etc. Any device that can be used for data processing may serve as the execution subject of this embodiment.
[0105] like Figure 2 As shown, the method includes:
[0106] S201: Acquire text information corresponding to a first object, where the text information is used to describe the first object.
[0107] In this embodiment, the first object can be an object from which keywords are to be extracted. For example, the first object can be a product on a shopping platform, or in other possible implementations, the first object can also be an entity object, etc. This embodiment does not limit the specific implementation method of the first object. Any object from which keywords can be extracted can be used as the first object in this embodiment.
[0108] Among them, the text information corresponding to the first object is used to describe the first object. The text information corresponding to the first object is explained below by taking the first object being a product as an example. In a possible implementation method, the text information may include at least one of the following: network data corresponding to the first object, data in the first details page, where the network data may, for example, include product titles, expert articles, high-quality reviews, etc., and the data in the details page may, for example, include product details information.
[0109] The product details information may be, for example, text data recognized from a picture on the product details page using optical character recognition (OCR) technology.
[0110] In other possible implementations, the text information may further include any information for describing the first object. This embodiment does not limit the specific implementation of the text information.
[0111] S202: Determine multiple candidate keywords corresponding to the first object according to the text information.
[0112] In this embodiment, the text information is used to describe the first object. The text information may include at least one keyword corresponding to the first object. Therefore, multiple candidate keywords corresponding to the first object may be determined based on the text information.
[0113] In one possible implementation, text information can be processed by a first model to extract multiple candidate keywords from the text information, wherein the first model is a model for extracting keywords from text information, wherein the first model is learned from multiple groups of samples, and each group of samples includes sample text information and sample candidate keywords.
[0114] Therefore, in this embodiment, the text information is processed based on the first model, which can effectively realize the rapid and efficient extraction of multiple candidate keywords from the text information.
[0115] In another possible implementation, the text information may be segmented, and it may be determined whether each segmented word is a keyword, thereby extracting a plurality of candidate keywords from the text information.
[0116] In this embodiment, when the first object is a commodity, the keyword of the first object can be understood as a selling point of the commodity, for example.
[0117] S203 : Determine at least one keyword of the first object from the plurality of candidate keywords based on similarities of the plurality of candidate keywords and probabilities that the candidate keywords are keywords.
[0118] It can be understood that the keywords obtained in the above step S202 are candidate keywords and further screening is required. For example, if there are words with high similarity among multiple candidate keywords, such as "super long battery life" and "super long standby", the similarity is relatively high. Then, one of the two candidate keywords with high similarity can be selected as the keyword of the first object.
[0119] In one possible implementation, the similarity between any two candidate keywords among multiple candidate keywords can be obtained. If there are two candidate keywords whose similarity is greater than a preset threshold, the two candidate keywords can be merged. For example, the probability of the two candidate keywords being keywords can be calculated, and the two candidate keywords can be merged into a keyword with a higher probability.
[0120] The above operation is performed for any two candidate keywords, thereby determining at least one keyword of the object among the candidate keywords.
[0121] In one possible implementation, in this embodiment, after obtaining at least one keyword of the first object, the at least one keyword can be provided at a position corresponding to the first object in the graphical user interface, so that the user can quickly obtain the keyword of the first object, thereby quickly and efficiently understanding the characteristics of the first object.
[0122] The keyword extraction method for an object provided in an embodiment of the present application includes: obtaining text information corresponding to a first object, where the text information is used to describe the first object. Based on the text information, multiple candidate keywords corresponding to the first object are determined. Based on the similarity of the multiple candidate keywords and the probability that the candidate keywords are keywords, at least one keyword for the first object is determined from the multiple candidate keywords. By determining the multiple candidate keywords corresponding to the first object through the text information, it is possible to quickly and efficiently extract the candidate keywords automatically from the text information, and filter the candidate keywords based on the phase velocity of the multiple candidate keywords and the probability that the candidate keywords are keywords, thereby ensuring the accuracy of the keywords of the first object finally determined.
[0123] Based on the above embodiments, the keyword extraction method of the object provided by this application is further described in detail below. Figure 3 This is a flowchart of the keyword extraction method for an object provided in an embodiment of the present application. Figure 4 A schematic diagram of the network structure of the first model provided in an embodiment of the present application.
[0124] like Figure 3 As shown, the method includes:
[0125] S301: Acquire text information corresponding to a first object, where the text information is used to describe the first object.
[0126] The implementation of S301 is the same as that of S201 and will not be described again here.
[0127] S302: Segment the text information to obtain multiple short sentences.
[0128] The implementation of sentence segmentation for text information may be, for example, obtaining punctuation marks in the text information, segmenting the text information according to the punctuation marks, and obtaining a plurality of short sentences.
[0129] For example, the following text message currently exists: "Wall-mounted air conditioners do not occupy the lower living space, making them a popular style for small families. They support four sleep modes to cater to the sleep needs of different groups and ensure that the family gets enough rest. The evaporator's self-cleaning technology cleverly uses condensed water to eliminate dust problems inside the unit, providing clean air."
[0130] The above text information is divided into sentences. For example, the following short sentences can be obtained: "The wall-mounted air conditioner does not occupy the lower living space", "It is a popular style for small families", "Supports 4 sleep modes", "Meets the sleep requirements of different groups of people", "Ensures sufficient rest for the family", "The evaporator self-cleaning technology cleverly uses condensed water to solve the dust problem inside the machine", and "Brings clean air".
[0131] In other possible implementations, any sentence segmentation algorithm may be used to segment the text information. No particular limitation is imposed on the specific implementation of the sentence segmentation process, as long as the text information can be segmented into multiple short sentences.
[0132] S303 : Determine whether each short sentence includes a keyword through a binary classification model, and determine the short sentence including the keyword as a target short sentence to obtain at least one target short sentence.
[0133] In this embodiment, in order to improve operation efficiency, a binary classification model may be used to perform preliminary screening on multiple short sentences.
[0134] For example, a binary classification model can be used to determine whether each short sentence contains keywords. Short sentences that do not contain keywords will be filtered out and not processed subsequently. Short sentences that contain keywords will be determined as target short sentences, thereby obtaining at least one target short sentence. Only target short sentences will be processed subsequently, which can effectively improve the operational efficiency of keyword extraction.
[0135] In this embodiment, the binary classification model is a model trained based on sample keywords, so the binary classification model in this embodiment can determine whether a short sentence includes keywords, where the input of the binary classification model is a short sentence, and the output is whether the short sentence includes keywords.
[0136] In the actual implementation process, the detailed implementation of the binary classification model can be selected according to actual needs, as long as the binary classification model can output whether the short sentence contains keywords.
[0137] S304: Perform word segmentation processing on the target short sentence to obtain multiple first words.
[0138] S305: Perform stop word filtering on the first vocabulary to obtain a plurality of second vocabulary.
[0139] The following is an introduction to S304 and S305:
[0140] In this embodiment, the target short sentence is a short sentence including a keyword determined by a binary classification model, and therefore word segmentation processing can be performed on the target short sentence to obtain a plurality of first words.
[0141] The specific implementation of the word segmentation processing can be selected according to actual needs. For example, the target short sentence can be segmented according to the word segmentation algorithm to obtain multiple first words. The word segmentation algorithm can be, for example, any one of the following: a word segmentation method based on string matching, a word segmentation method based on understanding, and a word segmentation method based on statistics. This embodiment does not limit the specific implementation of the word segmentation processing.
[0142] After obtaining multiple first words, stop word filtering processing can be performed on the first words. Stop words can include, for example, words without actual meanings such as "of", "in", "and", "then", etc., or stop words can also include words that are used very frequently such as "I", "just", etc. Filter the stop words in the first words to obtain multiple second words.
[0143] In a possible implementation, a stop word list can be determined in advance, and then stop word filtering processing is performed on the first words according to the stop word list.
[0144] S306. Perform keyword prediction processing on multiple second words to obtain multiple candidate keywords.
[0145] Among them, keyword prediction processing can obtain candidate keywords based on multiple second words.
[0146] In a possible implementation, candidate keywords can be generated according to Pointer-Generator Networks. For example, text information can be input into the Pointer-Generator Networks to obtain multiple candidate keywords. The following combines Figure 4 to introduce the network structure of the Pointer-Generator Networks in this embodiment.
[0147] As Figure 4 shown, the characters in the text information can be sent to the encoder one by one, thereby generating a series of encoder hidden states h i , where h i is involved in the calculation of the attention coefficient. The encoder can be, for example, a single-layer bidirectional lstm.
[0148] In each round of processing, the output state s t at the decoder end will also be involved in the calculation of the attention coefficient. For example, the attention coefficient can be calculated through the output state s t of the decoder and the encoder hidden state h i . The decoder can be, for example, a single-layer bidirectional lstm.
[0149] Based on the above introduction, it can be determined that there are two problems with the current seq2seq generation network:
[0150] 1) The extracted keywords are not words in the original text
[0151] For example, after the original sentence is tokenized, it is ['dry', 'dust removal', 'effective', 'reduce', 'your', 'cleaning', 'troubles']
[0152] The keyword extracted by the seq2seq generation network may be: drying energy saving. This keyword is not a word in the original sentence, but an arbitrary word in the vocabulary, which leads to the lack of accuracy of the generated keywords.
[0153] 2) The extracted keywords are repeated
[0154] For example, the original sentence becomes ['thickening', 'of', 'design', 'touch', comfortable]
[0155] The selling points extracted by the seq2seq generation network may be: comfortable and comfortable, so there are duplications in the generated keywords.
[0156] To address the first problem mentioned above, that “the extracted keywords are not words in the original text”, the pointer network in this embodiment adds a generation probability P in the output layer. gen .
[0157] The generation probability P gen It is used to determine the probability of the next output word of the decoder at each time step coming from the source text (Source Text) or the vocabulary (Vocabulary). In this way, when encountering the Oov problem, it can directly copy from the original sentence as the output to avoid the problem that the extracted keywords are not in the vocabulary of the original text.
[0158] Among them, the generation probability P gen For example, the following formula 1 can be satisfied:
[0159]
[0160] Among them, P gen To generate the probability, it represents the probability value calculated by the state of the input layer, the state of the decoding layer, and the input vector of the decoding layer, where the probability value represents the probability that the next output is obtained from the vocabulary. are all hyperparameters, s t is the coefficient for balancing, Represents the current vocabulary output or the vocabulary output of the predefined vocabulary table copied from the original sentence, x t is the input vector of the current decoder, and σ is the sigmoid function.
[0161] The final vocabulary output is P(w), where P(w) can satisfy the following formula 2:
[0162]
[0163] Among them, p vocab (w) represents the probability that the output of the current decoder is a word in the vocabulary, Indicates the probability that the output of the current decoder is a word in the original sentence.
[0164] Then, if the current word has not appeared in the original text, then If the current word is not recorded in the predefined word list, then p vocab (w) is 0.
[0165] By adding the generation probability P in the output layer of the pointer generation network gen , which can effectively solve the problem that the extracted keywords are not the words in the original text. For example, in the above example, the correct keyword that can be extracted is: drying and dust removal, which is a word in the original text.
[0166] To address the second issue of "extracted keywords are repeated" mentioned above, the pointer network in this embodiment introduces a coverage factor into the attention distribution function. The coverage factor is composed of the sum of the attention mechanisms of all time step decoder layers before the current time step t. The purpose is to avoid paying attention to words that have been paid attention to before. The coverage factor can, for example, satisfy the following formula 3:
[0167]
[0168] Among them, c t The coverage vector is used to calculate the words that have been paid attention to in the 0 to t-1 steps before the t-th time step, and avoid paying attention to them again in the t-th time step, thereby solving the problem of repeated words in the output results. Among them, the information that has been paid attention to is directly added as input to the attention mechanism at the input end, so as to guide the attention to the original text.
[0169] After the introduction of the coverage factor, the calculation method of the new encoder-side attention weight can be adjusted accordingly, where the new encoder-side attention weight The following formula 4 can be satisfied:
[0170]
[0171] Among them, W h 、W S 、W c is the parameter that needs to be learned, tanh is a hyperbolic function, h i is the hidden state of the encoder at the current time point, s t is the hidden state of the previous time point output by the decoder, is the coverage vector of the i-th word at the t-th time step, b attn is the bias parameter to be learned, v T are the parameters that need to be learned.
[0172] By introducing a coverage factor, it is possible to effectively avoid focusing on words that have already been focused on before, so as to avoid the problem of duplicate keywords being extracted. For example, in the above example, the correct keywords that can be extracted are: comfortable touch, avoiding duplicate extracted keywords.
[0173] S307. For every two candidate keywords among multiple candidate keywords, determine whether the similarity between the two candidate keywords is greater than a preset threshold. If so, execute S308; if not, execute S309.
[0174] After obtaining multiple candidate keywords, since some candidate keywords are very similar, the candidate keywords can be screened according to the similarity of the multiple candidate keywords. In one possible implementation, for example, for every two candidate keywords among multiple candidate keywords, calculate the similarity between the two candidate keywords and determine whether the similarity is greater than a preset threshold.
[0175] The following introduces a possible implementation method for calculating the similarity between two candidate keywords:
[0176] For example, the similarity can be calculated according to the following formula five:
[0177] Similarity = (Levenshtein ratio + Jaro-Winkler distance + longest common substring + edit distance) / 4
[0178] Formula Five
[0179] Among them, the Levenshtein ratio can satisfy the following formula six:
[0180]
[0181] Among them, assuming to calculate the similarity between string a and string b, similarity is the Levenshtein ratio, sum is the total length of string a and string b, ldist is the quasi-edit distance. In the quasi-edit distance, deletion and insertion still add 1, but substitution adds 2.
[0182] Here is an example: For example, a = 'I', b = 'you', the edit distance is 1, and the calculated similarity is 0.5, which is obviously inappropriate. The similarity calculated by the Levenshtein ratio is 0.
[0183] The Jaro-Winkler distance can satisfy the following formula seven:
[0184] d w = d j + lp(1 - d j ) Formula Seven
[0185] Among them, p is a factor used to adjust the prefix match, l is used to represent the length of the prefix match, dw The distance is calculated for the final similarity, where the Jaro-Winkler algorithm gives higher scores to strings that have the same initial part, so p and l are defined, where d j Satisfy the following formula 8:
[0186]
[0187] Among them, s1 and s2 are the two strings to be compared, m is the matching length of s1 and s2, t is the number of transpositions, d j is the final score.
[0188] The number of transpositions needs to be determined based on the matching window value. When the distance between two characters is less than the matching window value, the two characters are considered to be matched, but if the positions are different, transposition is required.
[0189] The matching window value may satisfy the following formula 9:
[0190]
[0191] Where MW is the matching window value and MAX is the function for obtaining the maximum value.
[0192] Here is an example: for example, a set of character strings AECFR and AMECFDR, MW=2.5, m=5, the matching character string AECFR has an order in the two character strings, so no transposition is required, t=0.
[0193] The longest common substring can satisfy the following formula 10:
[0194]
[0195] Here, avg is the function used to find the average value.
[0196] The edit distance can satisfy the following formula 11:
[0197]
[0198] In this embodiment, the preset threshold corresponding to the similarity can be set according to actual needs, and this embodiment does not impose any special restrictions on this.
[0199] S308: Merge the two candidate keywords into one keyword based on the probability that each of the two candidate keywords is a keyword.
[0200] In one possible implementation, if the similarity between two candidate keywords is greater than a preset threshold, the probability that the two candidate keywords are each keywords can be determined. For example, there are currently two candidate keywords: "super long battery life" and "super long standby".
[0201] The probability that "ultra-long battery life" is a keyword can be determined, as can the probability that "ultra-long standby time" is a keyword. Based on the probabilities of the two candidate keywords, the two candidate keywords can be merged into one keyword.
[0202] In a possible implementation, two candidate keywords may be merged into a target keyword, wherein the target keyword is a keyword with a higher probability of being a keyword among the two candidate keywords.
[0203] For example, the probability that "super long battery life" is a keyword is 98%, and the probability that "super long standby time" is a keyword is 87%. Then the two candidate keywords "super long battery life" and "super long standby time" can be merged into "super long battery life", thus obtaining the keyword: super long battery life.
[0204] The method for determining the probability of a candidate keyword may be, for example, processing the candidate keyword through an N-Gram language model to obtain the probability that the candidate keyword is a keyword.
[0205] In other possible implementations, for example, one of the two candidate keywords can be arbitrarily selected as the target keyword.
[0206] S309: Determine both candidate keywords as keywords of the first object.
[0207] In another possible implementation, if the similarity between two candidate keywords is not greater than a preset threshold, it can be determined that the two candidate keywords are not similar. In this case, no merging operation is required, and both candidate keywords can be determined as keywords of the first object.
[0208] The object keyword extraction method provided in the embodiments of the present application uses a pointer generation network to determine multiple candidate words corresponding to a first object in text information. The introduction of generation probability into the pointer generation network effectively avoids the situation where the extracted keywords are not words in the original text. The introduction of a coverage factor into the pointer generation network effectively avoids duplication of the extracted keywords, thereby effectively ensuring the correctness of the extracted keywords. Furthermore, by determining the similarity between each pair of candidate keywords, similar candidate keywords can be merged to achieve simplicity and accuracy in the final determined keywords for the first object.
[0209] Based on the above embodiment, before processing the text information through the first model, the first model needs to be trained so that the first model can output candidate keywords based on the text information. It can be understood that the training of the first model requires sample training data. In one possible implementation of this embodiment, the second model can be used to generate multiple groups of samples. The implementation method of generating multiple groups of samples according to the second model in this application is introduced below with reference to specific embodiments:
[0210] Figure 5 This is a flowchart of a keyword extraction method for an object provided in yet another embodiment of the present application.
[0211] like Figure 5 As shown, the method includes:
[0212] S501: Obtain sample text information.
[0213] In this embodiment, the sample text information is similar to the text information described above, except that the above text information is used to directly extract keywords, while the sample text information in this embodiment is used to generate training data.
[0214] S502: Perform word segmentation processing on the sample text information using the second model to obtain multiple sample words and the probability that each sample word is a keyword.
[0215] In this embodiment, the second model may be, for example, an N-Gram language model, wherein the N-Gram language model may take sample text information as input and output a plurality of sample words and the probability that each sample word is a keyword.
[0216] Before obtaining sample words and probabilities based on the N-Gram language model, the N-Gram language model must first be trained. For example, the N-Gram model can be trained based on existing keyword data to obtain a trained N-Gram model, so that the N-Gram model can output sample words and the probability that the sample words are keywords.
[0217] After the N-Gram model training is completed, the sample text information can be first segmented and stop words processed. The implementation method is similar to the above introduction and will not be repeated here.
[0218] Then, keyword candidate phrases can be generated. Since the length of the keyword of the first object is usually 3-7 characters, N in N-Gram can be selected from 1, 2, or 3, thereby generating 1-gram, 2-gram, and 3-gram phrases. For example, if there are "one-key", "automatic", and "cleaning", the generated 1-gram phrases can include, for example, "one-key", "automatic", and "cleaning", the generated 2-gram phrases can include, for example, "one-key automatic", "automatic cleaning", and the generated 3-gram phrases can include, for example, "one-key automatic cleaning".
[0219] In this embodiment, the keyword candidate phrases can be used as sample words, and then each keyword candidate phrase can be scored based on the trained N-Gram model to obtain the probability that each sample word is a keyword.
[0220] The idea of generating keywords by scoring phrases based on the N-Gram model is to infer the probability of a new short sentence being a keyword based on the probability of phrase combinations statistically calculated in the existing keyword training data. The higher the probability, the greater the possibility that it is a keyword.
[0221] For example, the probability that the phrase "one-key automatic cleaning" is a keyword is calculated as follows: <s> Indicates the start,< / s> Indicates the end.
[0222] P('one-button automatic cleaning') = p(one-button | <s> )*p(Automatic|One-touch)*p(Cleaning|Automatic)*p(< / s> | Cleaning)
[0223] Usually, since the probability values are all less than 1, in order to avoid the scores getting smaller and smaller due to continuous multiplication, it is necessary to take the log of both sides and add them together, as follows:
[0224] log(P('One-key automatic cleaning'))=log(p(One-key| <s> ))+log(p(Automatic|One-key))+log(p(Cleaning|Automatic))+log(p(< / s> | Cleaning))
[0225] Therefore, the method for calculating the probability that a phrase is a keyword can satisfy the following formula 12:
[0226]
[0227] Among them, C(w i-1 , w i ) represents word w i-1 and w i The number of times they appear together in the sample text information, C(w i-1 ) represents word w i-1 The total number of occurrences, P(w i |w i-1 ) represents word w i The probability of being a keyword.
[0228] S503: Determine sample candidate keywords from a plurality of sample words according to the probability that each sample word is a keyword, wherein the probability that the sample candidate keywords are keywords is greater than a first threshold.
[0229] After obtaining the probability of each sample word, keywords with a probability greater than a first threshold value may be determined as sample keywords among the multiple sample words, thereby obtaining multiple sample keywords.
[0230] The training data in this embodiment includes sample text information and sample keywords. In the process of training the first model based on the training data, the first model can be used to process the sample text information, and the first model learns according to the sample keywords corresponding to the sample text information, thereby realizing the training of the first model.
[0231] In an embodiment of the present application, the sample text data is processed by the second model to obtain sample keywords, so that training data can be automatically generated, where the training data includes sample text data and sample keywords, thereby effectively improving the efficiency of obtaining training data.
[0232] In another possible implementation, for example, if the first object is a commodity, the core industrial attributes sorted out from the commodity industrial attributes can be associated with expert articles to obtain a keyword phrase candidate set, and the required sample keywords can be manually screened out from the keyword phrase candidate set.
[0233] After training the first model based on the training data obtained above, the first model can be deployed as an interface for calling, thereby avoiding the first model being too large and the large node memory occupied by distributing the model to each node in a distributed call, effectively saving the network resources consumed in the distribution process and shortening the prediction time.
[0234] Based on the above embodiments, Figure 6 This paper introduces the overall process of model training, deployment, and implementation in the keyword extraction method of the object provided by this application. Figure 6 Schematic diagram of the process unit for keyword extraction of the object provided in the embodiment of this application:
[0235] See also Figure 6 , Figure 6 It includes data unit, model training unit, model deployment unit, and keyword extraction unit.
[0236] The data unit may automatically generate training data through the second model introduced above, and / or may obtain the training data manually.
[0237] The training data obtained by the data unit can be used in the model training unit. The model training unit trains the first model according to the training data to obtain a trained first model.
[0238] Then the model deployment unit deploys the trained first model in the form of an interface to effectively save resources and shorten the prediction time.
[0239] Finally, keywords can be extracted according to the keyword extraction unit. For example, text information can be input into the trained first model so that the first model outputs candidate keywords, and the candidate keywords can be screened according to the similarity between each two candidate keywords to obtain the keywords of the first object.
[0240] In one possible implementation, reference may be made to Figure 7 To understand, Figure 7 A schematic diagram of the extracted keywords provided in an embodiment of the present application.
[0241] Among them, text information can be Figure 7 As shown in 701 in FIG. , and the keywords extracted from each text information can be as follows Figure 7 As shown in 702, in one possible implementation, Figure 7 702 in the figure may be a candidate keyword in this application.
[0242] The specific implementation of each of the above units has been introduced in detail in the above embodiments. In summary, the keyword extraction method of the object provided in this application can effectively realize the automatic extraction of keywords of the first object from text information, while ensuring the accuracy and conciseness of the extracted keywords.
[0243] Figure 8 This is a schematic diagram of the structure of the keyword extraction device for the object provided in the embodiment of the present application. Figure 8 As shown, the device 80 includes: an acquisition module 801 and a determination module 802.
[0244] An acquisition module 801 is configured to acquire text information corresponding to a first object, where the text information is used to describe the first object.
[0245] A determination module 802 is configured to determine a plurality of candidate keywords corresponding to the first object based on the text information;
[0246] The determining module 802 is further configured to determine at least one keyword of the first object from among the plurality of candidate keywords according to similarities among the plurality of candidate keywords and probabilities that the candidate keywords are keywords.
[0247] In one possible design, the determining module 802 is specifically configured to:
[0248] Processing the text information using a first model to obtain the plurality of candidate keywords;
[0249] The first model is obtained by learning multiple groups of samples, each group of samples includes sample text information and sample candidate keywords, and the multiple groups of samples are generated by the second model.
[0250] In one possible design, the process of the second model generating the multiple groups of samples includes:
[0251] Obtaining the sample text information;
[0252] Performing word segmentation processing on the sample text information using the second model to obtain a plurality of sample words and a probability that each sample word is a keyword;
[0253] According to the probability that each sample word is a keyword, sample candidate keywords are determined from the plurality of sample words, and the probability that the sample candidate keywords are keywords is greater than a first threshold.
[0254] In one possible design, the determining module 802 is specifically configured to:
[0255] For each two candidate keywords among the plurality of candidate keywords, determining whether the similarity between the two candidate keywords is greater than a preset threshold;
[0256] If yes, then merging the two candidate keywords into one keyword based on the probability that each of the two candidate keywords is a keyword;
[0257] If not, both of the two candidate keywords are determined as keywords of the first object.
[0258] In one possible design, the determining module 802 is specifically configured to:
[0259] The two candidate keywords are merged into a target keyword, wherein the target keyword is a keyword with a higher probability of being a keyword among the two candidate keywords.
[0260] In one possible design, the determining module 802 is specifically configured to:
[0261] Segmenting the text information to obtain a plurality of short sentences;
[0262] Determining whether each of the short sentences includes a keyword through a binary classification model, and determining the short sentences including the keyword as target short sentences to obtain at least one target short sentence;
[0263] Performing word segmentation processing on each of the target short sentences to obtain a plurality of first words;
[0264] Performing stop word filtering on the first vocabulary to obtain a plurality of second vocabulary;
[0265] Keyword prediction processing is performed on the plurality of second words to obtain the plurality of candidate keywords.
[0266] In one possible design, the first model is a pointer generation network;
[0267] The output layer of the pointer generation network includes a generation probability, wherein the generation probability is used to indicate the probability that the next output word of the decoder at each time step is from a preset vocabulary; and
[0268] The attention distribution function of the pointer generation network includes a coverage factor.
[0269] In one possible design, the text information includes at least one of the following:
[0270] Network data corresponding to the first object, the network data including description information of the first object;
[0271] The data in the details page corresponding to the first object is a web page introducing the first object.
[0272] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0273] Figure 9 A schematic diagram of the hardware structure of the keyword extraction device provided in the embodiment of the present application is shown as follows: Figure 9 As shown, the object keyword extraction device 90 of this embodiment includes: a processor 901 and a memory 902;
[0274] Memory 902, for storing computer-executable instructions;
[0275] The processor 901 is configured to execute computer-executable instructions stored in the memory to implement the various steps of the object keyword extraction method in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0276] Optionally, the memory 902 may be independent or integrated with the processor 901 .
[0277] When the memory 902 is independently provided, the keyword extraction device of the object further includes a bus 903 for connecting the memory 902 and the processor 901 .
[0278] An embodiment of the present application further provides a computer-readable storage medium having computer-executable instructions stored therein. When a processor executes the computer-executable instructions, the keyword extraction method for an object as performed by the keyword extraction device for the object is implemented.
[0279] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0280] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the method described in various embodiments of the present application.
[0281] It should be understood that the processor described above may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0282] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0283] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be classified into address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0284] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0285] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0286] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A keyword extraction method for an object, characterized in that: include: Acquire text information corresponding to a first object, where the text information is used to describe the first object; determining, based on the text information, a plurality of candidate keywords corresponding to the first object; For each two candidate keywords among the plurality of candidate keywords, determining whether the similarity between the two candidate keywords is greater than a preset threshold; If so, merging the two candidate keywords into one keyword based on the probability that each of the two candidate keywords is a keyword; if not, determining both the two candidate keywords as keywords of the first object; Determining, based on the text information, a plurality of candidate keywords corresponding to the first object, including: The text information is processed by a first model to obtain the multiple candidate keywords; wherein the first model is obtained by learning multiple groups of samples, each group of samples includes sample text information and sample candidate keywords, and the multiple groups of samples are generated by a second model; the process of generating the multiple groups of samples by the second model includes: Obtaining the sample text information; Performing word segmentation processing on the sample text information using the second model to obtain a plurality of sample words and a probability that each sample word is a keyword; According to the probability that each sample word is a keyword, sample candidate keywords are determined from the plurality of sample words.
2. The method according to claim 1, characterized in that The probability that the sample candidate keyword is a keyword is greater than a first threshold.
3. The method according to claim 1, characterized in that Merging the two candidate keywords into one keyword according to the probability that each of the two candidate keywords is a keyword comprises: The two candidate keywords are merged into a target keyword, wherein the target keyword is a keyword with a higher probability of being a keyword among the two candidate keywords.
4. The method according to any one of claims 1 to 3, characterized in that Determining, based on the text information, a plurality of candidate keywords corresponding to the first object, including: Segmenting the text information to obtain a plurality of short sentences; Determining whether each of the short sentences includes a keyword through a binary classification model, and determining the short sentences including the keyword as target short sentences to obtain at least one target short sentence; Performing word segmentation processing on each of the target short sentences to obtain a plurality of first words; Performing stop word filtering on the first vocabulary to obtain a plurality of second vocabulary; Keyword prediction processing is performed on the plurality of second words to obtain the plurality of candidate keywords.
5. The method according to any one of claims 1 to 3, characterized in that The first model is a pointer generation network; The output layer of the pointer generation network includes a generation probability, wherein the generation probability is used to indicate the probability that the next output word of the decoder at each time step is from a preset vocabulary; and The attention distribution function of the pointer generation network includes a coverage factor.
6. The method according to any one of claims 1 to 3, characterized in that The text information includes at least one of the following: Network data corresponding to the first object, the network data including description information of the first object; The data in the details page corresponding to the first object is a web page introducing the first object.
7. A keyword extraction device for an object, characterized in that: include: An acquisition module, configured to acquire text information corresponding to a first object, wherein the text information is used to describe the first object; a determination module, configured to determine a plurality of candidate keywords corresponding to the first object based on the text information; The determining module is further configured to determine at least one keyword of the first object from among the plurality of candidate keywords based on similarities of the plurality of candidate keywords and probabilities that the candidate keywords are keywords; The determination module is specifically configured to process the text information using a first model to obtain the multiple candidate keywords; wherein the first model is obtained by learning multiple groups of samples, each group of samples including sample text information and sample candidate keywords, and the multiple groups of samples are generated by a second model; the process of the second model generating the multiple groups of samples includes: obtaining the sample text information; performing word segmentation processing on the sample text information using the second model to obtain multiple sample words and the probability of each sample word being a keyword; and determining the sample candidate keywords from the multiple sample words based on the probability of each sample word being a keyword; The determination module is specifically used to determine, for each two candidate keywords among the multiple candidate keywords, whether the similarity between the two candidate keywords is greater than a preset threshold; if so, merge the two candidate keywords into one keyword based on the probability that the two candidate keywords are each keywords; if not, determine both of the candidate keywords as keywords of the first object.
8. A keyword extraction device for an object, characterized in that: include: Memory, used to store programs; A processor is configured to execute the program stored in the memory. When the program is executed, the processor is configured to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Copywriting generation method and device
CN109992764A
Title generation method and device, electronic device and storage medium
CN110717327A