Product recommendation method, device, electronic device and readable storage medium

By performing word segmentation and word vector processing on user needs and product information, and calculating similarity to achieve product recommendation, the problem of low recommendation accuracy in the existing technology is solved, and the efficiency and accuracy of recommendation are improved.

CN113850643BActive Publication Date: 2024-09-17CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111098177.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-09-17
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

Existing product recommendation methods have limitations in extracting key information because the product information and user information obtained are not detailed, resulting in problems such as low recommendation accuracy, long process time, and low efficiency.

Method used

By segmenting user demand information text and product information text into word vectors, using the Word2vec model to extract keywords, construct vectors, and calculate similarity to determine product recommendations. If the similarity reaches the threshold, all price data will be extracted to calculate the expected price. .

Benefits of technology

It improves the accuracy and efficiency of product recommendations, reduces the time of the recommendation process, and enhances the accuracy of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850643B
    Figure CN113850643B
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence, and discloses a product recommendation method, including: receiving demand information text and product information text; performing word segmentation operations on the product information text and the demand information text respectively, and converting the obtained product word set and demand word set into a product word vector set and a demand word vector set respectively; extracting keywords from the product word set and the demand word set to obtain a product keyword set and a demand keyword set; constructing a product vector according to the product keyword set, and constructing a demand vector according to the demand keyword set; calculating the similarity of the product vector and the demand vector using a similarity formula, and performing product and product price indexing and recommendation by comparing the similarity with a similarity threshold. In addition, the present invention also relates to blockchain technology, and demand information and product information can be stored in nodes of the blockchain. The present invention also proposes a product recommendation device, equipment and medium. The present invention can improve the accuracy of product recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a product recommendation method, device, electronic device and computer-readable storage medium. Background Art

[0002] As people's needs become more diverse, product suppliers are providing more and more products on the market. However, in order to provide users with a better consumer experience and increase the promotion of products, it is necessary to screen out users who are suitable for the products from a large number of users in order to make product recommendations.

[0003] At present, product recommendation mainly analyzes product information and user-given information to obtain key information, and then recommends products based on the key information. However, due to the lack of detailed product information and user-given information, there are limitations in extracting key information, which results in too many interference items in product recommendation, resulting in low accuracy of recommendation, and sometimes even requiring secondary recommendation, which prolongs the recommendation process and reduces the efficiency of recommendation. Summary of the invention

[0004] The present invention provides a product recommendation method, device and computer-readable storage medium, the main purpose of which is to solve the problem of low accuracy in product recommendation.

[0005] To achieve the above object, the present invention provides a product recommendation method, comprising:

[0006] Receive user's demand information text;

[0007] Extract product information text and corresponding product identification number of one of the products from the product system;

[0008] Performing word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively;

[0009] Convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively;

[0010] Extracting a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set;

[0011] Constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set;

[0012] Calculating the similarity between the product vector and the demand vector using a pre-built similarity formula, and determining whether the similarity is less than a preset similarity threshold;

[0013] If the similarity is less than the similarity threshold, return to the above step of extracting the product information text and the corresponding product identification number of one of the products from the product system;

[0014] If the similarity is greater than or equal to the preset similarity threshold, extracting all price data of the product from the product system according to the product identification number;

[0015] The estimated price of the product is calculated based on all the price data, and the product and the estimated price of the product are output.

[0016] Optionally, converting the product word set and the demand word set into a product word vector set and a demand word vector set respectively includes:

[0017] Using the product word set and the demand word set as word bags of a pre-built Word2vec model;

[0018] Using the bag of words and the Word2vec model, each product word in the product word set is converted into a word vector, and the word vectors of each word in all the product word sets are summarized to obtain a product word vector set;

[0019] The bag of words and the Word2vec model are used to convert each demand word in the demand word set into a word vector, and the word vectors of each word in all the demand word sets are summarized to obtain a demand word vector set.

