Target word determination method and device, electronic equipment and computer readable medium

By performing naming entity recognition and image analysis on the original title data of the item, combining word vectors and image features, and determining the target words, the problem of inaccurate identification of product words when generating short titles is solved, and the focus of generated short titles is improved and accuracy.

CN119067115APending Publication Date: 2024-12-03BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310628140.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When generating short titles, the existing Seq2Seq model relies on single labeled data, making it difficult to accurately identify the real product words of the product, resulting in the generated short titles lacking focus and cannot meet the needs of different business scenarios.

Method used

By identifying the original title data of the item, combining the display image of the item, using word vectors and image feature vectors for similarity calculation, determining the target words in the candidate word set, and jointly training the graphic and text model and Named entity recognition models to generate more focused new title data.

Benefits of technology

It improves the accuracy of the determination of words in the title, obtains more diverse and richer item information, and the generated short titles are more focused, meeting the usage needs of different business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067115A_ABST
    Figure CN119067115A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a target word determination method and device, electronic equipment and a computer readable medium. A specific embodiment of the determination method comprises the following steps: performing named entity recognition on original title data of an article to obtain a candidate word set of a specified type; analyzing the display image of each word and article in the candidate word set to obtain a word vector set and an image feature vector; and based on the word vector set and the image feature vector, determining a target word in the candidate word set so as to generate new title data of the article. The embodiment is related to a text data processing technology, not only the original title data of the article is analyzed, but also the display image of the article is analyzed. Target words (such as product words) in the title are determined through image-text multi-modal analysis to further generate a new (short) title of the article. Therefore, the word determination accuracy can be improved, the generation accuracy of the short title of the article can be improved, and the time for searching the article by the user can be shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of text data processing, and in particular to a method, device, electronic device, and computer-readable medium for determining a target word. Background Art

[0002] Currently, product short title generation is usually based on the Seq2Seq model. Seq2Seq is an encoder-decoder network whose input is generally a sequence text and output is generally also a sequence. Seq2Seq is an important model in natural language processing and can be used in machine translation, dialogue systems, reading comprehension and other scenarios. Usually, the generated short title structure is "brand word + modifier word + product word".

[0003] However, the inventors found that this model is generally an end-to-end model trained using labeled data. The long product title input into the model often contains multiple product words. This will cause the model to not be able to identify the real product words of the product well, resulting in a lack of focus in the generated short title.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose a target word determination method, a target word determination device, an electronic device, a computer-readable medium, and a computer program product to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a method for determining a target word, including: performing named entity recognition on the original title data of an item to obtain a candidate word set of a specified type; analyzing each word in the candidate word set and the display image of the item to obtain a word vector set and an image feature vector, respectively; based on the word vector set and the image feature vector, determining the target word in the candidate word set to generate new title data for the item.

[0008] In some embodiments, based on the word vector set and the image feature vector, a target word in the candidate word set is determined, including: for the word vector in the word vector set, performing similarity calculation based on the word vector and the image feature vector; and determining the candidate word indicated by the word vector with the largest similarity value as the target word.

[0009] In some embodiments, the method also includes: analyzing the original title data to obtain a title feature vector; fusing the title feature vector with the image feature vector to obtain a composite feature vector; and performing similarity calculation based on the word vector and the image feature vector, including: determining the similarity between the word vector and the composite feature vector.

[0010] In some embodiments, each word in the candidate word set and the display image of the object are analyzed, including: inputting the original title data, the candidate word set and the display image into a trained graphic model to output the matching degree of each candidate word and the display image, wherein the graphic model is a pre-trained model based on contrasting text-image pairs.

[0011] In some embodiments, named entity recognition is performed on the original title data of the item to obtain a candidate word set of a specified type, including: inputting the original title data of the item into a trained named entity recognition model to classify and label each character in the original title data; based on the labeling results, determining the words labeled as the identifier corresponding to the specified type as candidate words to obtain a candidate word set.

[0012] In some embodiments, the method further includes: during the model training process, jointly training the graph-text model and the named entity recognition model, wherein the total loss function is the sum of the loss function of the graph-text model and the cross entropy loss function of the named entity recognition model.

[0013] In some embodiments, the method further includes: generating new title data for the item based on the original title data and the target word, wherein the number of characters in the new title data is smaller than the number of characters in the original title data.

