Product recommendation method and device, electronic device and storage medium

By constructing a hash table and updating the parent node, the problem of high similarity calculation complexity in product recommendation is solved, and efficient and accurate product recommendations are achieved.

CN119648340BActive Publication Date: 2025-09-30CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411765336.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-09-30
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In the existing technology, the time complexity of similarity calculation in the product recommendation process is high, which affects the recommendation efficiency.

Method used

By constructing a product-user mapping hash table and a user-product mapping hash table, the preset parent node array is updated based on these hash tables to obtain the target parent node array, and the target product sequence of each user is determined according to the target parent node array and the user-product mapping hash table to make product recommendations.

Benefits of technology

The pertinence and accuracy of product recommendations are improved, and the product recommendation sequence for each user can be determined after one processing, which significantly improves the recommendation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648340B_ABST
    Figure CN119648340B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a product recommendation method and device, electronic device and storage medium, which belongs to the field of artificial intelligence technology and is applicable to the field of financial technology. The method includes: obtaining original product data, original user data of original users and user click behavior data, and product click popularity data; constructing a product-user mapping hash table and a user-product mapping hash table between the original product data and the original user data based on the product click popularity data and the user click behavior data; updating the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data; determining the target product sequence of each original user according to the target parent node array and the user-product mapping hash table; and recommending products based on the target product sequence. The embodiment of the present application can improve the efficiency of product recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology and is applicable to the field of financial technology, and in particular to a product recommendation method and device, electronic device and storage medium. Background Art

[0002] In the field of intelligent recommendation, the recommendation system can recommend corresponding content, such as articles, videos, products, etc., to target users based on the preferences of similar users. It can be applied to multiple scenarios. For example, in financial scenarios, business personnel can make financial product recommendations based on this.

[0003] However, in actual applications, when recommending products to each user, similarity calculations with other users are required to screen out the target recommended products. This process has a high time complexity, which affects the efficiency of product recommendations.

[0004] Therefore, how to improve the efficiency of product recommendations has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The main purpose of the embodiments of the present application is to propose a product recommendation method and device, an electronic device and a storage medium, aiming to improve the efficiency of product recommendation.

[0006] To achieve the above objectives, a first aspect of an embodiment of the present application provides a product recommendation method, the method comprising:

[0007] Obtaining original product data, original user data of the original user, and user click behavior data, and obtaining product click popularity data; wherein the user click behavior data is used to characterize the click behavior of the original user on the original product data;

[0008] Constructing a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data;

[0009] Constructing a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data;

[0010] Performing parent node updates on a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data;

[0011] Determine the target product sequence of each original user according to the target parent node array and the user-product mapping hash table;

[0012] Product recommendations are made based on the target product sequence.

[0013] In some embodiments, updating the parent nodes of a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array includes:

[0014] Perform product traversal on the product-user mapping hash table to obtain a product-user set;

[0015] Performing a union-find process on the product-user set based on the user-product mapping hash table to obtain a target user relationship tree;

[0016] The original parent node array is updated based on the target user relationship tree to obtain the target parent node array.

[0017] In some embodiments, performing a union-find process on the product-user set based on the user-product mapping hash table to obtain a target user relationship tree includes:

[0018] Performing user pair extraction on the product user set to obtain an original user relationship pair; wherein the original user relationship pair includes a first user and a second user;

[0019] Performing root node detection on the first user and the second user pair in the same original user relationship pair to obtain root node similarity and difference data; wherein the root node similarity and difference data indicates whether the root node of the first user and the root node of the second user in the same original user relationship pair are the same or different;

[0020] The original user relationship pairs are heuristically merged based on the user-product mapping hash table and the root node similarity and difference data to obtain the target user relationship tree.

[0021] In some embodiments, the heuristically merging the original user relationship pairs based on the user-product mapping hash table and the root node similarity and difference data to obtain the target user relationship tree includes:

[0022] If the root node difference data indicates that the root node of the first user is different from the root node of the second user, calculating the number of products in the user-product mapping hash table to obtain clicked product statistics; wherein the clicked product statistics include the number of clicks on the first product by the first user and the number of clicks on the second product by the second user;

