Item recommendation ranking method and device, computer device, and storage medium
By combining the LightGBM model with first-order and second-order features and mapping them into low-dimensional vectors, the problem of slow iteration of the sorting model is solved, efficient item recommendation and sorting is achieved, hardware resource consumption is reduced, and user experience is improved.
Patent Information
- Application Number
- CN202111314663.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-11-08
AI Technical Summary
The iteration speed of the sorting model in the existing technology is slow, the efficiency of item recommendation sorting is low, and it cannot be applied to all application scenarios. In addition, the DNN model has high requirements for hardware resources and the sample training time is long.
The LightGBM model is used to combine first-order features and second-order features, map them into low-dimensional vectors through one-hot encoding, construct a training set, and generate similarity results of user click sequences to recommend items.
It improves the efficiency of recommendation sorting, reduces hardware resource consumption, shortens model iteration time, and improves user experience.
Smart Images

Figure CN114049172B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method, device, computer equipment, and storage medium for recommending and ranking items. Background Art
[0002] Ranking models play a crucial role in recommendation systems. A good ranking model can personalize recommendations to users and effectively enhance the user experience. Currently, mainstream recommendation systems generally use DNN-based ranking models, such as those based on DIN, Deep & Wide Network, and DeepFM. While DNN-based ranking models offer superior performance, they also place high demands on hardware. The larger the scale of recommendation ranking, the more hardware resources are consumed, making them unsuitable for all application scenarios.
[0003] Furthermore, due to the inherent nature of DNN training, training DNN-based ranking models often requires a large number of samples, typically exceeding millions, which makes sample collection and storage inconvenient. Large-sample training of DNN models can lead to extended training times and slow model iteration, resulting in lower item recommendation and ranking efficiency and a poor user experience. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, computer equipment and storage medium for recommending and ranking items, aiming to solve the technical problems in the prior art of slow iteration speed of ranking models and low efficiency of recommending and ranking items.
[0005] This application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for recommending and ranking items, comprising:
[0007] Obtaining the target user's log information and the items to be recommended, wherein the log information includes user information and user click sequence;
[0008] Preprocessing the acquired user information and the user click sequence to generate first-order features, and processing part of the first-order features to obtain second-order features;
[0009] Determine the one-hot codes of the items to be recommended, and map the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors;
[0010] Construct a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended and train a LightGBM model;
[0011] Generate a similarity result between the user click sequence and the items to be recommended based on the LightGBM model, and recommend items in the items to be recommended to the target user based on the similarity result.
[0012] Optionally, the user click sequence includes item information of at least one historical item before the current time, and the item information of the historical item includes the number of shares of the historical item and the click rate of the historical item.
[0013] Optionally, preprocessing the acquired user information and the user click sequence to generate first-order features, and processing part of the first-order features to obtain second-order features, includes:
[0014] Performing calculations on the number of shares of the historical item and the click rate of the historical item to generate first-order features;
[0015] The second-order feature is obtained by multiplying the first-order feature of the number of shares of the historical item and the first-order feature of the click rate of the historical item.
[0016] Optionally, determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes:
[0017] Use one-hot encoding to encode each of the items to be recommended;
[0018] Initializing the items to be recommended to form a high-dimensional vector representation, and updating the high-dimensional vector representation of the set of items to be recommended;
[0019] Based on the weight matrix, a fully connected network is used to perform linear transformation on the high-dimensional vector representation and map it into a distinguishable low-dimensional vector.
[0020] Optionally, determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes:
[0021] One-hot encoding is used to encode the item to be recommended. The specific one-hot encoding is [0 0 0 10];
[0022] The method of linearly transforming the high-dimensional vector representation into a distinguishable low-dimensional vector using a fully connected network based on a weight matrix includes:
[0023]
[0024] The result is [10 12 19], which is a low-dimensional vector whose one-hot encoding is [0 0 0 1 0].
[0025] Optionally, generating a similarity result between the user click sequence and the item to be recommended according to the LightGBM model includes:
[0026] Processing the first-order features and the second-order features to obtain feature vectors;
[0027] The LightGBM model is used to calculate the similarity between the feature vector and the item to be recommended;
[0028] Recommend items to the target user based on the similarity results of each of the items to be recommended.
[0029] Optionally, the similarity between the feature vector and the item to be recommended is obtained by calculating the cosine similarity between the feature vector and the item to be recommended.
[0030] In a second aspect, an embodiment of the present application provides an item recommendation and ranking device, comprising:
[0031] an acquisition module configured to acquire log information of a target user and items to be recommended, wherein the log information includes user information and user click sequence;
[0032] A feature generation module pre-processes the acquired user information and the user click sequence to generate first-order features, and processes part of the first-order features to obtain second-order features;
[0033] A low-dimensional processing module determines the one-hot encoding of the items to be recommended and maps the one-hot encodings of the items to be recommended into distinguishable low-dimensional vectors;
[0034] A model training module constructs a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended and trains a LightGBM model;
[0035] A ranking recommendation module generates similarity results between the user click sequence and the items to be recommended based on the LightGBM model, and recommends items in the items to be recommended to the target user based on the similarity results.
[0036] In a third aspect, an embodiment of the present application provides a computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the item recommendation sorting method as described above.
[0037] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to perform the steps of the item recommendation sorting method as described above.
[0038] The item recommendation and ranking method provided in the present application obtains the log information of the target user and the items to be recommended, wherein the log information includes user information and user click sequence; pre-processes the obtained user information and the user click sequence to generate first-order features, and processes part of the first-order features to obtain second-order features; determines the one-hot encoding of the items to be recommended, and maps the one-hot encodings of multiple items to be recommended into distinguishable low-dimensional vectors; constructs a training set and trains a LightGBM model based on the first-order features, the second-order features and the low-dimensional vectors of the items to be recommended; generates a similarity result between the user click sequence and the items to be recommended based on the LightGBM model, and recommends items in the items to be recommended to the target user based on the similarity result. The item recommendation and ranking method can recommend items to users more accurately through the processing of first-order features and second-order features, and adopts low-dimensional vector processing. The model occupies less storage space, consumes relatively less hardware resources, and has a fast update and iteration speed, which effectively improves the recommendation and ranking efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the process of recommending and ranking items according to an embodiment of the present invention;
[0040] Figure 2 Schematic diagram of the process of generating second-order features provided by an embodiment of the present application;
[0041] Figure 3 This is a schematic diagram of a structure for generating second-order features provided by an embodiment of the present application;
[0042] Figure 4 Schematic diagram of the process of mapping into low-dimensional vectors provided in an embodiment of the present application;
[0043] Figure 5 This is a schematic diagram of a structure mapped into a low-dimensional vector provided by an embodiment of the present application;
[0044] Figure 6 Schematic diagram of a model of an item recommendation and sorting method provided in an embodiment of the present application;
[0045] Figure 7 This is a block diagram of the modules of the item recommendation and ranking device provided in an embodiment of the present application;
[0046] Figure 8 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0047] Figure 9 It is a structural diagram of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this invention.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0050] As will be understood by those skilled in the art, the term "device" as used herein includes both wireless signal receivers, which are devices having only a transmitting signal receiver without transmitting capability, and transmitting and receiving hardware, which are devices having receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display; a personal communications system (PCS) which may combine voice, data processing, fax, and / or data communication capabilities; a personal digital assistant (PDA) which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional handheld computers or other devices having and / or including a radio frequency receiver.
[0051] like Figure 1 As shown, an item recommendation sorting method provided in an embodiment of the present application includes:
[0052] S1000: Obtain log information of a target user and items to be recommended, wherein the log information includes user information and user click sequence;
[0053] S2000: Preprocess the acquired user information and the user click sequence to generate first-order features, and process part of the first-order features to obtain second-order features;
[0054] S3000: Determine one-hot codes of the items to be recommended, and map the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors;
[0055] S4000: construct a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended, and train a LightGBM model;
[0056] S5000: Generate a similarity result between the user click sequence and the items to be recommended based on the LightGBM model, and recommend items in the items to be recommended to the target user based on the similarity result.
[0057] In this embodiment, the log information includes user information and user click sequences. Specifically, the user information may include user account information. The user click sequence includes item information of at least one historical item before the current time. The item information of the historical item includes the number of shares of the historical item and the click rate of the historical item.
[0058] Based on this, we can search for the target user's historical search history, search frequency for the same item, specific transaction records, and favorite records. We pre-process the acquired user information and user click sequences to generate first-order features. We can collect historical search record data, search frequency data, transaction record data, and favorite record data, and process and summarize them to derive the target user's characteristics. We can also process some of these first-order features to generate second-order features.
[0059] The items to be recommended are stored in a material library, and there are multiple items, which can be in the millions or even higher, and there is no limit here. Determine the one-hot code of the items to be recommended, and map the one-hot codes of the multiple items to be recommended into distinguishable low-dimensional vectors. The items to be recommended themselves have certain characteristics, such as the number of views, the number of clicks, etc. Furthermore, there is a cross-relationship between the target user and the items to be recommended, such as the target user searches for the items to be recommended in the material library, or further clicks and collects the items to be recommended. Based on the cross-relationship between the target user and the items to be recommended, relevant features can be further calculated and updated to more accurately feedback the relevant recommendation ranking results.
[0060] A training set is constructed based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended, and a LightGBM model is trained. This embodiment trains and uses the LightGBM model, which obtains the optimal ranking results using the full amount of training data. The LightGBM model generates similarity results between the user click sequence and the items to be recommended, and based on the similarity results, recommends items from the items to be recommended to the target user.
[0061] The embodiment of the present application constructs a training set and trains a LightGBM model based on the first-order features, the second-order features and the low-dimensional vectors of the items to be recommended, and adopts the LightGBM model to sort items. It occupies less memory, consumes relatively fewer hardware resources, has lower complexity in data separation, and has faster update and iteration speeds, thereby effectively improving the efficiency of recommendation sorting.
[0062] like Figure 2 and Figure 3 The figure shows a flow chart of generating second-order features according to an embodiment of the present application. The obtained user information and the user click sequence are pre-processed to generate first-order features, and part of the first-order features are processed to obtain second-order features, including:
[0063] S2100: Calculate and process the number of shares of the historical item and the click rate of the historical item to generate first-order features;
[0064] S2200: Multiply the first-order feature of the number of shares of the historical item and the first-order feature of the click rate of the historical item to obtain the second-order feature.
[0065] In this embodiment, the second-order features are features generated by performing computations on the first-order features. Specifically, if the first-order features include the number of shares of the historical item and the click-through rate of the historical item, the first-order features are firstly computed and processed to generate the first-order features. Furthermore, the first-order features of the number of shares of the historical item and the click-through rate of the historical item are multiplied to generate a new feature, which is the second-order feature.
[0066] In this embodiment, the item information of the historical item includes not only the number of shares and click-through rates of the historical item, but also includes the collection status and shopping cart status of the historical item, etc., without limitation. Furthermore, the collection status and shopping cart status of the historical item can be processed to obtain the second-order features.
[0067] Based on the first-order features and the second-order features, the embodiment of the present application can further judge and compare the target user's desire to click on the recommended items, so as to more accurately recommend items among the recommended items to the target user and better improve the target user's subjective experience.
[0068] like Figure 4 As shown, it is a schematic diagram of the process of mapping into a low-dimensional vector provided by an embodiment of the present application.
[0069] Determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes:
[0070] S3100: Encode each of the items to be recommended using one-hot encoding;
[0071] S3200: Initialize the items to be recommended to form a high-dimensional vector representation, and update the high-dimensional vector representation of the set of items to be recommended;
[0072] S3300. Based on the weight matrix, a fully connected network is used to perform a linear transformation on the high-dimensional vector representation to map it into a distinguishable low-dimensional vector.
[0073] In this embodiment, the recommended items in the inventory are first one-hot encoded. For example, if there are five items in the inventory, A, B, C, D, and E, item A can be represented as [1 0 0 0 0], item B can be represented as [0 1 0 00], item C can be represented as [0 0 1 0 0], item D can be represented as [0 0 0 1 0], and item E can be represented as [0 00 0 1]. This encoding method is simple and clear, but when the inventory contains millions of items, the encoding dimension of each item will reach one million.
[0074] like Figure 5 As shown in the figure, the embedding method can be used here to map the million-dimensional vector into a distinguishable low-dimensional vector based on a simple fully connected network.
[0075] The following is a process of low-dimensionalizing an input vector to obtain a three-dimensional vector. The process of determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes:
[0076] One-hot encoding is used to encode the item to be recommended. The specific one-hot encoding is [0 0 0 10];
[0077] The method of linearly transforming the high-dimensional vector representation into a distinguishable low-dimensional vector using a fully connected network based on a weight matrix includes:
[0078]
[0079] The result is [10 12 19], which is a low-dimensional vector whose one-hot encoding is [0 0 0 1 0].
[0080] This embodiment of the application uses an embedding method, based on a simple fully connected network, to map million-dimensional vectors into distinguishable low-dimensional vectors. This method can encode the recommended items in the material library using low-dimensional vectors while preserving their characteristics. Feeding the embedded low-dimensional vectors into the LightGBM model can effectively improve the efficiency of item recommendation sorting.
[0081] like Figure 6 , which is a schematic diagram of a model of the item recommendation sorting method provided in an embodiment of the present application.
[0082] In this embodiment, generating the similarity result between the user click sequence and the item to be recommended according to the LightGBM model includes:
[0083] Processing the first-order features and the second-order features to obtain feature vectors;
[0084] The LightGBM model is used to calculate the similarity between the feature vector and the item to be recommended;
[0085] Recommend items to the target user based on the similarity results of each of the items to be recommended.
[0086] The similarity between the feature vector and the item to be recommended is obtained by calculating the cosine similarity between the feature vector and the item to be recommended.
[0087] In n-dimensional coordinates, the cosine similarity is calculated as follows:
[0088]
[0089] Where A and B represent the feature vector and the low-dimensional vector of the item to be recommended, respectively, and n represents the n-dimensional coordinate.
[0090] If the similarity value is closer to 1, it means that the similarity between the feature vector and the item to be recommended is higher, and the cosine angle is approximately close to 0°. Therefore, based on the calculation result of the cosine similarity, the item in the item to be recommended can be recommended to the target user.
[0091] This embodiment of the present application encodes and performs low-dimensional processing on the items to be recommended in the material library, further calculates the cosine similarity between the low-dimensional vectors of the items to be recommended and the feature vectors, and recommends the items from the items to be recommended to the target user based on the similarity result. The item recommendation and sorting method provided by this embodiment of the application takes up little storage space, is efficient in item sorting, and effectively improves the efficiency of item recommendation.
[0092] like Figure 7 As shown, the present application also provides an item recommendation and sorting device, comprising:
[0093] An acquisition module 1000 is configured to acquire log information of a target user and items to be recommended, wherein the log information includes user information and user click sequence;
[0094] The feature generation module 2000 pre-processes the acquired user information and the user click sequence to generate first-order features, and processes part of the first-order features to obtain second-order features;
[0095] A low-dimensional processing module 3000 determines one-hot codes of the items to be recommended and maps the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors;
[0096] A model training module 4000 constructs a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended and trains a LightGBM model;
[0097] The ranking recommendation module 5000 generates similarity results between the user click sequence and the items to be recommended based on the LightGBM model, and recommends items in the items to be recommended to the target user based on the similarity results.
[0098] Since the above-mentioned item recommendation and ranking device is a device that corresponds one-to-one to the item recommendation and ranking method, its implementation principle is the same as that of the item recommendation and ranking method, and will not be repeated here.
[0099] In this embodiment, please refer to Figure 8 , provides a basic structural block diagram of computer equipment.
[0100] The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a method for recommending and ranking items. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may implement a method for recommending and ranking items. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0101] The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0102] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the item recommendation sorting method described in any of the above embodiments.
[0103] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one instruction, which is executed by the processor to implement the item recommendation ranking method provided in the method embodiment of the present application.
[0104] like Figure 9 The following is a schematic diagram showing the structure of a server provided in one embodiment of the present application. The server is used to implement the item recommendation and sorting method provided in the above embodiment. Specifically:
[0105] The server includes a central processing unit (CPU), system memory including random access memory (RAM) and read-only memory (ROM), and a system bus connecting the system memory and the CPU. The server also includes a basic input / output system (I / O system) that helps transfer information between various components within the computer, and a mass storage device for storing the operating system, application programs, and other program modules.
[0106] The basic input / output system includes a display for displaying information and input devices such as a mouse and keyboard for user input. The display and input devices are connected to the central processing unit via an input / output controller connected to the system bus. The basic input / output system may also include an input / output controller for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus.
[0107] The mass storage device is connected to the central processing unit via a mass storage controller (not shown) connected to the system bus. The mass storage device and its associated computer-readable medium provide non-volatile storage for the server. In other words, the mass storage device may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
[0108] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above-mentioned ones. The above-mentioned system memory and mass storage devices can be collectively referred to as memory.
[0109] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0110] The embodiments of the present invention are each process and / or block in the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present invention, and a combination of the processes and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 means for performing functions specified in a process or multiple processes and / or a block or multiple blocks in a block diagram.
[0111] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 A function specified by a box or boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0113] In addition, the functional devices in the various embodiments of the present invention may be integrated into the same data processing device, or each device may exist physically separately, or two or more devices may be integrated into the same device.
[0114] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalents of the claims be encompassed within the present invention. Any figure marks in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other devices or steps, and the singular does not exclude the plural. Multiple devices or computer devices stated in a computer device claim may also be implemented by the same computer device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.
[0115] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements or improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for recommending and ranking items, characterized in that: include: Obtaining the target user's log information and the items to be recommended, wherein the log information includes user information and user click sequence; Preprocessing the acquired user information and the user click sequence to generate first-order features, and processing part of the first-order features to obtain second-order features; Determine the one-hot codes of the items to be recommended, and map the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors; Construct a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended and train a LightGBM model; Generate a similarity result between the user click sequence and the items to be recommended based on the LightGBM model, and recommend items from the items to be recommended to the target user based on the similarity result; The user click sequence includes item information of at least one historical item before the current time, and the item information of the historical item includes the number of shares of the historical item and the click rate of the historical item; The preprocessing of the acquired user information and the user click sequence to generate first-order features, and processing of part of the first-order features to obtain second-order features, includes: Performing calculations on the number of shares of the historical item and the click rate of the historical item to generate first-order features; The second-order feature is obtained by multiplying the first-order feature of the number of shares of the historical item and the first-order feature of the click rate of the historical item.
2. The item recommendation ranking method according to claim 1, wherein: Determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes: Use one-hot encoding to encode each of the items to be recommended; Initializing the items to be recommended to form a high-dimensional vector representation, and updating the high-dimensional vector representation of the set of items to be recommended; Based on the weight matrix, a fully connected network is used to perform linear transformation on the high-dimensional vector representation and map it into a distinguishable low-dimensional vector.
3. The method for recommending and ranking items according to claim 2, wherein Determining the one-hot codes of the items to be recommended and mapping the one-hot codes of the items to be recommended into distinguishable low-dimensional vectors includes: One-hot encoding is used to encode the item to be recommended. The specific one-hot encoding is [0 0 0 1 0]; The method of linearly transforming the high-dimensional vector representation into a distinguishable low-dimensional vector using a fully connected network based on a weight matrix includes: The result is [10 12 19], which is a low-dimensional vector whose one-hot encoding is [0 0 0 1 0].
4. The method for recommending and ranking items according to claim 1, wherein , the similarity result between the user click sequence and the item to be recommended generated according to the LightGBM model includes: Processing the first-order features and the second-order features to obtain feature vectors; The LightGBM model is used to calculate the similarity between the feature vector and the item to be recommended; Recommend items to the target user based on the similarity results of each of the items to be recommended.
5. The method for recommending and ranking items according to claim 4, wherein ,The similarity between the feature vector and the item to be recommended is obtained by calculating the cosine similarity between the feature vector and the item to be recommended.
6. An item recommendation and sorting device, characterized in that: Implementing an item recommendation and sorting method as claimed in claim 1, comprising: an acquisition module configured to acquire log information of a target user and items to be recommended, wherein the log information includes user information and user click sequence; A feature generation module pre-processes the acquired user information and the user click sequence to generate first-order features, and processes part of the first-order features to obtain second-order features; A low-dimensional processing module determines the one-hot encoding of the items to be recommended and maps the one-hot encodings of the items to be recommended into distinguishable low-dimensional vectors; A model training module constructs a training set based on the first-order features, the second-order features, and the low-dimensional vectors of the items to be recommended and trains a LightGBM model; A ranking recommendation module generates similarity results between the user click sequence and the items to be recommended based on the LightGBM model, and recommends items in the items to be recommended to the target user based on the similarity results.
7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the item recommendation and sorting method according to any one of claims 1 to 5.
8. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the item recommendation ranking method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Product recommendation method and device, computer equipment and storage medium
CN110135943A
Content recommendation method and device, server and storage medium
CN110232152A