[0014] In some embodiments, new title data for an item is generated based on the original title data and the target words, including: performing word segmentation on the original title data to obtain an original title word sequence; inputting the original title word sequence and the target words into a trained pointer network model to predict and generate new title data for the item, wherein before training the pointer network model, the sample original titles in the sample data are segmented to generate a sample vocabulary.

[0015] In some embodiments, the loss function of the pointer network model is obtained by the following method: determining the loss value of the first word in the predicted sample new title, where the first word is the sample target word; determining the predicted loss values ​​of other words in the sample new title except the first word; weighted summing the loss value of the first word and the loss values ​​of other words, and determining the average loss value as the loss function of the pointer network model based on the number of sample data in a training cycle.

[0016] In a second aspect, some embodiments of the present disclosure provide a target word determination device, including: an entity recognition unit, configured to perform named entity recognition on original title data of an item to obtain a candidate word set of a specified type; an analysis unit, configured to analyze each word in the candidate word set and the display image of the item to obtain a word vector set and an image feature vector, respectively; a target word determination unit, configured to determine the target word in the candidate word set based on the word vector set and the image feature vector, so as to generate new title data for the item.

[0017] In some embodiments, the target word determination unit is further configured to perform similarity calculation on a word vector in the word vector set based on the word vector and the image feature vector; and determine the candidate word indicated by the word vector with the largest similarity value as the target word.

[0018] In some embodiments, the target word determination device also includes a feature fusion unit, which is configured to analyze the original title data to obtain a title feature vector; fuse the title feature vector with the image feature vector to obtain a composite feature vector; and the target word determination unit is further configured to determine the similarity between the word vector and the composite feature vector.

[0019] In some embodiments, the analysis unit is further configured to input the original title data, candidate word set and display image into a trained graphic model to output the matching degree of each candidate word and the display image, wherein the graphic model is a pre-trained model based on contrasting text-image pairs.

[0020] In some embodiments, the entity recognition unit is further configured to input the original title data of the item into a trained named entity recognition model to classify and label each character in the original title data; based on the labeling results, the words labeled as the identifier corresponding to the specified type are determined as candidate words to obtain a candidate word set.

[0021] In some embodiments, the target word determination device also includes a training unit, which is configured to jointly train the graph-text model and the named entity recognition model during the model training process, wherein the total loss function is the sum of the loss function of the graph-text model and the cross-entropy loss function of the named entity recognition model.

[0022] In some embodiments, the target word determination device also includes a title generation unit configured to generate new title data for the item based on the original title data and the target word, wherein the number of characters in the new title data is smaller than the number of characters in the original title data.

[0023] In some embodiments, the title generation unit is further configured to perform word segmentation on the original title data to obtain an original title word sequence; the original title word sequence and the target word are input into a trained pointer network model to predict and generate new title data for the item, wherein, before training the pointer network model, the sample original title in the sample data is segmented to generate a sample vocabulary.

[0024] In some embodiments, the target word determination device also includes a loss determination unit, which is configured to determine the loss value of the first word in the predicted sample new title, wherein the first word is the sample target word; determine the predicted loss values ​​of other words in the sample new title except the first word; perform weighted summation of the loss value of the first word and the loss values ​​of other words, and determine the loss average value as the loss function of the pointer network model based on the number of sample data in a training cycle.

[0025] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation method in the above-mentioned first aspect.

[0026] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any one of the implementations in the first aspect above is implemented.

[0027] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which implements the method described in any implementation manner in the above-mentioned first aspect when executed by a processor.

[0028] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the target word determination method of some embodiments of the present disclosure helps to improve the accuracy of word determination in the title. Specifically, the short titles of related products are usually generated based on the seq2seq model. This model is generally trained using annotated title data. In other words, this model often only learns the data information of the text title itself. This single data information often makes the model unable to identify the real product words of the product well, resulting in the generation of short titles without focus and unable to meet the usage requirements of different business scenarios.