[0023] Compare the number of clicks on the first product with the number of clicks on the second product to obtain user click quantity comparison data;

[0024] The relationship between the first user and the second user is adjusted according to the user click quantity comparison data to obtain the target user relationship tree.

[0025] In some embodiments, determining the target product sequence of each original user according to the target parent node array and the user-product mapping hash table includes:

[0026] For each of the original users, performing a root node query on the target parent node array based on the original user data to obtain target root node data;

[0027] A product query is performed on the user-product mapping hash table based on the target root node data to obtain the target product sequence.

[0028] In some embodiments, constructing a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data includes:

[0029] Sort the original product data based on the product click popularity data to obtain an original product sequence;

[0030] Performing product screening on the original product sequence to obtain a target product sequence;

[0031] Building an initial product hash table based on the target product sequence;

[0032] The initial product hash table is filled with data based on the user click behavior data and the original user data to obtain the product-user mapping hash table.

[0033] In some embodiments, constructing a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data includes:

[0034] Building an initial user hash table based on the original user data;

[0035] The initial user hash table is filled with data based on the user click behavior data and the original product data to obtain the user-product mapping hash table.

[0036] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a product recommendation device, comprising:

[0037] A data acquisition module is used to acquire original product data, original user data of original users, and user click behavior data, and obtain product click popularity data; wherein the user click behavior data is used to characterize the click behavior of the original user on the original product data;

[0038] A first hash table construction module is configured to construct a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data;

[0039] A second hash table construction module is used to construct a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data;

[0040] A parent node update module, configured to update a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data;

[0041] A product determination module, configured to determine a target product sequence for each original user according to the target parent node array and the user-product mapping hash table;

[0042] The target recommendation module is used to make product recommendations based on the target product sequence.

[0043] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0044] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect.

[0045] The product recommendation method and device, electronic device and storage medium proposed in the present application obtain original product data, original user data of original users and user click behavior data, and product click popularity data; and construct a hash table based on the product click popularity data and user click behavior data to obtain a product-user mapping hash table and a user-product mapping hash table between the original product data and the original user data, so as to efficiently mine the correlation between user preferences and product popularity, and then update the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; finally, determine the target product sequence of each original user according to the target parent node array and the user-product mapping hash table, and make product recommendations based on the target product sequence, which not only improves the pertinence and accuracy of product recommendations, but also determines the product recommendation sequence of each original user after one processing, thereby improving the efficiency of product recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flowchart of the product recommendation method provided in an embodiment of the present application;

[0047] Figure 2 yes Figure 1 Flowchart of step S102 in FIG.

[0048] Figure 3 yes Figure 1 Flowchart of step S103 in FIG.

[0049] Figure 4 yes Figure 1 Flowchart of step S104 in FIG.

[0050] Figure 5 yes Figure 4 Flowchart of step S402 in FIG.

[0051] Figure 6 yes Figure 5 Flowchart of step S503 in FIG.

[0052] Figure 7 yes Figure 1 Flowchart of step S105 in FIG.

[0053] Figure 8 This is a schematic diagram of the structure of the product recommendation device provided in an embodiment of the present application;

[0054] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0056] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0058] First, let’s analyze some of the terms used in this application:

[0059] Artificial intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0060] Hash Table: A hash table, also known as a hash table, accesses records by mapping key values ​​to locations in a table, speeding up lookups. Specifically, a hash table uses a hash function to calculate a hash value for each key value. This hash value is typically an integer and is used as an index into an array, enabling direct access to the record at that storage location. Because a hash function may map different key values ​​to the same hash value (i.e., a hash collision), hash tables require conflict resolution strategies, such as chain addressing (zippering) or open addressing. Hash tables are widely used in database indexing, cache systems, set operations, and other fields due to their efficient search, insertion, and deletion operations. By properly designing hash functions and conflict resolution strategies, hash tables can achieve near-constant time average complexity.

