Commodity recommendation method and device, equipment and medium

By segmenting and analyzing the grammatical structure of product titles, candidate phrases that meet the similarity criteria are selected as matching keywords, solving the problem of unstandardized product titles on independent websites and achieving more accurate product recommendations.

CN115907928BActive Publication Date: 2025-11-21GUANGZHOU HUANJU SHIDAI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211737299.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-11-21
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In the context of e-commerce on independent websites, product titles are freely edited by merchants without clear editing guidelines, making it difficult to extract keywords from product titles and affecting the accuracy of product recommendations.

Method used

By segmenting the product title into words, constructing a candidate phrase set, determining the grammatical relationships and structures between the word elements in the candidate phrases, calculating the similarity with the product title, and selecting candidate phrases that meet the preset conditions as matching keywords for product recommendation.

Benefits of technology

It improves the accuracy of product recommendations, enabling multi-dimensional matching of product characteristics and ensuring the precision of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115907928B_ABST
    Figure CN115907928B_ABST
Patent Text Reader

Abstract

The application relates to a commodity recommendation method and device, equipment and medium in the e-commerce technical field. The method comprises the following steps: obtaining a commodity title of a commodity, constructing a corresponding candidate phrase set after performing word segmentation on the commodity title; determining whether there is a grammatical relationship between word elements in each candidate phrase in the candidate phrase set; when the grammatical relationship exists, determining a grammatical structure to which the corresponding grammatical relationship belongs; determining the similarity between each candidate phrase belonging to the same grammatical structure and the commodity title; and screening out the candidate phrase with the similarity satisfying a preset condition as a matching keyword of the commodity for commodity recommendation for each grammatical structure. The application combines the grammatical information of phrases to deeply mine multi-dimensional keywords of commodities for commodity recommendation, and can improve the accuracy of recommended commodities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of e-commerce technology, and in particular to a product recommendation method and the corresponding apparatus, computer equipment, and computer-readable storage medium. Background Technology

[0002] Product conversion rate is one of the core metrics that sellers focus on for profitability, and product recommendations are a powerful tool for improving this rate. For consumers, product recommendations allow them to directly access recommended products without searching, reducing time costs and enhancing the shopping experience. For sellers, product recommendations increase product exposure, promote transactions, and boost revenue.

[0003] The usual method for recommending products based on keywords is to consider whether the keywords are matched to determine the corresponding products to recommend. However, in the e-commerce scenario of independent websites, product titles are freely edited by merchants without clear editing guidelines. Therefore, extracting the corresponding keywords from the product titles becomes particularly difficult.

[0004] In view of the challenges of product recommendation, the applicant has made corresponding explorations. Summary of the Invention

[0005] The primary objective of this application is to solve at least one of the aforementioned problems by providing a product recommendation method and corresponding apparatus, computer equipment, and computer-readable storage medium.

[0006] To achieve the various objectives of this application, the following technical solution is adopted:

[0007] A product recommendation method provided for one of the purposes of this application includes the following steps:

[0008] Obtain the product title, segment the product title into words, and construct a corresponding set of candidate phrases;

[0009] Determine whether there is a grammatical relationship between the lexical units in each candidate phrase in the candidate phrase set. If a grammatical relationship exists, determine the grammatical structure to which the corresponding grammatical relationship belongs.

[0010] Determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title;

[0011] For each grammatical structure, candidate phrases whose similarity meets preset conditions are selected as matching keywords for the product and used for product recommendation.

[0012] In a further embodiment, the product title is obtained, and a corresponding candidate phrase set is constructed after word segmentation of the product title, including the following steps:

[0013] The product title is obtained, and a preset word extraction window is used to slide and extract words from the product title with various movement steps to obtain various corresponding word segmentation phrases;

[0014] Each of the segmented phrases is summarized to form a candidate phrase set;

[0015] In a further embodiment, the product title is obtained, and a preset word-capturing window is used to slide and capture words from the product title with various movement steps to obtain corresponding word segmentation phrases, including the following steps:

[0016] Get the product title;

[0017] The first word segmentation sequence is obtained by moving the word extraction window by the first step length, where the first step length is smaller than the window size of the word extraction window;

[0018] The word extraction window is moved with a second step length to extract words from the product title to obtain a second word segmentation sequence. The second step length is equal to the window size of the word extraction window.

[0019] The third word segmentation sequence is obtained by moving the word extraction window by a third step length, where the third step length is greater than the window size of the word extraction window.

[0020] In a further embodiment, it is determined whether there is a grammatical relationship between the lexical units in each candidate phrase in the candidate phrase set. When a grammatical relationship exists, the grammatical structure to which the corresponding grammatical relationship belongs is determined, including the following steps:

[0021] A pre-defined multi-path classification model is used to extract the deep semantic information of candidate phrases by taking a single candidate phrase from the candidate phrase set as input, and obtain the corresponding semantic feature vector.

[0022] Based on the semantic feature vector, the first classifier of the multi-path classification model determines whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set;

[0023] When the prediction result of the first classifier is that there is a grammatical relationship, the grammatical structure between the words in the candidate phrase is determined by the second classifier of the multi-path classification model based on the semantic feature vector of the corresponding candidate phrase.

[0024] In a further embodiment, determining the similarity between each candidate phrase belonging to the same grammatical structure and the product title includes the following steps:

[0025] A pre-defined text encoding model is used to extract the deep semantic information corresponding to each candidate phrase and product title that belong to the same grammatical structure, and to obtain the text encoding vector of each candidate phrase and the text encoding vector of the product title.

[0026] Calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

[0027] In a further embodiment, after selecting candidate phrases whose similarity meets preset conditions as matching keywords for each grammatical structure, the following steps are also included:

[0028] Obtain matching keywords for the target product and other products;

[0029] The similarity score between the target product and other products is obtained by summing the number of matching keywords belonging to the same grammatical structure as the target product and the weight of the corresponding grammatical structure, and calculating the ratio of the median value to the total number of matching keywords of the target product and other products.

[0030] Other products with similar ratings that meet preset conditions are selected as recommended products for the target product.

[0031] In a further embodiment, before using a pre-defined multi-path classification model with a single candidate phrase from the candidate phrase set as input, the following steps are also included:

[0032] A single phrase sample and its supervision label are obtained from the prepared training set. The phrase sample contains multiple words. The supervision label represents whether there is a grammatical relationship between the words in the phrase sample. When the supervision label represents that there is a grammatical relationship between the words in the phrase sample, the supervision label also contains a grammatical structure representing the relationship between the words in the corresponding phrase sample.