[0020] Optionally, extracting a preset number of keywords from the product word set and the demand word set to obtain a product keyword set and a demand keyword set includes:

[0021] Removing stop words from the product word set and the demand word set respectively to obtain a product candidate keyword set and a demand candidate keyword set;

[0022] Sequentially slide the product candidate keyword set and the demand candidate keyword set using a pre-built smooth moving window, and combine the words covered by the smooth moving window to obtain a product windowed phrase group and a demand windowed phrase group corresponding to each slide;

[0023] Utilize the co-occurrence relationship predefined by the TextRank keyword extraction algorithm to construct a product candidate keyword graph for the product windowed phrase and a demand candidate keyword graph for the demand windowed phrase;

[0024] Calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph respectively using a pre-constructed iterative voting formula;

[0025] According to the voting scores, a preset number of words are output to obtain the product keyword set and the demand keyword set.

[0026] Optionally, the using of a pre-constructed iterative voting formula to respectively calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph includes:

[0027] The following iterative voting formula is used to calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph:

[0028]

[0029] Among them, WS(V i ) is the node V i The voting score, d is the damping coefficient, V j 、V k The product candidate keyword graph or the demand candidate keyword graph points to the node V i , and the node V i The node pointed to, ω ji For the V i , V j The weight of a directed edge between two nodes, ω jk For the V j , V k The weight of a directed edge between two nodes, InV i is the point to node V i The point set of this point, Out(V j ) is the node V j The set of points to point to.

[0030] Optionally, constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set, includes:

[0031] Sequentially obtain the vector of each product keyword in the product keyword set from the product word vector set, and concatenate the vectors of each product keyword head to tail according to the traversal order to obtain the product vector;

[0032] The vector of each demand keyword in the demand keyword set is obtained from the demand word vector set in turn, and the vector of each demand keyword is concatenated head to tail according to the traversal order to obtain the demand vector.

[0033] Optionally, extracting all price data of the product from the product system according to the product identification number of the product includes:

[0034] Traversing the identity numbers of all products in the product system according to the product identity number, and matching a product set having the same product identity number as the product;

[0035] The price data of each product in the product set is aggregated to obtain the total price data.

[0036] Optionally, calculating the estimated price of the product according to all the price data includes:

[0037] Remove the maximum price data and the minimum price data from all the price data;

[0038] Calculate the mean of the remaining price data to get the expected price of the product.

[0039] In order to solve the above problems, the present invention further provides a product recommendation device, the device comprising:

[0040] The information acquisition device is used to acquire the required information text of the receiving user; extract the product information text and the corresponding product identification number of one of the products from the product system;

[0041] An information processing device, used to perform word segmentation operations on the product information text and the demand information text respectively, to obtain a product word set and a demand word set respectively; convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively; extract a preset number of keywords from the product word set and the demand word set respectively, to obtain a product keyword set and a demand keyword set; construct a product vector according to the product word vector set and the product keyword set, and construct a demand vector according to the demand word vector set and the demand keyword set;

[0042] The product recommendation device is used to calculate the similarity between the product vector and the demand vector using a pre-built similarity formula, and when the similarity is greater than or equal to the preset similarity threshold, extract all price data of the product from the product system according to the product identity number; calculate the estimated price of the product based on all the price data, and output the product and the estimated price of the product.

[0043] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0044] at least one processor; and,

[0045] a memory communicatively connected to the at least one processor; wherein,

[0046] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the product recommendation method described above.

[0047] In order to solve the above-mentioned problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned product recommendation method.