[0061] Union-Find Set (UFS): A Union-Find Set (UFS) is a data structure used to handle the merging and querying of disjoint sets. Based on a tree structure, a Union-Find Set can efficiently implement set merging and search operations. In a Union-Find Set, each element initially constitutes a single-element set, and then the sets of elements belonging to the same group can be merged in a certain order. The search operation is used to determine which set an element belongs to, or whether two elements are in the same set. Union-Find Set is widely used in graph theory, social network analysis, computer networks, image processing, and other fields, and is an effective tool for handling set merging and querying problems.

[0062] Heuristic Merge: Heuristic merging is a common technique in computer science, particularly in the fields of data structures and algorithms. The basic idea is that when merging two data structures or datasets, rather than simply merging them one by one, a heuristic strategy is used to select the merge method to optimize merge efficiency and results. Specifically, heuristic merging typically merges a smaller set into a larger set to reduce the overhead of the merge process. This approach can significantly improve the efficiency of merge operations and is particularly effective when processing large amounts of data.

[0063] In the field of intelligent recommendation, the recommendation system can find similar users based on user behavior and recommend corresponding content to target users based on the displayed user preferences, such as articles, videos, products, etc. It can be applied to multiple scenarios. For example, in financial scenarios, business personnel can make financial product recommendations based on this.

[0064] Currently, the recommendation method based on similar users (U2U2I) is mainly used for product recommendation. However, in actual applications, when recommending products to each user, it is necessary to calculate the similarity with other users to screen out the target recommended products. This process has a high time complexity, which affects the efficiency of product recommendation.

[0065] Based on this, the embodiments of the present application provide a product recommendation method and device, an electronic device, and a storage medium, aiming to improve the efficiency of product recommendation.

[0066] The product recommendation method and device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the product recommendation method in the embodiments of the present application is described.

[0067] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. 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 achieve optimal results.

[0068] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0069] The product recommendation method provided in the embodiment of the present application relates to the field of artificial intelligence technology and is applicable to the field of financial technology. The product recommendation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as 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, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the product recommendation method, etc., but is not limited to the above forms.

[0070] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0071] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0072] Figure 1 This is an optional flowchart of the product recommendation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0073] Step S101: Obtain original product data, original user data of the original user, and user click behavior data to obtain product click popularity data; wherein the user click behavior data is used to characterize the original user's click behavior on the original product data;

[0074] Step S102: constructing a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data;

[0075] Step S103: construct a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data;

[0076] Step S104: updating the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data;

[0077] Step S105, determining the target product sequence of each original user according to the target parent node array and the user-product mapping hash table;

[0078] Step S106: Recommend products based on the target product sequence.

[0079] Steps S101 to S106 shown in the embodiment of the present application obtain original product data, original user data of original users and user click behavior data, and product click popularity data; and construct a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table and a user-product mapping hash table between the original product data and the original user data, so as to efficiently mine the correlation between user preferences and product popularity, and then update the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; finally, the target product sequence of each original user is determined according to the target parent node array and the user-product mapping hash table, and product recommendations are made based on the target product sequence, which not only improves the pertinence and accuracy of product recommendations, but also determines the product recommendation sequence of each original user after one processing, thereby improving the efficiency of product recommendations.

[0080] In step S101 of some embodiments, original product data is used to represent relevant information of products (such as product ID, product name, etc.), wherein these products can be referred to as original products.

[0081] Original user data: information used to represent the original user (such as user ID, name, etc.);

[0082] The user click behavior data represents the original user's click behavior on the original product corresponding to the original product data.

[0083] In some embodiments, the original product may be a financial product, insurance product, etc. in a fintech scenario, and may be displayed in a preset financial application or financial web page.

[0084] In some embodiments, the step of "obtaining product click popularity data" may include but is not limited to the following steps:

[0085] The original product data is heat-calculated based on the user click behavior data to obtain the product click heat data.

[0086] Specifically, the product click heat data is used to reflect the click behavior of all original users on multiple original product data, and can reflect the attention of the original product. If an original user clicks on an original product, the product click heat data corresponding to the original product will be increased by 1, or the product click heat data corresponding to the original product will be increased by a preset heat value, but it is not limited to this.

[0087] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S204:

[0088] Step S201: sorting the original product data based on the product click popularity data to obtain an original product sequence;

[0089] Step S202: Screen the original product sequence to obtain a target product sequence;