[0029] Based on this, the target word determination method in some embodiments of the present disclosure not only obtains the title data of the item, but also combines the display image of the item. The target word in the title can be determined by combining pictures and texts. Specifically, named entity recognition is first performed on the title data to obtain a potential candidate word set. Then, a similarity analysis is performed based on the candidate word set and the display image of the item. Thereby, the target word in the candidate word set is determined. By combining pictures and texts, more diverse and richer item information can be learned, which is conducive to improving the accuracy of determining the target word in the title. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0031] Figure 1 is a flow chart of some embodiments of the target word determination method disclosed in the present invention;

[0032] Figure 2 Schematic diagrams of some application scenarios of the target word determination method disclosed in the present invention;

[0033] Figure 3 are flow charts of some further embodiments of the target word determination method disclosed herein;

[0034] Figure 4 is a schematic diagram of the structure of some embodiments of the target word determination device disclosed in the present invention;

[0035] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0036] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0037] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0038] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0039] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0040] Figure 1 The process 100 of some embodiments of the target word determination method according to the present disclosure is shown. The method comprises the following steps:

[0041] Step 101, perform named entity recognition on the original title data of the item to obtain a candidate word set of a specified type.

[0042] In some embodiments, the execution subject of the target word determination method (such as an electronic device such as a server) can communicate with other electronic devices through a wired connection or a wireless connection. As an example, the user can send the original title data of the item to the execution subject through the terminal. Among them, the original title data can be data used to describe the item information. For example, it can be a long title used when displaying items in an application, such as XXX Winter Men's Thermal Underwear Set Plus Velvet Thickened Youth Autumn Clothes and Autumn Pants Student Thermal Clothes Set Men's Suit.

[0043] Here, when the execution subject receives the original title data, it can perform named entity recognition on it to identify the words of the specified type as candidate words, thereby obtaining a candidate word set. Among them, the specified type can be set according to actual needs. As an example, it can be one of the above-mentioned brand words, modifiers and product words. Among them, brand words can be words that represent product brands; modifiers can be words that describe product attribute characteristics (such as size, thickness, applicable population, season, etc.); and product words can be words that represent products, such as product names.

[0044] In some embodiments, the execution entity may adopt Figure 2 The named entity recognition model shown in is used to realize the recognition of candidate words. The named entity recognition model can be used to extract all words that may be words of a specified type from the input title data. Specifically, the execution subject can input the original title data of the item into the trained named entity recognition model to classify and annotate each word in the original title data. Afterwards, based on the annotation results, the words annotated as the identifier corresponding to the specified type are determined as candidate words to obtain a candidate word set.

[0045] As an example, the named entity recognition model can use the RoBERTa (A Robustly Optimized BERT) model. This model is usually an improved version of the BERT model, that is, the details of the general BERT model are optimized. The execution subject can input long titles, such as Internet celebrity cat bed, dog bed, cat bed, teddy, kitten, kitten, cat house, closed villa, autumn and winter pet supplies, pink ear cat + blanket m code (recommended for cats within 12 catties and dogs within 7 catties), into the model to obtain the vector representation (token embedding) of each word. Then, the embedding is input into the Token classifier to classify each word. Here, the BIO annotation method can be used. Among them, Pb can be used to represent the beginning of the product word, Pi can be used to represent the middle or end of the product word, and O can be used to represent non-product words. Then, potential product words (i.e., candidate words, Product words) can be identified from it, such as cat bed, dog bed, cat bed, teddy, kitten, kitten, cat house, pet, pink ear cat, blanket, cat, dog.

[0046] In some embodiments, the named entity recognition model can be obtained by training with sample data. The loss function of the model can be a cross entropy loss function:

[0047]

[0048] Where N is the number of samples in a training cycle (batch); T is the number of words in each sample; C is the number of categories; x i,j,k Indicates that the jth word of the i-th sample passes through the Token classifier and outputs the k-th category number; y i,j,k Indicates whether the jth word of the i-th sample belongs to the k-th category, 1 if yes, 0 if no; It represents the probability that the jth word of the i-th sample belongs to the k-th category.

[0049] Step 102, analyzing the display images of each word and item in the candidate word set to obtain a word vector set and an image feature vector respectively.

[0050] In some embodiments, the execution subject can analyze each word in the candidate word set and the display image of the item to obtain a word vector set and an image feature vector, respectively. That is, each word in the candidate word set is analyzed to obtain a word vector, thereby obtaining a word vector set. And the display image of the item is analyzed to obtain an image feature vector. As an example, the execution subject can obtain a word vector representation through the Encode encoder. The display image can be input into a commonly used image analysis model to obtain an image feature vector. The display image here can be an image representing item information, such as the main picture of a product in an application. The format, color, etc. of the image are not limited here.

