Method, device, electronic device and medium for generating information of user-favorite items
By using vector encoding of user operation time information and filtering of user interest dictionary, user preference item information that meets current time needs is generated, which solves the problem of inaccurate item information in the prior art and achieves efficient and accurate item recommendations.
Patent Information
- Application Number
- CN202210545254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-05-19
AI Technical Summary
The existing user prefers the item information generation method that does not meet the current time requirements, resulting in the generated item information being inaccurate enough.
By obtaining the time information of the current user operation, vector encoding is performed, combining the time feature vectors and item feature vectors in the user interest dictionary, matching target vector pairs are selected to generate user preference item information that meets the current time needs.
It realizes the accurate and efficient generation of user-like item information under the current time information, and avoids situations that do not meet the actual needs of users.
Smart Images

Figure CN114943583B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, device, electronic device, and medium for generating information about items preferred by users. Background Art
[0002] At present, the user-favorite item information exploration technology is a technology for exploring the item information that users like. Through the user-favorite item information exploration technology, the user's favorite item information can be recommended to the user. For the exploration of the user's favorite item information, the relevant method is: according to the user's historical interaction item information sequence, the sequence recommendation technology is used to generate the user's corresponding user favorite item information.
[0003] However, when the above method is used to generate user's favorite item information, the following technical problems often occur:
[0004] The generated user-favorite item information may not meet the user's actual needs at the current time, and there is a problem that the generated user-favorite item information is not accurate enough. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose methods, devices, electronic devices, and media for generating information about items preferred by users to solve the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for generating user preference item information, comprising: obtaining current time information corresponding to a current user operation; performing vector encoding on the current time information to obtain a time encoding vector; obtaining a user interest dictionary of an operating user associated with the current user operation, wherein the user interest dictionary comprises: a plurality of vector pairs in the form of two-tuples, each vector pair comprising: a time feature vector and a user preference item feature vector; based on the time encoding vector, selecting at least one target vector pair from the user interest dictionary, wherein the time feature vector in each target vector pair matches the time encoding vector; based on at least one user preference item feature vector, generating at least one user preference item information of the operating user corresponding to the current time information, wherein the at least one user preference item feature vector is a vector in the at least one target vector pair.
[0008] Optionally, the above-mentioned filtering out at least one target vector pair from the above-mentioned user interest dictionary based on the above-mentioned time coding vector includes: obtaining each time feature vector corresponding to multiple vector pairs; determining the correlation between the above-mentioned time coding vector and each of the above-mentioned time feature vectors; filtering out vector pairs whose corresponding correlation is greater than a preset threshold from the above-mentioned user interest dictionary as target vector pairs, and obtaining the above-mentioned at least one target vector pair.
[0009] Optionally, the user interest dictionary is generated by the following steps: obtaining the first historical interaction item information sequence and the first historical item interaction time information sequence corresponding to the operating user; generating a first fusion vector sequence, wherein the first fusion vector in the first fusion vector sequence represents fusion feature information of the first historical interaction item information and the corresponding first historical item interaction time information; inputting the first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the user interest dictionary.
[0010] Optionally, the above-mentioned inputting the above-mentioned first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the above-mentioned user interest dictionary includes: inputting the above-mentioned first fusion vector sequence into a pre-trained dependent feature information extraction network with a multi-head self-attention mechanism to output a first dependent feature vector sequence; generating a first user preference item combination feature vector set according to the above-mentioned first dependent feature vector sequence, wherein each first user preference item combination feature vector represents feature information of the user preference item combination information; performing multi-head linear projection on each first user preference item combination feature vector in the above-mentioned first user preference item combination feature vector set to generate a vector pair set to obtain a vector pair set group; generating the above-mentioned user interest dictionary according to the above-mentioned vector pair set group.
[0011] Optionally, the first historical interaction item information in the above-mentioned first historical interaction item information sequence includes: at least one historical interaction item attribute information and historical interaction item name information; and the above-mentioned generation of the first fusion vector sequence includes: for each first historical interaction item information in the above-mentioned first historical interaction item information sequence, executing the first fusion vector generation step: vector encoding at least one historical interaction item attribute information in the above-mentioned first historical interaction item information to obtain at least one item attribute vector; vector encoding the historical interaction item name information in the above-mentioned first historical interaction item information to obtain an item name vector; vector encoding the first historical item interaction time information corresponding to the above-mentioned first historical interaction item information to obtain a historical item interaction time vector; generating a first fusion vector based on the above-mentioned at least one item attribute vector, the above-mentioned item name vector and the above-mentioned historical item interaction time vector.
[0012] Optionally, generating a first fusion vector based on the at least one item attribute vector, the item name vector and the historical item interaction time vector includes: performing a pooling operation on the historical item interaction time vector to obtain a pooled vector; and splicing the at least one item attribute vector, the item name vector and the pooled vector to generate a spliced vector as the first fusion vector.
[0013] Optionally, the above-mentioned vector encoding of the above-mentioned current time information to obtain the time coding vector includes: performing word embedding processing on the above-mentioned current time information to obtain a word embedding vector; performing pooling operation on the above-mentioned word embedding vector to obtain the above-mentioned time coding vector.
[0014] Optionally, the above-mentioned generating a first item combination feature vector set based on the above-mentioned first dependency feature vector sequence includes: performing linear transformation on each first dependency feature vector in the above-mentioned first dependency feature vector sequence to obtain a transformed dependency feature vector sequence; performing clustering processing on each transformed dependency feature vector in the above-mentioned transformed dependency feature vector sequence to obtain each vector cluster center; determining the vector cluster center of the above-mentioned each vector cluster center as the first item combination feature vector to obtain the above-mentioned first item combination feature vector set.
[0015] Optionally, performing multi-head linear projection on each first item combination feature vector in the first item combination feature vector set to generate a vector pair set includes: inputting the first item combination feature vector into a multi-head linear network to output the vector pair set.
[0016] Optionally, the user interest dictionary generation model is trained by the following steps: obtaining a second historical interaction item information sequence and a second historical item interaction time information sequence for a historical user; generating a second fusion vector sequence, wherein the second fusion vector in the second fusion vector sequence represents feature information of the second historical interaction item information and the corresponding second historical item interaction time information; inputting the second fusion vector sequence into the initial user interest dictionary generation model to obtain an initial user interest dictionary; obtaining a user preference item information set corresponding to the target time information of the historical user; vector encoding the target time information to generate a target time encoding vector; vector encoding the user preference item information set to generate an item feature vector set; and obtaining a user preference item information set corresponding to the target time information of the historical user from the initial user interest dictionary. A vector pair corresponding to the target time coding vector is screened out as an initial vector pair to obtain at least one initial vector pair; for each item feature vector in the item feature vector set, an initial vector pair screening step is performed: an initial vector pair whose correlation with the item feature vector satisfies a second preset condition is screened out from the at least one initial vector pair to obtain an initial vector pair set; each initial vector pair in the obtained initial vector pair set is input into a preset sampling normalized exponential function to obtain first loss information; each initial vector pair in the initial vector pair set is input into a preset paired loss function to obtain second loss information; and model parameters in the initial user interest dictionary generation model are trained according to the first loss information and the second loss information.
[0017] In a second aspect, some embodiments of the present disclosure provide a user preference item information generating device, comprising: a first acquisition unit, configured to acquire current time information corresponding to a current user operation; a vector encoding unit, configured to vector encode the above current time information to obtain a time encoding vector; a second acquisition unit, configured to acquire a user interest dictionary of an operating user associated with the above current user operation, wherein the above user interest dictionary comprises: a plurality of vector pairs in the form of two-tuples, each vector pair comprising: a time feature vector and a user preference item feature vector; a screening unit, configured to screen out at least one target vector pair from the above user interest dictionary according to the above time encoding vector, wherein the time feature vector in each target vector pair matches the above time encoding vector; a generating unit, configured to generate at least one user preference item information of the above operating user corresponding to the above current time information according to at least one user preference item feature vector, wherein the above at least one user preference item feature vector is a vector in the above at least one target vector pair.
[0018] Optionally, the screening unit can be configured to: obtain each time feature vector corresponding to multiple vector pairs; determine the correlation between the above-mentioned time coding vector and the above-mentioned each time feature vector; screen out vector pairs whose corresponding correlation is greater than a preset threshold from the above-mentioned user interest dictionary as target vector pairs, and obtain the above-mentioned at least one target vector pair.
[0019] Optionally, the user interest dictionary is generated by the following steps: obtaining the first historical interaction item information sequence and the first historical item interaction time information sequence corresponding to the operating user; generating a first fusion vector sequence, wherein the first fusion vector in the first fusion vector sequence represents fusion feature information of the first historical interaction item information and the corresponding first historical item interaction time information; inputting the first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the user interest dictionary.
[0020] Optionally, the above-mentioned inputting the above-mentioned first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the above-mentioned user interest dictionary includes: inputting the above-mentioned first fusion vector sequence into a pre-trained dependent feature information extraction network with a multi-head self-attention mechanism to output a first dependent feature vector sequence; generating a first user preference item combination feature vector set according to the above-mentioned first dependent feature vector sequence, wherein each first user preference item combination feature vector represents feature information of the user preference item combination information; performing multi-head linear projection on each first user preference item combination feature vector in the above-mentioned first user preference item combination feature vector set to generate a vector pair set to obtain a vector pair set group; generating the above-mentioned user interest dictionary according to the above-mentioned vector pair set group.
[0021] Optionally, the first historical interaction item information in the above-mentioned first historical interaction item information sequence includes: at least one historical interaction item attribute information and historical interaction item name information; and the above-mentioned generation of the first fusion vector sequence includes: for each first historical interaction item information in the above-mentioned first historical interaction item information sequence, executing the first fusion vector generation step: vector encoding at least one historical interaction item attribute information in the above-mentioned first historical interaction item information to obtain at least one item attribute vector; vector encoding the historical interaction item name information in the above-mentioned first historical interaction item information to obtain an item name vector; vector encoding the first historical item interaction time information corresponding to the above-mentioned first historical interaction item information to obtain a historical item interaction time vector; generating a first fusion vector based on the above-mentioned at least one item attribute vector, the above-mentioned item name vector and the above-mentioned historical item interaction time vector.
[0022] Optionally, generating a first fusion vector based on the at least one item attribute vector, the item name vector and the historical item interaction time vector includes: performing a pooling operation on the historical item interaction time vector to obtain a pooled vector; and splicing the at least one item attribute vector, the item name vector and the pooled vector to generate a spliced vector as the first fusion vector.
[0023] Optionally, the above-mentioned vector encoding of the above-mentioned current time information to obtain the time coding vector includes: performing word embedding processing on the above-mentioned current time information to obtain a word embedding vector; performing pooling operation on the above-mentioned word embedding vector to obtain the above-mentioned time coding vector.
[0024] Optionally, the above-mentioned generating a first item combination feature vector set based on the above-mentioned first dependency feature vector sequence includes: performing linear transformation on each first dependency feature vector in the above-mentioned first dependency feature vector sequence to obtain a transformed dependency feature vector sequence; performing clustering processing on each transformed dependency feature vector in the above-mentioned transformed dependency feature vector sequence to obtain each vector cluster center; determining the vector cluster center of the above-mentioned each vector cluster center as the first item combination feature vector to obtain the above-mentioned first item combination feature vector set.
[0025] Optionally, performing multi-head linear projection on each first item combination feature vector in the first item combination feature vector set to generate a vector pair set includes: inputting the first item combination feature vector into a multi-head linear network to output the vector pair set.
[0026] Optionally, the user interest dictionary generation model is trained by the following steps: obtaining a second historical interaction item information sequence and a second historical item interaction time information sequence for a historical user; generating a second fusion vector sequence, wherein the second fusion vector in the second fusion vector sequence represents feature information of the second historical interaction item information and the corresponding second historical item interaction time information; inputting the second fusion vector sequence into the initial user interest dictionary generation model to obtain an initial user interest dictionary; obtaining a user preference item information set corresponding to the target time information of the historical user; vector encoding the target time information to generate a target time encoding vector; vector encoding the user preference item information set to generate an item feature vector set; and obtaining a user preference item information set corresponding to the target time information of the historical user from the initial user interest dictionary. A vector pair corresponding to the target time coding vector is screened out as an initial vector pair to obtain at least one initial vector pair; for each item feature vector in the item feature vector set, an initial vector pair screening step is performed: an initial vector pair whose correlation with the item feature vector satisfies a second preset condition is screened out from the at least one initial vector pair to obtain an initial vector pair set; each initial vector pair in the obtained initial vector pair set is input into a preset sampling normalized exponential function to obtain first loss information; each initial vector pair in the initial vector pair set is input into a preset paired loss function to obtain second loss information; and model parameters in the initial user interest dictionary generation model are trained according to the first loss information and the second loss information.
[0027] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0028] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0029] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the item information generation method of some embodiments of the present disclosure can accurately and efficiently generate at least one user's favorite item information of the operating user under the corresponding time information. Specifically, the reason for not being able to accurately and efficiently generate at least one user's favorite item information is that the generated recommended item information may not meet the actual needs of the target user at the current time, and there is a problem that the generated recommended item information is not accurate enough. Based on this, the item information generation method of some embodiments of the present disclosure can first obtain the current time information corresponding to the current user operation, so as to subsequently determine at least one user's favorite item information corresponding to the operating user for the current time information. Then, the above-mentioned current time information is vector-encoded to obtain a time encoding vector for subsequent matching with each vector pair in the user interest dictionary. Next, the user interest dictionary of the operating user associated with the above-mentioned current user operation is obtained. Among them, the above-mentioned user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, and the vector pair includes: a time feature vector representing the feature information of the time information, and a user favorite item feature vector representing the feature information of the user's favorite item information. Here, the user interest dictionary stores each user's favorite item information corresponding to each time information of the current user in the form of a vector pair. Therefore, by using the user interest dictionary, the user preference item information of the operating user at each time information can be accurately and efficiently determined. This avoids the situation where the generated user preference item information may not meet the actual needs of the operating user at the current time. Furthermore, according to the various time feature vectors corresponding to the above-mentioned user interest dictionary, the vector pairs corresponding to the above-mentioned time coding vectors can be efficiently and accurately screened out from the above-mentioned user interest dictionary as target vector pairs to obtain at least one target vector pair. Finally, by vector conversion of at least one user preference item feature vector included in at least one target vector pair, at least one user preference item information that meets the actual needs of the operating user at the current time information can be generated. Therefore, by using the various vector pairs in the user interest dictionary of the operating user, at least one user preference item information that currently meets the actual needs of the operating user can be accurately and efficiently generated by comparison. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0031] Figure 1 is a schematic diagram of an application scenario of a method for generating user preference item information according to some embodiments of the present disclosure;
[0032] Figure 2 is a flow chart of some embodiments of the method for generating user favorite item information according to the present disclosure;
[0033] Figure 3 is a schematic diagram of generating association degrees according to the method for generating user preference item information disclosed in the present invention;
[0034] Figure 4 is a flow chart of other embodiments of the method for generating user favorite item information according to the present disclosure;
[0035] Figure 5 is a schematic diagram of the structure of some embodiments of the device for generating user preference item information according to the present disclosure;
[0036] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0037] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0038] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0039] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0042] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0043] Figure 1It is a schematic diagram of an application scenario of a method for generating user preference item information according to some embodiments of the present disclosure.
[0044] exist Figure 1In the application scenario, the electronic device 101 may first obtain the current time information 103 corresponding to the current user operation 102. In this application scenario, the current user operation 102 may be "click operation on page item information". The current time information 103 may be "the first week of December 2012". Then, the electronic device 101 may vector encode the current time information 103 to obtain a time encoding vector 104. In this application scenario, the time encoding vector 104 may be "[1, 23, 45, 12, 31, 34]". Next, the electronic device 101 may obtain a user interest dictionary 105 of the operating user associated with the current user operation 102. The user interest dictionary 105 includes: a plurality of vector pairs in the form of two tuples, each vector pair including: a time feature vector and a user favorite item feature vector. In this application scenario, the user interest dictionary 105 includes: a vector pair 1051, a vector pair 1052, a vector pair 1053 and a vector pair 1054. The above-mentioned vector pair 1051 is “([1,23,45,12,31,34],[21,12,12,23,11])”. The above-mentioned vector pair 1052 is “([13,3,12,43,12,6],[223,42,98,3,1])”. The above-mentioned vector pair 1053 is “([7,23,45,12,31,34],[123,45,72,3,4])”. The above-mentioned vector pair 1054 is “([23,67,4,12,1,4],[25,52,17,29,11])”. Furthermore, the electronic device 101 can filter out at least one target vector pair 106 from the above-mentioned user interest dictionary 105 according to the above-mentioned time coding vector 104. Among them, the time feature vector in each target vector pair matches the above-mentioned time coding vector 104. In this application scenario, the at least one target vector pair 106 includes: vector pair 1051 and vector pair 1053. Finally, the electronic device 101 can generate at least one user favorite item information 107 corresponding to the current time information 103 of the operating user according to the at least one user favorite item feature vector. Among them, the at least one user favorite item feature vector is a vector in the at least one target vector pair 106. In this application scenario, the at least one user favorite item feature vector may include: "[21,12,12,23,11]" in the vector pair 1051, and "[123,45,72,3,4]" in the vector pair 1053. The at least one user favorite item information 107 may include: user favorite item information 1071 and user favorite item information 1072. The user favorite item information 1071 may be "** instant noodles". The user favorite item information 1072 may be "** top".
[0045] It should be noted that the above-mentioned electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple server terminals or terminal devices, or it can be implemented as a single server terminal or a single terminal device. When the electronic device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0046] It should be understood that Figure 1 The number of electronic devices in the embodiment is only for illustration. Any number of electronic devices may be provided according to implementation requirements.
[0047] Continue to refer Figure 2 , shows a process 200 of some embodiments of the method for generating user favorite item information according to the present disclosure. The method for generating user favorite item information comprises the following steps:
[0048] Step 201, obtaining current time information corresponding to the current user operation.
[0049] In some embodiments, the execution subject of the above method for generating user preference item information (for example Figure 1 The electronic device 101 shown can obtain the current time information corresponding to the current user operation through a wired connection method or a wireless connection method. Among them, the above-mentioned current user operation can be an operation performed by an operating user. The above-mentioned current time information can be the time information when the operating user performs the current user operation. For example, the above-mentioned current time information can be the moment information when the operating user performs the current user operation, and can also include at least one of the following: the year information of the above-mentioned moment information, the month information of the above-mentioned moment information, the season information of the above-mentioned moment information, the week information of the above-mentioned moment information, and the holiday information of the above-mentioned moment information.
[0050] It should be noted that the user information (e.g., current time information) of the operating user involved in the present disclosure is data obtained after the permission of the operating user. The operating user can determine whether to allow the use of the user information by operating the first option. The first option includes: an option to allow the acquisition and an option not to allow the acquisition.
[0051] As an example, the current time information may be “12:00, October 1, 2012”. The current time information may also be “2012”, “October”, “Autumn”, “the first week of October”, or “National Day”.
[0052] Optionally, the current user operation may be various operations performed by the operating user on the target page. For example, the current user operation may be a click operation performed by the operating user on the target item information on the target page, or a page sliding operation performed on the target page. The target page may be a page in a target application.
[0053] Step 202, vector encoding is performed on the above current time information to obtain a time encoding vector.
[0054] In some embodiments, the execution subject may perform vector encoding on the current time information to obtain a time encoding vector. The vector encoding on the current time information is to perform vector conversion on the current time information. The time encoding vector may represent time feature information of the current time information. The vector dimension of the time encoding vector may be preset.
[0055] As an example, the execution subject may perform word embedding processing on the current time information to obtain the time encoding vector.
[0056] Specifically, the execution subject may first perform one-hot encoding on the current time information to obtain a one-hot encoded vector, and then multiply the one-hot encoded vector by the word embedding matrix to generate the time encoding vector.
[0057] Step 203: Obtain a user interest dictionary of the operating user associated with the current user operation.
[0058] In some embodiments, the execution subject may obtain the user interest dictionary of the operating user associated with the current user operation by wired or wireless means. The operating user associated with the current user operation is the user who performs the current user operation. The user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, each vector pair including: a time feature vector and a user favorite item feature vector. The user interest dictionary is a dictionary generated for the operating user. The user interest dictionary may be a pre-stored dictionary or may be temporarily generated for the operating user. For example, for the operating user being a historical user (i.e., there is a user who performs the user operation), the user interest dictionary may be pre-stored. For the operating user being a new user (i.e., there is no user who performs the user operation), the user interest dictionary may be temporarily generated by various means. Each of the plurality of vector pairs may represent the association information between the time information and the user favorite item information of the operating user. The time feature vector may represent the feature information of the time information. The user favorite item feature vector may represent the feature information of the user favorite item.
[0059] It should be noted that the user interest dictionary is data obtained after permission. And by setting the second option, it is determined whether to allow the use of the user interest dictionary. The second option includes: an option to allow the acquisition and an option not to allow the acquisition.
[0060] For example, the vector pair in the user interest dictionary of the operating user is "([1,23,45,12,31,34],[21,12,12,23,11])". The time feature vector in the vector pair is "[1,23,45,12,31,34]". "[1,23,45,12,31,34]" can represent the feature information of "October 1, 2012 12:00". "[21,12,12,23,11]" can represent the feature information of "** instant noodles". That is, the user preference item corresponding to "October 1, 2012 12:00" of the operating user is "** instant noodles".
[0061] In some optional implementations of some embodiments, the user interest dictionary is generated by the following steps:
[0062] The first step is to obtain the first historical interactive item information sequence and the first historical item interaction time information sequence corresponding to the above-mentioned operating user. Among them, the first historical interactive item information is the operating item object information of the operating user performing the user operation. The first historical interactive item information sequence is the operating item object information sequence corresponding to the user operation sequence. The above-mentioned user operation sequence can be each user operation performed by the operating user within a predetermined time period. The above-mentioned operation item object information can be the item information of the operation item object. The first historical item interaction time information is the interaction time information when the operating user performs the user operation. The first historical item interaction time information sequence is the interaction time sequence corresponding to the user operation sequence. Among them, for each historical interactive item information in the first historical interactive item information sequence, there is the first historical item interaction time information corresponding to the above-mentioned historical interactive item information in the first historical item interaction time information sequence.
[0063] As an example, the first historical interactive item information sequence is "[**instant noodles, **red flag]". The first historical item interaction time information sequence is "[September, October]". Therefore, according to the association relationship between the first historical interactive item information sequence and the first historical item interaction time information sequence, it can be obtained that the operating user performed a user operation on "**instant noodles" in "September". For example, a purchase operation. The operating user performed a user operation on "**red flag" in "October". For example, an item transfer operation.
[0064] The second step is to generate a first fusion vector sequence, wherein the first fusion vector in the first fusion vector sequence represents fusion feature information of the first historical interaction item information and the corresponding first historical item interaction time information.
[0065] As an example, each first historical interactive item information in the first historical interactive item information sequence is word-embedded to obtain an embedded item vector sequence. Similarly, each first historical item interaction time information in the first historical item interaction time information sequence is word-embedded to obtain an embedded interaction time vector sequence. According to the correspondence between the first historical item information and the first historical item interaction time information, each embedded item vector in the embedded item vector sequence is concatenated with the corresponding embedded interaction time vector in the embedded interaction time vector sequence to generate a concatenated vector as the first fused vector, thereby obtaining a first fused vector sequence.
[0066] The third step is to input the first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the user interest dictionary. The user interest dictionary generation model may be a model for generating a user interest dictionary. Optionally, the user interest dictionary generation model may be a neural network model. For example, it may be a Bert model.
[0067] Optionally, the step of inputting the first fused vector sequence into a pre-trained user interest dictionary generation model to obtain the user interest dictionary may include the following steps:
[0068] In the first step, the first fused vector sequence is input into a pre-trained dependency feature information extraction network with a multi-head self-attention mechanism to output a first dependency feature vector sequence. The dependency feature information extraction network with a multi-head self-attention mechanism can be an encoding model in a transformer model. The encoding model in the transformer model can extract the implicit feature dependency in the first fused vector sequence, so that the first dependency feature vector has an implicit feature dependency.
[0069] The second step is to generate a user-favorite item combination feature vector set based on the first dependent feature vector sequence, wherein each user-favorite item combination feature vector represents feature information of the user-favorite item combination information.
[0070] As an example, K-Means clustering processing may be performed on each feature vector in the first dependent feature vector sequence to obtain a user-favorite item combination feature vector set.
[0071] The third step is to perform multi-head linear projection on each user-preferred item combination feature vector in the above user-preferred item combination feature vector set to generate a vector pair set and obtain a vector pair set group.
[0072] The fourth step is to generate the user interest dictionary based on the vector pair set.
[0073] As an example, the vector pair set may be converted into a user interest dictionary according to a predetermined dictionary format.
[0074] Optionally, the first historical interaction item information in the first historical interaction item information sequence includes: at least one historical interaction item attribute information and historical interaction item name information; and the generating the first fusion vector sequence may include the following steps:
[0075] For each first historical interaction item information in the first historical interaction item information sequence, the first fusion vector generation step is performed:
[0076] The first sub-step is to perform vector encoding on at least one historical interactive item attribute information in the first historical interactive item information to obtain at least one item attribute vector. The historical interactive item attribute information is the attribute information of the historical interactive item information. The historical interactive item attribute information may include at least one of the following: category information of the historical interactive item, brand information of the historical interactive item, and product word information of the historical interactive item.
[0077] As an example, word embedding processing may be performed on at least one historical interaction item attribute information in the first historical interaction item information to obtain at least one item attribute vector.
[0078] The second sub-step is to vector encode the historical interactive item name information in the first historical interactive item information to obtain an item name vector. The historical interactive item name information may be the item name information of the historical interactive item. Optionally, the item name information may be item name identification information, such as an item name identification ID (IdentityDocument).
[0079] As an example, word embedding processing may be performed on the historical interaction item name information in the first historical interaction item information to obtain an item name vector.
[0080] The third sub-step is to perform vector encoding on the first historical item interaction time information corresponding to the first historical interaction item information to obtain a historical item interaction time vector.
[0081] As an example, word embedding processing may be performed on the first historical item interaction time information corresponding to the first historical interaction item information to obtain a historical item interaction time vector.
[0082] The fourth sub-step is to generate a first fusion vector based on the at least one item attribute vector, the item name vector and the historical item interaction time vector.
[0083] As an example, vector concatenation may be performed directly on at least one item attribute vector, an item name vector, and a historical item interaction time vector to generate the first fusion vector.
[0084] Optionally, generating a first fusion vector according to the at least one item attribute vector, the item name vector, and the historical item interaction time vector may include the following steps:
[0085] The first step is to perform a pooling operation on the above historical item interaction time vector to obtain a pooled vector.
[0086] As an example, the execution entity may perform an average pooling operation on the historical item interaction time vector to obtain the pooled vector.
[0087] In the second step, the at least one item attribute vector, the item name vector and the pooled vector are concatenated to generate a concatenated vector as the first fused vector.
[0088] Optionally, the generating of the first item combination feature vector set according to the first dependent feature vector sequence may include the following steps:
[0089] In the first step, each first dependent eigenvector in the above first dependent eigenvector sequence is linearly transformed to obtain a transformed dependent eigenvector sequence.
[0090] As an example, according to a pre-designed bilinear transformation matrix, each first dependent eigenvector in the above-mentioned first dependent eigenvector sequence is linearly transformed to obtain a transformed dependent eigenvector sequence.
[0091] It should be noted that linear transformation of each first dependent feature vector in the first dependent feature vector sequence can eliminate item difference information between each first historical interactive item information in the first historical interactive item information sequence, which facilitates subsequent clustering processing.
[0092] In the second step, clustering is performed on each transformed dependent eigenvector in the above transformed dependent eigenvector sequence to obtain each vector cluster center.
[0093] As an example, soft clustering processing may be performed on each transformed dependent feature vector in the above transformed dependent feature vector sequence to obtain each vector cluster center.
[0094] The third step is to determine the vector cluster center among the above-mentioned vector cluster centers as the first item combination feature vector to obtain the above-mentioned first item combination feature vector set.
[0095] Optionally, the feature vector set of the first user's preferred item combination can be input into a multi-head nonlinear network to output the vector pair set. The multi-head nonlinear network includes a predetermined number of nonlinear networks. Each nonlinear network in the multi-head nonlinear network can include: a linear sub-network layer and an activation function layer. The activation function corresponding to the activation function layer can be a ReLU (Rectified Linear Unit) function. For example, the linear sub-network layer can be a fully connected layer.
[0096] Optionally, the user interest dictionary generation model is trained through the following steps:
[0097] The first step is to obtain a second historical interaction item information sequence and a second historical item interaction time information sequence for a historical user, wherein the historical user may be a user who has performed a user operation.
[0098] Here, the explanation of the second historical interaction item information sequence and the second historical item interaction time information sequence of the historical user can refer to the explanation of the first historical interaction item information sequence and the first item interaction time information sequence of the operating user, and will not be repeated here.
[0099] It should be noted that the user information of the historical user involved in the present disclosure (e.g., the second historical interaction item information sequence and the second historical item interaction time information sequence) is data obtained after the permission of the historical user. And the historical user can determine whether to allow the use of the user information by operating the first option. The first option includes: an option to allow the acquisition and an option not to allow the acquisition.
[0100] The second step is to generate a second fusion vector sequence, wherein the second fusion vector in the second fusion vector sequence represents feature information of the second historical interaction item information and the corresponding second historical item interaction time information.
[0101] For details, please refer to the explanation of the first fusion vector sequence, which will not be repeated here.
[0102] The third step is to input the second fusion vector sequence into the initial user interest dictionary generation model to obtain the initial user interest dictionary.
[0103] The fourth step is to obtain the user favorite item information set corresponding to the target time information of the historical user. The target time information may be the time information corresponding to the target user operation performed by the historical user. For example, the target user operation may be an item transfer operation performed by the historical user. Each item in the user favorite item information set may be the item information that the historical user liked under the target time information. For example, the target time information is "December 2011". The user favorite item information set may include: **Christmas tree, **dumplings.
[0104] The fifth step is to perform vector encoding on the above target time information to generate a target time encoding vector.
[0105] As an example, the target time information can be subjected to word embedding processing to generate a target time encoding vector.
[0106] The sixth step is to perform vector encoding on the above user preference item information set to generate an item feature vector set.
[0107] As an example, word embedding processing may be performed on each user favorite item information in the user favorite item information set to generate a target time encoding vector.
[0108] In the seventh step, a vector pair corresponding to the target time coding vector is selected from the initial user interest dictionary as an initial vector pair, thereby obtaining at least one initial vector pair.
[0109] As an example, vector pairs whose correlation with the target time coding vector is greater than a predetermined value may be selected from the above initial user interest dictionary as initial vector pairs to obtain at least one initial vector pair.
[0110] Step 8: For each item feature vector in the above item feature vector set, perform the initial vector pair screening step:
[0111] An initial vector pair whose correlation with the item feature vector satisfies a preset condition is selected from the at least one initial vector pair to obtain an initial vector pair set. The correlation is a value between 0 and 1. The closer the correlation is to 1, the more similar the feature information corresponding to the initial vector pair is to the item feature vector. The initial vector pair includes: an initial time feature vector and an initial user preference item feature vector. The preset condition may be that the correlation between the initial time feature vector and the item feature vector is greater than a preset value.
[0112] As an example, first, the cosine value between each initial time feature vector and the item feature vector in at least one initial vector pair can be determined as the correlation degree. Then, the initial vector pairs whose corresponding correlation degree is greater than a certain value are selected from the at least one initial vector pair to obtain an initial vector pair set.
[0113] In the ninth step, each initial vector pair in the obtained initial vector pair set is input into a preset sampled normalized exponential function to obtain first loss information. The sampled normalized exponential function may be a SampledSoftmax function.
[0114] In the tenth step, each initial vector pair in the initial vector pair set is input into a preset pairwise loss function to obtain second loss information. The pairwise loss function may be a pairwise loss function.
[0115] In the eleventh step, the model parameters in the initial user interest dictionary generation model are trained according to the first loss information and the second loss information.
[0116] As an example, in response to determining that the first loss function is greater than or equal to a first value, and / or the second loss function is greater than or equal to a second value, the model parameters in the initial user interest dictionary generation model are trained.
[0117] In response to determining that the first loss function is less than the first value, and the second loss function is less than or equal to the second value, the training of the model parameters in the initial user interest dictionary generation model is stopped, and the initial user interest dictionary generation model is determined as the trained user interest dictionary generation model.
[0118] Step 204: Filter out at least one target vector pair from the user interest dictionary according to the time coding vector.
[0119] In some embodiments, the execution entity may select at least one target vector pair from the user interest dictionary based on the time coding vector. The time feature vector in each target vector pair matches the time coding vector. The matching relationship between the time feature vector and the time coding vector in the target vector pair may be an inter-vector association relationship. For example, the inter-vector association relationship is that the number of elements with the same size of the elements at the corresponding positions of the time feature vector and the time coding vector is greater than a preset value.
[0120] As an example, the execution subject may first determine the time feature vector included in each vector pair in the user interest dictionary, and finally select at least one target vector pair that has a matching relationship with the time encoding vector from the user interest dictionary.
[0121] In some optional implementations of some embodiments, selecting at least one target vector pair from the user interest dictionary according to the time coding vector may include the following steps:
[0122] In the first step, the execution subject may obtain each time feature vector corresponding to the plurality of vector pairs, wherein the each time feature vector is a time feature vector included in each vector pair in the plurality of vector pairs.
[0123] In the second step, the execution subject may determine the correlation between the time coding vector and each of the time feature vectors. The correlation may be a value between 0 and 1. The closer the correlation is to 1, the more similar the feature information between the time coding vector and the time feature vector is.
[0124] As an example, the execution subject may determine a cosine value between the time encoding vector and each time feature vector as the degree of association.
[0125] As another example, the execution entity may input the time encoding vector and each of the time feature vectors into a correlation generation network (Dot attention network) to obtain each correlation degree.
[0126] As an example, Figure 3 A schematic diagram of inputting the time coding vector and the above-mentioned time feature vectors into the association degree generation network is shown. The various time feature vectors include: time feature vector 301, time feature vector 302 and time feature vector 303. Time feature vector 301, time feature vector 302, time feature vector 303 and time coding vector 304 are input into the above-mentioned association degree generation network 305 to obtain an association degree set 306. The above-mentioned association degree set 306 includes: the association degree corresponding to the time feature vector 301, the association degree corresponding to the time feature vector 302, and the association degree corresponding to the time feature vector 303. The association degree corresponding to the time feature vector 301 can be 0.4. The association degree corresponding to the time feature vector 302 can be 0.5. The association degree corresponding to the time feature vector 303 can be 0.8.
[0127] In the third step, the execution subject may select vector pairs with a corresponding correlation greater than a preset threshold from the user interest dictionary as target vector pairs, and obtain at least one target vector pair. For example, the preset threshold is 0.9.
[0128] Step 205: generating at least one user favorite item information corresponding to the above-mentioned operating user at the above-mentioned current time information according to at least one user favorite item feature vector.
[0129] In some embodiments, the execution subject may generate at least one user-favorite item information corresponding to the current time information of the operating user according to at least one user-favorite item feature vector. The at least one user-favorite item feature vector is a vector in the at least one target vector pair. For example, if the current time information is "October 1, 2012", the at least one user-favorite item information preferred by the operating user on "October 1, 2012" may include: a red flag and a flagpole.
[0130] As an example, the execution subject may input at least one user-favorite item feature vector into a text conversion network to obtain the at least one user-favorite item information. The text conversion network may be a neural network, for example, a convolutional neural network (CNN).
[0131] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the item information generation method of some embodiments of the present disclosure can accurately and efficiently generate at least one user's favorite item information of the operating user under the corresponding time information. Specifically, the reason for not being able to accurately and efficiently generate at least one user's favorite item information is that the generated recommended item information may not meet the actual needs of the target user at the current time, and there is a problem that the generated recommended item information is not accurate enough. Based on this, the item information generation method of some embodiments of the present disclosure can first obtain the current time information corresponding to the current user operation, so as to subsequently determine at least one user's favorite item information corresponding to the operating user for the current time information. Then, the above-mentioned current time information is vector-encoded to obtain a time encoding vector for subsequent matching with each vector pair in the user interest dictionary. Next, the user interest dictionary of the operating user associated with the above-mentioned current user operation is obtained. Among them, the above-mentioned user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, and the vector pair includes: a time feature vector representing the feature information of the time information, and a user favorite item feature vector representing the feature information of the user's favorite item information. Here, the user interest dictionary stores each user's favorite item information corresponding to each time information of the current user in the form of a vector pair. Therefore, by using the user interest dictionary, the user preference item information of the operating user at each time information can be accurately and efficiently determined. This avoids the situation where the generated user preference item information may not meet the actual needs of the operating user at the current time. Furthermore, according to the various time feature vectors corresponding to the above-mentioned user interest dictionary, the vector pairs corresponding to the above-mentioned time coding vectors can be efficiently and accurately screened out from the above-mentioned user interest dictionary as target vector pairs to obtain at least one target vector pair. Finally, by vector conversion of at least one user preference item feature vector included in at least one target vector pair, at least one user preference item information that meets the actual needs of the operating user at the current time information can be generated. Therefore, by using the various vector pairs in the user interest dictionary of the operating user, at least one user preference item information that currently meets the actual needs of the operating user can be accurately and efficiently generated by comparison.
[0132] Further references Figure 4 , shows a process 400 of another embodiment of the method for generating user favorite item information according to the present disclosure. The method for generating user favorite item information comprises the following steps:
[0133] Step 401, obtaining current time information corresponding to the current user operation.
[0134] In some embodiments, the specific implementation of step 401 and the technical effects thereof can be referred to in Figure 2 The corresponding step 201 in the embodiment will not be described in detail here.
[0135] Step 402: perform word embedding processing on the current time information to obtain a word embedding vector.
[0136] In some embodiments, an execution entity (e.g. Figure 1 The electronic device 101 shown can perform word embedding processing on the above current time information to obtain a word embedding vector.
[0137] Step 403: perform a pooling operation on the above word embedding vector to obtain the above time encoding vector.
[0138] In some embodiments, the execution entity may perform a pooling operation on the word embedding vector to obtain the time encoding vector.
[0139] As an example, the execution entity performs an average pooling operation on the word embedding vector to obtain the time encoding vector.
[0140] Step 404: Obtain a user interest dictionary of the operating user associated with the current user operation.
[0141] Step 405: Filter out at least one target vector pair from the user interest dictionary according to the time coding vector.
[0142] Step 406: Generate at least one user favorite item information corresponding to the above-mentioned operating user at the above-mentioned current time information based on at least one user favorite item feature vector.
[0143] In some embodiments, the specific implementation of steps 404-406 and the technical effects thereof can be referred to in Figure 2 Steps 204-205 in the corresponding embodiment will not be repeated here.
[0144] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 4 The process 400 of the method for generating user preference item information in some corresponding embodiments further highlights the specific steps of vector encoding the current time information. Therefore, the time encoding vector generated by the scheme described in these embodiments can better reflect the characteristic information of the current time information. Using the generated time encoding vector, at least one more accurate target vector pair can be subsequently screened out in the user interest dictionary. As a result, the at least one user preference item information generated subsequently is more accurate.
[0145] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a device for generating user preference item information. These device embodiments are similar to Figure 2Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0146] like Figure 5 As shown, a user preference item information generating device 500 includes: a first acquisition unit 501, a vector encoding unit 502, a second acquisition unit 503, a screening unit 504 and a generating unit 505. The first acquisition unit 501 is configured to acquire current time information corresponding to the current user operation; the vector encoding unit 502 is configured to vector encode the current time information to obtain a time encoding vector; the second acquisition unit 503 is configured to acquire a user interest dictionary of the operating user associated with the current user operation, wherein the user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, each vector pair includes: a time feature vector and a user preference item feature vector; the screening unit 504 is configured to screen out at least one target vector pair from the user interest dictionary according to the time encoding vector, wherein the time feature vector in each target vector pair matches the time encoding vector; the generating unit 505 is configured to generate at least one user preference item information corresponding to the current time information of the operating user according to the at least one user preference item feature vector, wherein the at least one user preference item feature vector is a vector in the at least one target vector pair.
[0147] In some optional implementations of some embodiments, the screening unit 504 in the above-mentioned device 500 can be further configured to: obtain each time feature vector corresponding to multiple vector pairs; determine the correlation between the above-mentioned time coding vector and the above-mentioned each time feature vector; screen out vector pairs whose corresponding correlation is greater than a preset threshold from the above-mentioned user interest dictionary as target vector pairs, and obtain the above-mentioned at least one target vector pair.
[0148] In some optional implementations of some embodiments, the above-mentioned user interest dictionary is generated through the following steps: obtaining the first historical interaction item information sequence and the first historical item interaction time information sequence corresponding to the above-mentioned operating user; generating a first fusion vector sequence, wherein the first fusion vector in the above-mentioned first fusion vector sequence represents the fusion feature information of the first historical interaction item information and the corresponding first historical item interaction time information; inputting the above-mentioned first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the above-mentioned user interest dictionary.
[0149] In some optional implementations of some embodiments, the above-mentioned inputting the above-mentioned first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the above-mentioned user interest dictionary includes: inputting the above-mentioned first fusion vector sequence into a pre-trained dependent feature information extraction network with a multi-head self-attention mechanism to output a first dependent feature vector sequence; generating a first user preference item combination feature vector set according to the above-mentioned first dependent feature vector sequence, wherein each first user preference item combination feature vector represents feature information of the user preference item combination information; performing multi-head linear projection on each first user preference item combination feature vector in the above-mentioned first user preference item combination feature vector set to generate a vector pair set to obtain a vector pair set group; generating the above-mentioned user interest dictionary according to the above-mentioned vector pair set group.
[0150] In some optional implementations of some embodiments, the first historical interaction item information in the above-mentioned first historical interaction item information sequence includes: at least one historical interaction item attribute information and historical interaction item name information; and the above-mentioned generation of the first fusion vector sequence includes: for each first historical interaction item information in the above-mentioned first historical interaction item information sequence, executing the first fusion vector generation step: vector encoding at least one historical interaction item attribute information in the above-mentioned first historical interaction item information to obtain at least one item attribute vector; vector encoding the historical interaction item name information in the above-mentioned first historical interaction item information to obtain an item name vector; vector encoding the first historical item interaction time information corresponding to the above-mentioned first historical interaction item information to obtain a historical item interaction time vector; generating a first fusion vector based on the above-mentioned at least one item attribute vector, the above-mentioned item name vector and the above-mentioned historical item interaction time vector.
[0151] In some optional implementations of some embodiments, the above-mentioned generating a first fusion vector based on the above-mentioned at least one item attribute vector, the above-mentioned item name vector and the above-mentioned historical item interaction time vector includes: performing a pooling operation on the above-mentioned historical item interaction time vector to obtain a pooled vector; splicing the above-mentioned at least one item attribute vector, the above-mentioned item name vector and the above-mentioned pooled vector to generate a spliced vector as the above-mentioned first fusion vector.
[0152] In some optional implementations of some embodiments, the above-mentioned vector encoding of the above-mentioned current time information to obtain the time encoding vector includes: performing word embedding processing on the above-mentioned current time information to obtain a word embedding vector; performing pooling operation on the above-mentioned word embedding vector to obtain the above-mentioned time encoding vector.
[0153] In some optional implementations of some embodiments, the above-mentioned generating a first item combination feature vector set based on the above-mentioned first dependency feature vector sequence includes: performing linear transformation on each first dependency feature vector in the above-mentioned first dependency feature vector sequence to obtain a transformed dependency feature vector sequence; performing clustering processing on each transformed dependency feature vector in the above-mentioned transformed dependency feature vector sequence to obtain each vector cluster center; determining the vector cluster center of the above-mentioned each vector cluster center as the first item combination feature vector to obtain the above-mentioned first item combination feature vector set.
[0154] In some optional implementations of some embodiments, the above-mentioned multi-head linear projection is performed on each first item combination feature vector in the above-mentioned first item combination feature vector set to generate a vector pair set, including: inputting the above-mentioned first item combination feature vector into a multi-head linear network to output the above-mentioned vector pair set.
[0155] In some optional implementations of some embodiments, the user interest dictionary generation model is trained by the following steps: obtaining a second historical interaction item information sequence and a second historical item interaction time information sequence for a historical user; generating a second fusion vector sequence, wherein the second fusion vector in the second fusion vector sequence represents feature information of the second historical interaction item information and the corresponding second historical item interaction time information; inputting the second fusion vector sequence into the initial user interest dictionary generation model to obtain an initial user interest dictionary; obtaining a user preference item information set corresponding to the target time information of the historical user; vector encoding the target time information to generate a target time encoding vector; vector encoding the user preference item information set to generate an item feature vector set; and A vector pair corresponding to the target time coding vector is screened out from the initial user interest dictionary as an initial vector pair, and at least one initial vector pair is obtained; for each item feature vector in the item feature vector set, an initial vector pair screening step is performed: an initial vector pair whose correlation with the item feature vector satisfies a second preset condition is screened out from the at least one initial vector pair, and an initial vector pair set is obtained; each initial vector pair in the obtained initial vector pair set is input into a preset sampling normalized exponential function to obtain first loss information; each initial vector pair in the initial vector pair set is input into a preset paired loss function to obtain second loss information; and model parameters in the initial user interest dictionary generation model are trained according to the first loss information and the second loss information.
[0156] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0157] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 Schematic diagram of the structure of the electronic device 101)600. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0158] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0159] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0160] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0161] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0162] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0163] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the current time information corresponding to the current user operation; vector encodes the current time information to obtain a time encoding vector; obtains a user interest dictionary of the operating user associated with the current user operation, wherein the user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, each vector pair includes: a time feature vector and a user preference item feature vector; based on the time encoding vector, at least one target vector pair is selected from the user interest dictionary, wherein the time feature vector in each target vector pair matches the time encoding vector; based on at least one user preference item feature vector, at least one user preference item information corresponding to the current time information of the operating user is generated, wherein the at least one user preference item feature vector is a vector in the at least one target vector pair.
[0164] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0165] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0166] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a first acquisition unit, a vector encoding unit, a second acquisition unit, a screening unit, and a generation unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the first acquisition unit may also be described as a "unit for acquiring current time information corresponding to the current user operation".
[0167] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0168] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for generating information about user-favorite items, comprising: Get the current time information corresponding to the current user operation; Performing vector encoding on the current time information to obtain a time encoding vector; Acquire a user interest dictionary of an operating user associated with the current user operation, wherein the user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, each vector pair including: a time feature vector and a user favorite item feature vector; According to the time coding vector, at least one target vector pair is selected from the user interest dictionary, wherein the time feature vector in each target vector pair matches the time coding vector; At least one user favorite item information corresponding to the operating user at the current time information is generated according to at least one user favorite item feature vector, wherein the at least one user favorite item feature vector is a vector in the at least one target vector pair.
2. The method according to claim 1, wherein: The step of selecting at least one target vector pair from the user interest dictionary according to the time coding vector comprises: Obtaining each time feature vector corresponding to a plurality of vector pairs; Determining the degree of association between the time encoding vector and each of the time feature vectors; Vector pairs whose corresponding correlation is greater than a preset threshold are selected from the user interest dictionary as target vector pairs to obtain the at least one target vector pair.
3. The method according to claim 1, wherein: The user interest dictionary is generated by the following steps: Acquire a first historical interaction item information sequence and a first historical item interaction time information sequence corresponding to the operating user; Generate a first fusion vector sequence, wherein a first fusion vector in the first fusion vector sequence represents fusion feature information of the first historical interaction item information and the corresponding first historical item interaction time information; The first fusion vector sequence is input into a pre-trained user interest dictionary generation model to obtain the user interest dictionary.
4. The method according to claim 3, wherein: The step of inputting the first fusion vector sequence into a pre-trained user interest dictionary generation model to obtain the user interest dictionary includes: Inputting the first fused vector sequence into a pre-trained dependent feature information extraction network with a multi-head self-attention mechanism to output a first dependent feature vector sequence; Generate a user-favorite-item combination feature vector set according to the first dependent feature vector sequence, wherein each user-favorite-item combination feature vector represents feature information of the user-favorite-item combination information; Performing multi-head linear projection on each user-favorite-item combination feature vector in the user-favorite-item combination feature vector set to generate a vector pair set, thereby obtaining a vector pair set group; The user interest dictionary is generated according to the vector pair set.
5. The method according to claim 3, wherein: The first historical interaction item information in the first historical interaction item information sequence includes: at least one historical interaction item attribute information and historical interaction item name information; and The generating of the first fused vector sequence comprises: For each first historical interaction item information in the first historical interaction item information sequence, a first fusion vector generation step is performed: Performing vector encoding on at least one historical interaction item attribute information in the first historical interaction item information to obtain at least one item attribute vector; Performing vector encoding on the historical interaction item name information in the first historical interaction item information to obtain an item name vector; Performing vector encoding on the first historical item interaction time information corresponding to the first historical interaction item information to obtain a historical item interaction time vector; A first fusion vector is generated according to the at least one item attribute vector, the item name vector and the historical item interaction time vector.
6. The method according to claim 5, wherein: The generating a first fusion vector according to the at least one item attribute vector, the item name vector and the historical item interaction time vector comprises: Performing a pooling operation on the historical item interaction time vector to obtain a pooled vector; The at least one item attribute vector, the item name vector and the pooled vector are concatenated to generate a concatenated vector as the first fused vector.
7. The method according to claim 6, wherein: The performing vector encoding on the current time information to obtain a time encoding vector includes: Performing word embedding processing on the current time information to obtain a word embedding vector; A pooling operation is performed on the word embedding vector to obtain the time encoding vector.
8. The method according to claim 4, wherein: The step of generating a user preference item combination feature vector set according to the first dependent feature vector sequence includes: Performing a linear transformation on each first dependent eigenvector in the first dependent eigenvector sequence to obtain a transformed dependent eigenvector sequence; Performing clustering processing on each transformed dependent feature vector in the transformed dependent feature vector sequence to obtain each vector cluster center; The vector cluster center among the vector cluster centers is determined as the user's favorite item combination feature vector to obtain the user's favorite item combination feature vector set.
9. The method according to claim 4, wherein: The performing multi-head linear projection on each user-favorite-item combination feature vector in the user-favorite-item combination feature vector set to generate a vector pair set includes: The user-favorite item combination feature vector set is input into a multi-head nonlinear network to output the vector pair set.
10. The method according to claim 3, wherein: The user interest dictionary generation model is trained through the following steps: Acquire a second historical interaction item information sequence and a second historical item interaction time information sequence for a historical user; generating a second fusion vector sequence, wherein the second fusion vector in the second fusion vector sequence represents feature information of the second historical interaction item information and corresponding second historical item interaction time information; Inputting the second fused vector sequence into an initial user interest dictionary generation model to obtain an initial user interest dictionary; Obtaining a user preference item information set corresponding to the historical user at the target time information; Performing vector encoding on the target time information to generate a target time encoding vector; Performing vector encoding on the user's favorite item information set to generate an item feature vector set; Selecting a vector pair corresponding to the target time coding vector from the initial user interest dictionary as an initial vector pair, and obtaining at least one initial vector pair; For each item feature vector in the item feature vector set, perform an initial vector pair screening step: Selecting an initial vector pair whose correlation with the item feature vector satisfies a preset condition from the at least one initial vector pair to obtain an initial vector pair set; Inputting each initial vector pair in the obtained initial vector pair set group into a preset sampling normalized exponential function to obtain first loss information; Inputting each initial vector pair in the initial vector pair set into a preset pairwise loss function to obtain second loss information; Model parameters in the initial user interest dictionary generation model are trained according to the first loss information and the second loss information.
11. A device for generating information of user-favorite items, comprising: A first acquisition unit is configured to acquire current time information corresponding to a current user operation; A vector encoding unit, configured to perform vector encoding on the current time information to obtain a time encoding vector; A second acquisition unit is configured to acquire a user interest dictionary of an operation user associated with the current user operation, wherein the user interest dictionary includes: a plurality of vector pairs in the form of two-tuples, each vector pair including: a time feature vector and a user favorite item feature vector; a screening unit configured to screen out at least one target vector pair from the user interest dictionary according to the time coding vector, wherein the time feature vector in each target vector pair matches the time coding vector; A generating unit is configured to generate at least one user preference item information corresponding to the operating user at the current time information based on at least one user preference item feature vector, wherein the at least one user preference item feature vector is a vector in the at least one target vector pair.
12. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
13. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Generation method and apparatus for user preferred item information, and electronic device and medium
WO2023221661A1