[0048] The embodiment of the present invention performs word segmentation on the user's demand information text and product information text, uses the Word2vec model to convert each word in the demand information text and the product information text into a word vector form, and extracts a preset number of keywords in the demand information text and the product information text through a pre-built keyword extraction model to obtain the user's demand key information and the product key information, and uses the keywords in the extracted demand keyword set and product keyword set and the corresponding word vectors in the Word2vec model to form a demand vector and a product vector, and performs similarity calculation. When the similarity is greater than or equal to a preset similarity threshold, the product recommendation is completed, and all price data of the product is indexed from the data system, and the product price recommendation is completed by calculating the mean of all price data. Therefore, the product recommendation method, device, electronic device and computer-readable storage medium proposed in the present invention can solve the problem of low accuracy in product recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A flowchart of a product recommendation method provided by an embodiment of the present invention;

[0050] Figure 2 A functional module diagram of a product recommendation device provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of an electronic device for implementing the product recommendation method provided by an embodiment of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] The embodiment of the present application provides a product recommendation method. The execution subject of the product recommendation method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the product recommendation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0055] Reference Figure 1 , which is a flow chart of a product recommendation method provided by an embodiment of the present invention.

[0056] In this embodiment, the product recommendation method includes:

[0057] S1. Obtain the user's demand information text;

[0058] In an embodiment of the present invention, the demand information text may be a specific description of a desired product provided by a user. For example, if a user wants to buy a bicycle, the demand information text may be described as "I prefer mountain bikes, preferably with a Shimano transmission system, and integrated wheels are more in line with my aesthetic taste."

[0059] S2, extracting product information text and corresponding product identification number of one of the products from the product system;

[0060] In an embodiment of the present invention, the product system may be a system for each e-commerce platform to store specific information of all products on the platform. For example, the text content of a bicycle information of a certain brand on a certain e-commerce platform stored in the product system is "This bicycle is a mountain bike of the XX brand. The wheel hub adopts an integrated wheel with better stability and performance. The whole vehicle adopts 30-speed transmission with 3 front levels and 10 rear levels. The wheel hub size is 26 inches. It is unisex and suitable for people with a height of 155cm-180cm." The product system may also be a system for storing all transaction price data of products. For example, the price data of the same bicycle under a certain brand stored in the data system may be [1650, 1675, 1750, 1800, 1700], etc.

[0061] In an embodiment of the present invention, the product information number may be an identity number that each e-commerce platform uses to uniquely identify each product on the platform. For example, an e-commerce platform may use a 15-digit number to identify a product. The number of a bicycle under a certain bicycle brand may be [918277364098573]. Once the identity number is generated, other products cannot generate the same identity number as the product.

[0062] In the embodiment of the present invention, each product under the product system has a unique identification number, which is convenient for product indexing and product management.

[0063] S3, performing word segmentation operations on the product information text and the demand information text respectively, to obtain a product word set and a demand word set respectively;

[0064] In detail, the embodiment of the present invention uses a large amount of product information text and a large amount of demand information text to pre-build a segmentation dictionary according to grammatical requirements;

[0065] The word segmentation dictionary is used to perform word segmentation on the product information text and the demand information text to obtain the product word set and the demand word set respectively.

[0066] Among them, the word segmentation dictionary can be a word set constructed according to strict grammatical requirements using independent and non-repetitive words in a large number of product information texts. For example, the word segmentation dictionary constructed using product information texts may include, but is not limited to, the following words "mobile phone / pen / pencil / bicycle / hub / applicable / circumference / bearing / universal / communication / performance / fiber / bracelet / ".

[0067] For example, the above-mentioned “This bicycle is a mountain bicycle of XX brand, and the wheel hub adopts an integrated wheel with better stability and performance” can be divided into “This / bicycle / is / XX / brand / mountain / bicycle / , / the / wheel / hub / adopts / an / integrated / wheel / with / better / stability / performance / ” according to the word segmentation dictionary.

[0068] S4. According to the pre-built Word2vec model, the product word set and the demand word set are converted into a product word vector set and a demand word vector set respectively;

[0069] In an embodiment of the present invention, the pre-built Word2vec model is a word vector conversion tool for converting words into word vectors, wherein the Word2vec model consists of an input layer, a projection layer, and an output layer.