[0051] Step 103, based on the word vector set and the image feature vector, determine the target word in the candidate word set to generate new title data for the item.

[0052] In some embodiments, based on the word vector set and image feature vector obtained in step 102, the execution subject can determine the target word in the candidate word set to generate new title data for the item. The target word here can also be set according to the actual situation, such as the core product word among all potential product words. That is, the word that characterizes the true attribute of the item (what the item is). The new title data is usually different from the original title data.

[0053] It should be noted that, under normal circumstances, the display image (such as the main picture of the product) is generally consistent with the item to be sold. At this time, for each word vector in the word vector set, the execution entity can calculate the similarity between the word vector and the image feature vector. Furthermore, the candidate word indicated by the word vector with the largest similarity value can be determined as the target word. It can be understood that by combining the display image, more item information can be obtained. Compared with the traditional reliance on title data alone, determining the core product words through image and text matching can help improve the accuracy of the determination results.

[0054] In some embodiments, the displayed image is sometimes inconsistent with the item. For example, when selling pet food, the main image may be a picture of a pet dog or cat. In this case, the image-text matching may not be accurate. Therefore, the item title and the main image can be fused to obtain richer product information. As an example, first, the execution entity can analyze the original title data to obtain a title feature vector. Then, the title feature vector can be fused with the image feature vector to obtain a composite feature vector. After that, the similarity between each word vector in the word vector set and the composite feature vector can be determined.

[0055] As an example, the execution entity can use Figure 2 The graphic model shown in is used to implement the process of the above steps 102 and 103. The graphic model here can be a pre-training model based on contrastive text-image pairs (i.e., CLIP, Contrastive Language-Image Pre-training). At this time, the execution subject can input the original title data, the candidate word set and the display image into the trained graphic model to output the matching degree of each candidate word and the display image.

[0056] Specifically, Figure 2As shown, first, the long title of the item can be input into the text encoder of the model to obtain the vector representation of the item title (i.e., sku name embedding). Next, the main image of the item can be input into the image encoder of the model to obtain the vector representation of the main image of the item (i.e., image embedding). At this time, the multi-head attention mechanism can be used to fuse the long title and the main image to obtain embedding i. After that, the potential product words identified by the named entity recognition model from the long title of the item can be input into the text encoder of the model to obtain the vector representation of each product word (i.e., Product embedding, P1, P2...). Then, the similarity between embedding i and Product embedding can be calculated, i.e., I*P1, I*P2... Finally, the most similar one (i.e., the one with the largest similarity value max) can be taken as the core product word (i.e., final product) of the item.

[0057] It should be noted that in actual application, the image-text model often does not know whether the main image of the item is consistent with the item. In the implementation of the present disclosure, by integrating the information of the main image and the title, when the main image is inconsistent with the item, information can be obtained from the title; conversely, information can be obtained from the main image. In the end, the model will automatically learn the main image and title, and contribute to the final recognition result. The prediction effect of this model will be much better than the effect learned by the main image alone, which can improve the accuracy of the model prediction results.

[0058] In some embodiments, the graph-text model can also be obtained by training with sample data. The loss function of the graph-text model here can be:

[0059]

[0060] x i,l = cosine(emba i , embp l );

[0061]

[0062] Among them, Q is the image embedding of the main image of the i-th sample; K and V are the vectors representing the sku name embedding of the long title of the i-th sample product, which are the same vector; T represents transposition; d k Indicates the dimension of the K vector; embp l The vector representing the product word represents the product embedding; y i,lIndicates whether the i-th sample belongs to the l-th product word. If it belongs to y i,l =1, otherwise y i,l =0; C represents the number of potential product words (candidate words); N is the number of samples in a training cycle (batch).

[0063] In some optional implementations, the execution entity may jointly train the above two models. That is, during the model training process, the graph-text model and the named entity recognition model may be jointly trained. At this time, the total loss function may be the sum of the loss function of the graph-text model and the cross entropy loss function of the named entity recognition model. That is, the total loss function is:

[0064] L=L r +L m ;

[0065] Here, when the value of the total loss function reaches a preset value, it can be determined that the training of the named entity recognition model and the image-text model is completed.

[0066] Through the above description, the target word determination method in some embodiments of the present disclosure not only obtains the title data of the item, but also combines the display image of the item. The target word in the title can be determined by combining pictures and texts. Specifically, named entity recognition is first performed on the title data to obtain a potential candidate word set. Then, a similarity analysis is performed based on the candidate word set and the display image of the item. Thereby, the target word in the candidate word set is determined. By combining pictures and texts, more diverse and richer item information can be learned, which is conducive to improving the accuracy of determining the target word in the title.

[0067] Continue to refer Figure 3 , which shows a process 300 of some other embodiments of the target word determination method according to the present disclosure. The method comprises the following steps:

[0068] Step 301, perform named entity recognition on the original title data of the item to obtain a candidate word set of a specified type.

[0069] Step 302: Analyze the display images of each word and item in the candidate word set to obtain a word vector set and an image feature vector, respectively.

[0070] Step 303: Determine the target word in the candidate word set based on the word vector set and the image feature vector.

[0071] The above process can be found in Figure 1 The descriptions of steps 101 to 103 in the embodiment are not repeated here.

[0072] Step 304, generating new title data for the item based on the original title data and the target word.

[0073] In some embodiments, based on the original title data and the target word determined in step 303, the execution entity can generate new title data for the item. The number of characters in the new title data is usually less than the number of characters in the original title data. The new title data here can also be set according to actual needs, such as a short title for the item, such as a brand word + modifier + product word. As an example, the execution entity can use the recognition results of the named entity recognition model to select brand words and modifiers from the original title data of the item. Then, the selected brand words and modifiers can be sorted with the target words to generate a short title for the item.

[0074] In some embodiments, the execution entity may adopt Figure 2 The pointer network model shown in the figure can be used to generate new title data. Specifically, the original title data can be segmented to obtain the original title word sequence. Then, the original title word sequence and the target word can be input into the trained pointer network model to predict and generate new title data for the item. In other words, the main function of the pointer network model is to generate a short title (i.e., a new title) for the item based on the long title of the item and the core product words extracted by the graphic model.

[0075] As an example, first, the long title of the item can be segmented using a commonly used segmentation method (such as jieba). Then, the segmented long title can be input into the encoder part of the pointer network model to obtain the long title vector representation. The encoder in this model can be a two-layer BiLSTM structure, that is, a bidirectional long short-term memory network. Then, the long title vector representation and the product word (target word) can be combined and input into the decoder of the pointer network model. Thus, the final short title is decoded.

[0076] For example, if the input long title is: XXX Winter Men's Thermal Underwear Set Plus Velvet Thickening Youth Autumn Clothes and Autumn Pants Student Thermal Clothes Set Men's Set; the input core product word is: underwear. Then the model output short title can be: Underwear Warm Men XXX.

[0077] The pointer network model here can also be trained by sample data. The loss function of this model can be:

[0078]

[0079] Where N represents the number of samples in a training cycle; Td represents the length of the target sentence (the output short title) (i.e., the decoder time step); loss td represents the prediction loss of the target sentence at the tdth time step (i.e., the tdth word); loss1 represents the loss of the first word; μ represents the weight, which can be 1 here.

[0080] It should be noted that in some business application scenarios, it is usually necessary to define the importance of each type of word, such as product words > brand words > modifier words. Therefore, in order to improve the accuracy of product words (i.e. target words), product words are usually given priority when generating short titles. In other words, the first word of a short title is often a product word.

[0081] Here,

[0082]

[0083]

[0084] Among them, P(w td ) indicates the final calculation of the tdth word w td probability; represents the attention probability of the i-th word in the source sentence (encoder, i.e. the long title after word segmentation) at the decoder time td; Represents the attention and before the tdth time step.

[0085] also,

[0086]

[0087] Among them, P v (w td ) is the model predicting the tdth word w of the target sentence td Probability in the vocabulary; p gen is the pointer probability, belonging to (0, 1); w i is the i-th word of the source sentence; if w td is not in the source sentence, then If td If it is not in the vocabulary, then P v (w td )=0, so the pointer network can solve the oov (out of vocabulary) problem.