[0090] Step S203, constructing an initial product hash table based on the target product sequence;

[0091] Step S204 , filling the initial product hash table with data based on the user click behavior data and the original user data to obtain a product-user mapping hash table.

[0092] In steps S201 to S204 shown in the embodiment of the present application, the original product data is sorted based on the product click popularity data to obtain an original product sequence, and some popular products are screened out from the original product sequence to obtain a target product sequence, which can further narrow the scope of product recommendations to improve the efficiency and effectiveness of product recommendations; further, an initial product hash table is constructed based on the target product sequence, and the initial product hash table is filled with data based on the user click behavior data and the original user data to obtain a product-user mapping hash table. By utilizing the efficient data processing performance of the hash table, it is possible to quickly respond to the needs of personalized recommendations and service optimization, thereby improving the efficiency of product recommendations.

[0093] In some embodiments, the original product data can be sorted from high to low according to click popularity to form an original product sequence, and the original product sequence can be screened based on a preset number of products to obtain a target product sequence, thereby preliminarily screening out products with high user attention.

[0094] For example, the top 100 / 200 / 300 products in terms of click popularity are filtered out from the original product sequence to obtain the target product sequence.

[0095] In step S203 of some embodiments, an initial product hash table is constructed using product information (such as product ID, product name, etc.) in the target product sequence, which can quickly implement indexing and querying of product information.

[0096] In step S204 of some embodiments, it is determined which original users clicked on a certain original product based on the user click behavior data, and the users who clicked on the original product are stored in a hash table to expand the initial product hash table, add user dimension information, and form a product-user mapping hash table.

[0097] For example:

[0098] Original product 1 → original user 1 → original user 4 → original user 9;

[0099] Original product 2 → original user 2 → original user 4;

[0100] Original product 3 → original user 1 → original user 5 → original user 8;

[0101] It can be understood that the product-user mapping hash table can be understood as a set of users corresponding to the product.

[0102] See also Figure 3 In some embodiments, step S103 may include but is not limited to steps S301 to S302:

[0103] Step S301, constructing an initial user hash table based on original user data;

[0104] Step S302 : Filling the initial user hash table with data based on the user click behavior data and the original product data to obtain a user-product mapping hash table.

[0105] In steps S301 to S302 shown in the embodiment of the present application, an initial user hash table is constructed based on the original user data, and data is filled into the initial user hash table based on the user click behavior data and the original product data to obtain a user-product mapping hash table. By utilizing the efficient data processing performance of the hash table, the needs of personalized recommendations and service optimization can be quickly responded to, thereby improving the efficiency of product recommendations.

[0106] In step S301 of some embodiments, an initial user hash table is constructed using user information (such as user ID, name, etc.) of the original user data, which can quickly implement indexing and querying of product information.

[0107] In step S302 of some embodiments, it is determined which original users clicked on a certain original product based on the user click behavior data, and the clicked original products are stored in a hash table to expand the initial user hash table, add product dimension information, and form a user-product mapping hash table.

[0108] For example:

[0109] Original user 1 → original product 1 → original product 3 → original product 5;

[0110] Original user 2 → original product 2 → original product 4;

[0111] Original user 3 → original product 1 → original product 2 → original product 6 → original product 7;

[0112] It is understandable that the user-product mapping hash table can be understood as a product set corresponding to the user.

[0113] It is understandable that the original products in the user-product mapping hash table do not need to be sorted and filtered according to the product click popularity data. Including some products with lower click popularity can more comprehensively reflect user behavior.

[0114] In step S104 of some embodiments, the original parent node array is constructed based on the original user data. Each element in the original parent node array initially points to itself, meaning it has no parent node. Specifically, the array structure may be two rows, with each element in the first row corresponding to the original user's information and each element in the second row containing the parent node information corresponding to the original user.

[0115] See also Figure 4 In some embodiments, step S104 may include but is not limited to steps S401 to S403:

[0116] Step S401: perform product traversal on the product-user mapping hash table to obtain a product-user set;

[0117] Step S402: performing a union-find process on the product-user set based on the user-product mapping hash table to obtain a target user relationship tree;

[0118] Step S403: update the original parent node array based on the target user relationship tree to obtain a target parent node array.