[0070] In detail, the product word set and the demand word set are converted into a product word vector set and a demand word vector set respectively according to the pre-built Word2vec model, including:

[0071] Using the product word set and the demand word set as word bags of a pre-built Word2vec model;

[0072] Using the bag of words and the Word2vec model, each product word in the product word set is converted into a word vector, and the word vectors of each word in all the product word sets are summarized to obtain a product word vector set;

[0073] The bag of words and the Word2vec model are used to convert each demand word in the demand word set into a word vector, and the word vectors of each word in all the demand word sets are summarized to obtain a demand word vector set.

[0074] S5, extracting a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set;

[0075] In an embodiment of the present invention, the keywords may be highly summarized words used to express the specific meaning of the text. For example, the keyword that can be extracted from the above-mentioned segmented text "This / bicycle / is / XX / brand / mountain / bicycle / , / the / wheel / hub / adopts / stable / performance / more / excellent / integrated / wheel / " is: "bicycle / mountain / integrated / wheel / ".

[0076] In detail, extracting a preset number of keywords from the product word set and the demand word set to obtain a product keyword set and a demand keyword set respectively includes:

[0077] Removing stop words from the product word set and the demand word set respectively to obtain a product candidate keyword set and a demand candidate keyword set;

[0078] Sequentially slide the product candidate keyword set and the demand candidate keyword set using a pre-built smooth moving window, and combine the words covered by the smooth moving window to obtain a product windowed phrase group and a demand windowed phrase group corresponding to each slide;

[0079] Utilize the co-occurrence relationship predefined by the TextRank keyword extraction algorithm to construct a product candidate keyword graph for the product windowed phrase and a demand candidate keyword graph for the demand windowed phrase;

[0080] Calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph respectively using a pre-constructed iterative voting formula;

[0081] According to the voting scores, a preset number of words are output to obtain the product keyword set and the demand keyword set.

[0082] In the embodiment of the present invention, the stop words may be words and punctuation marks that have no actual meaning in natural language.

[0083] In the embodiment of the present invention, the following iterative voting formula is used to calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph:

[0084]

[0085] Among them, WS(V i ) is the node V i The voting score, d is the damping coefficient, V j 、V k The product candidate keyword graph or the demand candidate keyword graph points to the node V i , and the node V i The node pointed to, ω ji For the V i , V j The weight of a directed edge between two nodes, ω jk For the V j , V k The weight of a directed edge between two nodes, InV i is the point to node V i The point set of this point, Out(V j ) is the node V j The set of points to point to.

[0086] S6. constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set;

[0087] In detail, the step of constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set, includes:

[0088] Sequentially obtain the vector of each product keyword in the product keyword set from the product word vector set, and concatenate the vectors of each product keyword head to tail according to the traversal order to obtain the product vector;

[0089] The vector of each demand keyword in the demand keyword set is obtained from the demand word vector set in turn, and the vector of each demand keyword is concatenated head to tail according to the traversal order to obtain the demand vector.

[0090] S7. Calculate the similarity between the product vector and the demand vector using a pre-built similarity formula, and determine whether the similarity is less than a preset similarity threshold;

[0091] In an embodiment of the present invention, the similarity formula is a similarity formula constructed based on cosine similarity. Cosine similarity can represent the similarity between vectors according to the cosine value of the angle between the vectors. For example, when the cosine value of two vectors is closer to 1, the similarity between the two vectors is higher; when the cosine value of two vectors is closer to -1, the similarity between the two vectors is the lowest.

[0092] In the embodiment of the present invention, the pre-constructed similarity formula is as follows:

[0093]

[0094] Among them, x is the product information vector, y is the user information vector, θ is the angle between the product information amount and the user information vector, and Sim(x,y) is the similarity between the product information vector and the user information vector.

[0095] If the similarity is less than the similarity threshold, return to the above step S2;

