Method and device for calculating article correlation
By combining user behavior data and association rule mining algorithms, the weight in the recall algorithm is optimized, and the problem of inaccurate item correlation calculation in the existing technology is solved, and more accurate item correlation evaluation and user experience improvement of e-commerce platforms is achieved. .
Patent Information
- Application Number
- CN202310810205.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2025-01-07
AI Technical Summary
The existing item correlation calculation methods rely only on order data and fail to fully consider the impact of user behavior data on item correlation, resulting in inaccurate calculation results.
The method based on user behavior data is adopted, combined with the association rule mining algorithm to calculate the item correlation coefficient and add it to the recall algorithm to optimize the weight to improve the accuracy of the calculation.
By considering user behavior data, the accuracy of item correlation calculation results is improved, and the effect of item recommendation and information push in e-commerce platforms is improved.
Smart Images

Figure CN119273404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of e-commerce platforms and big data technologies, and in particular to a method and device for calculating item relevance. Background Art
[0002] Currently, in scenarios such as e-commerce, the correlation between items can be calculated to determine multiple items with a high degree of correlation, and related items can be pushed when users browse items to improve the user's shopping experience.
[0003] In the existing correlation calculation process, a single recall algorithm is generally used for calculation. However, in the calculation process, only the order data in the order is considered, and the structural weight of the user pair corresponding to each item pair is 1 by default, which cannot reflect the impact of user behavior data on the correlation between the two items in the item pair. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for calculating the correlation between items. The calculation is based on user behavior data, so that a more accurate correlation result between two items in each item pair can be obtained. At the same time, the calculation result of the association rule mining algorithm is added to the recall algorithm as a correlation coefficient, and the existing weights are optimized, thereby improving the accuracy of the calculation.
[0005] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for calculating item relevance is provided.
[0006] A method for calculating item correlation according to an embodiment of the present invention includes: acquiring multiple user behavior data; determining one or more item pairs corresponding to each user according to the user behavior data; calculating the correlation coefficient of each item pair using an association rule mining algorithm; determining the user pair corresponding to each item pair according to one or more users corresponding to each item pair; and determining the correlation between two items in each item pair according to the user pair corresponding to the item pair and the correlation coefficient using a recall algorithm.
[0007] Optionally, determining one or more item pairs corresponding to each user according to the user behavior data includes: determining an item column corresponding to each user according to the user behavior data; wherein the item column indicates the correspondence between the user and one or more items; for each item column corresponding to the user: transforming the item column to obtain an item row corresponding to the item column; and cross-processing the one or more items corresponding to the user according to the item row and the item column to obtain the item pair corresponding to the user.
[0008] Optionally, the method of calculating the correlation coefficient of each item pair using an association rule mining algorithm includes: determining the first item and the second item in the item pair; calculating the support corresponding to the first item, the second item and the item pair respectively using an association rule mining algorithm; determining the credibility of the simultaneous occurrence of the first item and the second item based on the ratio of the support corresponding to the item pair to the support corresponding to the first item; and determining the correlation coefficient based on the ratio of the credibility to the support corresponding to the second item.
[0009] Optionally, determining the user pairs corresponding to the item pairs based on the one or more users corresponding to each item pair includes: determining one or more target item pairs whose number of corresponding users is greater than a preset threshold based on the one or more users corresponding to each item pair; and determining the user pairs corresponding to the one or more target item pairs.
[0010] Optionally, determining the user pairs corresponding to the one or more target item pairs includes: for each target item pair: determining a user column corresponding to the target item pair according to multiple users corresponding to the target item pair; transforming the user column to obtain a user row corresponding to the user column; and cross-processing the multiple users corresponding to the target item pair according to the user row and the user column to obtain a user pair corresponding to the target item pair.
[0011] Optionally, the method further includes: determining a plurality of processing nodes corresponding to each row of data according to the number of rows of the item column or the user column; wherein each of the processing nodes corresponds to one or more rows of data; and utilizing each of the processing nodes to synchronously perform column-to-row operations on the corresponding row or more rows of data.
[0012] Optionally, using each of the processing nodes to perform a column-to-row operation on the corresponding row or rows of data includes: for each of the processing nodes: using a column-to-row function in a data warehouse architecture framework to perform a column-to-row operation on the row or rows of data.
[0013] Optionally, the use of a recall algorithm to determine the correlation between the two items in each item pair according to the user pairs corresponding to the item pairs and the correlation coefficient includes: using a recall algorithm to calculate the similarities corresponding to each item pair under the corresponding user pairs; and determining the correlation between the two items in each item pair according to the product of the similarities and the correlation coefficient.
[0014] Optionally, the method further includes: constructing a swing structure in the recall algorithm based on the item pairs and the user pairs corresponding to the item pairs; wherein the swing structure includes nodes corresponding to each item and each user, and a connection path between each user and each item.
[0015] Optionally, the method further comprises: in case of updating, deleting or adding a user or an object, updating the swing structure according to the updated, deleted or added user or object.
[0016] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for calculating item correlation is provided.
[0017] An apparatus for calculating item correlation according to an embodiment of the present invention comprises: an acquisition module for acquiring a plurality of user behavior data; a determination module for determining one or more item pairs corresponding to each user according to the user behavior data; determining a user pair corresponding to each item pair according to one or more users corresponding to each item pair; a calculation module for calculating a correlation coefficient of each item pair using an association rule mining algorithm; and determining the correlation between two items in each item pair according to the user pair corresponding to the item pair and the correlation coefficient using a recall algorithm.
[0018] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for calculating item relevance is provided.
[0019] An electronic device for calculating item correlation according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement a method for calculating item correlation according to an embodiment of the present invention.
[0020] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided.
[0021] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements a method for calculating item relevance according to an embodiment of the present invention.
[0022] An embodiment of the above invention has the following advantages or beneficial effects: calculation based on user behavior data can obtain a more accurate correlation result between two items in each item pair, and at the same time, the calculation result of the association rule mining algorithm is added to the recall algorithm as a correlation coefficient, the existing weight is optimized, and the accuracy of the calculation is improved.
[0023] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0025] Figure 1 is a flow chart of a method for calculating item relevance according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a process of determining one or more item pairs corresponding to each user according to user behavior data according to an embodiment of the present invention;
[0027] FIG3(A) is a schematic diagram of an item data table corresponding to each user according to an embodiment of the present invention;
[0028] FIG3(B) is a schematic diagram of an item row obtained after a column-to-row operation is performed on an item column corresponding to a single user according to an embodiment of the present invention;
[0029] FIG3(C) is a schematic diagram of cross-combining items in each row and column for a single user according to an embodiment of the present invention;
[0030] FIG3(D) is a schematic diagram of item pairs corresponding to each user after the combination of identical items is deleted according to an embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of a process of multi-node synchronous processing of a data table according to an embodiment of the present invention;
[0032] Figure 5 is a schematic diagram of a process for determining a correlation coefficient according to an embodiment of the present invention;
[0033] Figure 6 is a schematic diagram of a process for screening item pairs according to an embodiment of the present invention;
[0034] Figure 7 is a schematic diagram of a process of determining user pairs corresponding to target item pairs according to an embodiment of the present invention;
[0035] Figure 8 is a schematic diagram of a process of determining the correlation between two items in each item pair by using a recall algorithm according to an embodiment of the present invention;
[0036] Fig. 9 is a structural diagram of a swing structure in a recall algorithm according to an embodiment of the present invention;
[0037] Fig.10is a schematic diagram of main modules of an apparatus for calculating item relevance according to an embodiment of the present invention;
[0038] Fig.11 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0039] Fig.12 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0041] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.
[0042] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0043] Figure 1 4 is a schematic diagram of main steps of a method for calculating item relevance according to an embodiment of the present invention.
[0044] like Figure 1 As shown, the method for calculating item relevance in the embodiment of the present invention mainly includes the following steps:
[0045] Step S101: Acquire multiple user behavior data;
[0046] Step S102: determining one or more item pairs corresponding to each user according to the user behavior data;
[0047] Step S103: Calculate the correlation coefficient of each item pair using an association rule mining algorithm;
[0048] Step S104: determining user pairs corresponding to the item pairs according to one or more users corresponding to each item pair;
[0049] Step S105: using a recall algorithm to determine the correlation between two items in each item pair according to the user pairs corresponding to the item pairs and the correlation coefficient.
[0050] Among them, in the field of Internet e-commerce, item relevance can be understood as the relevance between two items that can be purchased on the e-commerce platform, and then information can be pushed based on the obtained relevance results, such as advertising push, item recommendation or activity recommendation. It can be understood that the user behavior data in step S201 refers to the data of operations between users and items, including but not limited to user order data, user purchase data (item data added to the shopping cart by the user), user attention data and user search data, wherein the data can be understood as item data, that is, items ordered by the user, items purchased, items followed and items searched.
[0051] It should be noted that, in the case of a large amount of data, each user will correspond to multiple items, and then to multiple item pairs, wherein step S102 counts item pairs with the user as the dimension, so as to calculate the correlation coefficient of each item pair corresponding to each user. In step S104, based on the determined item pairs, the user pairs corresponding to each item pair are counted with the item pairs as the dimension, so the description methods of step S102 and step S104 are different.
[0052] In an optional embodiment, the process of determining one or more item pairs corresponding to each user according to the user behavior data in step S102 can be as follows: Figure 2 As shown, including:
[0053] Step S201: determining the item columns corresponding to each user according to the user behavior data; wherein the item columns indicate the corresponding relationship between the user and one or more items;
[0054] For each item column corresponding to a user: execute step S202 and step S203;
[0055] Step S202: transform the item column to obtain the item row corresponding to the item column;
[0056] Step S203: performing cross processing on one or more items corresponding to the user according to the item rows and item columns to obtain an item pair corresponding to the user.
[0057] Among them, the item column in step S201 can be a matrix or a data table. The following takes the data table as an example to illustrate steps S201 to S203. In step S201, the item data table of all items corresponding to each user (who has placed an order, added a purchase, paid attention to, and searched) can be determined based on the user behavior data, as shown in Figure 3 (A), and each user has an independent item data table. Then, for each item column corresponding to each user, step S203 is executed to perform a column-to-row operation, and the item row corresponding to the item column can be obtained, as shown in Figure 3 (B), taking the column-to-row operation of the item data table corresponding to user 1 as an example. If it is in the case of a matrix, it can be understood as a transposition operation to convert the column matrix into a row matrix. After obtaining the item rows and item columns, the items in each row and column can be cross-combined, as shown in Figure 3 (C), where items ab and items ac are the combined item pairs. Finally, by deleting the combinations of the same items (i.e., deleting the combinations of the same items such as item aa and item bb), and performing deduplication processing on other combinations, we can obtain the item pairs corresponding to each user, as shown in FIG3(D).
[0058] It should be noted that in the field of big data with huge data volume, storing and calculating both the item rows and item columns in step S201 and step S202 in the form of data tables can effectively improve the computing efficiency and save storage space. However, in the process of implementing the recall algorithm in programming languages such as Python, the time and space complexity are greatly affected by the amount of data, and it is difficult to run successfully when the amount of data is large. Therefore, in a further optional embodiment, a large amount of data is processed synchronously by multiple nodes during the processing process, such as Figure 4 As shown, further comprising:
[0059] Step S401: Determine a plurality of processing nodes corresponding to each row of data according to the number of rows of the item column or the user column; wherein each processing node corresponds to one or more rows of data;
[0060] Step S402: using each processing node to synchronously perform a column-to-row conversion operation on the corresponding row or rows of data.
[0061] For example, different processing nodes may be allocated to different users according to the number of rows in the data table. Figure 3(A) to Figure 3(D)For example, there are 9 items in the item list corresponding to user A. Assuming that each processing node can process 3 rows of data in the data table, 3 processing nodes (processing nodes 1, 2, and 3) can be allocated to user A. Similarly, there are only 3 items in the item list corresponding to user B, so 1 processing node (processing node 4) can be allocated to user B. In a further optional embodiment, each processing node can correspond to only one row of data, so that each row of data can be processed independently. By setting multiple processing nodes to perform parallel processing respectively, the problem of uneven distribution of data processing efficiency when the amount of data is large is effectively solved.
[0062] For step S103, in an optional embodiment, the specific process of determining the correlation coefficient can be as follows: Figure 5 As shown, including:
[0063] Step S501: determining a first item and a second item in an item pair;
[0064] Step S502: Calculate the support corresponding to the first item, the second item and the item pair respectively by using an association rule mining algorithm;
[0065] Step S503: determining the credibility of the simultaneous appearance of the first item and the second item according to the ratio of the support corresponding to the item pair to the support corresponding to the first item;
[0066] Step S504: Determine the correlation coefficient according to the ratio of the credibility to the support corresponding to the second item.
[0067] The association rule mining algorithm may be an Apriori algorithm, support refers to the frequency of an item appearing in the entire data set, and confidence refers to the frequency of two items appearing at the same time. For the correlation coefficient, a value greater than or equal to 1 indicates that the first item and the second item are related, the larger the value, the more related, and a value less than 1 indicates that the first item and the second item are not related.
[0068] In a further optional embodiment, in the process of determining the user pairs corresponding to the item pairs in step S104, the item pairs need to be screened first to screen out the target item pairs that may have correlation. The specific screening process is as follows: Figure 6 As shown, including:
[0069] Step S601: determining one or more target item pairs whose corresponding user numbers are greater than a preset threshold according to one or more users corresponding to each item pair;
[0070] Step S602: Determine user pairs corresponding to one or more target item pairs.
[0071] It is understandable that, in the case of a large amount of data, when an item pair corresponds to only one or a small number of users, it means that the correlation between the two items in the item pair is small, and when there are multiple users, it means that the correlation between the two items in the item pair is large. Therefore, screening according to the number of users corresponding to the item pair can reduce the judgment of similarity between irrelevant items and improve calculation efficiency. In a further optional embodiment, the preset threshold is an integer not less than 1, because in the recall algorithm, the user pair corresponding to the item pair needs to be calculated as a group structure, so at least two users need to be satisfied.
[0072] On the basis of screening out the target item pairs, the process of determining the user pairs corresponding to the target item pairs in step S602 can be as follows: Figure 7 As shown, further comprising:
[0073] For each target item pair, execute steps S701 to S703:
[0074] Step S701: determining a user column corresponding to the target item pair according to multiple users corresponding to the target item pair;
[0075] Step S702: transform the user column to obtain the user row corresponding to the user column;
[0076] Step S703: performing cross processing on multiple users corresponding to the target item pair according to the user rows and user columns to obtain user pairs corresponding to the target item pair.
[0077] For the above process, cross processing is performed after converting columns into rows, which is the same as the process from step S202 to step S203, wherein the user column can be a matrix or a data table, and the processing process can also be processed simultaneously by multiple processing nodes. The specific implementation process is the same as step S401 to step S402, and this solution will not be repeated here.
[0078] In a further optional embodiment, the process of using each processing node to perform column-to-row operations on the corresponding row or rows of data in step S402 may include: for each processing node: using the column-to-row function in the data warehouse framework to perform column-to-row operations on one or more rows of data. The data warehouse framework may be a framework built using the open source Hive system, and the column-to-row function may be a UDTF (User-Defined Table-Generating Functions) function, which is a function for processing data tables. Especially when the amount of data is large, multiple data tables can be quickly processed into columns and rows to obtain a combination of every two data in the data table.
[0079] After obtaining the user pairs corresponding to each item pair and the correlation coefficient corresponding to each item pair, the recall algorithm can be used to calculate the correlation. The specific process is as follows: Figure 8 As shown, including:
[0080] Step S801: Calculate the similarity of each item pair under the corresponding user pair using a recall algorithm;
[0081] Step S802: Determine the correlation between two items in each item pair according to the product of the similarity and the correlation coefficient.
[0082] Exemplarily, the similarity in step S801 can be obtained by solving the following formula (1) and formula (2), as follows:
[0083] Assume that the item pair is item i and item j, and one of the user pairs corresponding to the item pair is user u and user v. The weight of the item pair under the corresponding user pair is as shown in formula (1):
[0084]
[0085] Among them, I u Represents the set of items that generate behavior data for user u, I v represents the set of items that generate behavior data for user v, and α is the smoothing factor.
[0086] Sum all user pairs corresponding to the item pairs to get the similarity ω of the item pairs i,j As formula (2):
[0087]
[0088] Among them, I u ∩I v The number of items in the intersection of the item set of user u's behavior data and the item set of user v's behavior data, U i ∩U j Represents the set of all user pairs corresponding to item pairs.
[0089] After obtaining the similarity of the item pair, the final similarity can be obtained by multiplying it with the correlation coefficient, as shown in formula (3):
[0090]
[0091] Among them, lift i<=i represents the correlation coefficient, ω u and ω v are the normalization coefficients corresponding to user u and user v respectively, where |I v| represents the number of products of user v, |I u | represents the number of products of user u.
[0092] Through the above formulas (1) to (3), the results obtained by the association rule mining algorithm are used as the correlation coefficient to optimize the weights in the recall algorithm, so that in the process of calculating the correlation between two items, the impact of user behavior on the correlation of items is fully considered, thereby obtaining a more accurate calculation result.
[0093] In a further optional embodiment, after obtaining the user pairs corresponding to the item pairs, the method further includes: constructing a swing structure in the recall algorithm according to the item pairs and the user pairs corresponding to the item pairs; wherein the swing structure includes nodes corresponding to each item and each user, and connection paths between each user and each item. Fig. 9 As shown in the figure, capital letters such as A, B, and C represent users, and lowercase letters such as h, r, and p represent items. Each pair of users corresponding to each pair of items is regarded as a group of structures. The weighted sum of the structures corresponding to multiple pairs of users corresponding to the same pair of items (two items) can be used to obtain the similarity of each pair of items. Taking items h and p as an example, the user pairs corresponding to the item pair are users A and B, users B and C, and users A and C, that is, there are three groups of structures, namely<B,p,C> ,<A,p,B> as well as<A,p,C> , weights of the three groups of structures are calculated respectively according to the above formula (1), and weighted summation is performed according to the above formula (2) to obtain the similarity.
[0094] In a further embodiment, when it is necessary to update, delete, or add a user or item, it also includes: updating the swing structure according to the updated, deleted, or added user or item. It is understandable that when it is necessary to update a user or item, the node and connection path in the swing structure are added; when a user or item is deleted, the node in the swing structure and the connection path corresponding to the node are deleted; when a user or item is updated, the node in the swing structure is modified.
[0095] According to the method for calculating item correlation according to an embodiment of the present invention, a more accurate correlation result between two items in each item pair can be obtained by performing calculation based on user behavior data. At the same time, the calculation result of the association rule mining algorithm is added to the recall algorithm as a correlation coefficient, and the existing weights are optimized, thereby improving the accuracy of the calculation.
[0096] Fig.10 4 is a schematic diagram of main modules of an apparatus for calculating item relevance according to an embodiment of the present invention.
[0097] like Fig.10As shown, the device 1000 for calculating item correlation according to the embodiment of the present invention includes:
[0098] An acquisition module 1001 is used to acquire multiple user behavior data;
[0099] A determination module 1002 is used to determine one or more item pairs corresponding to each user according to the user behavior data; and to determine user pairs corresponding to the item pairs according to one or more users corresponding to each item pair;
[0100] The calculation module 1003 is used to calculate the correlation coefficient of each item pair using an association rule mining algorithm; and to determine the correlation between the two items in each item pair based on the user pairs corresponding to the item pairs and the correlation coefficient using a recall algorithm.
[0101] In an optional embodiment of the present invention, the determination module 1002 is also used to determine the item columns corresponding to each user according to the user behavior data; wherein the item columns indicate the corresponding relationship between the user and one or more items; for each item column corresponding to the user: transform the item column to obtain the item row corresponding to the item column; according to the item row and the item column, cross-process the one or more items corresponding to the user to obtain the item pair corresponding to the user.
[0102] In an optional embodiment of the present invention, the calculation module 1003 is also used to determine the first item and the second item in the item pair; calculate the support corresponding to the first item, the second item and the item pair respectively using an association rule mining algorithm; determine the credibility of the simultaneous appearance of the first item and the second item based on the ratio of the support corresponding to the item pair to the support corresponding to the first item; determine the correlation coefficient based on the ratio of the credibility to the support corresponding to the second item.
[0103] In an optional embodiment of the present invention, the determination module 1002 is also used to determine one or more target item pairs whose corresponding user number is greater than a preset threshold based on one or more users corresponding to each item pair; and determine the user pairs corresponding to the one or more target item pairs.
[0104] In an optional embodiment of the present invention, the determination module 1002 is also used to, for each target item pair: determine a user column corresponding to the target item pair according to multiple users corresponding to the target item pair; transform the user column to obtain a user row corresponding to the user column; and cross-process the multiple users corresponding to the target item pair according to the user row and the user column to obtain a user pair corresponding to the target item pair.
[0105] In an optional embodiment of the present invention, the determination module 1002 is also used to determine multiple processing nodes corresponding to each row of data according to the number of rows of the item column or the user column; wherein each of the processing nodes corresponds to one or more rows of data; and each of the processing nodes is used to synchronously perform column-to-row operations on the corresponding row or rows of data.
[0106] In an optional embodiment of the present invention, the determination module 1002 is further used to: for each of the processing nodes: utilize a column-to-row function in a data warehouse architecture framework to perform column-to-row operations on the one or more rows of data.
[0107] In an optional embodiment of the present invention, the calculation module 1003 is also used to calculate the similarity of each item pair under the corresponding user pair using a recall algorithm; and determine the correlation between each item pair based on the product of the similarity and the correlation coefficient.
[0108] In an optional embodiment of the present invention, the device also includes a storage module, which is used to construct a swing structure in the recall algorithm based on the item pairs and the user pairs corresponding to the item pairs; wherein the swing structure includes nodes corresponding to each item and each user, and a connection path between each user and each item.
[0109] In an optional embodiment of the present invention, the storage module is also used to update the swing structure according to the updated, deleted, or newly added users or items when the users or items are updated, deleted, or newly added.
[0110] According to the device for calculating item correlation according to the embodiment of the present invention, a more accurate correlation result between two items in each item pair can be obtained by performing calculation based on user behavior data. At the same time, the calculation result of the association rule mining algorithm is added as a correlation coefficient to the recall algorithm, and the existing weights are optimized, thereby improving the accuracy of the calculation.
[0111] Fig.11 An exemplary system architecture 1100 is shown to which the method for calculating item correlation or the apparatus for calculating item correlation according to an embodiment of the present invention can be applied.
[0112] like Fig.11 As shown, system architecture 1100 may include terminal devices 1101, 1102, 1103, a network 1104, and a server 1105. Network 1104 is used to provide a medium for communication links between terminal devices 1101, 1102, 1103 and server 1105. Network 1104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0113] Users can use terminal devices 1101, 1102, 1103 to interact with server 1105 through network 1104 to receive or send data, etc. Various communication client applications can be installed on terminal devices 1101, 1102, 1103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0114] The terminal devices 1101 , 1102 , and 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0115] The server 1105 may be a server that provides various services, such as a background management server that provides support for user behavior data obtained by users using the terminal devices 1101, 1102, and 1103. The background management server may analyze and process the obtained user behavior data and other data, and feed back the processing results (such as push messages obtained based on the correlation between items) to the terminal device.
[0116] It should be noted that the method for calculating item correlation provided in the embodiment of the present invention is generally executed by the server 1105 , and accordingly, the device for calculating item correlation is generally set in the server 1105 .
[0117] It should be understood that Fig.11 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0118] Reference below Fig.12 , which shows a schematic diagram of the structure of a computer system 1200 of a terminal device suitable for implementing an embodiment of the present invention. Fig.12 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0119] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the system 1200 are also stored. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) first interface 1205 is also connected to the bus 1204.
[0120] The following components are connected to the I / O first interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network first interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O first interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0121] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the above-mentioned functions defined in the system of the present invention are executed.
[0122] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes an acquisition module, a determination module, and a calculation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the acquisition module may also be described as a "module for acquiring multiple user behavior data."
[0125] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining multiple user behavior data; determining one or more item pairs corresponding to each user according to the user behavior data; calculating the correlation coefficient of each item pair using an association rule mining algorithm; determining the user pair corresponding to each item pair according to the one or more users corresponding to each item pair; and determining the correlation between two items in each item pair according to the user pair corresponding to the item pair and the correlation coefficient using a recall algorithm.
[0126] According to the technical solution of the embodiment of the present invention, by performing calculations based on user behavior data, a more accurate correlation result between two items in each item pair can be obtained. At the same time, the calculation result of the association rule mining algorithm is added to the recall algorithm as a correlation coefficient, the existing weights are optimized, and the accuracy of the calculation is improved.
[0127] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for calculating item relevance, characterized in that: include: Obtain multiple user behavior data; Determine one or more item pairs corresponding to each user according to the user behavior data; Use association rule mining algorithm to calculate the correlation coefficient of each item pair; Determine the user pairs corresponding to the item pairs according to one or more users corresponding to each item pair; The correlation between the two items in each item pair is determined by using a recall algorithm according to the user pairs corresponding to the item pairs and the correlation coefficients.
2. The method according to claim 1, characterized in that The determining one or more item pairs corresponding to each user respectively according to the user behavior data includes: Determine, according to the user behavior data, the item columns corresponding to each user; wherein the item columns indicate the corresponding relationship between the user and one or more items; For each item column corresponding to the user: Transforming the item column to obtain item rows corresponding to the item column; According to the item rows and item columns, cross processing is performed on one or more items corresponding to the user to obtain an item pair corresponding to the user.
3. The method according to claim 1, characterized in that The method of calculating the correlation coefficient of each item pair by using the association rule mining algorithm includes: determining a first item and a second item in the item pair; Calculating the support degrees corresponding to the first item, the second item, and the item pair respectively by using an association rule mining algorithm; Determining the credibility of the simultaneous appearance of the first item and the second item according to the ratio of the support corresponding to the item pair to the support corresponding to the first item; The correlation coefficient is determined according to a ratio of the credibility to the support corresponding to the second item.
4. The method according to claim 1, characterized in that: The step of determining the user pairs corresponding to the item pairs according to the one or more users corresponding to the item pairs includes: According to one or more users corresponding to each item pair, one or more target item pairs whose number of corresponding users is greater than a preset threshold are determined; Determine user pairs corresponding to the one or more target item pairs.
5. The method according to claim 4, characterized in that The determining the user pairs corresponding to the one or more target item pairs respectively includes: For each target item pair: Determine a user column corresponding to the target item pair according to a plurality of users corresponding to the target item pair; Transforming the user column to obtain a user row corresponding to the user column; According to the user rows and user columns, a plurality of users corresponding to the target item pair are cross-processed to obtain a user pair corresponding to the target item pair.
6. The method according to claim 2 or 5, characterized in that: Also includes: Determine a plurality of processing nodes corresponding to each row of data according to the number of rows of the item column or the user column; wherein each of the processing nodes corresponds to one or more rows of data; Each of the processing nodes is used to synchronously perform a column-to-row conversion operation on a corresponding row or rows of data.
7. The method according to claim 6, characterized in that The using each of the processing nodes to perform a column-to-row operation on the corresponding row or rows of data includes: For each of the processing nodes: using the column-to-row function in the data warehouse framework, perform column-to-row operations on the one or more rows of data.
8. The method according to claim 1, characterized in that The using a recall algorithm to determine the correlation between two items in each item pair according to the user pairs corresponding to the item pairs and the correlation coefficients includes: Calculate the similarity of each item pair under the corresponding user pair using a recall algorithm; The correlation between the two items in each of the item pairs is determined according to the product of the similarity and the correlation coefficient.
9. The method according to claim 1, characterized in that: Also includes: According to the item pairs and the user pairs corresponding to the item pairs, a swing structure in the recall algorithm is constructed; wherein the swing structure includes nodes corresponding to each item and each user, and connection paths between each user and each item.
10. The method according to claim 9, characterized in that Also includes: In the case of updating, deleting, or adding a user or an item, the swing structure is updated according to the updated, deleted, or added user or item.
11. A device for calculating item relevance, characterized in that: include: An acquisition module is used to acquire multiple user behavior data; A determination module, configured to determine one or more item pairs corresponding to each user according to the user behavior data; and determine user pairs corresponding to the item pairs according to one or more users corresponding to each item pair; The calculation module is used to calculate the correlation coefficient of each item pair by using an association rule mining algorithm; and to determine the correlation between two items in each item pair according to the user pairs corresponding to the item pairs and the correlation coefficient by using a recall algorithm.
12. An electronic device for calculating item relevance, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.