[0119] In steps S401 to S403 shown in the embodiment of the present application, a product user set is obtained by traversing each product pair in the product-user mapping hash table; a union-find process is performed on the product user set according to the user-product mapping hash table, which can effectively identify the association between users and merge the relationships to obtain a target user relationship tree, and then the original parent node array is updated according to the target user relationship tree to obtain a target parent node array, which can effectively sort out the associations between all users and provide strong data support for subsequent personalized product recommendations.

[0120] In step S401 of some embodiments, since the product-user mapping hash table records all users corresponding to each product, product traversal can be performed on each product pair in the product-user mapping hash table to obtain the user set corresponding to the product, that is, the product-user set.

[0121] In step S402 of some embodiments, a union-find algorithm is applied to the user-product mapping hash table and the product-user set to merge and search for user relationships, which can efficiently identify and merge user groups with direct or indirect connections, ultimately constructing a target user relationship tree. The target user relationship tree can intuitively display the connections between users.

[0122] See also Figure 5 In some embodiments, step S402 may also include but is not limited to steps S501 to S503:

[0123] Step S501: extract user pairs from the product user set to obtain original user relationship pairs; wherein the original user relationship pairs include a first user and a second user;

[0124] Step S502: Root node detection is performed on the first user and the second user in the same original user relationship pair to obtain root node similarity and difference data; wherein the root node similarity and difference data indicates whether the root node of the first user and the root node of the second user in the same original user relationship pair are the same or different;

[0125] Step S503: Heuristically merge the original user relationship pairs based on the user-product mapping hash table and the root node similarity and difference data to obtain a target user relationship tree.

[0126] In steps S501 to S503 shown in the embodiment of the present application, for a certain original product, user pairs are extracted from the product user set corresponding to the original product to obtain original user relationship pairs; wherein the original user relationship pairs include the first user and the second user, thereby linking the first user and the second user, and then root node detection is performed on the first user and the second user pair to determine whether the root node of the first user is the same or different from the root node of the second user, to obtain root node difference data, and finally, the original user relationship pairs are heuristically merged based on the user-product mapping hash table and the root node difference data to obtain a target user relationship tree, thereby improving the accuracy and efficiency of user relationship analysis.

[0127] In step S501 of some embodiments, two users are randomly selected from the product user set to form an original user relationship pair. If the product user set contains only one user, there is no original user relationship pair, which means that the user has no other connected users under the original product.

[0128] For example, if the product user set of the original product 1 includes the three users original user 1, original user 4 and original user 9, then after combination, three pairs of original user relationship pairs are obtained, namely {original user 1, original user 4}, {original user 1, original user 9}, and {original user 4, original user 9}.

[0129] It is understandable that the two users in the original user relationship pair can be recorded as the first user and the second user, and the first user and the second user are connected because of the original product, that is, the user1-item-user2 relationship, so they can be considered to be in a "user relationship tree".

[0130] Furthermore, it is necessary to determine whether the user relationship tree of the first user and the second user is the same tree, that is, whether there is the same root node, and obtain root node similarity and difference data.

[0131] In some embodiments, if the root node difference data indicates that the root node of the first user is different from the root node of the second user, the process jumps to step S503 .

[0132] See also Figure 6 In some embodiments, step S503 includes but is not limited to steps S601 to S603:

[0133] Step S601: If the root node difference data indicates that the root node of the first user is different from the root node of the second user, the number of products is calculated in the user-product mapping hash table to obtain clicked product statistics; wherein the clicked product statistics include the number of clicks on the first product by the first user and the number of clicks on the second product by the second user;

[0134] Step S602: Compare the number of clicks on the first product with the number of clicks on the second product to obtain user click number comparison data;

[0135] Step S603: Adjust the relationship between the first user and the second user according to the comparison data of the number of user clicks to obtain a target user relationship tree.