[0033] The phrase samples are input into a multi-path classification model to extract the deep semantic information corresponding to the phrase samples and obtain the corresponding semantic feature vectors.

[0034] Based on the semantic feature vector, the first classifier predicts the corresponding first inference result;

[0035] When the supervision label represents the grammatical relationship between the lexical units in the phrase sample, the corresponding second inference result is predicted by the second classifier based on the semantic feature vector.

[0036] Using the supervision labels of the phrase samples, when the supervision labels represent that there is a grammatical relationship between the lexical units in the phrase samples, the first loss value corresponding to the first inference result and the second inference result is determined accordingly; otherwise, the second loss value of the first inference result is determined. When the first loss value or the second loss value does not reach the corresponding preset threshold, the weights of the multi-path classification model are updated, and other phrase samples are called to carry out iterative training until the multi-path classification model converges.

[0037] On the other hand, a product recommendation device provided to meet one of the purposes of this application includes a set construction module, a grammar determination module, a similarity determination module, and a keyword filtering module. The set construction module is used to obtain the product title, segment the product title into words, and construct a corresponding set of candidate phrases. The grammar determination module is used to determine whether there is a grammatical relationship between the words in each candidate phrase in the candidate phrase set, and when a grammatical relationship exists, to determine the grammatical structure to which the corresponding grammatical relationship belongs. The similarity determination module is used to determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title. The keyword filtering module is used to filter candidate phrases whose similarity meets preset conditions for each grammatical structure as matching keywords for the product recommendation.

[0038] In a further embodiment, the set construction module includes: a sliding word extraction submodule, used to obtain the product title of the product, and to slide to extract words from the product title using a preset word extraction window with multiple movement steps to obtain corresponding multiple word segmentation phrases; and a phrase summarization submodule, used to summarize each word segmentation phrase to form a candidate phrase set.

[0039] In a further embodiment, the sliding word extraction submodule includes: a title acquisition unit for acquiring the product title; a first word extraction unit for moving the word extraction window by a first step length to extract words from the product title to obtain a first word segmentation sequence, wherein the first step length is less than the window size of the word extraction window; a second word extraction unit for moving the word extraction window by a second step length to extract words from the product title to obtain a second word segmentation sequence, wherein the second step length is equal to the window size of the word extraction window; and a third word extraction unit for moving the word extraction window by a third step length to extract words from the product title to obtain a third word segmentation sequence, wherein the third step length is greater than the window size of the word extraction window.

[0040] In a further embodiment, the grammar determination module includes: an inference feature representation submodule, used to extract deep semantic information of candidate phrases by using a preset multi-path classification model with a single candidate phrase in the candidate phrase set as input, and obtain corresponding semantic feature vectors; a binary classification submodule, used to determine whether there is a grammatical relationship between the lexical units in each candidate phrase in the candidate phrase set based on the semantic feature vectors and the first classifier of the multi-path classification model; and a multi-classification submodule, used to determine the grammatical structure between the lexical units in the candidate phrase based on the semantic feature vectors of the corresponding candidate phrases and the second classifier of the multi-path classification model when the prediction result of the first classifier is that there is a grammatical relationship.

[0041] In a further embodiment, the similarity determination module includes: a text encoding submodule, used to extract deep semantic information corresponding to each candidate phrase and the product title that belong to the same grammatical structure using a preset text encoding model, and obtain the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title; and a vector similarity submodule, used to calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

[0042] In a further embodiment, after the keyword filtering module, the system further includes: a keyword acquisition submodule, used to acquire matching keywords corresponding to the target product and other products; a similarity score calculation submodule, used to sum the weights of the matching keywords of the target product and other products that belong to the same grammatical structure, obtain an intermediate value, calculate the ratio of the intermediate value to the total number of matching keywords of the target product and other products, and obtain a similarity score between the target product and other products; and a product filtering submodule, used to filter out other products whose similarity scores meet preset conditions as recommended products of the target product.

[0043] In a further embodiment, before the inference feature representation submodule, the system further includes: a sample acquisition submodule, used to acquire a single phrase sample and its supervision label from a prepared training set, wherein the phrase sample contains multiple lexical units, and the supervision label characterizes whether there is a grammatical relationship between the lexical units in the phrase sample; when the supervision label characterizes that there is a grammatical relationship between the lexical units in the phrase sample, the supervision label also includes a grammatical structure characterizing the grammatical structure to which the lexical units in the corresponding phrase sample belong; a training feature representation submodule, used to input the phrase sample into a multi-path classification model, extract the deep semantic information corresponding to the phrase sample, and obtain the corresponding semantic feature vector; and a first classification submodule, used to predict the semantic feature vector using a first classifier. The system includes: a first inference result; a second classification submodule, used to predict the corresponding second inference result based on the semantic feature vector using a second classifier when the supervision label indicates that there is a grammatical relationship between the lexical units in the phrase sample; and an iterative training submodule, used to determine the first loss value corresponding to the first inference result and the second inference result when the supervision label indicates that there is a grammatical relationship between the lexical units in the phrase sample, otherwise, to determine the second loss value of the first inference result. When the first loss value or the second loss value does not reach the corresponding preset threshold, the system updates the weights of the multi-path classification model and continues to call other phrase samples to perform iterative training until the multi-path classification model converges.

[0044] In another aspect, a computer device provided for one of the purposes of this application includes a central processing unit and a memory, the central processing unit being used to invoke and run a computer program stored in the memory to perform the steps of the product recommendation method described in this application.

[0045] In another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the described product recommendation method, which, when invoked by a computer, performs the steps included in the method.

[0046] The technical solution of this application has many advantages, including but not limited to the following aspects:

[0047] This application constructs a candidate phrase set by segmenting the product title, determines whether there is a grammatical relationship between the words in each candidate phrase, and if so, identifies the grammatical structure to which the relationship belongs. Furthermore, it determines the similarity between each candidate phrase belonging to the same grammatical structure and the product title. Based on this, candidate phrases whose similarity to each grammatical structure meets preset conditions are selected as matching keywords for product recommendations. This effectively mines candidate phrases with multiple grammatical structures from the product title as matching keywords, thus accurately representing the characteristics of the corresponding product with multi-dimensional matching keywords, which helps ensure the accuracy of product recommendations based on matching keywords. Attached Figure Description

[0048] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0049] Figure 1 This is a flowchart illustrating a typical embodiment of the product recommendation method of this application;