[0096] In an embodiment of the present invention, the preset similarity threshold is a similarity reference value used to determine whether this product is the product required by the user. For example, the preset threshold is set to 0.75. When the similarity between the product information vector and the user information vector is less than the preset similarity threshold, it indicates that this product is not the product required by the user.

[0097] S8. If the similarity is greater than or equal to the similarity threshold, extract all price data of the product from the product system according to the product identification number;

[0098] In detail, if the similarity is greater than or equal to the similarity threshold, extracting all price data of the product from the product system according to the product identification number includes:

[0099] Traversing the identity numbers of all products in the product system according to the product identity number, and matching a product set having the same product identity number as the product;

[0100] The price data of each product in the product set is aggregated to obtain the total price data.

[0101] S9. Calculate the estimated price of the product based on all the price data, and output the product and the estimated price of the product.

[0102] The embodiment of the present invention removes the maximum price data and the minimum price data from all the price data; calculates the mean of the remaining price data to obtain the estimated price of the product.

[0103] like Figure 2 , which is a functional module diagram of a product recommendation device provided by an embodiment of the present invention.

[0104] The product recommendation device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the product recommendation device 100 may include an information acquisition module 101, an information processing module 102 and a product recommendation module 103. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0105] In this embodiment, the functions of each module / unit are as follows:

[0106] The information acquisition module 101 is used to acquire the required information text of the receiving user; and extract the product information text and the corresponding product identification number of one of the products from the product system.

[0107] In an embodiment of the present invention, the demand information text may be a specific description of a desired product provided by a user. For example, if a user wants to buy a bicycle, the demand information text may be described as "I prefer mountain bikes, preferably with a Shimano transmission system, and integrated wheels are more in line with my aesthetic taste."

[0108] In an embodiment of the present invention, the product system may be a system for each e-commerce platform to store specific information of all products on the platform. For example, the text content of a bicycle information of a certain brand on a certain e-commerce platform stored in the product system is "This bicycle is a mountain bike of the XX brand. The wheel hub adopts an integrated wheel with better stability and performance. The whole vehicle adopts 30-speed transmission with 3 front levels and 10 rear levels. The wheel hub size is 26 inches. It is unisex and suitable for people with a height of 155cm-180cm." The product system may also be a system for storing all transaction price data of products. For example, the price data of the same bicycle under a certain brand stored in the data system may be [1650, 1675, 1750, 1800, 1700], etc.

[0109] In an embodiment of the present invention, the product information number may be an identity number that each e-commerce platform uses to uniquely identify each product on the platform. For example, an e-commerce platform may use a 15-digit number to identify a product. The number of a bicycle under a certain bicycle brand may be [918277364098573]. Once the identity number is generated, other products cannot generate the same identity number as the product.

[0110] In the embodiment of the present invention, each product under the product system has a unique identification number, which is convenient for product indexing and product management.

[0111] The information processing module 102 is used to perform word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively; convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively; extract a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set; construct a product vector based on the product word vector set and the product keyword set, and construct a demand vector based on the demand word vector set and the demand keyword set.

[0112] In detail, the information processing module 102 described in the embodiment of the present invention pre-builds a word segmentation dictionary based on grammatical requirements using a large amount of product information texts and a large amount of demand information texts; and uses the word segmentation dictionary to perform word segmentation on the product information text and the demand information text to obtain the product word set and the demand word set, respectively.

[0113] Among them, the word segmentation dictionary can be a word set constructed according to strict grammatical requirements using independent and non-repetitive words in a large number of product information texts. For example, the word segmentation dictionary constructed using product information texts may include, but is not limited to, the following words "mobile phone / pen / pencil / bicycle / hub / applicable / circumference / bearing / universal / communication / performance / fiber / bracelet / ".

[0114] For example, the above-mentioned “This bicycle is a mountain bicycle of XX brand, and the wheel hub adopts an integrated wheel with better stability and performance” can be divided into “This / bicycle / is / XX / brand / mountain / bicycle / , / the / wheel / hub / adopts / an / integrated / wheel / with / better / stability / performance / ” according to the word segmentation dictionary.