[0136] In steps S601 to S603 shown in the embodiment of the present application, when the root node difference data indicates that the root node of the first user is different from the root node of the second user, the product quantity is calculated for the user-product mapping hash table to obtain click product statistics; wherein the click product statistics include the click quantity of the first product of the first user and the click quantity of the second product of the second user, the click quantity of the first product is compared with the click quantity of the second product to obtain user click quantity comparison data, and the relationship between the first user and the second user is adjusted according to the user click quantity comparison data to obtain a target user relationship tree. The user relationship tree can be dynamically adjusted based on the user's product click data, thereby more accurately reflecting the interest association between users, which helps to enhance the accuracy and relevance of product recommendations.

[0137] It can be understood that if the root node difference data indicates that the root node of the first user is different from the root node of the second user, it means that the first user and the second user are not in the same "user relationship tree". Therefore, it is necessary to adjust the relationship between the first user and the second user, and the "heuristic merge" method is adopted.

[0138] Specifically, the number of clicks on the first product by the first user and the number of clicks on the second product by the second user are counted from the user-product mapping hash table;

[0139] For example, if the first user is original user 1, the product set of original user 1 is read from the user-product mapping hash table, which is {original product 1, original product 3, original product 5}, then the number of clicks on the first product is 3;

[0140] If the second user is the original user 3, the product set of the original user 3 is read from the user-product mapping hash table, which is {original product 1, original product 2, original product 6, original product 7}, then the number of clicks on the first product is 4.

[0141] Compare the number of clicks on the first product with the number of clicks on the second product to obtain user click number comparison data; wherein, the user click number comparison data includes three situations: the number of clicks on the first product is greater than the number of clicks on the second product, the number of clicks on the first product is less than the number of clicks on the second product, and the number of clicks on the first product is equal to the number of clicks on the second product.

[0142] In step S603 of some embodiments, the relationship between the first user and the second user is adjusted based on the user click quantity comparison data, for example, the first user is used as the parent node of the second user, or the second user is used as the parent node of the first user, thereby adjusting the user relationship tree to obtain the target user relationship tree.

[0143] Specifically:

[0144] If the user click quantity comparison data indicates that the number of clicks on the first product is greater than the number of clicks on the second product, the first user is taken as the parent node of the second user to obtain the target user relationship tree;

[0145] If the user click quantity comparison data indicates that the number of clicks on the first product is less than the number of clicks on the second product, the second user is taken as the parent node of the first user to obtain the target user relationship tree;

[0146] If the user click quantity comparison data indicates that the number of clicks on the first product is equal to the number of clicks on the second product, the first user can be used as the parent node of the second user, or the second user can be used as the parent node of the first user, or other merging strategies can be used, the specific selection needs to be made in combination with the actual application scenario, and is not limited to this.

[0147] It should be noted that after confirming the parent node of the first user and the second user at any time, the product set corresponding to the user as the parent node will be equal to the product set of the first user plus the product set of the second user, and the user-product mapping hash table will be adjusted to achieve heuristic merging.

[0148] Finally, when the target user relationship tree is built, the product set of the root node will contain the product sets of all users in the target user relationship tree.

[0149] In some embodiments, after step S502, if the root node difference data indicates that the root node of the first user is the same as the root node of the second user, there is no need to perform heuristic merging on the original user relationship pairs, and the user relationship tree of the first user and the second user continues to be maintained. There is no need to modify the content in the original parent node array, and the above steps S502 to S503 are jumped to the next original user relationship pair until all original user relationship pairs of all original products are completed and the query processing and heuristic merging are completed to obtain the final target user relationship tree, and the parent node of the original parent node array is updated based on the target user relationship tree to obtain the target parent node array.

[0150] In step S403 of some embodiments, each element in the original parent node array is modified based on the target user relationship tree to the index value of the parent node (eg, array subscript), thereby obtaining the target parent node array.

[0151] See also Figure 7 In some embodiments, step S105 may include but is not limited to steps S701 to S702:

[0152] Step S701: for each original user, perform a root node query on the target parent node array based on the original user data to obtain the target root node data;

[0153] Step S702: perform product query on the user-product mapping hash table based on the target root node data to obtain a target product sequence.

[0154] In steps S701 to S702 shown in the embodiment of the present application, a root node query is performed on the target parent node array based on the original user data to obtain the target root node data; then a product query is performed on the user-product mapping hash table based on the target root node data to obtain the target product sequence corresponding to each original user, giving full play to the efficient data processing performance of the hash table, and being able to quickly query and obtain the recommended product sequence, which helps to improve the efficiency of product recommendations.