[0050] Figure 2 This is a schematic diagram illustrating the process of constructing a candidate phrase set in an embodiment of this application;

[0051] Figure 3 This is a flowchart illustrating the process of determining whether there is a grammatical relationship between word elements in a candidate phrase and the grammatical structure to which they belong, as described in an embodiment of this application.

[0052] Figure 4 This is a schematic diagram of a multi-path classification model in an embodiment of this application;

[0053] Figure 5 This is a flowchart illustrating the process of determining the similarity between candidate phrases in the candidate phrase set and product titles in an embodiment of this application;

[0054] Figure 6This is a flowchart illustrating the process of selecting recommended products for the target product in an embodiment of this application;

[0055] Figure 7 This is a schematic diagram of the training process of the multi-path classification model in the embodiments of this application;

[0056] Figure 8 This is a schematic block diagram of the product recommendation device of this application;

[0057] Figure 9 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation

[0058] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0059] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0060] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0061] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include radio frequency receivers, pagers, internet / intranet access, web browsers, notepads, calendars, and / or GPS (Global Positioning System) receivers; and conventional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.

[0062] The hardware referred to by the names "server," "client," and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, execute the instructions in the program, and interact with the input and output devices to complete specific functions.

[0063] It should be noted that the concept of "server" used in this application can also be extended to apply to server clusters. Based on network deployment principles as understood by those skilled in the art, the servers should be logically divided; physically, these servers can be independent yet accessible through interfaces, or they can be integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method described in this application.

[0064] One or more of the technical features of this application, unless explicitly specified herein, can be deployed on a server and accessed by a client remotely calling the online service interface provided by the server, or can be directly deployed and run on a client for access.

[0065] Unless otherwise specified, the neural network models referenced or potentially referenced in this application may be deployed on a remote server and invoked remotely on the client, or deployed on a client with the capability to invoke directly. In some embodiments, when running on the client, the corresponding intelligence may be acquired through transfer learning in order to reduce the requirements on the client's hardware resources and avoid excessive consumption of the client's hardware resources.

[0066] Unless otherwise specified, all data involved in this application may be stored remotely on a server or on a local terminal device, as long as it is suitable for use by the technical solution of this application.

[0067] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.

[0068] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should be aware of such modifications.

[0069] One product recommendation method of this application can be programmed into a computer program product and deployed on a client or server for execution. For example, in an exemplary application scenario of this application, it can be deployed on the server of an e-commerce platform. In this way, the method can be executed by human-computer interaction with the process of the computer program product through a graphical user interface by accessing the interface opened after the computer program product is running.

[0070] Please see Figure 1 The product recommendation method of this application, in its typical embodiment, includes the following steps:

[0071] Step S1100: Obtain the product title, segment the product title into words, and construct the corresponding candidate phrase set;

[0072] In e-commerce platform applications, each listed product can be processed as a relatively independent unit of information. Merchants on the e-commerce platform are responsible for publishing, maintaining, and updating these units, and consumers can browse and place orders. The online store can be an independent website, maintaining its own product database. When a user on an online store needs to list a product, they enter the product information on the corresponding product listing page on the e-commerce platform and submit it to the backend server. This information is then linked to the unique identifier of the target product and stored in the product database. The product information includes product images and product text. The product images visually demonstrate the product's effect and appearance, while the product text includes a product title, product details, and other descriptive text.

[0073] The product title refers to the product description information provided in text form that is associated with the listed product. In practice, the product title generally uses concise language to accurately describe any specific information about the listed product, such as its name, brand, material, function, use, and selling points.

[0074] In one embodiment, the product title can be obtained from the product database of an online store based on the product's unique identifier. The unique identifier is a unique identifier set by software engineers to distinguish various products on the e-commerce platform, so as to facilitate the storage and retrieval of product information.

[0075] When segmenting the product title, for Chinese product titles, algorithms such as Jieba, Stanford, Hanlp, KCWS, THULAC, N-Gram, and deep learning can be used. For product titles in English, French, German, or other natural languages ​​where words are separated by spaces, simple space segmentation is sufficient, or algorithms such as Keras, Spacy, Gensim, NNTK, N-Gram, and deep learning can be used.

[0076] For example, the product title is segmented using the Jieba word segmentation algorithm in search engine mode to obtain the corresponding segmented text. Those skilled in the art will understand that Jieba's precise segmentation mode performs the most accurate segmentation of the product title, producing the corresponding segmented text, which avoids redundant data. However, the search engine mode, based on the precise mode, further segments long words in the segmented text, resulting in finer-grained segmentation.

[0077] In one embodiment, after segmenting the product title, a corresponding segmentation sequence is obtained, which includes multiple segmented texts ordered according to the word order of the product title. Each segmented text is a semantically complete, smallest indivisible unit. Further, each segmented text in the segmentation sequence is combined with one or more subsequent segmented texts to form a candidate phrase. The number of segmented texts combined for each candidate phrase can be flexibly set by those skilled in the art, but two are recommended. All combined candidate phrases constitute a candidate phrase set. It can be understood that by combining multiple segmented texts obtained from segmenting the product title, a sufficient number of candidate phrases are ensured in the candidate phrase set.

[0078] Step S1200: Determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set. If there is a grammatical relationship, determine the grammatical structure to which the corresponding grammatical relationship belongs.

[0079] A deep learning model based on deep semantic learning, suitable for extracting semantic features of text in the field of Natural Language Processing (NLP), can be used. This model is followed by a first classifier suitable for binary classification tasks and a second classifier suitable for multi-class classification tasks. The deep learning model extracts the deep semantic information corresponding to each word in the candidate phrase set. After obtaining the semantic feature vector corresponding to each candidate phrase, the semantic feature vector corresponding to each candidate phrase is passed through the first classifier connected to the deep learning model to determine whether there is a grammatical relationship between the words in each candidate phrase set. The grammatical relationship refers to the mutual relationship between the constituent units in the grammatical structure, such as subject-predicate relationship, coordinate relationship, modifier-head relationship, verb-object relationship, verb-complement relationship, etc.

[0080] When it is determined that there is a grammatical relationship between the lexical units of the corresponding candidate phrases in the candidate phrase set, the semantic feature vector corresponding to the candidate phrase is obtained. Based on the semantic feature vector corresponding to the candidate phrase and the second classifier connected to the deep learning model, the grammatical structure to which the grammatical relationship belongs is further determined. The grammatical structure refers to subject-predicate, coordinate, modifier-head, verb-object, verb-complement, etc.