[0088] It is understandable that before training the pointer network model, the sample original title in the sample data needs to be segmented to generate a sample word list. For example, all non-repeated words after segmentation can be used to form a word list. When predicting, each step is to output the word with the highest prediction probability in this word list.

[0089] The model predicts the vocabulary probability can be given by the following formula:

[0090]

[0091] Among them, V′, V, b, b′ are all learnable parameters; s tdOutput the hidden state for the decoder at the td-1 time step; For each time step h of the encoder encoder i With attention Weighted sum, that is

[0092]

[0093] in, b ptr are all learnable parameters; x td is the vector of the target tdth word.

[0094] in addition,

[0095] a t =softmax(e t );

[0096]

[0097] Among them, a t For attention; T , W h , W s , b attn All are learnable parameters; h i is the output hidden state of the source sentence at the i-th time step.

[0098] The target word determination method in the disclosed embodiment further enriches and improves the process of generating new titles for items. By generating new titles for items based on the determined target words and the original title data of the items, the accuracy of generating new titles can be improved. In particular, the embodiment of core product words in new titles can be improved. This improves the focus of short titles for items and meets the usage requirements of different business scenarios. This helps shorten the time it takes for users to search for items.

[0099] Further references Figure 4 , as a response to the above Figures 1 to 3 In order to realize the target word determination method shown in the figure, the present disclosure provides some embodiments of a target word determination device. These target word determination device embodiments are similar to Figures 1 to 3 The target word determination device can be specifically applied to various electronic devices.

[0100] like Figure 4As shown, a target word determination device 400 of some embodiments may include: an entity recognition unit 401, configured to perform named entity recognition on the original title data of the item to obtain a candidate word set of a specified type; an analysis unit 402, configured to analyze each word in the candidate word set and the display image of the item to obtain a word vector set and an image feature vector, respectively; a target word determination unit 403, configured to determine the target word in the candidate word set based on the word vector set and the image feature vector, so as to generate new title data for the item.

[0101] In some embodiments, the target word determination unit 403 may be further configured to perform similarity calculation on a word vector in the word vector set based on the word vector and the image feature vector; and determine the candidate word indicated by the word vector with the largest similarity value as the target word.

[0102] In some embodiments, the target word determination device 400 may also include a feature fusion unit (not shown in the figure), which is configured to analyze the original title data to obtain a title feature vector; fuse the title feature vector with the image feature vector to obtain a composite feature vector; and the target word determination unit 403 may be further configured to determine the similarity between the word vector and the composite feature vector.

[0103] In some embodiments, the analysis unit 402 can be further configured to input the original title data, candidate word set and display image into a trained graphic model to output the matching degree of each candidate word and the display image, wherein the graphic model is a pre-trained model based on contrasting text-image pairs.

[0104] In some embodiments, the entity recognition unit 401 can be further configured to input the original title data of the item into a trained named entity recognition model to classify and label each character in the original title data; based on the labeling results, the words labeled as the identifier corresponding to the specified type are determined as candidate words to obtain a candidate word set.

[0105] In some embodiments, the target word determination device 400 may also include a training unit (not shown in the figure), which is configured to jointly train the graph-text model and the named entity recognition model during the model training process, wherein the total loss function is the sum of the loss function of the graph-text model and the cross-entropy loss function of the named entity recognition model.

[0106] In some embodiments, the target word determination device 400 may also include a title generation unit (not shown in the figure), which is configured to generate new title data for the item based on the original title data and the target word, wherein the number of characters in the new title data is less than the number of characters in the original title data.

[0107] In some embodiments, the title generation unit can be further configured to perform word segmentation on the original title data to obtain an original title word sequence; input the original title word sequence and the target word into the trained pointer network model to predict and generate new title data for the item, wherein before training the pointer network model, the sample original title in the sample data is segmented to generate a sample vocabulary.

[0108] In some embodiments, the target word determination device 400 may also include a loss determination unit (not shown in the figure), which is configured to determine the loss value of the first word in the predicted sample new title, wherein the first word is the sample target word; determine the predicted loss values ​​of other words in the sample new title except the first word; perform weighted summation of the loss value of the first word and the loss values ​​of other words, and determine the average loss value based on the number of sample data in a training cycle as the loss function of the pointer network model.