[0155] It can be understood that after obtaining the target user relationship tree, all original users are divided into multiple "groups", each target user relationship tree corresponds to a "group", and all users in each "group" can be understood as users with the same needs, so the same products can be recommended, that is, all products clicked in each "group" can be used as recommended products.

[0156] In step S701 of some embodiments, for each original user, a root node query is performed from the target parent node array based on the original user data of the original user to obtain the root node information of the target user relationship tree where the original user is located, that is, the target root node data;

[0157] It can be understood that the target root node data can represent a complete target user relationship tree, and the product set of the root node will contain the product sets of all users in this target user relationship tree. Therefore, it is only necessary to query the product set corresponding to the target root node data from the user-product mapping hash table to obtain the products clicked by all users in this target user relationship tree and obtain the target product sequence, which may be the products liked by the original user.

[0158] In step S106 of some embodiments, after determining the target product sequence corresponding to each original user, a product recommendation is made to the original user based on the target product sequence.

[0159] In some embodiments, step S106 may also include but is not limited to the following steps:

[0160] For each original user, perform product query on the user-product mapping hash table based on the original user data to obtain the user-clicked product sequence;

[0161] Based on the user's clicked product sequence, the original user's target product sequence is reduced to obtain the final recommended product sequence;

[0162] Recommend products to original users based on the recommended product sequence.

[0163] The product recommendation method provided by the embodiment of the present application uses the union-find and heuristic merging methods to retain the maximum product set at the root node of each target user relationship tree, without requiring each node to retain all the data of the maximum set, which can greatly save space storage; and when searching for the product set corresponding to each user, it is only necessary to find the root node through the search function, which can shorten the time of product recommendation and improve the efficiency of product recommendation. Compared with the existing U2U2I solution, the time complexity can be reduced from O(N 2 ) is reduced to O(N*α+MlogM), where N is the number of original users, M is the number of original products, and a is the path compression time of the search function, which can be regarded as a constant.

[0164] See also Figure 8 The present application also provides a product recommendation device that can implement the above-mentioned product recommendation method. The device includes:

[0165] The data acquisition module 801 is used to acquire original product data, original user data of the original user, and user click behavior data, and obtain product click popularity data; wherein the user click behavior data is used to represent the original user's click behavior on the original product data;

[0166] A first hash table construction module 802 is configured to construct a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data;

[0167] The second hash table construction module 803 is used to construct a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data;

[0168] The parent node update module 804 is configured to update the parent nodes of a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data;

[0169] The product determination module 805 is used to determine the target product sequence of each original user according to the target parent node array and the user-product mapping hash table;

[0170] The target recommendation module 806 is used to make product recommendations based on the target product sequence.

[0171] The specific implementation of the product recommendation device is basically the same as the specific embodiment of the above-mentioned product recommendation method, and will not be repeated here.

[0172] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the product recommendation method when executing the computer program. The electronic device can be any smart terminal, such as a tablet computer or an in-vehicle computer.

[0173] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:

[0174] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0175] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the product recommendation method of the embodiments of this application;

[0176] Input / output interface 903, used to implement information input and output;

[0177] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0178] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );

[0179] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0180] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned product recommendation method is implemented.

[0181] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0182] The product recommendation method and device, electronic device and storage medium provided by the embodiments of the present application obtain original product data, original user data of original users and user click behavior data, and product click popularity data; and construct a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table and a user-product mapping hash table between the original product data and the original user data, so as to efficiently mine the correlation between user preferences and product popularity, and then update the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; finally, determine the target product sequence of each original user according to the target parent node array and the user-product mapping hash table, and perform product recommendations based on the target product sequence, which not only improves the pertinence and accuracy of product recommendations, but also determines the product recommendation sequence of each original user after one processing, thereby improving the efficiency of product recommendations.