[0081] The deep learning model mentioned is such as LSTM, Bi LSTM, or the open-source framework SentenceTransformers, which provides a large number of pre-trained Transformer models that have converged, such as BERT, RoBERTa, XLM-RoBERTa, and MPNet. The specific selection can be flexibly chosen by those skilled in the art.

[0082] It is understood that the deep learning model is followed by the first classifier and the second classifier. It can refer to step S1100 to prepare phrases as samples and label them with supervision labels to indicate whether there is a grammatical relationship between the words in the phrase samples. When a grammatical relationship exists, the supervision label also includes a representation of the grammatical structure between the words in the corresponding phrase samples. Thus, the deep learning model under this model structure is trained in a supervised manner using phrase samples and their supervision labels. After training to convergence, it learns the ability to perform corresponding feature representations based on the input phrases, perform binary classification to determine whether there is a grammatical relationship between the words in the phrase samples, and perform multi-class classification to determine the grammatical structure between the words in the phrase samples with grammatical relationships.

[0083] Step S1300: Determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title;

[0084] By adopting a text encoding model suitable for extracting text features in the NLP field, each candidate phrase and product title belonging to the same grammatical structure can be used as input to the text encoding model to extract the corresponding deep semantic information, and obtain the vectorized feature representation of each candidate phrase and the vectorized feature representation of the product title.

[0085] Since each candidate phrase and the product title have their corresponding vectorized feature representations, i.e., equivalent quantization transformation is achieved, the similarity between each candidate phrase and the product title can be represented by calculating the similarity between their corresponding vectorized feature representations. The similarity calculation can be implemented using any of the large-scale vector retrieval engines such as Faiss, ElasticSearch, and Milvus, or by using any existing algorithm such as cosine similarity, inner product, Manhattan distance, or Euclidean distance.

[0086] The text encoding model mentioned, such as the BERT model, is a relatively excellent neural network model capable of processing temporal information in text and can be applied to the text extraction work in this application. Similarly, the Electra model can achieve the same or similar results as the BERT model with a lower number of parameters, so it is also recommended. The text encoding model used in this application is pre-trained to convergence before being used. Since the training process of models such as Transformer and BERT is known to those skilled in the art, its training process will not be described in detail.

[0087] Step S1400: For each grammatical structure, select candidate phrases whose similarity meets the preset conditions as matching keywords for the product and use them for product recommendation.

[0088] In one embodiment, candidate phrases with a similarity greater than a preset threshold are selected as matching keywords for each grammatical structure. The preset threshold can be flexibly set by those skilled in the art. It is understood that the selection based on the preset threshold, obtaining a certain number of matching keywords for each grammatical structure of the product, facilitates subsequent matching based on the corresponding matching keywords between pairs of products, determining an appropriate number of products for recommendation.

[0089] In another embodiment, for each grammatical structure, the candidate phrase with the highest similarity is selected as the matching keyword for the product. It is understood that the matching keywords selected based on the highest similarity are highly accurate, which is beneficial for subsequent matching based on the corresponding matching keywords between pairs of products, accurately determining the appropriate product for recommendation.

[0090] As can be seen from the typical embodiments of this application, the technical solution of this application has many advantages, including but not limited to the following aspects:

[0091] This application constructs a candidate phrase set by segmenting the product title, determines whether there is a grammatical relationship between the words in each candidate phrase, and if so, identifies the grammatical structure to which the relationship belongs. Furthermore, it determines the similarity between each candidate phrase belonging to the same grammatical structure and the product title. Based on this, candidate phrases whose similarity to each grammatical structure meets preset conditions are selected as matching keywords for product recommendations. This effectively mines candidate phrases with multiple grammatical structures from the product title as matching keywords, thus accurately representing the characteristics of the corresponding product with multi-dimensional matching keywords, which helps ensure the accuracy of product recommendations based on matching keywords.

[0092] Please see Figure 2 In a further embodiment, step S1100, obtaining the product title and constructing a corresponding candidate phrase set after segmenting the product title, includes the following steps:

[0093] Step S1110: Obtain the product title, and use a preset word extraction window to slide and extract words from the product title with various movement steps to obtain various corresponding word segmentation phrases;

[0094] The product title can be obtained from the online store's product database based on the product's unique identifier. Then, the N-Gram algorithm is used to segment the product title into words. Specifically, a word-capturing window of a preset size slides across the product title step by step according to a predetermined movement size, retrieving segmented phrases from the window each time. It can be understood that the movement size controls the distance the word-capturing window moves each time, and the size of the word-capturing window controls the number of tokens in the segmented phrases retrieved from the window.

[0095] In one embodiment, a preset word-capturing window is used to slide and capture words from the product title with various movement steps to obtain corresponding word-segmented phrases, including the following steps:

[0096] Step S1111: Move the word extraction window by the first step length to extract words from the product title to obtain the first word segmentation sequence. The first step length is smaller than the window size of the word extraction window.

[0097] The size of the word-capturing window can be flexibly set by those skilled in the art, so that the word-capturing window contains two or more word elements. It is recommended to include two word elements. For example, the word-capturing window size can contain four or five Chinese characters, two or three English words, etc.

[0098] It is understandable that, since the length of the first step is smaller than the window size of the word extraction window, there is overlap between the word phrases in the first word segmentation sequence obtained by the corresponding word extraction.

[0099] Step S1112: Move the word extraction window with a second step length to extract words from the product title to obtain a second word segmentation sequence. The second step length is equal to the window size of the word extraction window.

[0100] It is understandable that, since the second step length is equal to the window size of the word extraction window, the word phrases in the second word segmentation sequence obtained by the corresponding word extraction do not overlap and are relatively continuous.

[0101] Step S1113: Move the word extraction window with a third step length to extract words from the product title to obtain the third word segmentation sequence. The third step length is greater than the window size of the word extraction window.

[0102] It is understandable that, since the third step is longer than the window size of the word-capturing window, the word phrases in the third word segmentation sequence obtained by the corresponding word capture are relatively discontinuous.

[0103] Step S1120: Summarize each of the segmented phrases to form a candidate phrase set;

[0104] Using a preset word-capturing window, words are captured by sliding across the product title with the first, second, and third step lengths, respectively. The resulting overlapping, non-overlapping, continuous, and discontinuous word segments are then summarized to form a candidate phrase set.