[0115] In an embodiment of the present invention, the pre-built Word2vec model is a word vector conversion tool for converting words into word vectors, wherein the Word2vec model consists of an input layer, a projection layer, and an output layer.

[0116] In detail, the product word set and the demand word set are converted into a product word vector set and a demand word vector set respectively according to the pre-built Word2vec model, including:

[0117] Using the product word set and the demand word set as word bags of a pre-built Word2vec model;

[0118] Using the bag of words and the Word2vec model, each product word in the product word set is converted into a word vector, and the word vectors of each word in all the product word sets are summarized to obtain a product word vector set;

[0119] The bag of words and the Word2vec model are used to convert each demand word in the demand word set into a word vector, and the word vectors of each word in all the demand word sets are summarized to obtain a demand word vector set.

[0120] In an embodiment of the present invention, the keywords may be highly summarized words used to express the specific meaning of the text. For example, the keyword that can be extracted from the above-mentioned segmented text "This / bicycle / is / XX / brand / mountain / bicycle / , / the / wheel / hub / adopts / stable / performance / more / excellent / integrated / wheel / " is: "bicycle / mountain / integrated / wheel / ".

[0121] In detail, extracting a preset number of keywords from the product word set and the demand word set to obtain a product keyword set and a demand keyword set respectively includes:

[0122] Removing stop words from the product word set and the demand word set respectively to obtain a product candidate keyword set and a demand candidate keyword set;

[0123] Sequentially slide the product candidate keyword set and the demand candidate keyword set using a pre-built smooth moving window, and combine the words covered by the smooth moving window to obtain a product windowed phrase group and a demand windowed phrase group corresponding to each slide;

[0124] Utilize the co-occurrence relationship predefined by the TextRank keyword extraction algorithm to construct a product candidate keyword graph for the product windowed phrase and a demand candidate keyword graph for the demand windowed phrase;

[0125] Calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph respectively using a pre-constructed iterative voting formula;

[0126] According to the voting scores, a preset number of words are output to obtain the product keyword set and the demand keyword set.

[0127] In the embodiment of the present invention, the stop words may be words and punctuation marks that have no actual meaning in natural language.

[0128] In the embodiment of the present invention, the following iterative voting formula is used to calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph:

[0129]

[0130] Among them, WS(V i ) is the node V i The voting score, d is the damping coefficient, V j 、Vk The product candidate keyword graph or the demand candidate keyword graph points to the node V i , and the node V i The node pointed to, ω ji For the V i , V j The weight of a directed edge between two nodes, ω jk For the V j , V k The weight of a directed edge between two nodes, InV i is the point to node V i The point set of this point, Out(V j ) is the node V j The set of points to point to.

[0131] In detail, the step of constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set, includes:

[0132] Sequentially obtain the vector of each product keyword in the product keyword set from the product word vector set, and concatenate the vectors of each product keyword head to tail according to the traversal order to obtain the product vector;

[0133] The vector of each demand keyword in the demand keyword set is obtained from the demand word vector set in turn, and the vector of each demand keyword is concatenated head to tail according to the traversal order to obtain the demand vector.

[0134] The product recommendation module 103 is used to calculate the similarity between the product vector and the demand vector using a pre-built similarity formula, and when the similarity is greater than or equal to the similarity threshold, extract all price data of the product from the product system according to the product identity number; calculate the estimated price of the product based on all the price data, and output the product and the estimated price of the product.

[0135] In an embodiment of the present invention, the similarity formula is a similarity formula constructed based on cosine similarity. Cosine similarity can represent the similarity between vectors according to the cosine value of the angle between the vectors. For example, when the cosine value of two vectors is closer to 1, the similarity between the two vectors is higher; when the cosine value of two vectors is closer to -1, the similarity between the two vectors is the lowest.

