A product service recommendation method, storage medium and system
By building a product-related network and calculating the median central value, combined with encryption technology, it is possible to provide users with accurate product recommendations without collecting user privacy information, solve the contradiction between user privacy leakage and recommendation accuracy, and improve computing efficiency and network adaptability.
Patent Information
- Application Number
- CN202210241324.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2042-03-11
AI Technical Summary
When providing users with accurate and personalized recommendations, existing recommendation systems need to track user behavior and collect user data for a long time, resulting in user privacy leakage and network security risks.
By obtaining user public keys and demand keywords, building a product association network, calculating node mediation central values and sorting, generating product recommendation tables, and using user public key encryption recommendation tables to send to the user for decryption and processing, realizing accurate recommendations without excessive collection of user privacy information.
On the premise of protecting user privacy, the precise recommendation of products is achieved, the risk of user privacy leakage is reduced, and the computing efficiency is improved for various network types.
Smart Images

Figure CN114661986B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet services, and in particular relates to a product service recommendation method, storage medium and system. Background Art
[0002] Since the 21st century, with the rapid development of mobile Internet and social networks, mankind has entered the era of information explosion. Internet services have greatly enriched people's lives. People fully enjoy the convenience of online shopping, cultural entertainment, social interaction, smart life, etc. brought by the Internet, thus forming various forms of communication networks, social networks, Internet of Things and other actual networks. These networks are intertwined to form a complex and large-scale network. How to let people get what they want on the mobile Internet and how to meet the various needs of users have become problems that enterprises in the Internet era need to solve urgently. In this context, recommendation systems came into being.
[0003] Recommendation system is a technical method to help users find interesting information from a large amount of information when user needs are vague. Existing recommendation systems combine user information (region, age, gender, identifier, etc.), information about the products or services displayed by the company (price, origin, service type, etc.), and user's past behavior towards products or services (whether to buy, click on news, play videos, etc.), and use machine learning technology to build a user interest model to provide users with accurate personalized recommendations.
[0004] The current recommendation system uses identifiers to mark the goods and services provided by users and enterprises, track user behavior and record user data over a long period of time, and manage these behaviors and data with the user's identifier to form a personalized recommendation system. In other words, the accurate recommendation of the recommendation system is based on the long-term tracking of user behavior and the recording of user data. This behavior will bring great privacy leakage and network security risks to users. For example, if someone attacks the server where the relevant data is recorded, it will have an immeasurable impact on users; or the relevant service operators will treat user data as a trading commodity and trade data with those who have demand for this data.
[0005] The risk of user privacy leakage is not groundless. At present, there are indeed a lot of user privacy leakage problems, involving e-shopping, online payment, job recruitment and other fields. If the intelligent recommendation system does not collect user data sufficiently, the accuracy of the recommendation system cannot be guaranteed; if excessive user data is collected, user privacy security cannot be protected. Summary of the invention
[0006] One of the purposes of the present invention is to provide a product recommendation method, which does not require excessive collection of user privacy information. Under the premise of protecting user privacy, it achieves accurate product recommendation, meets customer needs, and resolves the contradiction between the accuracy of product recommendation and the protection of user privacy.
[0007] A second object of the present invention is to provide a storage medium.
[0008] A third object of the present invention is to provide a product recommendation system.
[0009] In order to achieve one of the above purposes, the present invention adopts the following technical solution:
[0010] A product recommendation method, the product recommendation method comprising the following steps:
[0011] Step 1: Obtain the user public key and user requirement keywords sent by the local user terminal;
[0012] Step 2: Obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain a feature Boolean vector of each product;
[0013] Step 3: Perform inner product processing on the feature Boolean vectors of any two products and construct a product association network;
[0014] The nodes in the product association network are products, the edges represent the existence of an association relationship between two products, and the edge value is the association degree value of the two products; the association degree value is a non-zero inner product value;
[0015] Step 4: Based on the adjacency matrix, determine the betweenness centrality value of each node in the product association network and sort them to generate a product recommendation table;
[0016] Step 5: Encrypt the product recommendation table using the user's public key and send the recommendation information package to the local user terminal;
[0017] Step 6: The local user terminal uses the user private key to decrypt and process the received recommendation information packets in sequence and feed back the processing results.
[0018] Furthermore, the specific process of generating the user private key and the user public key includes:
[0019] After receiving the user registration request, the server distributes a unique user identifier to the local user terminal;
[0020] The server randomly generates a PKG private key and a PKG public key and publishes them to the local client, then destroys the PKG private key and the PKG public key;
[0021] The local user terminal generates a user public key and a user private key according to the user identifier, the PKG private key and the PKG public key; and sends the user public key to the server.
[0022] Furthermore, the product characteristic data includes at least one of the following characteristic data:
[0023] Supplier, origin, user group, product usage period, product attributes, price range, brand, user reviews, visit counts, and purchase counts.
[0024] Furthermore, in step 4, the specific process of determining the betweenness centrality value of each node in the product association network is as follows:
[0025] Step 41: Use the product association network as the global association network; and select one of the nodes in the global association network as the node to be calculated;
[0026] Step 42: construct an n*n global association matrix A and a neighborhood association matrix B of the node to be calculated according to the global association network;
[0027] The element values in the global association matrix A are the corresponding association degree values in the global association network; n is the number of nodes in the global association network;
[0028] The element values corresponding to the node to be calculated and other nodes directly connected to the node to be calculated in the neighborhood association matrix B are 0, and the other element values are the same as the corresponding element values in the global association matrix A;
[0029] Step 43, set K n*n first spatial domain matrices; and search for the position where the element value is k in the global association matrix A; and fill k into the corresponding position of the kth first spatial domain matrix, and fill 0 into other positions, to obtain the kth similarity matrix H k ;
[0030] Where k = 1, 2, 3, ..., K, K = max(n, w0), w0 is the maximum element value in the global incidence matrix A;
[0031] Step 44, set K n*n second spatial domain matrices; search for the position where the element value is 1 in the global association matrix A; and fill 1 into the corresponding position in the second spatial domain matrix, and fill 0 into other positions, to obtain the global association matrix A with element value 1 1 ;
[0032] Step 45, set K n*n third spatial matrixes; search for the position where the element value is 1 in the neighborhood association matrix B; and fill 1 into the corresponding position in the third spatial matrix, and fill 0 into other positions, to obtain the neighborhood association matrix B with element value 1 1 ;
[0033] Step 46: According to the similarity matrix H k And the global association matrix A 1 and the neighborhood association matrix B 1 , calculate the global association matrix A with element value k k , neighborhood association matrix B k ; and calculate the global association matrix A k and the neighborhood association matrix B k The difference matrix C k ;
[0034] Step 47, set a fourth spatial matrix of n*n; and calculate the difference matrix C k and the global incidence matrix A k The ratio of the element values at the corresponding positions in the fourth spatial matrix is filled with the ratio until all positions are filled to obtain a new matrix;
[0035] Step 48: Calculate the sum of the element values at each position in the new matrix and perform normalization processing; and use the normalization processing result value as the node betweenness centrality value.
[0036] Furthermore, in step 46, when w0≥n, w v ≥n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0037] A k =A k-1 *A 1 +H k-1 ;
[0038] B k =B k-1 *B 1 +H k-1 ;
[0039] Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, wv ≤w0.
[0040] Furthermore, in step 46, when w0<n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0041] A k =A k-1 *A 1 +H k-1 , 1<k≤w0;
[0042] A k =A (r1) *A (λ1*w0) , w0<n;
[0043] r1 = kmod w0;
[0044]
[0045] B k =B k-1 *B 1 +H k-1 , 1<k≤w v ;
[0046] B k =B (r2) *B (λ2*w0) , w v <n;
[0047] r2=k mod w v ;
[0048]
[0049] Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
[0050] Furthermore, in step 46, when w0≥n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0051] A k =A k-1 *A 1 +H k-1 ;
[0052] B k =B k-1 *B 1 +H k-1 , 1<k≤w v ;
[0053] B k =B (r2) *B (λ2*w0) , w v <n;
[0054] r2=k mod w v ;
[0055]
[0056] Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
[0057] Furthermore, in step 48, normalization is performed according to the following formula:
[0058] bet(v)=S v / ((n-1)*(n-2));
[0059] Where bet(v) is the betweenness centrality value of the node v to be calculated; S vis the sum of the values of each element in the new matrix of the computing node v; n is the number of nodes in the global association network.
[0060] In order to achieve the second objective above, the present invention adopts the following technical solution:
[0061] A storage medium storing computer program instructions; the product recommendation method described above is implemented by executing the computer program instructions.
[0062] In order to achieve the third objective above, the present invention adopts the following technical solution:
[0063] A product recommendation system, the product recommendation system comprising the storage medium described above; or,
[0064] A product recommendation system, comprising:
[0065] The acquisition module is used to obtain the user public key and user demand keywords sent by the local user terminal;
[0066] A processing module is used to obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain a feature Boolean vector of each product;
[0067] A construction module is used to perform inner product processing on the feature Boolean vectors of any two products and construct a product association network;
[0068] The nodes in the product association network are products, the edges represent the existence of an association relationship between two products, and the edge value is the association degree value of the two products; the association degree value is a non-zero inner product value;
[0069] The product recommendation generation module is used to determine the betweenness centrality value of each node in the product association network based on the adjacency matrix and sort them by size to generate a product recommendation table;
[0070] An encryption module, used to encrypt the product recommendation table using the user's public key and then send the recommendation information package to the local user terminal;
[0071] The feedback module is used for the local user end to use the user's private key to decrypt and process the received recommendation information packages in sequence and feedback the processing results.
[0072] Beneficial effects of the present invention:
[0073] The present invention uses user demand keywords to filter out product feature data that does not match the user demand keywords; and performs Boolean vector processing and inner product processing on the product feature data that matches the user demand keywords in sequence, and determines the connection relationship between each node in the product association network and the degree of association between each node according to the inner product processing result; calculates the betweenness centrality value of each node in the product association network and generates a product recommendation table after sorting the size, thereby achieving the goal of not needing to collect user privacy information and data, fully protecting user privacy security, and accurately recommending products required by users; the present invention adopts an adjacency matrix to realize matrix product operation, fully developing The advantages of parallel computing are brought into play and computing efficiency is improved. The higher the computing power provided by the computing platform, the higher the operating efficiency is. It is more suitable for sparse networks and dense networks, unauthorized networks and authorized networks, and undirected networks and directed networks. The present invention uses the user's public key to encrypt the product recommendation table and then sends the recommendation information package to the local user end. The local user end uses the user's private key to decrypt and process the received recommendation information package in turn and feed back the processing results. The server end retains the user's public key but does not save the user's private key, thereby realizing encryption of the transmitted data without decryption, and only decrypting the data on the user end, thereby reducing the risk of leaking user privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flow chart of the product recommendation method of the present invention;
[0075] Figure 2 This is a diagram of a product association-authored undirected network. DETAILED DESCRIPTION
[0076] The specific implementation modes of the present invention are described in detail below with reference to the accompanying drawings.
[0077] This embodiment provides a product recommendation method. Figure 1 , the product recommendation method comprises the following steps:
[0078] Step 1: Obtain the user public key and user requirement keywords sent by the local user.
[0079] When a local user registers, the server distributes a unique user identifier to the local user and randomly generates a PKG private key and a PKG public key for the local user.
[0080] The local user generates a user private key for decryption and a user public key for encryption based on the user identifier, PKG private key and PKG public key. The user public key is given to the server, and the server uses the user public key to encrypt the data and then gives it to the local user. The server stores the user public key and user identifier in the user encryption database.
[0081] The user's public key is used when the server transmits encrypted product information to the user, and the local user uses the user's private key to decrypt the data locally. The local user uses the user's public key to encrypt the data.
[0082] In order to prevent the behavior of long-term tracking of user history data through monitoring, the server promptly destroys all data generated during the recommendation process after each recommendation. It also saves encrypted user history data and product recommendation network data. The server does not have a decryption function, so attackers cannot obtain user information through monitoring or by stealing keys, which greatly protects user privacy.
[0083] In summary, the specific process of generating the user private key and the user public key in this embodiment includes:
[0084] After receiving the user registration request, the server distributes a unique user identifier to the local user terminal;
[0085] The server randomly generates a central PKG private key and a PKG public key and publishes them to the local client, then destroys the PKG private key and the PKG public key;
[0086] The local user terminal generates a user public key and a user private key according to the user identifier, the central PKG private key and the central PKG public key; and sends the user public key to the server.
[0087] The user demand keywords in this embodiment include at least one of the following characteristic data:
[0088] Brand, supplier (of products or services), place of origin, user group (i.e., target group of products or services), product life (i.e., shelf life of products or availability of services), product attributes (i.e., product parameters or service details), price range (of products or services). It may also include the number of consecutive visits between products or services, the scope of application of products or services, the period of benefit realization of products or services, the ease with which products or services are understood and used by users, and the needs met by products or services. For example, if the keyword of user demand is Huawei mobile phone, which belongs to the brand feature item, the feature data vector of "Huawei" is a unit vector; the feature data vectors of "Xiaomi", "Oppo", "vivo", etc. are all zero vectors.
[0089] The products in this embodiment can be commodities (including food and electronic products), such as dairy products, dried fruits and beverages in the food category, mobile phones (such as Huawei mobile phones, Xiaomi mobile phones and Apple mobile phones) and watches in the electronic category, and products can also be services. The product attributes of dairy products include energy, protein, fat, carbohydrates, sodium, vitamin E, vitamin D, vitamin E, high calcium, high iron and high zinc, etc. The product attributes of mobile phones include CPU frequency, mobile phone memory, running memory (RAM), support for expansion capabilities (memory card expansion), screen size, resolution, material, camera pixels, flash type, whether built-in GPS, talk time and standby time, etc.
[0090] Step 2: Obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain the feature Boolean vector of each product.
[0091] In this embodiment, the product feature data includes at least one of the following feature data:
[0092] Supplier (of products or services), origin, user group (i.e., target group of products or services), product life (i.e., shelf life of products or availability of services), product attributes (i.e., product parameters or service details), price range (of products or services), brand, user evaluation (of products or services), visit counts, and purchase counts. It may also include the number of consecutive visits between products or services, the scope of application of products or services, the period of benefit realization of products or services, the ease with which products or services are understood and used by users, and the needs met by products or services. The specific process of Boolean vector processing is: when the product feature data of a product has a certain origin, the Boolean value of the corresponding position of the certain origin is 1. If there is no certain origin or it is another origin, the Boolean value of the corresponding position of the certain origin is 0.
[0093] It should be noted that when the user does not have a clear demand, the products can be obtained and sorted by count based on the visit count and purchase count feature items of the products, and the first N (preferably 1000) products can be extracted.
[0094] Step 3: Perform inner product processing on the feature Boolean vectors of any two products and construct a product association network.
[0095] The real network constructed by the products and services provided by the manufacturer and the associations between them is abstracted into a large-scale complex network model, namely, a product association network. The nodes in the product association network of this embodiment are products, the edges indicate that there is an association relationship between two products, the edge value is the association degree value of the two products, and the association degree value is a non-zero inner product value. The association degree value of this embodiment represents the association relationship between different products in terms of (product or service) supplier, origin, user group (i.e., target population of the product or service), product use period (i.e., shelf life of the product or availability period of the service), product attributes (i.e., product parameters or service details), (product or service) price range, brand, (product or service) user evaluation, visit count and purchase count.
[0096] The product association network in this embodiment is a right network, including a product association right undirected network and a product association right directed network. Figure 2 The product associations in the entitled undirected network.
[0097] Step 4: Based on the adjacency matrix, determine the betweenness centrality value of each node in the product association network and sort them to generate a product recommendation table.
[0098] The closer the betweenness centrality value of this embodiment is to 1, the more frequently the node appears on the shortest path between network nodes, and the more important the corresponding product is. When the betweenness centrality value is 0, it means that the node does not appear on the shortest path between other nodes, and the importance of the corresponding product is very low. The specific process of determining the betweenness centrality value of each node in the product association network is as follows:
[0099] Step 41: Use the product association network as the global association network; and select one of the nodes from the global association network as the node to be calculated.
[0100] Step 42: Based on the global association network, construct an n*n global association matrix A and a neighborhood association matrix B of the node to be calculated.
[0101] The global association matrix A of this embodiment.
[0102]
[0103] The element value in the global association matrix A is the corresponding association degree value in the global association network, and n is the number of nodes in the global association network. When there is an edge with an association degree value of k between node i and node j in the global association network, then the element value a in the global association matrix A is ij = k; when there is no edge between node i and node j in the global association network, the element value a in the global association matrix A ij =0; when i=j, then a ij =0.
[0104] In the neighborhood association matrix B of this embodiment, the element values corresponding to the node to be calculated and other nodes directly connected to the node to be calculated are 0, and the other element values are the same as the corresponding element values in the global association matrix A.
[0105] Step 43, set K n*n first spatial domain matrices; and search for the position where the element value is k in the global association matrix A; and fill k into the corresponding position of the kth first spatial domain matrix, and fill 0 into other positions, to obtain the kth similarity matrix H k . Where k = 1, 2, 3, ..., K, K = max(n, w0), w0 is the maximum element value in the global association matrix A.
[0106] Step 44, set K n*n second spatial domain matrices; search for the position where the element value is 1 in the global association matrix A; and fill 1 into the corresponding position in the second spatial domain matrix, and fill 0 into other positions, to obtain the global association matrix A with element value 1 1 .
[0107] Step 45, set K n*n third spatial matrixes; search for the position where the element value is 1 in the neighborhood association matrix B; and fill 1 into the corresponding position in the third spatial matrix, and fill 0 into other positions, to obtain the neighborhood association matrix B with element value 1 1 .
[0108] Step 46: According to the similarity matrix H k And the global association matrix A 1 and the neighborhood association matrix B 1 , calculate the global association matrix A with element value k k , neighborhood association matrix B k ; and calculate the global association matrix A k and the neighborhood association matrix B k The difference matrix C k .
[0109] When w0≥n, w v ≥n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0110] A k =A k-1 *A 1 +H k-1 ;
[0111] B k =B k-1 *B 1 +Hk-1 ;
[0112] Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0.
[0113] When w0<n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0114] A k =A k-1 *A 1 +H k-1 , 1<k≤w0;
[0115] A k =A (r1) *A (λ1*w0) , w0<n;
[0116] r1 = kmod w0;
[0117]
[0118] B k =B k-1 *B 1 +H k-1 , 1<k≤w v ;
[0119] B k =B (r2) *B (λ2*w0) , w v <n;
[0120] r2=k mod w v ;
[0121]
[0122] Among them, A k and B kH are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
[0123] When w0≥n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas:
[0124] A k =A k-1 *A 1 +H k-1 ;
[0125] B k =B k-1 *B 1 +H k-1 , 1<k≤w v ;
[0126] B k =B (r2) *B (λ2*w0) , w v <n;
[0127] r2 = kmod w v ;
[0128]
[0129] Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w vis the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
[0130] The difference matrix C of this embodiment k for:
[0131] C k =A k -B k .
[0132] Step 47, set a fourth spatial matrix of n*n; and calculate the difference matrix C k and the global incidence matrix A k The ratio of the element values at the corresponding positions in ; and fill the ratio into the corresponding positions in the fourth spatial matrix until all positions are filled to obtain a new matrix.
[0133] Step 48: Calculate the sum of the element values at each position in the new matrix and perform normalization processing; and use the normalization processing result value as the betweenness centrality value of the node.
[0134] Normalization is performed according to the following formula:
[0135] bet(v)=S v / ((n-1)*(n-2));
[0136] Where bet(v) is the betweenness centrality value of the node v to be calculated; S v is the sum of the values of each element in the new matrix of the computing node v; n is the number of nodes in the global association network.
[0137] The product recommendation table in this embodiment includes product serial numbers and product feature data. The product feature data includes at least one of the following feature data:
[0138] Supplier, origin, user group, product use period, product attributes, price range, brand, user evaluation, visit count and purchase count, etc. For example, the product attributes of dairy products include at least one of the following factors: vitamin E, vitamin D, vitamin E, high calcium, high iron and high zinc, etc. If dairy products contain vitamin E, the element value at the corresponding position is 1, if not, the element value at the corresponding position is 0.
[0139] Step 5: Use the user's public key to encrypt the product recommendation table and send the recommendation information package to the local user terminal.
[0140] This embodiment adopts a page-by-page recommendation method to recommend products to users.
[0141] Step 6: The local user terminal uses the user private key to decrypt and process the received recommendation information packets in sequence and feed back the processing results.
[0142] The processing in this embodiment includes browsing and purchasing. When a local user clicks to browse a product in the product recommendation table, the visit count of the product clicked by the user is updated, and the visit count increases by 1 for each click; when the local user finally pays for the purchase, the purchase count of the product purchased by the user is updated, and the purchase count increases by 1 for each purchase, and the product feature data purchased this time and the updated visit count and purchase count are saved.
[0143] This embodiment also includes a product information library for storing product feature data, and indexing it in the form of product identifiers. The product identifier is unique and represents the product. In order to protect user privacy, the product identifier is generally randomly generated and cannot be changed. In order to reduce the length of the product identifier as much as possible, a 32-bit m-sequence linear feedback shift register (LFSR) is used to generate the product identifier. The m-sequence ensures full use of the product identifier space. When the characteristic formula is a primitive polynomial, the generated sequence is an m-sequence. The m-sequence, that is, the longest linear feedback shift register sequence, has a length of 2 n -1, n is the number of bits of LFSR. This embodiment uses four 8-bit m-sequence linear feedback shift registers to solve the problem that the number of commodities will exceed the capacity of the existing product identifiers after the increase in the number of commodities in the future, and to generate product identifier index values. When querying, the product identifier index value is queried first, and then the product identifier is queried to reduce the query time.
[0144] The following specifically uses the Yili brand in the food category as a user demand keyword to introduce the process of implementing the technical solution of this embodiment:
[0145] Product feature data table matching the Yili brand:
[0146]
[0147]
[0148] The elements of the feature Boolean vector of this embodiment include Hohhot 1, Shenyang 2, Jinan 3, Suzhou 4, Duerbert 5, high calcium 6, full fat 7, low fat 8, skim 9, infants 10, teenagers 11, middle-aged and elderly 12, vitamin E 13, high zinc 14, high iron 15, vitamin D 16, vitamin B 17, cheese 18, yogurt 19, liquid milk 20, goat milk 21 and milk powder 22. The dimension of the feature Boolean vector is 22. As shown in the product feature data in the above table, the feature Boolean vectors of products 0 to 7 are respectively:
[0149] Product 0 feature Boolean vector: (1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0);
[0150] Product 1 feature Boolean vector: (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0);
[0151] Product 2 feature Boolean vector: (0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0);
[0152] Product 3 feature Boolean vector: (0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1);
[0153] Product 4 characteristic Boolean vector: (0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0);
[0154] Product 5 feature Boolean vector: (0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0);
[0155] Product 6 feature Boolean vector: (0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
[0156] Product 7 feature Boolean vector: (0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0).
[0157] According to the characteristic Boolean vectors of products 0 to 7, an 8-node product association weighted undirected network G = (V, E) is constructed. The path with the maximum association degree value in the product association network is 4. The default association degree value of the edge without an association degree value is 1. Figure 2 , calculate the betweenness centrality value of each node in the product association network
[0158] 1. Calculate the matrix A 1 To A 7
[0159]
[0160]
[0161]
[0162] 2. Calculate H1 To H 7 , H 1 , H 3 , H 5 , H 6 and H 7 All matrices are zero, H 2 and H 4 as follows:
[0163]
[0164] 3. Matrix B of node v (numbered 0) 1 To B 7
[0165]
[0166]
[0167]
[0168] 4. Calculate C 1 To C 7
[0169]
[0170]
[0171]
[0172] 5. Set up for storage The matrix Γ of the values of 1 to Γ 3 :
[0173]
[0174]
[0175] The symbol # (0 can also be used to represent it) indicates that the value of this position has no effect on the calculation of the betweenness centrality value of node v. This position is the row, column, and diagonal element where node v is located. The symbol * indicates that the position is in Γ (k) It has not appeared yet, and it can also be represented by a blank. When k = 3, Γ (k) It is completely filled, that is, there are no elements with empty values, the values in the matrix will not change anymore and will not be enumerated further.
[0176] In the above example, the value of the betweenness centrality bet(v) of node v is 0.1587302.
[0177] According to the above method, the value of betweenness centrality bet(v) of each node is calculated, sorted to form a product recommendation table, and then decrypted and transmitted to the user.
[0178] This embodiment uses user demand keywords to filter out product feature data that does not match the user demand keywords; and performs Boolean vector processing and inner product processing on the product feature data that matches the user demand keywords in turn, and determines the connection relationship between each node in the product association network and the degree of association between each node according to the inner product processing result; calculates the betweenness centrality value of each node in the product association network and generates a product recommendation table after sorting the size, so that there is no need to collect user privacy information and data, fully protects user privacy security, and accurately recommends products required by users; this embodiment uses an adjacency matrix to implement matrix product operations, which fully The advantages of parallel computing are brought into play and computing efficiency is improved. The higher the computing power provided by the computing platform, the higher the operating efficiency is. It is more suitable for sparse networks and dense networks, unauthorized networks and authorized networks, and undirected networks and directed networks. This embodiment uses the user's public key to encrypt the product recommendation table and then sends the recommendation information package to the local user end. The local user end uses the user's private key to decrypt and process the received recommendation information package in turn and feedback the processing results. The server end retains the user's public key but does not save the user's private key, thereby encrypting the transmitted data without decrypting it. Data is only decrypted on the user end, reducing the risk of leaking user privacy.
[0179] Another embodiment provides a storage medium, which stores computer program instructions; by executing the computer program instructions, the product recommendation method provided in the above embodiment is implemented.
[0180] Still another embodiment provides a product recommendation system, which includes the storage medium provided in the above embodiment.
[0181] Another embodiment provides a product recommendation system, the product recommendation system comprising:
[0182] The acquisition module is used to obtain the user public key and user demand keywords sent by the local user terminal;
[0183] A processing module is used to obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain a feature Boolean vector of each product;
[0184] A construction module is used to perform inner product processing on the feature Boolean vectors of any two products and construct a product association network;
[0185] The nodes in the product association network are products, the edges represent the existence of an association relationship between two products, and the edge value is the association degree value of the two products; the association degree value is a non-zero inner product value;
[0186] The product recommendation generation module is used to determine the betweenness centrality value of each node in the product association network based on the adjacency matrix and sort them by size to generate a product recommendation table;
[0187] An encryption module, used to encrypt the product recommendation table using the user's public key and then send the recommendation information package to the local user terminal;
[0188] The feedback module is used for the local user end to use the user's private key to decrypt and process the received recommendation information packages in sequence and to feed back the processing results.
[0189] The above implementation modes are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit the present invention. Although the embodiments of the present invention are described in detail with reference to the above preferred implementation modes, those skilled in the art should understand that the technical solutions of the embodiments of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A product recommendation method, characterized in that: The product recommendation method comprises the following steps: Step 1: Obtain the user public key and user requirement keywords sent by the local user terminal; Step 2: Obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain a feature Boolean vector of each product; Step 3: Perform inner product processing on the feature Boolean vectors of any two products and construct a product association network; The nodes in the product association network are products, the edges represent the existence of an association relationship between two products, and the edge value is the association degree value of the two products; the association degree value is a non-zero inner product value; Step 4: Based on the adjacency matrix, determine the betweenness centrality value of each node in the product association network and sort them to generate a product recommendation table; Step 5: Encrypt the product recommendation table using the user's public key and send the recommendation information package to the local user terminal; Step 6: The local user terminal uses the user private key to decrypt and process the received recommendation information packets in sequence and feed back the processing results.
2. The product recommendation method according to claim 1, characterized in that: The specific process of generating the user private key and the user public key includes: After receiving the user registration request, the server distributes a unique user identifier to the local user terminal; The server randomly generates a PKG private key and a PKG public key and publishes them to the local client, then destroys the PKG private key and the PKG public key; The local user terminal generates a user public key and a user private key according to the user identifier, the PKG private key and the PKG public key; and sends the user public key to the server.
3. The product recommendation method according to claim 2, characterized in that: The product characteristic data includes at least one of the following characteristic data: Supplier, origin, user group, product usage period, product attributes, price range, brand, user reviews, visit counts, and purchase counts.
4. The product recommendation method according to any one of claims 1 to 3, characterized in that: In step 4, the specific process of determining the betweenness centrality value of each node in the product association network is as follows: Step 41: Use the product association network as the global association network; and select one of the nodes in the global association network as the node to be calculated; Step 42: construct an n*n global association matrix A and a neighborhood association matrix B of the node to be calculated according to the global association network; The element values in the global association matrix A are the corresponding association degree values in the global association network; n is the number of nodes in the global association network; The element values corresponding to the node to be calculated and other nodes directly connected to the node to be calculated in the neighborhood association matrix B are 0, and the other element values are the same as the corresponding element values in the global association matrix A; Step 43, set K n*n first spatial domain matrices; and search for the position where the element value is k in the global association matrix A; and fill k into the corresponding position of the kth first spatial domain matrix, and fill 0 into other positions, to obtain the kth similarity matrix H k ; Where k = 1, 2, 3, ..., K, K = max(n, w0), w0 is the maximum element value in the global incidence matrix A; Step 44, set K n*n second spatial domain matrices; search for the position where the element value is 1 in the global association matrix A; and fill 1 into the corresponding position in the second spatial domain matrix, and fill 0 into other positions, to obtain the global association matrix A with element value 1 1 ; Step 45, set K n*n third spatial matrixes; search for the position where the element value is 1 in the neighborhood association matrix B; and fill 1 into the corresponding position in the third spatial matrix, and fill 0 into other positions, to obtain the neighborhood association matrix B with element value 1 1 ; Step 46: According to the similarity matrix H k And the global association matrix A 1 and the neighborhood association matrix B 1 , calculate the global association matrix A with element value k k , neighborhood association matrix B k ; and calculate the global association matrix A k and the neighborhood association matrix B k The difference matrix C k ; Step 47, set a fourth spatial matrix of n*n; and calculate the difference matrix C k and the global incidence matrix A k The ratio of the element values at the corresponding positions in the fourth spatial matrix is filled with the ratio until all positions are filled to obtain a new matrix; Step 48: Calculate the sum of the element values at each position in the new matrix and perform normalization processing; and use the normalization processing result value as the node betweenness centrality value.
5. The product recommendation method according to claim 4, characterized in that: In step 46, when w0≥n, w v ≥n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas: A k =A k-1 *A 1 +H k-1 ; B k =B k-1 *B 1 +H k-1 ; Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0.
6. The product recommendation method according to claim 4, characterized in that: In step 46, when w0<n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas: A k =A k-1 *A 1 +H k-1 ,1<k≤w0; THE k =A (r1) *THE (λ1*w0) ,w0<n; r1=k mod w0; B k =B k-1 *B 1 +H k-1 ,1<k≤w v ; B k =B (r2) *B (λ2*w0) ,w v <n; r2=k mod w v ; Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
7. The product recommendation method according to claim 4, characterized in that: In step 46, when w0≥n, w v <n, the global association matrix A with element value k k and the neighborhood association matrix B k Calculate according to the following formulas: A k =A k-1 *A 1 +H k-1 ; B k =B k-1 *B 1 +H k-1 ,1<k≤w v ; B k =B (r2) *B (λ2*w0) ,w v <n; r2=k mod w v ; Among them, A k and B k H are the global incidence matrix and the neighborhood incidence matrix with element values k respectively; k-1 is the k-1th similarity matrix; A k-1 and B k-1 The global incidence matrix and the neighborhood incidence matrix with element values of k-1 respectively; A 1 and B 1 The global association matrix and the neighborhood association matrix have element values of 1 respectively; n is the number of nodes in the global association network; w0 is the maximum element value in the global association matrix A; w v is the maximum element value in the neighborhood association matrix B of the node v to be calculated, w v ≤w0; is rounding down; mod is modulus.
8. The product recommendation method according to claim 4, characterized in that: In step 48, normalization is performed according to the following formula: bet(v)=S v / ((n-1)*(n-2)); Where bet(v) is the betweenness centrality value of the node v to be calculated; S v is the sum of the values of each element in the new matrix of the computing node v; n is the number of nodes in the global association network.
9. A storage medium, characterized in that: The storage medium stores computer program instructions; by executing the computer program instructions, the product recommendation method described in any one of claims 1 to 8 is implemented.
10. A product recommendation system, characterized in that: The product recommendation system comprises: The acquisition module is used to obtain the user public key and user demand keywords sent by the local user terminal; A processing module is used to obtain products and product feature data that match the user's demand keywords; and perform Boolean vector processing on the product feature data to obtain a feature Boolean vector of each product; A construction module is used to perform inner product processing on the feature Boolean vectors of any two products and construct a product association network; The nodes in the product association network are products, the edges represent the existence of an association relationship between two products, and the edge value is the association degree value of the two products; the association degree value is a non-zero inner product value; The product recommendation generation module is used to determine the betweenness centrality value of each node in the product association network based on the adjacency matrix and sort them by size to generate a product recommendation table; An encryption module, used to encrypt the product recommendation table using the user's public key and then send the recommendation information package to the local user terminal; The feedback module is used for the local user end to use the user's private key to decrypt and process the received recommendation information packages in sequence and feedback the processing results.
Citation Information
Patent Citations
Personalized commodity recommendation method and system based on multilayer heterogeneous attribute network representation learning
CN112131480A
Data encryption and decryption method and device, equipment and storage medium
CN112367169A