[0105] In this embodiment, by using a word-capturing window to slide and capture words from the product title with various movement steps, a candidate phrase set is formed by summarizing various word-segmented phrases, which can efficiently and conveniently extract rich word-segmented phrases from the product title.

[0106] Please see Figure 3 In a further embodiment, step S1200, determining whether there is a grammatical relationship between the lexical units in each candidate phrase of the candidate phrase set, and when a grammatical relationship exists, determining the grammatical structure to which the corresponding grammatical relationship belongs, includes the following steps:

[0107] Step S1210: Using a pre-defined multi-path classification model, a single candidate phrase in the candidate phrase set is used as input to extract the deep semantic information of the candidate phrase and obtain the corresponding semantic feature vector.

[0108] Please see Figure 4The multi-path classification model prepared in this application includes a feature representation layer, a first classifier, and a second classifier. The feature representation layer can be a deep learning model based on deep semantic learning in the field of NLP (Natural Language Processing) that is suitable for extracting semantic features of text, such as BiLSTM, BERT, etc. The first classifier and the second classifier are respectively connected to the feature representation layer, and thus share the feature representation output by the feature representation layer. The first classifier is suitable for binary classification tasks and can adopt one or more fully connected layers or MLP (Multi-Layer Perceptron). The second classifier is suitable for multi-class classification tasks and can adopt one or more fully connected layers or MLP (Multi-Layer Perceptron).

[0109] A pre-defined multi-path classification model is adopted, with a single candidate phrase in the candidate phrase set as input. In one embodiment, the feature representation layer of the multi-path classification model is BiLSTM. The feature representation layer BiLSTM extracts the deep semantic information of the candidate phrases in both positive and negative directions. For each word in the candidate phrase, the corresponding positive feature representation and negative feature representation are obtained and concatenated to form the semantic feature vector.

[0110] Step S1220: Based on the semantic feature vector, determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set by the first classifier of the multi-path classification model;

[0111] The first classifier of the multi-path classification model takes the feature representation output by the feature representation layer, i.e. the semantic feature vector, as input, and performs binary classification mapping on the semantic feature vector corresponding to each candidate phrase in the candidate phrase set, thereby obtaining the first classification probability corresponding to the existence of grammatical relations between the words in each candidate phrase and the second classification probability corresponding to the absence of grammatical relations. By determining the maximum of the first classification probability and the second classification probability, the existence of grammatical relations is determined accordingly.

[0112] Step S1230: When the prediction result of the first classifier is that there is a grammatical relationship, the grammatical structure between the word elements in the candidate phrase is determined by the second classifier of the multi-path classification model based on the semantic feature vector of the corresponding candidate phrase.

[0113] The second classifier of the multi-path classification model takes the semantic feature vector, which is the feature representation output by the feature representation layer, of the candidate phrases with grammatical relationships between corresponding word elements as input, and performs multi-class mapping on the semantic feature vectors of the candidate phrases to obtain the classification probability corresponding to each grammatical structure. The grammatical structure corresponding to the one with the highest classification probability is determined as the grammatical structure to which the word elements in the candidate phrase belong.

[0114] In this embodiment, a multi-path classification model is used to extract the semantic feature vector corresponding to each candidate phrase in the candidate phrase set. A binary classification mapping is then performed on the semantic feature vector of each candidate phrase to determine whether a grammatical relationship exists between the word elements in each candidate phrase. When a grammatical relationship exists, a multi-path classification mapping is performed on the semantic feature vector of the corresponding candidate phrase to determine the grammatical structure to which the word elements belong in that candidate phrase. The multi-path classification model can quickly and accurately determine candidate phrases with grammatical relationships between their word elements, and the grammatical structure to which the word elements belong.

[0115] Please see Figure 5 In a further embodiment, step S1300, determining the similarity between each candidate phrase belonging to the same grammatical structure and the product title, includes the following steps:

[0116] Step S1310: Use a preset text encoding model to extract the deep semantic information corresponding to each candidate phrase and product title that belong to the same grammatical structure, and obtain the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

[0117] By adopting a text encoding model suitable for extracting text features in the NLP field, each candidate phrase and product title belonging to the same grammatical structure can be used as input to the text encoding model to extract the corresponding deep semantic information, and obtain the vectorized feature representation of each candidate phrase and the vectorized feature representation of the product title.

[0118] The text encoding model mentioned, such as the BERT model, is a relatively excellent neural network model capable of processing temporal information in text and can be applied to the text extraction work in this application. Similarly, the Electra model can achieve the same or similar results as the BERT model with a lower number of parameters, so it is also recommended. The text encoding model used in this application is pre-trained to convergence before being used. Since the training process of models such as Transformer and BERT is known to those skilled in the art, its training process will not be described in detail.

[0119] Step S1320: Calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

[0120] Since each candidate phrase and the product title have their corresponding vectorized feature representations, i.e., equivalent quantization transformation is achieved, the similarity between each candidate phrase and the product title can be represented by calculating the similarity between the vectorized feature representations of each candidate phrase and the product title. The similarity calculation can be implemented by any of the large-scale vector retrieval engines such as Faiss, ElasticSearch, and Milvus, or by any existing algorithm such as cosine similarity, inner product, Manhattan distance, and Euclidean distance.

[0121] In this embodiment, by employing a text encoding model, the text encoding vector corresponding to each candidate phrase and the text encoding vector corresponding to the product title can be accurately encoded based on the deep semantic information corresponding to each candidate phrase and the product title. This allows for the calculation of the similarity between the text encoding vectors corresponding to each candidate phrase and the product title, thus representing the similarity between each candidate phrase and the product title. This process is efficient and convenient, ensuring the accuracy of the similarity.

[0122] Please see Figure 6 In a further embodiment, after step S1400, which involves selecting candidate phrases whose similarity meets preset conditions for each grammatical structure as matching keywords for the product, the following steps are also included:

[0123] Step S1500: Obtain matching keywords for the target product and other products;

[0124] The target product can be a product found in a user's search, a product added to the user's shopping cart, a product the user has searched for, or a product the user has purchased, etc. It can be used as the target product whenever product recommendations are needed. Of course, to ensure that each listed product can be recommended at any time, one product can be selected as the target product at a time.

[0125] You can refer to steps S1100-1400 to obtain the matching keywords for each product, associate the matching keywords with the unique identifier of the corresponding product and store them in the product database, so that they can be retrieved and called when product recommendation is needed.

