TWI522945B - Method and system for item association recommendation - Google Patents

Method and system for item association recommendation Download PDF

Info

Publication number
TWI522945B
TWI522945B TW102132376A TW102132376A TWI522945B TW I522945 B TWI522945 B TW I522945B TW 102132376 A TW102132376 A TW 102132376A TW 102132376 A TW102132376 A TW 102132376A TW I522945 B TWI522945 B TW I522945B
Authority
TW
Taiwan
Prior art keywords
item
items
database table
kth
relationship
Prior art date
Application number
TW102132376A
Other languages
Chinese (zh)
Other versions
TW201411525A (en
Inventor
Fan Zhang
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed filed Critical
Publication of TW201411525A publication Critical patent/TW201411525A/en
Application granted granted Critical
Publication of TWI522945B publication Critical patent/TWI522945B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

物品關聯推薦的方法及系統 Method and system for item association recommendation

本發明係有關於物品關聯推薦的方法及系統。 The present invention relates to methods and systems for item related recommendations.

物品關聯推薦引擎是商務領域的一項核心技術,可以有效地幫助用戶發現需求、促進物品的銷售等。 The item association recommendation engine is a core technology in the business field, which can effectively help users discover needs and promote sales of items.

現有技術中,圖書關聯推薦的方法一般包括步驟:首先掃描全部使用者購買圖書的記錄,並把每個使用者的購買記錄整理為單獨的集合;其次分別窮舉每個集合中所有元素的二元組合,並把所有集合中相同的二元組合合併為一項,其中相同的二元組合出現的次數用Count值表示,以及將所有不同的二元組合的標識和對應的Count值構成資料庫表;最後對與第一圖書相關的所有圖書構成的二元組合按照Count值由大到小進行排列,構成排序列表,並按照從前到後的順序從該排序清單中提取與需要推薦的物品的個數相等的圖書作為與該圖書關聯的可推薦的圖書。 In the prior art, the method for recommending a book association generally includes the steps of: first scanning a record of all users purchasing a book, and sorting each user's purchase record into a separate set; secondly, excluding each of the elements in each set Combine the elements and combine the same binary combinations in all the sets into one. The number of occurrences of the same binary combination is represented by the Count value, and the identifiers of all the different binary combinations and the corresponding Count values constitute a database. Finally, the binary combination of all the books related to the first book is arranged according to the Count value from large to small to form a sorted list, and the items to be recommended are extracted from the sorted list in order from the front to the back. An equal number of books serve as recommendable books associated with the book.

在實現上述圖書關聯推薦的過程中,發明人發現現有技術中至少存在如下問題:因計算方法複雜,使得運算速度慢;因採用窮舉二元組合的方法構建資料庫表,使得存儲佔有量大,進而使得成本高。 In the process of implementing the above-mentioned book association recommendation, the inventor found that at least the following problems exist in the prior art: the calculation method is complicated, so that the operation speed is slow; and the database table is constructed by using the exhaustive binary combination method, so that the storage occupancy is large. , which in turn makes the cost high.

本發明實施例提供物品關聯推薦的方法及系統,採用記憶體矩陣的存儲方式,根據記憶體矩陣的任意兩個物品的向量之間的運算可以直接計算該任意兩個物品之間的關聯關係值,可有效減小存儲空間,提高計算速度,降低成本。 Embodiments of the present invention provide a method and system for item association recommendation, which uses a memory matrix storage method to directly calculate an association value between any two items according to an operation between vectors of any two items of a memory matrix. Can effectively reduce storage space, increase calculation speed and reduce cost.

為達到上述目的,根據本發明的一個方面,提供一種物品關聯推薦的方法,包括步驟:獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄;根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識Bi與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊,其中i=1,2,...n;根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品與上述第k物品之間的關聯關係值,其中L(Bk)指上述第k物品所在列的所有元素組成的向量,L(Bi)指上述第i物品所在列的所有元素組成的向量,而R(Bi_k)指上述第i物品與上述第k物品的關聯關係值,其中k=1,2,...n;對所有上述其他物品與上述第k物品的關聯關係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 In order to achieve the above object, according to an aspect of the present invention, a method for item-related recommendation is provided, comprising the steps of: obtaining attribute information of an item, wherein the attribute information of the item includes an identification of the item, an identifier of the user, and a record of the item purchased by the user. Generating a database table stored in the form of a memory matrix according to the attribute information of the above item, wherein the rows and columns of the database table respectively represent the identifier B i of the item and the identifier of the user, and the elements of the database table indicate corresponding The user purchases information of the corresponding item, where i=1, 2, . . . n; and calculates the k- th item in the above-mentioned database table according to R(B i_k )=L(B i )*L(B k ) The relationship between the i-th item other than the k-th item, wherein L(B k ) is a vector of all elements of the column in which the k-th item is located, and L(B i ) refers to the column of the i-th item. a vector consisting of all the elements, and R(B i_k ) refers to the relationship between the above-mentioned i-th article and the k-th article, wherein k=1, 2, . . . n; for all the other items and the k-th item described above The relationship values are sorted and based on the above The number of items to be recommended for the kth item determines the item to which the kth item is associated and recommended.

優選地,根據CPU的核心數將上述資料庫表中的所有物品平均分為相應物品組,並在每一個上述組之間平行計算上述每個組內包含的上述其他物品與上述第k物品之間的關聯關係值。 Preferably, all the items in the database table are equally divided into corresponding item groups according to the number of cores of the CPU, and the other items included in each of the groups and the k-th item are calculated in parallel between each of the groups. The relationship value between.

優選地,上述物品組的個數是CPU的核心數加1。 Preferably, the number of the above-mentioned item groups is the number of cores of the CPU plus one.

優選地,將所有上述其他物品與上述第k物品的關聯關係值按照計算的先後順序,降冪***到預設鏈表中,上述預設鏈表包含的最大元素個數與上述第k物品需要推薦的物品個數相同。 Preferably, the relationship value of all the other items and the kth item is inserted into the preset linked list according to the calculated order, and the maximum number of elements included in the preset linked list is required for the kth item. The recommended number of items is the same.

優選地,上述記憶體矩陣採用二進位位元的形式存儲。 Preferably, the above memory matrix is stored in the form of binary bits.

優選地,週期性地獲取物品的屬性資訊,根據週期性地獲取的上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,根據更新的資料庫表計算上述關聯關係值,並根據更新的關聯關係值進行排序以確定對上述第k物品進行關聯推薦的物品。 Preferably, the attribute information of the item is periodically acquired, and the database table stored in the memory matrix form is generated according to the attribute information of the item acquired periodically, and the relationship value is calculated according to the updated database table, and is updated according to the update The relationship values are sorted to determine the items that are associated with the kth item described above.

根據本發明的另一方面,提供一種物品關聯推薦的系統,包括:獲取單元,用於獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄;生成單元,用於根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識Bi與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊,其中i=1,2,...n;計算單元,用於根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品與上述第k物品之間的關聯關係值,其中L(Bk)指上述第k物品所在列的所有元素組成的向量,L(Bi)指上述第i物品所在列的所有元素組成的向量,R(Bi_k)指上述第i物品與上述第k物品的關聯關係值,其中k=1,2,...n;排序單元,用於對所有上述其他物品與上述第k物品的關聯關 係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 According to another aspect of the present invention, a system for item-related recommendation is provided, comprising: an obtaining unit, configured to acquire attribute information of an item, wherein the attribute information of the item includes an identifier of the item, an identifier of the user, and a record of the item purchased by the user. a generating unit, configured to generate a database table stored in the form of a memory matrix according to the attribute information of the item, wherein the row and the column of the database table respectively represent the identifier B i of the item and the identifier of the user, and the database table The element represents the information of the corresponding user purchasing the corresponding item, where i=1, 2, . . . n; the calculation unit is respectively calculated according to R(B i_k )=L(B i )*L(B k ) The relationship between the i-th item other than the k-th item and the k-th item described above, wherein L(B k ) refers to a vector consisting of all the elements of the column of the k-th item, L ( B i ) refers to a vector consisting of all the elements of the column in which the i-th article is located, and R(B i_k ) refers to the relationship between the i-th article and the k-th article, wherein k=1, 2, . . . n; Unit for all of the above other items and the above kth object The relationship value of the item is sorted, and the item recommended for the kth item is determined according to the number of items that need to be recommended for the kth item.

本發明實施例提供的物品關聯推薦的方法及系統,根據物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,根據資料庫表中任意兩個物品的向量之間的運算可以直接計算該任意兩個物品之間的關聯關係值,可有效減小存儲空間,提高計算速度,降低成本,解決了現有技術中推薦物品計算速度慢,成本高的問題。 The method and system for item association recommendation provided by the embodiment of the present invention generates a database table stored in the form of a memory matrix according to the attribute information of the item, and can directly calculate the calculation according to the operation between the vectors of any two items in the database table. The relationship value between any two items can effectively reduce the storage space, increase the calculation speed, reduce the cost, and solve the problem that the recommended items in the prior art are slow in calculation and high in cost.

301‧‧‧獲取單元 301‧‧‧Acquisition unit

302‧‧‧生成單元 302‧‧‧Generating unit

303‧‧‧計算單元 303‧‧‧Computation unit

304‧‧‧排序單元 304‧‧‧Sorting unit

305‧‧‧分組單元 305‧‧‧ grouping unit

306‧‧‧更新單元 306‧‧‧Update unit

本發明的上述技術方案通過結合了附圖的實施例變得更加明白,在附圖中,圖1示出根據本發明的物品關聯推薦的方法的流程圖;圖2示出根據本發明的鏈表***排序法的流程圖;圖3示出根據本發明的一個實施例的物品關聯推薦系統的方塊圖;圖4示出根據本發明的另一個實施例的物品關聯推薦系統的方塊圖。 The above-described technical solutions of the present invention will become more apparent from the embodiments in which the drawings are shown in which FIG. 1 shows a flow chart of a method of item-related recommendation according to the present invention; FIG. 2 shows a chain according to the present invention. A flowchart of a table insertion ordering method; FIG. 3 is a block diagram showing an item association recommendation system according to an embodiment of the present invention; and FIG. 4 is a block diagram showing an item association recommendation system according to another embodiment of the present invention.

下面將結合本發明的附圖,對本發明實施例中的技術方案進行詳細描述。 The technical solutions in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

顯然,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有做出創造性勞動前提下所獲得的所有其他 實施例,都屬於本發明保護的範圍。 It is apparent that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. Based on the embodiments of the present invention, all others obtained by those of ordinary skill in the art without creative efforts The embodiments are all within the scope of protection of the present invention.

本發明實施例的物品關聯推薦的方法可以應用於各種物品的推薦,例如圖書、歌曲、電影、日用品等各種物品。尤其適用於中小規模網站(物品的種類數量小於10萬,用戶的數量在百萬級別)的物品關聯推薦。 The method for item-related recommendation of the embodiment of the present invention can be applied to recommendations of various items, such as books, songs, movies, daily necessities, and the like. It is especially suitable for item-related recommendations for small and medium-sized websites (the number of items is less than 100,000 and the number of users is in the millions).

圖1示出根據本發明的物品關聯推薦的方法的流程圖。參見圖1,在步驟S101中,獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄。 1 shows a flow chart of a method of item association recommendation in accordance with the present invention. Referring to FIG. 1, in step S101, attribute information of an item is acquired, and the attribute information of the item includes an identification of the item, an identifier of the user, and a record of the item purchased by the user.

例如,獲取物品的屬性資訊,包括:獲取所有物品的標識,其中物品的標識可以為該物品的條碼或其他可唯一表示該物品的標識,本實施例中採用B1、B2、B3......Bn形式表示不同物品的標識;獲取所有使用者的標識,其中使用者的標識可以為該使用者的登陸帳號或者其他可唯一表示該使用者的標識,本實施例中採用U1、U2、U3......Um形式表示不同使用者的標識;獲取所有使用者購買的所有物品的記錄,其中使用者購買物品的記錄為使用者與所購買的物品之間的關係,可以為該用戶購買該物品的數量或者購買金額等。 For example, obtaining the attribute information of the item includes: obtaining the identifier of all the items, wherein the identifier of the item may be a barcode of the item or other identifier that can uniquely represent the item, and B 1 , B 2 , and B 3 are used in this embodiment. .....B n form the identification of different items; the identification of all users is obtained, wherein the user's identification may be the user's login account or other identifier that uniquely represents the user, which is used in this embodiment. U 1 , U 2 , U 3 ... U m forms represent the identification of different users; a record of all items purchased by the user is obtained, wherein the user purchases the item as the user and the purchased item The relationship between the number of items that can be purchased for the user, the amount of purchase, and the like.

優選地,為了更好的為活躍用戶推薦熱點物品,物品的屬性資訊可以只記錄熱點物品的標識、活躍使用者的標識、以及活躍使用者購買的熱點物品的記錄,其中熱點物品可以根據需要進行選擇,例如,根據每種物品的銷售額或者銷售數量進行選擇,活躍使用者也可以根據需要進行選擇,例如,可根據每個使用者的消費額或者活躍次數(購買次數)選擇。 Preferably, in order to better recommend the hot item for the active user, the attribute information of the item may only record the identifier of the hot item, the identifier of the active user, and the record of the hot item purchased by the active user, wherein the hot item may be performed as needed. The selection, for example, is based on the sales or the number of sales of each item, and the active user can also make a selection as needed, for example, according to the amount of consumption or the number of activations (number of purchases) of each user.

例如,預定熱點物品的種類為4萬,當所有物品的種類大於4萬時,根據每種物品的銷售數量按照由大到小的順序對該所有種類的物品進行排序,選擇前4萬種物品作為熱點物品,若至少兩種物品的銷售數量相等,則隨機排序;當所有物品的種類小於或等於4萬時,所有物品均為熱點物品。 For example, the type of the hot item is 40,000, and when the type of the item is more than 40,000, the items of all kinds are sorted according to the sales quantity of each item, and the first 40,000 items are selected. As a hot item, if at least two items are sold in equal numbers, they are randomly sorted; when all items are less than or equal to 40,000, all items are hot items.

預定活躍用戶的個數為200萬,當所有用戶的個數大於200萬時,根據每個使用者的活躍次數按照由多到少的順序或根據每個使用者的消費額按照由高到低的順序對該所有使用者進行排序,並選擇前200萬個用戶作為活躍用戶,若至少兩個用戶的活躍次數相等,則隨機排序;當所有用戶的個數小於或等於200萬時,所有用戶均為活躍用戶。 The number of scheduled active users is 2 million. When the number of all users is greater than 2 million, the number of active users per user is in descending order or according to the consumption amount of each user. The order of all users is sorted, and the first 2 million users are selected as active users. If at least two users have the same number of active times, they are randomly sorted; when the number of all users is less than or equal to 2 million, all users All are active users.

優選地,在步驟S101中,可以設置一個更新週期,更新週期的長短可以根據物品銷售變化情況進行設定,例如,可以設為一個月,一周或一天,本發明對此不進行限制,在每個更新週期內獲取上述每個更新週期內的物品的屬性資訊並進行更新。本實施例下述各步驟均以當前週期為例進行說明。 Preferably, in step S101, an update period may be set, and the length of the update period may be set according to the change of the item sales, for example, may be set to one month, one week or one day, and the present invention does not limit this, in each The attribute information of the items in each of the above update periods is obtained and updated in the update period. The following steps in the present embodiment are described by taking the current cycle as an example.

接下來,在步驟S102中,根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識Bi(其中i=1,2,...n)與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊。 Next, in step S102, a database table stored in the form of a memory matrix is generated according to the attribute information of the item, wherein the rows and columns of the database table respectively represent the identifier B i of the item (where i=1, 2, ...n) with the user's logo, the elements of the above database table indicate the corresponding user's purchase of the corresponding item information.

例如,首先表初始化上一週期的資料庫,然後根據當前週期內物品屬性資訊生成當前週期的資料庫表。 For example, first the table initializes the database of the previous cycle, and then generates a database table of the current cycle according to the item attribute information in the current cycle.

該資料表庫的行可以表示使用者的標識,對應的 列表示物品的標識,也可以行表示物品的標識,對應的列表示使用者的標識。本實施例中的資料庫表以行表示使用者的標識、列表示物品的標識為例進行說明。 The row of the data table library can represent the user's logo, corresponding The column indicates the identity of the item, and may also indicate the identity of the item, and the corresponding column indicates the identity of the user. The database table in this embodiment is described by taking an example in which the user's logo is displayed in a row and the column indicates the identifier of the article.

記憶體矩陣可以採用二進位位元、八進制、十進位等各種數制的形式存儲,優選地,為了使存儲佔有量最小,本實施例的上述記憶體矩陣採用二進位位元的形式存儲,其中資料庫表初始化可以將所有二進位位元的資料庫表的每個元素的初始值均歸0。 The memory matrix may be stored in the form of a binary number, an octal, a decimal, or the like. Preferably, in order to minimize the storage occupancy, the memory matrix of the embodiment is stored in the form of a binary bit, wherein The database table initialization can zero the initial value of each element of the database table of all binary bits.

例如,根據上述屬性資訊生成資料庫表,其中屬性資訊可以採用表格形式或者其他形式表示,參見表1,為當前週期內選取的活躍用戶購買選定的熱點物品的資訊,其中Bi代表熱點物品,Ui代表活躍用戶,每個儲存格內代表對應的活躍用戶購買對應熱點物品的數量。 For example, the database table is generated according to the attribute information, wherein the attribute information may be expressed in a tabular form or other forms. See Table 1 for purchasing information of the selected hot item for the active user selected in the current period, where B i represents a hot item. U i represents an active user, and each cell represents the number of corresponding hot items on behalf of the corresponding active user.

那麼,根據表1中當前週期內選取的活躍用戶購買選定的熱點物品的資訊生成的資料庫表如表2所示:每個元 素的初始狀態均為0,若活躍用戶Ux購買了熱點物品By,則把Ux與By對應的元素(Ux,By)設為1。需說明的是,只要該活躍用戶Ux購買了熱點物品By,就把(Ux,By)設為1,而與購買數量無關。 Then, according to the information generated by the active user selected in the current period in Table 1 to purchase the selected hot item, the database table is as shown in Table 2: the initial state of each element is 0, if the active user U x purchases the hot item B y, put the U element (U x, B y) x and B y corresponding to 1. It should be noted that as long as the active user U x purchases the hot item B y , ( U x , B y ) is set to 1, regardless of the number of purchases.

接下來,在步驟S103中,根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品除第k一物品之外的第i物品與第k物品之間的關聯關係值。這裡,L(Bk)指上述第k物品所在列或行的所有元素組成的向量,L(Bi)指上述第i物品所在列/或行的所有元素組成的向量,R(Bi_k)指上述第i物品與上述第k物品的關聯關係值,其中i=1,2,...,n;而k=1,2,...m。 Next, in step S103, the i-th item other than the k-th item in the database table is calculated according to R(B i_k )=L(B i )*L(B k ). The value of the relationship between the outer i-th item and the k-th item. Here, L(B k ) refers to a vector composed of all elements of the column or row in which the kth item is located, and L(B i ) refers to a vector composed of all elements of the column/row of the above i-th item, R(B i_k ) Refers to the relationship between the above-mentioned i-th article and the above-mentioned kth article, where i=1, 2, . . . , n; and k=1, 2, . . . m.

例如,若需要獲取與第k物品相關聯的可推薦的物品,則需要計算所有其他物品與第k物品的關聯關係值,其中每個其他物品與第k物品的關聯關係值的計算方法均相同。假設第k物品Bk為第一物品B1,在此僅以物品B2與B1的關 聯關係值的計算方法為例進行說明。 For example, if it is necessary to obtain a recommendable item associated with the kth item, then the relationship value of all other items to the kth item needs to be calculated, wherein the relationship value of each other item and the kth item is calculated in the same way. . Assuming that the kth item B k is the first item B 1 , only the calculation method of the relationship value of the items B 2 and B 1 will be described as an example.

參見表2,第一物品B1所在的列組成的向量為L(B1)=(0,1,0,1,...,1),物品B2所在的列組成的向量為L(B2)=(1,0,1,1,...,1),那麼,物品B2與該第一物品B1之間的關聯關係值R(B2_1)的計算方法如下:R(B2_1)=L(B2)*L(B1)=(1,0,1,1,...,1)*(0,1,0,1,...,1)=1*0+0*1+1*0+1*1+...+1*1。同理,可分別依次計算出其他物品與該第一物品B1的關聯關係值:R(B3_1)、R(B4_1)、...、R(Bi_1)、...、R(Bn_1)。 Referring to Table 2, the vector of the column in which the first item B 1 is composed is L(B 1 )=(0, 1, 0, 1, ..., 1), and the vector in which the column of the item B 2 is composed is L ( B 2 )=(1,0,1,1,...,1), then, the calculation relationship value R(B 2_1 ) between the item B 2 and the first item B 1 is calculated as follows: R ( B 2_1 )=L(B 2 )*L(B 1 )=(1,0,1,1,...,1)*(0,1,0,1,...,1)=1* 0+0*1+1*0+1*1+...+1*1. Similarly, the relationship between other items and the first item B 1 can be calculated in order: R(B 3_1 ), R(B 4_1 ), . . . , R(B i_1 ), . . . , R ( B n_1 ).

優選地,在步驟S103之前,為了使得硬體效率達到最大,進而使計算速度最大,上述方法還可以包括:根據CPU的核心數將資料庫表中的所有物品平均分為至少兩個組;然後在每一個組之間平行計算每個組內包含的其他物品與第一物品B1之間的關聯關係值,每個組內串列計算該組中除第一物品B1之外的其他物品與第一物品B1之間的關聯關係值。 Preferably, before step S103, in order to maximize the hardware efficiency and thereby maximize the calculation speed, the method may further include: dividing all the items in the database table into at least two groups according to the number of cores of the CPU; Calculating the relationship between the other items included in each group and the first item B 1 in parallel between each group, and calculating the items other than the first item B 1 in the group in each group. The relationship value with the first item B 1 .

例如,假設表2中物品共有4萬種,均分為甲(B1-B10000)、乙(B10001-B20000)、丙(B20001-B30000)、丁(B30001-B40000)四個組,每個組分別利用一個執行緒計算該組內物品與第一物品的關聯關係值,各執行緒之間的計算可獨立進行,所以,各組之間可實現平行計算,例如,可以同時計算B2、B10001、B20001、B30001四種物品與B1的關聯關係值R(B2_1)、R(B10001_1)、R(B20001_1)、R(B30001_1)。 For example, suppose that there are 40,000 items in Table 2, which are divided into A (B 1 -B 10000 ), B (B 10001 -B 20000 ), C (B 20001 -B 30000 ), D (B 30001 -B 40000 ) Four groups, each of which uses a thread to calculate the relationship between the items in the group and the first item, and the calculation between the threads can be performed independently, so parallel calculation can be implemented between the groups, for example, B 2 can be calculated simultaneously, B 10001, B 20001, B 30001 B with four kinds of articles association value R (B 2_1) 1 is, R (B 10001_1), R (B 20001_1), R (B 30001_1).

例如,若將所有物品平均分組後還有餘數,則作 為餘數的物品可隨機分給任何一組。 For example, if there is a remainder after all the items are grouped evenly, then Items that are the remainder can be randomly assigned to any group.

例如,假設表2中物品共有4萬種,均分為7組後還餘下2種物品,將該七個組分別表示為A、B、C、D、E、F、G,那麼可將剩餘的2種物品隨機分給A、B、C、D、E、F、G中的任意一組。 For example, suppose that there are 40,000 items in Table 2, and after dividing into 7 groups, there are still 2 items remaining, and the seven groups are respectively represented as A, B, C, D, E, F, G, then the remaining The two kinds of items are randomly assigned to any one of A, B, C, D, E, F, and G.

優選地,可以將上述資料庫表中的所有物品分為上述推薦伺服器CPU的核心數加1個組。 Preferably, all the items in the above-mentioned database table may be divided into the number of cores of the above-mentioned recommended server CPU plus one group.

接下來,在步驟S104中,對所有上述其他物品與上述第一物品的關聯關係值進行排序,並根據上述第一物品需要推薦的物品個數確定對上述第一物品進行關聯推薦的物品。 Next, in step S104, the relationship values of all the other items and the first item are sorted, and the items recommended for the first item are determined according to the number of items that the first item needs to be recommended.

例如,獲取所有其他物品與第一物品B1的關聯關係值後,對所有關聯關係值進行降冪排列,然後根據需要推薦的物品個數T取排序最靠前的T個關聯關係值對應的物品作為對第一物品進行關聯推薦的物品。 For example, after obtaining all relationships with other items of the first item values B 1, and all arranged for descending relationship values, then the highest ranking T take the T values corresponding relationship according to the number of items required to be recommended The item is an item that is associated with the first item.

優選地,為了進一步減小存儲佔有量,可採用鏈表***排序法獲取排序最靠前的T個關聯關係值。設定第一物品為B1,物品的種類為n,Bi表示第i種物品,鏈表S的最大元素個數為T。 Preferably, in order to further reduce the storage occupancy, the linked list insertion method may be used to obtain the T top relationship values ranked first. The first item is set to B 1 , the item type is n, B i represents the i-th item, and the maximum number of elements of the linked list S is T.

圖2示出根據本發明的鏈表***排序法的流程圖。參見圖2,在步驟S201中,初始賦值。例如,將除B1之外的其他物品中標識資訊的標號最小的物品(即B2)的標號設置為初始值,即i=2。 Figure 2 shows a flow chart of a linked list insertion ordering method in accordance with the present invention. Referring to Fig. 2, in step S201, an initial assignment is made. For example, the label of the item having the smallest identification information (ie, B 2 ) among the items other than B 1 is set to the initial value, that is, i=2.

接下來,在步驟S202中,計算R(Bi_k)=L(Bi)*L(Bk)。例如,根據公式R(B1_k)=L(B1)*L(Bk)計 算除B1之外的其他物品與B1的關聯關係值,其中在每一個組之間平行計算每個組內包含的除B1之外的物品與B1之間的關聯關係值,每一個組內串列計算該組內包含的上述其他物品與B1之間的關聯關係值。 Next, in step S202, the calculated R (B i_k) = L ( B i) * L (B k). For example, the relationship value of the items other than B 1 and B 1 is calculated according to the formula R(B 1_k )=L(B 1 )*L(B k ), wherein each group is calculated in parallel between each group The value of the relationship between the items other than B 1 and B 1 included in each group, and the value of the relationship between the other items included in the group and B 1 is calculated in each group.

接下來,在步驟S203中,把R(Bi_k)按降冪***到鏈表S上。例如,可以根據計算的先後順序分別將每個除Bi之外的物品與Bi的關係值以R(Bi_k):Bi的形式按降冪***到鏈表S上,最後S鏈表上的資料形如:{1000:B25,900:B10,200:B88,150:B47}。 Next, in step S203, R(B i_k ) is inserted onto the linked list S by a power reduction. For example, the relationship value of each item other than B i and B i may be inserted into the linked list S in the form of R(B i_k ):B i according to the order of calculation, and finally the S-segment table The information on the form is: {1000: B 25 , 900: B 10 , 200: B 88 , 150: B 47 }.

接下來,在步驟S204中,判斷鏈表S中元素的個數是否超過了T。若鏈表S中的元素個數超過了T,則在步驟S205中捨棄鏈表S末尾的一個元素,而若鏈表S中的元素個數沒有超過了T,則在步驟S206中對i加1運算。然後,在步驟S207中判斷i是否超過了n,並且在i超過了n時,在步驟S208中結束處理,而在i沒有超過n時,在步驟S208中返回步驟S202。 Next, in step S204, it is judged whether or not the number of elements in the linked list S exceeds T. If the number of elements in the linked list S exceeds T, then an element at the end of the linked list S is discarded in step S205, and if the number of elements in the linked list S does not exceed T, then i is added in step S206. 1 operation. Then, it is judged in step S207 whether i has exceeded n, and when i exceeds n, the processing is ended in step S208, and when i does not exceed n, the processing returns to step S202 in step S208.

計算結束之後得到的鏈表S中的所有元素即為與物品B1的關聯關係值排序最靠前的T個物品。 All the elements in the linked list S obtained after the calculation is the T items that are ranked first in the relationship value with the item B1.

本發明上述實施例通過根據物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,根據資料庫表中任意兩個物品的向量之間的運算可以直接計算該任意兩個物品之間的關聯關係值,可有效減小存儲空間,提高計算速度,降低成本,從而解決了現有技術中推薦物品計算速度慢,成本高的問題。 According to the above embodiment of the present invention, the database table stored in the memory matrix form is generated according to the attribute information of the item, and the association between the two items can be directly calculated according to the operation between the vectors of any two items in the database table. The relationship value can effectively reduce the storage space, increase the calculation speed, and reduce the cost, thereby solving the problem that the recommended items in the prior art are slow in calculation and high in cost.

圖3示出根據本發明的物品關聯推薦系統的方塊 圖。參考圖3,根據本發明的一個實施例的物品關聯推薦的系統包括獲取單元301、生成單元302、計算單元303、排序單元304。 Figure 3 shows a block of an item association recommendation system in accordance with the present invention. Figure. Referring to FIG. 3, a system for item association recommendation according to an embodiment of the present invention includes an acquisition unit 301, a generation unit 302, a calculation unit 303, and a sorting unit 304.

在圖3中,獲取單元301用於獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄。 In FIG. 3, the obtaining unit 301 is configured to acquire attribute information of the item, and the attribute information of the item includes an identifier of the item, an identifier of the user, and a record of the item purchased by the user.

例如,獲取單元301獲取物品的屬性資訊,包括:獲取所有物品的標識,其中物品的標識可以為該物品的條碼或其他可唯一表示該物品的標識,本實施例中採用B1、B2、B3......Bn形式表示不同物品的標識;獲取所有使用者的標識,其中使用者的標識可以為該使用者的登陸帳號或者其他可唯一表示該使用者的標識,本實施例中採用U1、U2、U3......Um形式表示不同使用者的標識;獲取所有使用者購買的所有物品的記錄,其中使用者購買物品的記錄為使用者與所購買的物品之間的關係,可以為該用戶購買該物品的數量或者購買金額等。 For example, the obtaining unit 301 obtains the attribute information of the item, including: obtaining the identifier of all the items, wherein the identifier of the item may be a barcode of the item or other identifier that can uniquely represent the item, and B 1 and B 2 are used in this embodiment. The B 3 ... B n form indicates the identification of different items; the identification of all users is obtained, wherein the user's identification may be the user's login account number or other identifier that uniquely indicates the user, this implementation used in Example U1, U2, U 3 ...... U m different users represented in the form of identification; obtaining a record of all items purchased by all users, wherein a user records the user to purchase items for purchase The relationship between the items, the number of items purchased by the user or the amount of purchase, and the like.

進一步,為了更好的為活躍用戶推薦熱點物品,物品的屬性資訊可以只記錄熱點物品的標識、活躍使用者的標識以及活躍使用者購買的熱點物品的記錄,其中熱點物品可以根據需要進行選擇,例如,根據每種物品的銷售額或者銷售數量進行選擇,活躍使用者也可以根據需要進行選擇,例如,可根據每個使用者的消費額或者活躍次數(購買次數)選擇。 Further, in order to better recommend a hot item for an active user, the attribute information of the item may only record the identifier of the hot item, the identifier of the active user, and the record of the hot item purchased by the active user, wherein the hot item may be selected according to needs. For example, the selection may be made according to the sales amount or the number of sales of each item, and the active user may also select according to the needs, for example, according to the consumption amount or the number of activations (the number of purchases) of each user.

例如,預定熱點物品的種類為4萬,當所有物品的種類大於4萬時,根據每種物品的銷售數量按照由大到小的 順序對該所有種類的物品進行排序,選擇前4萬種物品作為熱點物品,若至少兩種物品的銷售數量相等,則隨機排序;當所有物品的種類小於或等於4萬時,所有物品均為熱點物品。 For example, the type of hot items ordered is 40,000, and when the type of all items is more than 40,000, according to the sales quantity of each item, according to the size of each item Sort all the items in order, select the top 40 items as hot items, and if at least two items are sold in equal numbers, they are randomly sorted; when all items are less than or equal to 40,000, all items are Hot items.

預定活躍用戶的個數為200萬,當所有用戶的個數大於200萬時,根據每個使用者的活躍次數按照由多到少的順序或根據每個使用者的消費額按照由高到低的順序對該所有使用者進行排序,並選擇前200萬個用戶作為活躍用戶,若至少兩個用戶的活躍次數相等,則隨機排序;當所有用戶的個數小於或等於200萬時,所有用戶均為活躍用戶。 The number of scheduled active users is 2 million. When the number of all users is greater than 2 million, the number of active users per user is in descending order or according to the consumption amount of each user. The order of all users is sorted, and the first 2 million users are selected as active users. If at least two users have the same number of active times, they are randomly sorted; when the number of all users is less than or equal to 2 million, all users All are active users.

如圖3所示的生成單元302用於根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊。 The generating unit 302 is configured to generate a database table stored in the form of a memory matrix according to the attribute information of the item, wherein the row and the column of the database table respectively represent the identifier of the item and the identifier of the user, The elements of the database table indicate the information of the corresponding user purchasing the corresponding item.

例如,預設資料庫表初始化,然後根據物品屬性資訊生成資料庫表,其中該資料表庫的行可以表示使用者的標識,對應的列表示物品的標識,也可以行表示物品的標識,對應的列表示使用者的標識。本實施例中的資料庫表以行表示使用者的標識、列表示物品的標識為例進行說明。 For example, the preset database table is initialized, and then the database table is generated according to the item attribute information, wherein the line of the data table library can represent the identifier of the user, the corresponding column indicates the identifier of the item, and the line indicates the identifier of the item, corresponding The column indicates the identity of the user. The database table in this embodiment is described by taking an example in which the user's logo is displayed in a row and the column indicates the identifier of the article.

記憶體矩陣可以採用二進位位元、八進制、十進位等各種數制的形式存儲,優選地,為了使存儲佔有量最小,本實施例的上述記憶體矩陣採用二進位位元的形式存儲,其中資料庫表初始化可以將所有二進位位元的資料庫表的每個元素的初始值均歸0。 The memory matrix may be stored in the form of a binary number, an octal, a decimal, or the like. Preferably, in order to minimize the storage occupancy, the memory matrix of the embodiment is stored in the form of a binary bit, wherein The database table initialization can zero the initial value of each element of the database table of all binary bits.

例如,根據上述屬性資訊生成資料庫表,其中屬 性資訊可以採用表格形式或者其他形式表示,參見表1,為活躍用戶購買選定的熱點物品的資訊,其中Bi代表熱點物品,Ui代表活躍用戶,每個儲存格內代表對應的活躍用戶購買對應熱點物品的數量。 For example, the database table is generated according to the attribute information, wherein the attribute information may be expressed in a form of a table or other forms. See Table 1 for information on purchasing selected hot items for an active user, where B i represents a hot item and U i represents an active user. Each cell represents the number of corresponding hot items purchased by the corresponding active user.

那麼,根據表1中選取的活躍用戶購買選定的熱點物品的資訊生成的資料庫表如表2所示:每個元素的初始狀態均為0,若活躍用戶Ux購買了熱點物品By,則把Ux與By對應的元素(Ux,By)設為1。需說明的是,只要該活躍用戶Ux購買了熱點物品By,就把(Ux,By)設為1,而與購買數量無關。 Then, the database table generated according to the information of the selected hot item selected by the active user selected in Table 1 is as shown in Table 2: the initial state of each element is 0, and if the active user U x purchases the hot item B y , put an element U (U x, B y) x and B y corresponding to 1. It should be noted that as long as the active user U x purchases the hot item B y , ( U x , B y ) is set to 1, regardless of the number of purchases.

如圖3所示的計算單元303用於根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品除第k一物品之外的第i物品與第k物品之間的關聯關係值,其中L(Bk)指上述第k物品所在列或行的所有元素組成的向量,L(Bi)指上述第i物品所在列或行的所有元素組成的向量,R(Bi_k)指上述第i物品與上述第k物品的關聯關係值;例如,若需要獲取與第k物品相關聯的可推薦的物品,則需要計算所有其他物品與第k物品的關聯關係值,其中每個其他物品與第k物品的關聯關係值的計算方法均相同。假設第k物品Bk為第一物品B1,在此僅以物品B2與B1的關聯關係值的計算方法為例進行說明。 The calculation unit 303 shown in FIG. 3 is configured to calculate, respectively, the ith item other than the kth item in the above-mentioned database table according to R(B i_k )=L(B i )*L(B k ) The relationship between the i-th item and the k-th item other than an item, where L(B k ) refers to a vector consisting of all the elements of the column or row in which the k-th item is located, and L(B i ) refers to the above i-th a vector consisting of all the elements of the column or row of the item, R(B i_k ) is the value of the relationship between the i-th item and the k-th item; for example, if it is necessary to obtain a recommendable item associated with the k-th item, It is necessary to calculate the relationship value of all other items with the kth item, wherein the relationship value of each other item and the kth item is calculated in the same way. Assuming that the kth item B k is the first item B 1 , only the calculation method of the relationship value of the items B 2 and B 1 will be described as an example.

參見表2,第一物品B1所在的列組成的向量為L(B1)=(0,1,0,1,...,1),第二物品B2所在的列組成的向量 為L(B2)=(1,0,1,1,...,1),那麼,物品B2與該第一物品B1之間的關聯關係值R(B2_1)的計算方法如下:R(B2_1)=L(B2)*L(B1)=(1,0,1,1,...,1)*(0,1,0,1,...,1)=1*0+0*1+1*0+1*1+...+1*1。同理,可分別依次計算出其他物品與該第一物品B1的關聯關係值:R(B3_1)、R(B4_1)、...、R(Bi_1)、...、R(Bn_1)。 Referring to Table 2, the vector of the column in which the first item B 1 is composed is L(B 1 )=(0, 1, 0, 1, ..., 1), and the vector of the column in which the second item B 2 is located is L(B 2 )=(1,0,1,1,...,1), then, the calculation relationship value R(B 2_1 ) between the item B 2 and the first item B 1 is calculated as follows: R(B 2_1 )=L(B 2 )*L(B 1 )=(1,0,1,1,...,1)*(0,1,0,1,...,1)= 1*0+0*1+1*0+1*1+...+1*1. Similarly, the relationship between other items and the first item B 1 can be calculated in order: R(B 3_1 ), R(B 4_1 ), . . . , R(B i_1 ), . . . , R ( B n_1 ).

如圖3所示的排序單元304用於對所有上述其他物品與上述第k物品的關聯關係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 The sorting unit 304 shown in FIG. 3 is configured to sort the relationship values of all the other items and the kth item, and determine the recommended item for the kth item according to the number of items that the kth item needs to be recommended. article.

例如,獲取所有其他物品與第一物品B1的關聯關係值後,對所有關聯關係值進行降冪排列,然後根據需要推薦的物品個數T取排序最靠前的T個關聯關係值對應的物品作為對第一物品進行關聯推薦的物品。 For example, after obtaining all relationships with other items of the first item values B 1, and all arranged for descending relationship values, then the highest ranking T take the T values corresponding relationship according to the number of items required to be recommended The item is an item that is associated with the first item.

優選地,為了進一步減小存儲佔有量,排序單元304可採用鏈表***排序法獲取排序最靠前的T個關聯關係值。設定第一物品為B1,物品的種類為n,Bi表示第i種物品,鏈表S的最大元素個數為T。鏈表***排序法的過程可參照圖2所示方法,此處不再贅述。 Preferably, in order to further reduce the storage occupancy, the sorting unit 304 may use the linked list insertion sorting method to obtain the T top relationship values ranked first. The first item is set to B 1 , the item type is n, B i represents the i-th item, and the maximum number of elements of the linked list S is T. The process of inserting the linked list into the sorting method can refer to the method shown in FIG. 2, and details are not described herein again.

進一步,圖4示出根據本發明的另一實施例的物品關聯推薦系統的方塊圖。參見圖4,在其中,除了分組單元305和更新單元306之外,其他組成部分與圖3中的那些相同附圖標記的組成部分相同,因此在此忽略其詳細描述。 Further, FIG. 4 shows a block diagram of an item association recommendation system in accordance with another embodiment of the present invention. Referring to FIG. 4, the components other than the grouping unit 305 and the updating unit 306 are the same as those of the same reference numerals in FIG. 3, and thus detailed description thereof will be omitted.

如圖4所示的分組單元305用於根據CPU的核心 數將資料庫表中的所有物品平均分為至少兩個組,然後在每一個組之間平行計算每個組內包含的其他物品與第一物品B1之間的關聯關係值,每個組內串列計算該組中除第一物品B1之外的其他物品與第一物品B1之間的關聯關係值。這樣可以使得硬體效率達到最大,進而使計算速度最大。 The grouping unit 305 shown in FIG. 4 is configured to divide all the items in the database table into at least two groups according to the number of cores of the CPU, and then calculate the other items included in each group in parallel between each group. The relationship value between the first items B 1 , and the number of associations between the items other than the first item B 1 and the first item B 1 in the group are calculated in tandem in each group. This maximizes the efficiency of the hardware and maximizes the computational speed.

例如,假設表2中物品共有4萬種,均分為甲(B1-B10000)、乙(B10001-B20000)、丙(B20001-B30000)、丁(B30001-B40000)四個組,每個組分別利用一個執行緒計算該組內物品與第一物品的關聯關係值,各執行緒之間的計算可獨立進行,所以,各組之間可實現平行計算,例如,可以同時計算B2、B10001、B20001、B30001四種物品與B1的關聯關係值R(B2_1)、R(B10001_1)、R(B20001_1)、R(B30001_1)。 For example, suppose that there are 40,000 items in Table 2, which are divided into A (B 1 -B 10000 ), B (B 10001 -B 20000 ), C (B 20001 -B 30000 ), D (B 30001 -B 40000 ) Four groups, each of which uses a thread to calculate the relationship between the items in the group and the first item, and the calculation between the threads can be performed independently, so parallel calculation can be implemented between the groups, for example, B 2 can be calculated simultaneously, B 10001, B 20001, B 30001 B with four kinds of articles association value R (B 2_1) 1 is, R (B 10001_1), R (B 20001_1), R (B 30001_1).

例如,若將所有物品平均分組後還有餘數,則作為餘數的物品可隨機分給任何一組。 For example, if all items are evenly grouped and there is a remainder, the items that are the remainder can be randomly assigned to any group.

例如,假設表2中物品共有4萬種,均分為7組後還餘下2種物品,將該七個組分別表示為A、B、C、D、E、F、G,那麼可將剩餘的2種物品隨機分給A、B、C、D、E、F、G中的任意一組。 For example, suppose that there are 40,000 items in Table 2, and after dividing into 7 groups, there are still 2 items remaining, and the seven groups are respectively represented as A, B, C, D, E, F, G, then the remaining The two kinds of items are randomly assigned to any one of A, B, C, D, E, F, and G.

上述分組單元305還可以用於將上述資料庫表中的所有物品分為上述推薦伺服器CPU的核心數加1個組。 The grouping unit 305 can also be configured to divide all the items in the database table into the number of cores of the recommended server CPU plus one group.

如圖4所示的更新單元306用於設置更新週期,其中更新週期的長短可以根據物品銷售變化情況進行設定,例如,可以設為一個月,一周或一天,本發明對此不進行限制,在每個更新週期內獲取上述每個更新週期內的物品的屬性資 訊並進行更新。 The update unit 306 is configured to set an update period, wherein the length of the update period can be set according to the change of the item sales, for example, it can be set to one month, one week or one day, and the present invention does not limit this. Obtaining the attributes of the items in each of the above update cycles in each update cycle And update it.

相應地,如圖4所示的獲取單元301根據上述更新單元306設置的更新週期,在每個更新週期內,獲取上述每個更新週期內的物品的屬性資訊。如圖4所示的生成單元302用於根據上述更新單元306設置的更新週期,在每個更新週期內,根據每個更新週期內的上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表。如圖4所示的計算單元303用於根據上述更新單元306設置的更新週期,在每個更新週期內,根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述每個更新週期內的資料庫表中除第k一物品之外的第i物品除第k一物品之外的第i物品與第k物品之間的關聯關係值。而如圖4所示的排序單元304用於根據上述更新單元306設置的更新週期,在每個更新週期內,對所有上述其他物品與上述第k物品的關聯關係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 Correspondingly, the obtaining unit 301 shown in FIG. 4 acquires the attribute information of the items in each of the update periods in each update period according to the update period set by the update unit 306. The generating unit 302 shown in FIG. 4 is configured to generate, according to the update period set by the updating unit 306, a database stored in the form of a memory matrix according to the attribute information of the item in each update period in each update period. table. The calculation unit 303 shown in FIG. 4 is configured to calculate each of the above according to R(B i_k )=L(B i )*L(B k ) in each update period according to the update period set by the update unit 306. The value of the relationship between the i-th item and the k-th item other than the kth item of the i-th item other than the k-th item in the database table in the update period. The sorting unit 304 shown in FIG. 4 is configured to sort the relationship values of all the other items and the kth item in each update period according to the update period set by the update unit 306, and according to the above The number of items to be recommended for the k item is determined by the item recommended for the kth item.

因此,根據本發明的上述實施例,本發明的物品關聯推薦系統通過根據物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,並根據資料庫表中任意兩個物品的向量之間的運算可以直接計算該任意兩個物品之間的關聯關係值,可有效減小存儲空間,提高計算速度,降低成本,解決了現有技術中推薦物品計算速度慢,成本高的問題。 Therefore, according to the above embodiment of the present invention, the article association recommendation system of the present invention generates a database table stored in the form of a memory matrix based on the attribute information of the article, and based on the vector between any two items in the database table. The calculation can directly calculate the relationship value between the two items, which can effectively reduce the storage space, improve the calculation speed, reduce the cost, and solve the problem that the recommended items in the prior art are slow in calculation and high in cost.

本領域普通技術人員可以理解:實現上述方法實施例的全部或部分步驟可以通過程式指令相關的硬體來完成,前述的程式可以存儲於一電腦可讀取存儲介質中,該程式 在執行時,執行包括上述方法實施例的步驟;而前述的存儲介質包括:ROM、RAM、磁碟或者光碟等各種可以存儲程式碼的介質。 A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by using a program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium. In the execution, the steps including the foregoing method embodiments are performed; and the foregoing storage medium includes: various media that can store code, such as a ROM, a RAM, a magnetic disk, or an optical disk.

以上所述,僅為本發明的具體實施方式,但本發明的保護範圍並不局限於此,任何熟悉本技術領域的技術人員在本發明揭露的技術範圍內,可輕易想到變化或替換,都應涵蓋在本發明的保護範圍之內。因此,本發明的保護範圍應以所述申請專利範圍的保護範圍為准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the scope of the claims.

Claims (12)

一種物品關聯推薦的方法,包括步驟:獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄;根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識Bi與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊,其中i=1,2,...n;根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品與上述第k物品之間的關聯關係值,其中L(Bk)指上述第k物品所在列的所有元素組成的向量,L(Bi)指上述第i物品所在列的所有元素組成的向量,而R(Bi_k)指上述第i物品與上述第k物品的關聯關係值,其中k=1,2,...n;對所有上述其他物品與上述第k物品的關聯關係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 A method for association recommendation of an item, comprising the steps of: obtaining attribute information of the item, the attribute information of the item includes an identifier of the item, an identifier of the user, and a record of the item purchased by the user; and generating the memory matrix according to the attribute information of the item; The stored database table, wherein the rows and columns of the database table respectively represent the identifier B i of the item and the identifier of the user, and the elements of the database table represent information of the corresponding user purchasing the corresponding item, wherein i=1, 2,...n; calculating, according to R(B i_k )=L(B i )*L(B k ), between the i-th item other than the kth item in the above-mentioned database table and the k-th item The relationship value, where L(B k ) refers to a vector consisting of all the elements of the column in which the kth item is located, and L(B i ) refers to a vector composed of all elements of the column in which the i-th item is located, and R(B i_k ) And the value of the relationship between the ith item and the kth item, wherein k=1, 2, . . . n; sorting the relationship values of all the other items and the kth item, and according to the kth item The number of items to be recommended is determined for the above kth item Line associated with the recommended items. 根據申請專利範圍第1項所述的物品關聯推薦的方法,其中根據CPU的核心數將上述資料庫表中的所有物品平均分為相應物品組,並在每一個上述組之間平行計算上述每個組內包含的上述其他物品與上述第k物品之間的關聯關係值。 According to the method of item-related recommendation described in claim 1, wherein all items in the above-mentioned database table are equally divided into corresponding item groups according to the number of cores of the CPU, and each of the above-mentioned groups is calculated in parallel The relationship between the other items included in the group and the kth item described above. 根據申請專利範圍第2項所述的物品關聯推薦的方法,其中上述物品組的個數是CPU的核心數加1。 The method of association recommendation according to item 2 of the patent application scope, wherein the number of the item groups is the number of cores of the CPU plus one. 根據申請專利範圍第1或3項所述的物品關聯推薦的方法,其中將所有上述其他物品與上述第k物品的關聯關係值按照計算的先後順序,降冪***到預設鏈表中,上述預設鏈表包含的最大元素個數與上述第k物品需要推薦的物品個數相同。 According to the method of claim-related recommendation according to Item 1 or 3 of the patent application, wherein the relationship value of all the other items and the k-th item is inserted into the preset linked list according to the calculation order, The preset linked list contains the same maximum number of elements as the number of items to be recommended for the kth item above. 根據申請專利範圍第1項所述的物品關聯推薦的方法,其中上述記憶體矩陣採用二進位位元的形式存儲。 The method of item-related recommendation according to claim 1, wherein the memory matrix is stored in the form of a binary bit. 根據申請專利範圍第4項所述的物品關聯推薦的方法,其中週期性地獲取物品的屬性資訊,根據週期性地獲取的上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,根據更新的資料庫表計算上述關聯關係值,並根據更新的關聯關係值進行排序以確定對上述第k物品進行關聯推薦的物品。 According to the method of item-related recommendation described in claim 4, wherein the attribute information of the item is periodically acquired, and the database table stored in the memory matrix form is generated according to the attribute information of the item acquired periodically, according to The updated database table calculates the above relationship value and sorts according to the updated relationship value to determine an item for which the kth item is associated with the recommendation. 一種物品關聯推薦的系統,包括:獲取單元,用於獲取物品的屬性資訊,上述物品的屬性資訊包括物品的標識、使用者的標識以及使用者購買物品的記錄;生成單元,用於根據上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,其中上述資料庫表的行和列分別表示物品的標識Bi與使用者的標識,上述資料庫表的元素表示對應的使用者購買對應物品的資訊,其中i=1,2,...n;計算單元,用於根據R(Bi_k)=L(Bi)*L(Bk)分別計算上述資料庫表中除第k一物品之外的第i物品與上述第k物品之間的關聯關係值,其中L(Bk)指上述第k物品所在列的所有元素 組成的向量,L(Bi)指上述第i物品所在列的所有元素組成的向量,R(Bi_k)指上述第i物品與上述第k物品的關聯關係值,其中k=1,2,...n;排序單元,用於對所有上述其他物品與上述第k物品的關聯關係值進行排序,並根據上述第k物品需要推薦的物品個數確定對上述第k物品進行關聯推薦的物品。 A system for item association recommendation, comprising: an obtaining unit, configured to acquire attribute information of an item, the attribute information of the item includes an identifier of the item, an identifier of the user, and a record of the item purchased by the user; and a generating unit, configured to use the item according to the item The attribute information generates a database table stored in the form of a memory matrix, wherein the rows and columns of the database table respectively represent the identifier B i of the item and the identifier of the user, and the elements of the database table indicate corresponding user purchase corresponding Information of the item, where i=1, 2, . . . n; a calculation unit for calculating the k- th in the above-mentioned database table according to R(B i_k )=L(B i )*L(B k ) The relationship between the i-th item other than the item and the k-th item, wherein L(B k ) refers to a vector consisting of all elements of the column in which the k-th item is located, and L(B i ) refers to the i-th item a vector consisting of all the elements of the column, R(B i_k ) refers to the relationship between the above-mentioned i-th article and the k-th article described above, where k=1, 2, . . . n; a sorting unit for all the other items mentioned above Sorting the relationship values with the kth item above, and The item to be recommended for the kth item is determined based on the number of items to be recommended for the kth item. 根據申請專利範圍第7項所述的物品關聯推薦的系統,還包括:分組單元,用於根據CPU的核心數將上述資料庫表中的所有物品平均分為相應物品組,其中上述計算單元在每一個上述組之間平行計算上述每個組內包含的上述其他物品與上述第k物品之間的關聯關係值。 The system for item-related recommendation according to claim 7 of the patent application, further comprising: a grouping unit, configured to divide, according to the number of cores of the CPU, all items in the database table into an object group, wherein the calculating unit is The relationship between the other items included in each of the above groups and the kth item is calculated in parallel between each of the above groups. 根據申請專利範圍第8項所述的物品關聯推薦的系統,其中上述分組單元將上述資料庫表中的所有物品平均分為CPU的核心數加1個物品組。 A system for item-related recommendation according to claim 8, wherein the grouping unit divides all items in the database table into an average number of cores of the CPU plus one item group. 根據申請專利範圍第7或9項所述的物品關聯推薦的系統,其中上述排序單元將所有上述其他物品與上述第k物品的關聯關係值按照計算的先後順序,降冪***到預設鏈表中,上述預設鏈表包含的最大元素個數與上述第k物品需要推薦的物品個數相同。 The system for recommending an item as described in claim 7 or 9, wherein the sorting unit inserts the relationship value of all the other items and the kth item in a calculated order, and inserts the power into the preset linked list. The number of the largest elements included in the preset linked list is the same as the number of items to be recommended in the kth item. 根據申請專利範圍第7項所述的物品關聯推薦的系統,其中上述記憶體矩陣採用二進位位元的形式存儲。 A system for item-related recommendation according to claim 7 of the patent application, wherein the memory matrix is stored in the form of a binary bit. 根據申請專利範圍第10項所述的物品關聯推薦的系統,其中 上述獲取單元週期性地獲取上述每個更新週期內的物品的屬性資訊,上述生成單元根據週期性獲得的上述物品的屬性資訊生成以記憶體矩陣形式存儲的資料庫表,上述計算單元根據更新的資料庫表計算上述關聯關係值,而上述排序單元根據更新的關聯關係值進行排序以確定對上述第k物品進行關聯推薦的物品。 A system for associating recommendations of articles according to claim 10 of the scope of the patent application, wherein The acquiring unit periodically acquires attribute information of the items in each of the update periods, and the generating unit generates a database table stored in a memory matrix form according to the attribute information of the items obtained periodically, and the calculating unit is updated according to the The database table calculates the relationship value, and the sorting unit sorts the updated relationship value to determine an item that is associated with the kth item.
TW102132376A 2012-09-10 2013-09-09 Method and system for item association recommendation TWI522945B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210332241.7A CN103679489A (en) 2012-09-10 2012-09-10 Item-based collaborative recommendation method and system

Publications (2)

Publication Number Publication Date
TW201411525A TW201411525A (en) 2014-03-16
TWI522945B true TWI522945B (en) 2016-02-21

Family

ID=50236524

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102132376A TWI522945B (en) 2012-09-10 2013-09-09 Method and system for item association recommendation

Country Status (3)

Country Link
CN (2) CN103679489A (en)
TW (1) TWI522945B (en)
WO (1) WO2014036892A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11250338B2 (en) 2016-11-29 2022-02-15 Industrial Technology Research Institute Method for enhancing association rules, apparatus using the same and computer readable medium therefor

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069125A (en) * 2015-08-13 2015-11-18 上海斐讯数据通信技术有限公司 Social network recommending method and social network recommending system
CN107369091B (en) * 2016-05-12 2021-02-05 创新先进技术有限公司 Product recommendation method and device and financial product recommendation method
CN106651542B (en) * 2016-12-31 2021-06-25 珠海市魅族科技有限公司 Article recommendation method and device
CN107328164A (en) * 2017-05-27 2017-11-07 北京京东尚科信息技术有限公司 Monitoring method, device, electronic equipment and the storage medium of article storage period
CN109697621B (en) * 2017-10-23 2023-04-07 阿里巴巴集团控股有限公司 Hotspot attribute determining method and device, and data processing method, device and system
CN109242580B (en) * 2018-11-28 2020-12-29 北京腾云天下科技有限公司 Method for determining recommended emporium of target brand in specified city
CN113408254B (en) * 2021-05-18 2024-06-11 支付宝(杭州)信息技术有限公司 Page form information filling method, device, equipment and readable medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101206752A (en) * 2007-12-25 2008-06-25 北京科文书业信息技术有限公司 Electric commerce website related products recommendation system and method
CN102253936B (en) * 2010-05-18 2013-07-24 阿里巴巴集团控股有限公司 Method for recording access of user to merchandise information, search method and server
CN102456203B (en) * 2010-10-22 2015-10-14 阿里巴巴集团控股有限公司 Determine method and the relevant apparatus of candidate products chained list
CN102254028A (en) * 2011-07-22 2011-11-23 青岛理工大学 Personalized commodity recommending method and system which integrate attributes and structural similarity

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11250338B2 (en) 2016-11-29 2022-02-15 Industrial Technology Research Institute Method for enhancing association rules, apparatus using the same and computer readable medium therefor

Also Published As

Publication number Publication date
CN104685522A (en) 2015-06-03
CN103679489A (en) 2014-03-26
TW201411525A (en) 2014-03-16
WO2014036892A1 (en) 2014-03-13

Similar Documents

Publication Publication Date Title
TWI522945B (en) Method and system for item association recommendation
CN103823908B (en) Content recommendation method and server based on user preference
CN106547767B (en) Method and device for determining video cover picture
JP2019512809A (en) Method and apparatus for time division recommendation for service target
KR20140056731A (en) Purchase recommendation service system and method
CN109658206A (en) Information recommendation method and device
US20100205052A1 (en) Self-uploaded indexing and data clustering method and apparatus
CN111310050A (en) Recommendation method based on multilayer attention
US10147129B1 (en) Determining collections of similar items
CN105354202B (en) Data push method and device
Liu et al. A new Nawaz–Enscore–Ham-based heuristic for permutation flow-shop problems with bicriteria of makespan and machine idle time
CN106651418A (en) Method of recommending add-on item for special offer when spending enough by e-business
CN109791492B (en) Pipeline dependency tree query optimizer and scheduler
CN112256720A (en) Data cost calculation method, system, computer device and storage medium
JP2019505914A (en) Computerized promotional and discount pricing schedule
CN104992348A (en) Method and device for displaying information
CN110197404A (en) The personalized long-tail Method of Commodity Recommendation and system of popularity deviation can be reduced
Sato Enumerating fair packages for group recommendations
US20130332386A1 (en) Content management
CN111611228A (en) Load balance adjustment method and device based on distributed database
CN117194764A (en) Goods display method, equipment and medium based on multi-platform fusion mall
GB2443440A (en) Graph based solutions to certain determination problems in auctions
CN108509622A (en) Article sequencing method, device, computing device and storage medium
JP2009199397A (en) Inventory management device, inventory management method and computer program
Hua et al. Clusters and filling-curve-based storage assignment in a circuit board assembly kitting area