[0136] In the embodiment of the present invention, the pre-constructed similarity formula is as follows:

[0137]

[0138] Among them, x is the product information vector, y is the user information vector, θ is the angle between the product information amount and the user information vector, and Sim(x,y) is the similarity between the product information vector and the user information vector.

[0139] In an embodiment of the present invention, the preset similarity threshold is a similarity reference value used to determine whether this product is the product required by the user. For example, the preset threshold is set to 0.75. When the similarity between the product information vector and the user information vector is less than the preset similarity threshold, it indicates that this product is not the product required by the user.

[0140] In detail, if the similarity is greater than or equal to the similarity threshold, all price data of the product are extracted from the product system according to the product identification number of the product, including:

[0141] Traversing the identity numbers of all products in the product system according to the product identity number, and matching a product set having the same product identity number as the product;

[0142] The price data of each product in the product set is aggregated to obtain the total price data.

[0143] The embodiment of the present invention removes the maximum price data and the minimum price data from all the price data; calculates the mean of the remaining price data to obtain the estimated price of the product.

[0144] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a product recommendation method provided by an embodiment of the present invention.

[0145] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a product recommendation program.

[0146] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a product recommendation program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0147] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can be used not only to store application software and various types of data installed in the electronic device, such as the code of a product recommendation program, but also to temporarily store data that has been output or is to be output.

[0148] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0149] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0150] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0151] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0152] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0153] The product recommendation program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0154] Receive user's demand information text;

[0155] Extract product information text and corresponding product identification number of one of the products from the product system;

[0156] Performing word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively;

[0157] Convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively;

[0158] Extracting a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set;

[0159] Constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set;

[0160] Calculating the similarity between the product vector and the demand vector using a pre-built similarity formula, and determining whether the similarity is less than a preset similarity threshold;

[0161] If the similarity is less than the similarity threshold, return to the above step of extracting the product information text and the corresponding product identification number of one of the products from the product system;

[0162] If the similarity is greater than or equal to the similarity threshold, extracting all price data of the product from the product system according to the product identification number;

[0163] The estimated price of the product is calculated based on all the price data, and the product and the estimated price of the product are output.

[0164] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0165] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0166] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0167] Receive user's demand information text;

[0168] Extract product information text and corresponding product identification number of one of the products from the product system;

[0169] Performing word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively;

[0170] Convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively;

[0171] Extracting a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set;

[0172] Constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set;

[0173] Calculating the similarity between the product vector and the demand vector using a pre-built similarity formula, and determining whether the similarity is less than a preset similarity threshold;

[0174] If the similarity is less than the similarity threshold, return to the above step of extracting the product information text and the corresponding product identification number of one of the products from the product system;

[0175] If the similarity is greater than or equal to the similarity threshold, extracting all price data of the product from the product system according to the product identification number;

[0176] The estimated price of the product is calculated based on all the price data, and the product and the estimated price of the product are output.