[0126] Step S1510: Sum the number of matching keywords of the target product and other products that belong to the same grammatical structure and the weight of the corresponding grammatical structure to obtain an intermediate value. Calculate the ratio of the intermediate value to the total number of matching keywords of the target product and other products to obtain the similarity score between the target product and other products.

[0127] It is understandable that the matching keywords corresponding to the multiple grammatical structures of a product can accurately represent the product in multiple dimensions. Therefore, by comparing the similarity of the matching keywords between two products, it can be determined whether the two products are similar.

[0128] An example formula for calculating the similarity score between the target product and other products is shown below:

[0129]

[0130] Where: Score is the similarity score between the target product and other products, w is the weight of the grammatical structure, A∩B is the number of matching keywords of the target product and other products belonging to the same grammatical structure, and A∪B is the total number of matching keywords of the target product and other products.

[0131] Based on the importance of each grammatical structure, a corresponding weight is preset for each grammatical structure. For example, the attributive-head relationship mainly comes from product words and their modifiers, which can be regarded as quite important, so a high weight is set. The specific value of the weight can be set by those skilled in the art as needed.

[0132] Step S1520: Select other products with similar ratings that meet the preset conditions as recommended products for the target product.

[0133] In one embodiment, when multiple products can be recommended as target products, other products with similarity scores exceeding a preset threshold are selected as recommended products for the target product. The preset threshold can be flexibly set by those skilled in the art.

[0134] In another embodiment, when it is necessary to accurately recommend a product as the target product, other products with the highest similarity scores are selected as the recommended products for the target product.

[0135] In this embodiment, recommended products for the target product are determined by calculating the similarity score between the matching keywords corresponding to the target product and other products. The calculation is based on matching keywords of multiple syntactic structures of the target product and matching keywords of multiple syntactic structures corresponding to other products. Furthermore, during the calculation process, the number of matching keywords belonging to the same syntactic structure as the target product and other products is matched with the weight of the corresponding syntactic structure. Therefore, the final similarity score can accurately reflect the similarity between the target product and other products.

[0136] Please see Figure 7 In a further embodiment, before step S1210, which uses a preset multi-path classification model with a single candidate phrase from the candidate phrase set as input, the following steps are also included:

[0137] Step S2200: Obtain a single phrase sample and its supervision label from the prepared training set. The phrase sample contains multiple word elements. The supervision label represents whether there is a grammatical relationship between word elements in the phrase sample. When the supervision label represents that there is a grammatical relationship between word elements in the phrase sample, the supervision label also contains a grammatical structure representing the relationship between word elements in the corresponding phrase sample.

[0138] Referring to step S1100, a candidate phrase set for multiple products can be obtained. Each candidate phrase in the candidate phrase set is used as a phrase sample. The supervision label of each phrase sample is manually labeled. Then, each phrase sample and its supervision label can be summarized to construct a training set.

[0139] Step S2210: Input the phrase sample into the multi-path classification model, extract the deep semantic information corresponding to the phrase sample, and obtain the corresponding semantic feature vector;

[0140] A pre-defined multi-path classification model is adopted, with a single candidate phrase in the candidate phrase set as input. In one embodiment, the feature representation layer of the multi-path classification model is BiLSTM. The feature representation layer BiLSTM extracts the deep semantic information of the candidate phrases in both positive and negative directions. For each word in the candidate phrase, the corresponding positive feature representation and negative feature representation are obtained and concatenated to form the semantic feature vector.

[0141] Step S2220: Based on the semantic feature vector, the first classifier predicts the corresponding first inference result;

[0142] The first classifier of the multi-path classification model takes the feature representation output by the feature representation layer, i.e. the semantic feature vector, as input, and performs binary classification mapping on the semantic feature vector to obtain the first classification probability corresponding to the existence of grammatical relationship between word elements in the phrase sample and the second classification probability corresponding to the absence of grammatical relationship. By determining the maximum of the first classification probability and the second classification probability as the first inference result, the existence of grammatical relationship is determined accordingly.

[0143] Step S2230: When the supervised label represents that there is a grammatical relationship between the lexical units in the phrase sample, the corresponding second inference result is predicted by the second classifier based on the semantic feature vector;

[0144] The second classifier of the multi-path classification model takes the semantic feature vector, which is the feature representation output by the feature representation layer, of phrase samples with grammatical relationships between corresponding word units as input, and performs multi-class mapping on the semantic feature vector of the phrase samples to obtain the classification probability corresponding to each grammatical structure. The grammatical structure corresponding to the one with the highest classification probability is determined as the second inference result.

[0145] Step S2240: Using the supervision label of the phrase sample, when the supervision label indicates that there is a grammatical relationship between the words in the phrase sample, the first loss value corresponding to the first inference result and the second inference result is determined accordingly; otherwise, the second loss value of the first inference result is determined. When the first loss value or the second loss value does not reach the corresponding preset threshold, the weight of the multi-way classification model is updated, and other phrase samples are called to carry out iterative training until the multi-way classification model converges.

[0146] The preset cross-entropy loss function is invoked. This function can be flexibly set by those skilled in the art based on prior knowledge or experimental experience. Based on the supervision label of the phrase sample, the corresponding cross-entropy loss value is calculated. When the supervision label indicates that there is a grammatical relationship between the words in the phrase sample, the cross-entropy loss values ​​corresponding to the first inference result and the second inference result are added together as the first loss value. Otherwise, the cross-entropy loss value of the first inference result is used as the second loss value. When the first loss value and the second loss value reach the corresponding preset threshold, it indicates that the multi-way classification model has been trained to a convergent state, and the model training can be terminated. When the first loss value or the second loss value reaches the corresponding preset threshold, it indicates that the model has not converged. Therefore, the model is updated with gradients based on the corresponding first loss value or the second loss value. Usually, the weight parameters of each part of the model are corrected through backpropagation to make the model closer to convergence. Then, the next phrase sample in the training set is called to iteratively train the multi-way classification model until the multi-way classification model is trained to a convergent state.

[0147] This embodiment reveals the training process of the multi-path classification model. After training to convergence, the multi-path classification model performs corresponding feature representation based on the input phrase, performs binary classification to determine whether there is a grammatical relationship between the words in the phrase sample, and performs multi-path classification to determine the grammatical structure between the words in the phrase sample that have a grammatical relationship.