[0109] It can be understood that the units recorded in the target word determination device 400 and the reference Figures 1 to 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the target word determination device 400 and the units included therein, and will not be described in detail here.

[0110] Reference below Figure 5 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0111] like Figure 5 As shown, the terminal device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the terminal device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0112] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a speaker, a vibrator, etc.; storage devices 508 including, for example, a disk, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0113] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0114] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0115] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0116] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: performs named entity recognition on the original title data of the item to obtain a candidate word set of a specified type; analyzes each word in the candidate word set and the display image of the item to obtain a word vector set and an image feature vector respectively; determines the target word in the candidate word set based on the word vector set and the image feature vector to generate new title data for the item.

[0117] In addition, computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0119] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including an entity recognition unit, an analysis unit, and a target word determination unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the entity recognition unit may also be described as a "unit for performing named entity recognition on the original title data of an item".

[0120] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0121] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which implements any of the above-mentioned target word determination methods when executed by a processor.

[0122] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A method for determining a target word, comprising: Perform named entity recognition on the original title data of the item to obtain a candidate word set of the specified type; Analyze each word in the candidate word set and the display image of the object to obtain a word vector set and an image feature vector respectively; Based on the word vector set and the image feature vector, a target word in the candidate word set is determined to generate new title data for the item.

2. The target word determination method according to claim 1, wherein: The determining the target word in the candidate word set based on the word vector set and the image feature vector comprises: For a word vector in the word vector set, performing similarity calculation based on the word vector and the image feature vector; The candidate word indicated by the word vector with the largest similarity value is determined as the target word.

3. The target word determination method according to claim 2, wherein: The method further comprises: Analyze the original title data to obtain a title feature vector; Merging the title feature vector with the image feature vector to obtain a composite feature vector; and The similarity calculation based on the word vector and the image feature vector includes: Determine the similarity between the word vector and the composite feature vector.

4. The target word determination method according to claim 3, wherein: The analyzing each word in the candidate word set and the display image of the object includes: The original title data, the candidate word set and the display image are input into a trained graphic model to output the matching degree between each candidate word and the display image, wherein the graphic model is a pre-trained model based on contrasting text-image pairs.

5. The target word determination method according to claim 4, wherein: The named entity recognition is performed on the original title data of the item to obtain a candidate word set of a specified type, including: Inputting the original title data of the item into the trained named entity recognition model to classify and label each word in the original title data; According to the marking results, the words marked as the identifier corresponding to the specified type are determined as candidate words to obtain a candidate word set.

6. The target word determination method according to claim 5, wherein: The method further comprises: During the model training process, the graph-text model and the named entity recognition model are jointly trained, wherein the total loss function is the sum of the loss function of the graph-text model and the cross entropy loss function of the named entity recognition model.

7. The target word determination method according to any one of claims 1 to 6, wherein: The method further comprises: New title data of the article is generated based on the original title data and the target word, wherein the number of characters of the new title data is smaller than the number of characters of the original title data.

8. The target word determination method according to claim 7, wherein: The step of generating new title data for the item according to the original title data and the target word includes: Performing word segmentation processing on the original title data to obtain an original title word sequence; The original title word sequence and the target word are input into the trained pointer network model to predict and generate new title data for the item, wherein before training the pointer network model, the sample original title in the sample data is segmented to generate a sample word list.

9. The target word determination method according to claim 8, wherein: The loss function of the pointer network model is obtained by the following method: Determine the loss value of the first word in the predicted sample new title, wherein the first word is the sample target word; Determine the prediction loss values ​​of other words in the sample new title except the first word; The loss value of the first word and the loss values ​​of other words are weightedly summed, and the average loss value is determined according to the number of sample data in one training cycle to serve as the loss function of the pointer network model.

10. A target word determination device, comprising: An entity recognition unit is configured to perform named entity recognition on the original title data of the item to obtain a candidate word set of a specified type; an analyzing unit, configured to analyze each word in the candidate word set and the display image of the object to obtain a word vector set and an image feature vector respectively; A target word determination unit is configured to determine a target word in the candidate word set based on the word vector set and the image feature vector, so as to generate new title data for the item.

11. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.

12. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 9.