[0177] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0178] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0179] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0180] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0181] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0182] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0183] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0184] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A product recommendation method, characterized in that: The method comprises: Receive user's demand information text; Extract product information text and corresponding product identification number of one of the products from the product system; Performing word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively; Convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively; Extracting a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set; Constructing a product vector according to the product word vector set and the product keyword set, and constructing a demand vector according to the demand word vector set and the demand keyword set; Calculating the similarity between the product vector and the demand vector using a pre-built similarity formula, and determining whether the similarity is less than a preset similarity threshold; If the similarity is less than the similarity threshold, return to the above step of extracting the product information text and the corresponding product identification number of one of the products from the product system; If the similarity is greater than or equal to the similarity threshold, extracting all price data of the product from the product system according to the product identification number; Calculate the estimated price of the product based on all the price data, and output the product and the estimated price of the product; Among them, the extracting of a preset number of keywords from the product word set and the demand word set to obtain the product keyword set and the demand keyword set respectively includes: removing stop words from the product word set and the demand word set respectively to obtain the product candidate keyword set and the demand candidate keyword set; sequentially sliding the product candidate keyword set and the demand candidate keyword set using a pre-constructed smooth moving window, and combining the words covered by the smooth moving window to obtain the product windowed phrase group and the demand windowed phrase group corresponding to each sliding; using the co-occurrence relationship predefined by the TextRank keyword extraction algorithm to respectively construct the product candidate keyword word graph of the product windowed phrase group and the demand candidate keyword word graph of the demand windowed phrase group; using a pre-constructed iterative voting formula to respectively calculate the voting score of each node in the product candidate keyword word graph and the demand candidate keyword word graph; outputting a preset number of words according to the voting score to obtain the product keyword set and the demand keyword set; The method of using a pre-constructed iterative voting formula to respectively calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph comprises: using the following iterative voting formula to calculate the voting score of each node in the product candidate keyword graph and the demand candidate keyword graph: ; in, For Node The voting score, is the damping coefficient, The product candidate keyword graph or the demand candidate keyword graph points to the node , and the node Pointing to the node, For the , The weight of a directed edge between two nodes, For the , The weight of a directed edge between two nodes, Point to the node The point set, For Node The set of points to point to.

2. The product recommendation method according to claim 1, characterized in that: The converting the product word set and the demand word set into a product word vector set and a demand word vector set respectively includes: Using the product word set and the demand word set as word bags of a pre-built Word2vec model; Using the bag of words and the Word2vec model, each product word in the product word set is converted into a word vector, and the word vectors of each word in all the product word sets are summarized to obtain a product word vector set; The bag of words and the Word2vec model are used to convert each demand word in the demand word set into a word vector, and the word vectors of each word in all the demand word sets are summarized to obtain a demand word vector set.

3. The product recommendation method according to claim 1, characterized in that: The constructing of the product vector according to the product word vector set and the product keyword set, and the constructing of the demand vector according to the demand word vector set and the demand keyword set, include: Sequentially obtain the vector of each product keyword in the product keyword set from the product word vector set, and concatenate the vectors of each product keyword head to tail according to the traversal order to obtain the product vector; The vector of each demand keyword in the demand keyword set is obtained from the demand word vector set in turn, and the vector of each demand keyword is concatenated head to tail according to the traversal order to obtain the demand vector.

4. The product recommendation method according to claim 1, characterized in that: The extracting all price data of the product from the product system according to the product identification number includes: Traversing the identity numbers of all products in the product system according to the product identity number, and matching a product set having the same product identity number as the product; The price data of each product in the product set is aggregated to obtain the total price data.

5. The product recommendation method according to claim 1, characterized in that: The step of calculating the estimated price of the product according to all the price data includes: Remove the maximum price data and the minimum price data from all the price data; Calculate the mean of the remaining price data to get the expected price of the product.

6. A product recommendation device, used to implement the product recommendation method according to any one of claims 1 to 5, characterized in that: The device comprises: The information acquisition module is used to acquire the required information text of the receiving user; extract the product information text and the corresponding product identification number of one of the products from the product system; An information processing module is used to perform word segmentation operations on the product information text and the demand information text respectively to obtain a product word set and a demand word set respectively; convert the product word set and the demand word set into a product word vector set and a demand word vector set respectively; extract a preset number of keywords from the product word set and the demand word set respectively to obtain a product keyword set and a demand keyword set; construct a product vector according to the product word vector set and the product keyword set, and construct a demand vector according to the demand word vector set and the demand keyword set; The product recommendation module is used to calculate the similarity between the product vector and the demand vector using a pre-built similarity formula, and when the similarity is greater than or equal to a preset similarity threshold, extract all price data of the product from the product system according to the product identity number; calculate the estimated price of the product based on all the price data, and output the product and the estimated price of the product.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the product recommendation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the product recommendation method according to any one of claims 1 to 5 is implemented.