[0148] Please see Figure 8This invention provides a product recommendation device to meet one of the purposes of this application. It is a functional embodiment of the product recommendation method of this application. The device includes a set construction module 1100, a grammar determination module 1200, a similarity determination module 1300, and a keyword filtering module 1400. The set construction module 1100 is used to obtain the product title, segment the product title into words, and construct a corresponding set of candidate phrases. The grammar determination module 1200 is used to determine whether there is a grammatical relationship between the words in each candidate phrase in the candidate phrase set. When a grammatical relationship exists, it determines the grammatical structure to which the corresponding grammatical relationship belongs. The similarity determination module 1300 is used to determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title. The keyword filtering module 1400 is used to filter candidate phrases whose similarity meets preset conditions for each grammatical structure as matching keywords for the product recommendation.

[0149] In a further embodiment, the set construction module 1100 includes: a sliding word extraction submodule, used to obtain the product title of the product, and to slide to extract words from the product title with a preset word extraction window at various movement steps to obtain corresponding multiple word segmentation phrases; and a phrase summarization submodule, used to summarize each word segmentation phrase to form a candidate phrase set.

[0150] In a further embodiment, the sliding word extraction submodule includes: a title acquisition unit for acquiring the product title; a first word extraction unit for moving the word extraction window by a first step length to extract words from the product title to obtain a first word segmentation sequence, wherein the first step length is less than the window size of the word extraction window; a second word extraction unit for moving the word extraction window by a second step length to extract words from the product title to obtain a second word segmentation sequence, wherein the second step length is equal to the window size of the word extraction window; and a third word extraction unit for moving the word extraction window by a third step length to extract words from the product title to obtain a third word segmentation sequence, wherein the third step length is greater than the window size of the word extraction window.

[0151] In a further embodiment, the grammar determination module 1200 includes: an inference feature representation submodule, used to extract deep semantic information of candidate phrases by using a preset multi-path classification model with a single candidate phrase in the candidate phrase set as input, and obtain corresponding semantic feature vectors; a binary classification submodule, used to determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set based on the semantic feature vectors and the first classifier of the multi-path classification model; and a multi-classification submodule, used to determine the grammatical structure between the word elements in the candidate phrases based on the semantic feature vectors of the corresponding candidate phrases and the second classifier of the multi-path classification model when the prediction result of the first classifier is that there is a grammatical relationship.

[0152] In a further embodiment, the similarity determination module 1300 includes: a text encoding submodule, used to extract deep semantic information corresponding to each candidate phrase and the product title that belong to the same grammatical structure using a preset text encoding model, and obtain the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title; and a vector similarity submodule, used to calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

[0153] In a further embodiment, after the keyword filtering module 1400, the module further includes: a keyword acquisition submodule, used to acquire matching keywords corresponding to the target product and other products; a similarity score calculation submodule, used to sum the weights of the matching keywords of the target product and other products that belong to the same grammatical structure, obtain an intermediate value, calculate the ratio of the intermediate value to the total number of matching keywords of the target product and other products, and obtain a similarity score between the target product and other products; and a product filtering submodule, used to filter out other products whose similarity scores meet preset conditions as recommended products of the target product.

[0154] In a further embodiment, before the inference feature representation submodule, the system further includes: a sample acquisition submodule, used to acquire a single phrase sample and its supervision label from a prepared training set, wherein the phrase sample contains multiple lexical units, and the supervision label characterizes whether there is a grammatical relationship between the lexical units in the phrase sample; when the supervision label characterizes that there is a grammatical relationship between the lexical units in the phrase sample, the supervision label also includes a grammatical structure characterizing the grammatical structure to which the lexical units in the corresponding phrase sample belong; a training feature representation submodule, used to input the phrase sample into a multi-path classification model, extract the deep semantic information corresponding to the phrase sample, and obtain the corresponding semantic feature vector; and a first classification submodule, used to predict the semantic feature vector using a first classifier. The system includes: a first inference result; a second classification submodule, used to predict the corresponding second inference result based on the semantic feature vector using a second classifier when the supervision label indicates that there is a grammatical relationship between the lexical units in the phrase sample; and an iterative training submodule, used to determine the first loss value corresponding to the first inference result and the second inference result when the supervision label indicates that there is a grammatical relationship between the lexical units in the phrase sample, otherwise, to determine the second loss value of the first inference result. When the first loss value or the second loss value does not reach the corresponding preset threshold, the system updates the weights of the multi-path classification model and continues to call other phrase samples to perform iterative training until the multi-path classification model converges.

[0155] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 9The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a product recommendation method. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the product recommendation method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0156] In this embodiment, the processor is used to execute... Figure 8 The system defines the specific functions of each module and its sub-modules. The memory stores the program code and various data required to execute these modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the product recommendation device of this application. The server can call the server's program code and data to execute the functions of all sub-modules.

[0157] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the product recommendation method of any embodiment of this application.

[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).

[0159] In summary, this application combines the grammatical information of phrases to deeply mine multi-dimensional keywords for product recommendations, which can improve the accuracy of recommended products.

[0160] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0161] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A product recommendation method, characterized in that, Includes the following steps: Obtain the product title, segment the product title into words, and construct a corresponding set of candidate phrases; Determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set. When a grammatical relationship exists, determine the grammatical structure to which the corresponding grammatical relationship belongs. This includes using a pre-defined multi-path classification model with a single candidate phrase in the candidate phrase set as input to extract the deep semantic information of the candidate phrase and obtain the corresponding semantic feature vector. Based on the semantic feature vector, the first classifier of the multi-path classification model determines whether there is a grammatical relationship between the words in each candidate phrase in the candidate phrase set; when the prediction result of the first classifier is that there is a grammatical relationship, the second classifier of the multi-path classification model determines the grammatical structure between the words in the candidate phrase based on the semantic feature vector of the corresponding candidate phrase. Determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title; After selecting candidate phrases whose similarity meets preset conditions for each grammatical structure as matching keywords for the product and using them for product recommendation, the process further includes: obtaining matching keywords corresponding to the target product and other products; summing the number of matching keywords belonging to the same grammatical structure for the target product and other products according to the weight of the corresponding grammatical structure to obtain an intermediate value; calculating the ratio of the intermediate value to the total number of matching keywords for the target product and other products to obtain a similarity score between the target product and other products; and selecting other products whose similarity scores meet preset conditions as recommended products for the target product. The step of constructing a corresponding candidate phrase set after segmenting the product title includes: The product title is obtained, and a preset word extraction window is used to extract words from the product title with various movement steps to obtain corresponding word segmentation phrases. These steps include: moving the word extraction window with a first step length to extract words from the product title to obtain a first word segmentation sequence, where the first step length is less than the window size; moving the word extraction window with a second step length to extract words from the product title to obtain a second word segmentation sequence, where the second step length is equal to the window size; and moving the word extraction window with a third step length to extract words from the product title to obtain a third word segmentation sequence, where the third step length is greater than the window size. Each of the segmented phrases is combined to form a candidate phrase set.

