Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In the prior art, the shopping recommending function of the e-commerce platform only recommends the articles which the user wants to buy, but cannot recommend the articles which the family and the friends of the user want to buy, so that the user is inconvenient to select the appropriate articles when the user wants to buy the gifts sent to the family or the friends.
In order to solve the above problem, in the embodiment of the present invention, it is desirable that the e-commerce platform can also recommend the user preference item information corresponding to the user, such as family, friend, and mate. In order to achieve the above object, in the embodiment of the present invention, account numbers of family, friend, and partner of the current account, that is, an associated account number associated with the current account number, may be determined first, and after analyzing preferred item information of a user corresponding to the associated account number, the preferred item information is pushed to a terminal of the current account number, so that a reference is provided when the current user purchases gifts for the family, friend, and partner, which may facilitate the user to select and purchase appropriate items, meet requirements of the family, friend, and partner, and improve user experience.
The item recommendation method provided by the embodiment of the invention can be applied to a communication system shown in fig. 1, and the communication system includes aserver 101, adatabase 102, and aterminal 103 of a current account, wherein thedatabase 102 can store browsing records and/or collection records uploaded by associated accounts, and can also store association relations between accounts, and theserver 101 acquires the associated account associated with the current account from thedatabase 102, and can also acquire the browsing records and/or collection records of the associated account from thedatabase 102, analyzes and obtains preferred item information of a user corresponding to the associated account, and pushes the preferred item information of the user corresponding to the associated account to theterminal 103.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of an item recommendation method according to an embodiment of the present invention. The embodiment provides an article recommendation method, an execution subject of which may be a computer device such as a server of an e-commerce platform, and the article recommendation method specifically includes the following steps:
s201, acquiring a related account number related to the current account number from a database according to a preset related relation between the account numbers; the association relationship between the accounts is acquired according to a pre-constructed account relationship knowledge graph or actively created by a user corresponding to the account.
In this embodiment, the associated account may be an account created on the e-commerce platform by family, friend, mate, or the like, and has an associated or bound relationship with the account. When the server of the e-commerce platform pushes the article information to the user terminal, the associated account associated with the current account can be obtained first.
Optionally, the association relationship between the account numbers may be obtained in advance, for example, all the associated account numbers (there may be one or more) associated with each account number are obtained and stored in the database, and when the associated account number associated with the current account number needs to be obtained, the association relationship between the preset account numbers may be directly queried from the database.
The association relationship between the accounts may be obtained according to a pre-constructed account relationship knowledge graph or actively created by a user corresponding to the accounts, or may be obtained through other approaches, which is not described in detail herein. Optionally, the association relationship between the account numbers is stored in the database in advance.
S202, obtaining preference item information of a user corresponding to the associated account.
In this embodiment, the server may obtain preferred item information of a user corresponding to an associated account associated with a current account, where the server may analyze browsing records, collection records, and the like of the associated account, predict preferred item information of the associated account from the browsing records and the collection records, and the preferred item information may specifically include, but is not limited to, an item type, a brand, and the like.
S203, pushing the preference item information of the user corresponding to the associated account to the terminal.
In this embodiment, after the preferred item information of the user corresponding to the associated account is acquired, the preferred item information may be sent to the terminal where the current account is located, so that reference may be provided when the user purchases gifts for family, friends, and partners.
Optionally, the information can be pushed to the terminal at a suitable time, for example, a promotional event is held by the e-commerce platform, or a birthday, a holiday or a anniversary corresponding to the account number is associated with the user, and the like. In this embodiment, the pushing time may be determined according to the received advertisement information and/or the information of the user corresponding to the associated account; and pushing the preference item information of the user corresponding to the associated account to the terminal within the pushing time.
According to the item recommendation method provided by the embodiment, the associated account number associated with the current account number is acquired from the database according to the association relationship between the preset account numbers; the incidence relation between the accounts is acquired according to a pre-constructed account relation knowledge graph or actively created by a user corresponding to the accounts; acquiring preference article information of a user corresponding to the associated account; and pushing the preference item information of the user corresponding to the associated account to the terminal. According to the embodiment, the preference item information of the user corresponding to the associated account is pushed to the user, reference is provided when the user purchases gifts for family, friends and partners, the user can conveniently select and purchase suitable items, the requirements of the family, the friends and the partners are met, and the user experience is improved.
On the basis of any of the above embodiments, as shown in fig. 3, this embodiment provides a method for acquiring an associated account associated with a current account according to an account relationship knowledge graph, which includes the following specific steps:
s301, acquiring at least one item of attribute information of each account, wherein the attribute information comprises at least one item of address information, a mobile phone number and an article sharing record.
In this embodiment, for each account of the e-commerce platform, at least one item of attribute information of the account may be acquired, for example, the attribute information may include but is not limited to at least one item of address information, a mobile phone number, and an item sharing record, where the address information and the mobile phone number may be an address and a mobile phone number bound when the account is registered by the user, and may also be a recipient address of the user and a mobile phone number of a recipient contact; and the item sharing record can be a record of the content shared by the user on the social platform.
Optionally, at least one item of attribute information of each account may be acquired from a database, and specifically, user basic data may be acquired as attribute information of an account through some data support and smart crawler technologies, and managed by using a relational database. Because the attribute information of the account numbers often exists in a dispersed, heterogeneous and autonomous form, and has the characteristics of redundancy, noise, uncertainty and non-completeness, the problems cannot be solved by cleaning, and therefore, from the knowledge, a fusion and verification step is usually required to fuse data of different sources and different structures into a unified knowledge map so as to ensure the consistency of the knowledge. In addition, when obtaining attribute information of an account, for entity identification, entity link, entity relationship identification, concept extraction, and the like, which may be involved in plain text data, many natural language processing techniques are required, including but not limited to word segmentation, part of speech tagging, distributed semantic expression, analysis of latent topics of chapters, construction of synonyms, semantic parsing, syntax dependence, semantic role tagging, semantic similarity calculation, and the like, which are not described herein any more.
S302, according to the similarity of the attribute information among the accounts, the similarity among the accounts is obtained.
In this embodiment, the similarity of each attribute information between any two accounts can be obtained, and the similarity of each attribute information is used as the similarity between the accounts. It should be noted that attribute information of different dimensions may obtain a similarity value, for example, address information dimensions may obtain a similarity value, a mobile phone number may also obtain a similarity value, and an item sharing record mobile phone number may also obtain a similarity value, where the similarity values may be respectively used as similarities of different dimensions between accounts, or may be summarized to obtain a value as a comprehensive similarity between accounts, where the summarizing manner may be a weighted sum of similarities of the dimensions.
Optionally, for example, the calculation amount is reduced, when the similarity of each attribute information between any two account numbers is obtained, the account numbers which may have a correlation may be determined first, for example, at least one attribute information is the same or similar, and then the similarity is obtained for the account numbers which may have a correlation, without obtaining the similarity of the attribute information of a certain account number and all other account numbers.
S303, constructing the account relation knowledge graph according to the similarity between the accounts.
In this embodiment, one circle may represent one account, and a connection line between the accounts is established according to the similarity between the accounts, so as to obtain an account relationship knowledge graph, as shown in fig. 4, the connection line between the accounts represents the similarity between the accounts, wherein the similarity may be shown by a line width of the connection line, wherein the line width is larger, that is, the line is thicker, which represents that the similarity between the accounts is larger, and in this embodiment, the line width of the connection line between the accounts may be set according to a mapping relationship between a preset line width and the similarity. It should be noted that, if there are similarities with different dimensions between accounts, the similarity with each dimension may be represented by a connection line.
S304, acquiring the association relation between the accounts according to the account relation knowledge graph, and storing the association relation in the database.
In this embodiment, after the account relation indicating map is obtained, the association relation between the accounts can be obtained according to the account relation knowledge map, specifically, for any two accounts, the line width of the connecting line between the two account circles can be obtained from the account relation knowledge map, the similarity between the two accounts can be determined according to the line width of the connecting line, in addition, the number of the connecting lines can also be obtained, the more the number of the connecting lines is, the larger the line width is, and the larger the similarity between the two accounts is.
Optionally, in this embodiment, for any account, the similarity between the account and all other accounts connected with the account and the account may be obtained from the account relation knowledge graph, and the other account with the similarity higher than the preset threshold is used as the associated account associated with the account. By traversing the account relation knowledge graph, the associated accounts associated with all accounts can be found and recorded in the database.
On the basis of the foregoing embodiment, the obtaining the similarity between the accounts according to the similarity of the attribute information between the accounts in S302 may specifically include:
for any two account numbers, acquiring the number of items of the same attribute information of the two account numbers and the number of items of all attribute information of each account number in the two account numbers; and according to the number of items of the same attribute information of the two account numbers and the number of items of all attribute information of each account number in the two account numbers, obtaining the cosine similarity between the two account numbers.
In this embodiment, the similarity is cosine similarity, specifically, cosine similarity w between account u and account vuvCalculated using the following formula:
where n (u) represents the attribute information set of account u, n (v) represents the attribute information set of account v, the numerator | n (u) n (v) | represents the number of the same attribute information existing in the attribute information set of account u and the attribute information set of account v, | n (u) | represents the number of the attribute information in the attribute information set of account u, and | n (v) | represents the number of the attribute information in the attribute information set of account v.
Taking address information as an example, assume that there are 4 accounts at present: A. b, C, D, the address information of the four accounts is subjected to character recognition and comparison of similarity, the address information with character similarity higher than the set value is regarded as one address information, so that all the address information can be obtained, and if the address information has 5: a. b, c, d, e, the relationship between the account and the address information is shown in table 1:
TABLE 1
| Account number | Address information |
| A | a、b、d |
| B | a、c |
| C | b、e |
| D | c、d、e |
For convenience of calculation, an inverted table of address information and account numbers is established, as shown in table 2:
TABLE 2
| Address information | Account number |
| a | A、B |
| b | A、C |
| c | B、D |
| d | A、D |
| e | C、D |
Creating a matrix of the relationship between the account numbers, wherein if the two account numbers have the same address information, the corresponding number in the matrix is increased by 1, so that the matrix of the address information relationship between the account numbers is as follows:
the matrix only represents the cosine similarity sub-part, while the denominator part is the product of the number of address information in two accounts, as can be seen from table 1, there are 3 address information of account a, 2 address information of account B, 2 address information of account C, and 3 address information of account D, so the matrix of cosine similarity between accounts is as follows:
according to the matrix, the cosine similarity between any two account numbers can be obtained. For example, for account a, the cosine similarity between account a and account B, C, D can be obtained as follows:
cosine similarity between account a and account B:
cosine similarity between account a and account C:
cosine similarity between account a and account D:
similarly, the cosine similarity between other account numbers can be directly obtained from the matrix.
The above example takes address information as an example, and the similarity of other attribute information such as mobile phone numbers, article sharing records, and the like is the same, and is not described herein again.
Further, an account relation knowledge graph is constructed according to the similarity between the accounts, which can be referred to the above embodiments and is not described herein again.
On the basis of any of the foregoing embodiments, as shown in fig. 5, the acquiring, in S203, the preferred item information of the user corresponding to the associated account may specifically include:
s501, acquiring browsing records and/or collecting records of the associated account;
s502, obtaining a weight value corresponding to each item in the browsing record and/or the collection record, and sequencing according to the weight values;
s503, determining the preference item information of the user corresponding to the associated account according to the sequence.
In this embodiment, the preferred item information of the user may be determined according to the browsing record and/or the collection record of the associated account, a weight value may be assigned to each item in the browsing record and/or the collection record according to a predetermined rule, and then the items are sorted according to the weight value, wherein one or more items with the top sorting order are used as the preferred items of the user.
Optionally, the weight value corresponding to each item in the browsing record and/or the collection record may be obtained by using a TF-IDF (term frequency-inverse document frequency) algorithm, which is a common weighting technique for information retrieval and data mining, and is used to evaluate the importance degree of a word to one of a set of files or a corpus of files. In short, the TF-IDF algorithm determines the importance of a word as a function of the number of occurrences of the word in the article and as a function of the number of occurrences of the word in the entire document set.
Specifically, the obtaining a weight value corresponding to each item in the browsing record and/or the collection record includes:
for any target object in the browsing record and/or the collection record, acquiring a first ratio TF of the browsing times of the target object and the total browsing times in the browsing record and/or the collection record;
acquiring a second ratio IDF of the total browsing times of all users to all articles to the total browsing times of all users to the target article;
and taking the product TF multiplied by the IDF of the first ratio TF and the second ratio IDF as a weight value corresponding to the target object in the browsing record and/or the collection record.
Wherein, the first ratio TF is obtained by the following formula:
wherein, TF (P, T) represents TF parameters of the associated account P to the target item T, w (P, T) represents browsing times of the associated account P to the target item T, and Σ w (P, T)i) Representing the total browsing times of the associated account P to all the items in the browsing record and/or the collection record, namely the total browsing times in the browsing record and/or the collection record, wherein TiIndicating the ith item of all items in the browsing record and/or the collection record of the associated account number P.
The second ratio IDF is obtained by the following formula:
wherein, the IDF (P, T) represents the IDF parameter of the associated account number P to the target article T, and can represent the occurrence probability of the target article T, sigma w (P)j,Ti) Represents the total number of views of all items by all users, where PjRepresents the jth user account number, sigma w (P) of all usersjT) watchShowing the total number of views of the target item T by all users.
Furthermore, the weight value corresponding to the target item T in the browsing record and/or the collection record of the associated account P is TF (P, T) × IDF (P, T), each item in the browsing record and/or the collection record can be sorted according to the weight, one or more items with the top sorting are used as preferred items of the user corresponding to the associated account P, and are pushed to the current account, and can also be stored in the database in association with the associated account.
It should be noted that, because there may be a plurality of associated accounts associated with the current account, which associated account corresponds to the preferred item information of the user when pushing the preferred item information is marked, so that the user of the current account can distinguish conveniently.
On the basis of any of the above embodiments, the method may further include:
acquiring a purchase record of the associated account, and adding a purchased identifier to the item purchased by the associated account in the preferred item information; and/or
And acquiring the purchase records of other associated accounts associated with the associated account, and adding purchased identifications to the items purchased by the other associated accounts in the preferred item information.
In this embodiment, since a preferred item browsed by an associated account may have been purchased by a user corresponding to the associated account or purchased by a user corresponding to another associated account, if the user of the current account purchases the preferred item again, repeated purchases may be caused, and to avoid this, in this embodiment, after determining the preferred item information of the user corresponding to the associated account, a purchase record of the associated account and/or a purchase record of another associated account may be obtained, so that it may be determined whether the preferred item has been purchased, and if the preferred item has been purchased, a purchased identifier may be added to the item in the preferred item information pushed to the terminal; or may also screen out purchased items when determining preferred item information.
On the basis of any of the above embodiments, in order to protect the privacy of the user, a switch may be provided to allow other associated accounts to check the preferred item information, for example, when the associated account opens a switch that does not allow checking, the current account cannot receive the preferred item information of the user corresponding to the associated account; in addition, the user may also set whether to allow other associated accounts to view items of different categories, for example, after the associated account opens a switch that does not allow viewing for a certain category of items, the current account cannot receive the information of the preferred items of the category of the user corresponding to the associated account, but may receive the information of the preferred items of the other categories of the user corresponding to the associated account.
Fig. 6 is a block diagram of an article recommendation device according to an embodiment of the present invention. The item recommendation device provided in this embodiment may execute the processing flow provided in the item recommendation method embodiment, as shown in fig. 6, theitem recommendation device 600 includes an associated accountnumber obtaining module 601, a preferred iteminformation obtaining module 602, and a pushingmodule 603.
The associatedaccount acquisition module 601 is configured to acquire an associated account associated with a current account from a database according to an association relationship between preset accounts; the incidence relation between the accounts is acquired according to a pre-constructed account relation knowledge graph or actively created by a user corresponding to the accounts;
a preferred iteminformation obtaining module 602, configured to obtain preferred item information of a user corresponding to the associated account;
a pushingmodule 603, configured to push the information of the preferred item of the user corresponding to the associated account to the terminal.
In a possible implementation manner, the associated accountnumber obtaining module 601 obtains an associated account number associated with a current account number from a database according to an association relationship between preset account numbers; when the association relationship between the accounts is acquired according to a pre-constructed account relationship knowledge graph or actively created by a user corresponding to the accounts, the association relationship is used for:
acquiring an associated account number associated with the current account number from a database; wherein, the database records the association relationship between the account numbers; the association relationship between the accounts is acquired according to a pre-constructed account relationship knowledge graph or actively created by a user corresponding to the account.
In a possible implementation manner, the associated accountnumber obtaining module 601 is further configured to:
acquiring at least one item of attribute information of each account, wherein the attribute information comprises at least one item of address information, a mobile phone number and an article sharing record;
acquiring the similarity between the account numbers according to the similarity of the attribute information between the account numbers;
constructing the account relation knowledge graph according to the similarity among the accounts;
and acquiring the association relation between the accounts according to the account relation knowledge graph, and storing the association relation in the database.
In a possible implementation manner, when the associated accountnumber obtaining module 601 obtains the similarity between the account numbers according to the similarity of the attribute information between the account numbers, the module is configured to:
for any two account numbers, acquiring the number of items of the same attribute information of the two account numbers and the number of items of all attribute information of each account number in the two account numbers;
and according to the number of items of the same attribute information of the two account numbers and the number of items of all attribute information of each account number in the two account numbers, obtaining the cosine similarity between the two account numbers.
In a possible implementation manner, when the associated accountnumber obtaining module 601 constructs the account number relationship knowledge graph according to the similarity between the account numbers, the associated account number obtaining module is configured to:
establishing a connection line between the account numbers according to the similarity between the account numbers, and setting the line width of the connection line between the account numbers according to the mapping relation between the preset line width and the similarity.
In a possible implementation manner, when acquiring the association relationship between the accounts according to the account relationship knowledge graph, the account acquisition module is configured to:
for any account, the similarity between all other accounts connected with the account and the account is obtained from the account relation knowledge graph, and the other accounts with the similarity higher than a preset threshold value are used as associated accounts associated with the account.
In a possible implementation manner, when acquiring the preferred item information of the user corresponding to the associated account, the preferred iteminformation acquiring module 602 is configured to:
acquiring a browsing record and/or a collection record of the associated account;
acquiring a weight value corresponding to each item in the browsing record and/or the collection record, and sequencing according to the weight value;
and determining the preference item information of the user corresponding to the associated account according to the sequence.
In a possible implementation manner, the preferred iteminformation obtaining module 602, when obtaining a weight value corresponding to each item in the browsing record and/or the favorite record, is configured to:
for any target item in the browsing record and/or the collection record, acquiring a first ratio of the browsing times of the target item to the total browsing times in the browsing record and/or the collection record;
acquiring a second ratio of the total browsing times of all users to all the articles to the total browsing times of all the users to the target articles;
and taking the product of the first ratio and the second ratio as a weighted value corresponding to the target item in the browsing record and/or the collection record.
In a possible implementation, the preferred iteminformation obtaining module 602 is further configured to:
acquiring a purchase record of the associated account, and adding a purchased identifier to the item purchased by the associated account in the preferred item information; and/or
And acquiring the purchase records of other associated accounts associated with the associated account, and adding purchased identifications to the items purchased by the other associated accounts in the preferred item information.
In a possible implementation manner, when pushing the preferred item information of the user corresponding to the associated account to the terminal, the pushingmodule 603 is configured to:
determining pushing time according to the received advertisement information and/or the information of the user corresponding to the associated account;
and pushing the preference item information of the user corresponding to the associated account to the terminal within the pushing time.
The article recommendation device provided in the embodiment of the present invention may be specifically configured to execute the method embodiments provided in fig. 2, 3, and 5, and specific functions are not described herein again.
According to the article recommendation device provided by the embodiment of the invention, the associated account number associated with the current account number is acquired from the database according to the association relationship among the preset account numbers; the incidence relation between the accounts is acquired according to a pre-constructed account relation knowledge graph or actively created by a user corresponding to the accounts; acquiring preference article information of a user corresponding to the associated account; and pushing the preference item information of the user corresponding to the associated account to the terminal. According to the embodiment, the preference item information of the user corresponding to the associated account is pushed to the user, reference is provided when the user purchases gifts for family, friends and partners, the user can conveniently select and purchase suitable items, the requirements of the family, the friends and the partners are met, and the user experience is improved.
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present invention. The computer device provided in the embodiment of the present invention may execute the processing flow provided in the embodiment of the item recommendation method, as shown in fig. 7, theelectronic device 70 includes amemory 71, aprocessor 72, and a computer program; wherein the computer program is stored in thememory 71 and is configured to be executed by theprocessor 72 for the item recommendation method as described in the above embodiments. In addition, theelectronic device 70 may further have acommunication interface 73 for receiving a control instruction.
The electronic device of the embodiment shown in fig. 7 may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
In addition, the present embodiment also provides a computer-readable storage medium on which a computer program is stored, the computer program being executed by a processor to implement the item recommendation method described in the above embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.