[0183] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0184] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0185] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0186] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0187] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0188] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0189] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0191] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0192] If the integrated unit 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. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0193] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A product recommendation method, characterized in that: The method comprises: Obtaining original product data, original user data of the original user, and user click behavior data, and obtaining product click popularity data; wherein the user click behavior data is used to characterize the click behavior of the original user on the original product data; Constructing a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data; Constructing a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data; Performing parent node updates on a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data; Determine the target product sequence of each original user according to the target parent node array and the user-product mapping hash table; Perform product recommendations based on the target product sequence; Wherein, updating the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain the target parent node array includes: Perform product traversal on the product-user mapping hash table to obtain a product-user set; Performing user pair extraction on the product user set to obtain an original user relationship pair; wherein the original user relationship pair includes a first user and a second user; Performing root node detection on the first user and the second user in the same original user relationship pair to obtain root node similarity and difference data; wherein the root node similarity and difference data indicates whether the root node of the first user and the root node of the second user in the same original user relationship pair are the same or different; If the root node difference data indicates that the root node of the first user is different from the root node of the second user, calculating the number of products in the user-product mapping hash table to obtain clicked product statistics; wherein the clicked product statistics include the number of clicks on the first product by the first user and the number of clicks on the second product by the second user; Compare the number of clicks on the first product with the number of clicks on the second product to obtain user click quantity comparison data; Adjusting the relationship between the first user and the second user based on the user click quantity comparison data to obtain a target user relationship tree; The original parent node array is updated based on the target user relationship tree to obtain the target parent node array.

2. The method according to claim 1, characterized in that The determining the target product sequence of each original user according to the target parent node array and the user-product mapping hash table includes: For each of the original users, performing a root node query on the target parent node array based on the original user data to obtain target root node data; A product query is performed on the user-product mapping hash table based on the target root node data to obtain the target product sequence.

3. The method according to claim 1, characterized in that The hash table is constructed based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data, including: Sort the original product data based on the product click popularity data to obtain an original product sequence; Performing product screening on the original product sequence to obtain a target product sequence; Building an initial product hash table based on the target product sequence; The initial product hash table is filled with data based on the user click behavior data and the original user data to obtain the product-user mapping hash table.

4. The method according to claim 1, wherein The step of constructing a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data includes: Building an initial user hash table based on the original user data; The initial user hash table is filled with data based on the user click behavior data and the original product data to obtain the user-product mapping hash table.

5. A product recommendation device, characterized in that: The device comprises: A data acquisition module is used to acquire original product data, original user data of original users, and user click behavior data, and obtain product click popularity data; wherein the user click behavior data is used to characterize the click behavior of the original user on the original product data; A first hash table construction module is configured to construct a hash table based on the product click popularity data and the user click behavior data to obtain a product-user mapping hash table between the original product data and the original user data; A second hash table construction module is used to construct a hash table based on the user click behavior data to obtain a user-product mapping hash table between the original user data and the original product data; A parent node update module, configured to update a preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain a target parent node array; wherein the original parent node array is constructed based on the original user data; A product determination module, configured to determine a target product sequence for each original user according to the target parent node array and the user-product mapping hash table; A target recommendation module, configured to make product recommendations based on the target product sequence; Wherein, updating the parent node of the preset original parent node array based on the product-user mapping hash table and the user-product mapping hash table to obtain the target parent node array includes: Perform product traversal on the product-user mapping hash table to obtain a product-user set; Performing user pair extraction on the product user set to obtain an original user relationship pair; wherein the original user relationship pair includes a first user and a second user; Performing root node detection on the first user and the second user in the same original user relationship pair to obtain root node similarity and difference data; wherein the root node similarity and difference data indicates whether the root node of the first user and the root node of the second user in the same original user relationship pair are the same or different; If the root node difference data indicates that the root node of the first user is different from the root node of the second user, calculating the number of products in the user-product mapping hash table to obtain clicked product statistics; wherein the clicked product statistics include the number of clicks on the first product by the first user and the number of clicks on the second product by the second user; Compare the number of clicks on the first product with the number of clicks on the second product to obtain user click quantity comparison data; Adjusting the relationship between the first user and the second user based on the user click quantity comparison data to obtain a target user relationship tree; The original parent node array is updated based on the target user relationship tree to obtain the target parent node array.

6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 4 when executing the computer program.

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