2. The product recommendation method according to claim 1, characterized in that, Determining the similarity between each candidate phrase belonging to the same grammatical structure and the product title includes the following steps: A pre-defined text encoding model is used to extract the deep semantic information corresponding to each candidate phrase and product title that belong to the same grammatical structure, and to obtain the text encoding vector of each candidate phrase and the text encoding vector of the product title. Calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

3. The product recommendation method according to claim 1, characterized in that, Before using a pre-defined multi-path classification model with a single candidate phrase from the candidate phrase set as input, the following steps are also included: A single phrase sample and its supervision label are obtained from the prepared training set. The phrase sample contains multiple words. The supervision label represents whether there is a grammatical relationship between the words in the phrase sample. When the supervision label represents that there is a grammatical relationship between the words in the phrase sample, the supervision label also contains a grammatical structure representing the relationship between the words in the corresponding phrase sample. The phrase samples are input into a multi-path classification model to extract the deep semantic information corresponding to the phrase samples and obtain the corresponding semantic feature vectors. Based on the semantic feature vector, the first classifier predicts the corresponding first inference result; When the supervision label represents the grammatical relationship between the lexical units in the phrase sample, the corresponding second inference result is predicted by the second classifier based on the semantic feature vector. Using the supervision labels of the phrase samples, when the supervision labels represent that there is a grammatical relationship between the lexical units in the phrase samples, the first loss value corresponding to the first inference result and the second inference result is determined accordingly; otherwise, the second loss value of the first inference result is determined. When the first loss value or the second loss value does not reach the corresponding preset threshold, the weights of the multi-path classification model are updated, and other phrase samples are called to carry out iterative training until the multi-path classification model converges.

4. A product recommendation device, characterized in that, include: The set construction module is used to obtain the product title, segment the product title into words, and construct the corresponding candidate phrase set; The grammar determination module is used to determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set. When a grammatical relationship exists, the module determines the grammatical structure to which the corresponding grammatical relationship belongs. This includes using a preset multi-path classification model with a single candidate phrase in the candidate phrase set as input to extract the deep semantic information of the candidate phrase and obtain the corresponding semantic feature vector. Based on the semantic feature vector, the first classifier of the multi-path classification model determines whether there is a grammatical relationship between the words in each candidate phrase in the candidate phrase set; when the prediction result of the first classifier is that there is a grammatical relationship, the second classifier of the multi-path classification model determines the grammatical structure between the words in the candidate phrase based on the semantic feature vector of the corresponding candidate phrase. The similarity determination module is used to determine the similarity between each candidate phrase belonging to the same grammatical structure and the product title; The keyword filtering module, used to filter candidate phrases whose similarity meets preset conditions for each grammatical structure as matching keywords for the product for product recommendation, further includes: obtaining matching keywords corresponding to the target product and other products; summing the number of matching keywords belonging to the same grammatical structure for the target product and other products according to the weight of the corresponding grammatical structure to obtain an intermediate value; calculating the ratio of the intermediate value to the total number of matching keywords for the target product and other products to obtain a similarity score between the target product and other products; and filtering other products whose similarity scores meet preset conditions as recommended products for the target product. The step of constructing a corresponding candidate phrase set after segmenting the product title includes: The product title is obtained, and a preset word extraction window is used to extract words from the product title with various movement steps to obtain corresponding word segmentation phrases. These steps include: moving the word extraction window with a first step length to extract words from the product title to obtain a first word segmentation sequence, where the first step length is less than the window size; moving the word extraction window with a second step length to extract words from the product title to obtain a second word segmentation sequence, where the second step length is equal to the window size; and moving the word extraction window with a third step length to extract words from the product title to obtain a third word segmentation sequence, where the third step length is greater than the window size. Each of the segmented phrases is combined to form a candidate phrase set.

5. The product recommendation device according to claim 4, characterized in that, The syntax determination module further includes: The reasoning feature representation submodule is used to extract the deep semantic information of a candidate phrase from a candidate phrase set by using a pre-defined multi-path classification model as input, and obtain the corresponding semantic feature vector. The binary classification submodule is used to determine whether there is a grammatical relationship between the word elements in each candidate phrase in the candidate phrase set based on the semantic feature vector and the first classifier of the multi-way classification model. The multi-classification submodule is used to determine the grammatical structure between the words in the candidate phrases based on the semantic feature vectors of the corresponding candidate phrases by the second classifier of the multi-classification model when the prediction result of the first classifier is that there is a grammatical relationship.

6. The product recommendation device according to claim 4, characterized in that, The similarity determination module further includes: The text encoding submodule is used to extract the deep semantic information corresponding to each candidate phrase and product title that belong to the same grammatical structure using a preset text encoding model, and to obtain the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title. The vector similarity submodule is used to calculate the similarity between the text encoding vector corresponding to each candidate phrase and the text encoding vector of the product title.

7. The product recommendation device according to claim 4, characterized in that, The set construction module includes: The sliding word extraction submodule is used to obtain the product title. It uses a preset word extraction window to slide and extract words from the product title with various movement steps to obtain various corresponding word segmentation phrases. The phrase aggregation submodule is used to aggregate each of the segmented phrases to form a candidate phrase set.

8. The product recommendation device according to claim 7, characterized in that, The sliding word extraction submodule includes: The title acquisition unit is used to acquire the product title; the first word extraction unit is used to move the word extraction window by a step length to extract words from the product title to obtain the first word segmentation sequence, wherein the step length is smaller than the window size of the word extraction window; The second word extraction unit is used to move the word extraction window by a second step size to extract words from the product title and obtain a second word segmentation sequence. The second step size is equal to the window size of the word extraction window. The third word extraction unit is used to move the word extraction window by a third step size to extract words from the product title and obtain the third word segmentation sequence. The third step size is greater than the window size of the word extraction window.

9. A computer device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 3.

10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 3, which, when invoked by a computer, executes the steps included in the corresponding method.

Citation Information

Patent Citations

  • Method, device and equipment for recommending information and computer readable medium

    CN114511382A

  • Commodity title abstract generation method and device, equipment and medium

    CN115203400A