Recommended method, electronic device, and medium
By adding a normally distributed random perturbation to the user vector, updated user vectors are obtained to acquire candidate data, which solves the problem of insufficient randomness in existing exploration methods and achieves an efficient balance between exploration and development.
Patent Information
- Application Number
- CN202310565161.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-05-18
AI Technical Summary
Existing exploration methods rely on randomness and cannot efficiently balance the diversity and accuracy of recommendation systems.
By adding a normally distributed random perturbation to the user vector, an updated user vector is obtained. The updated user vector is then used to obtain a candidate data set, and candidate data is obtained based on the candidate data set and pushed to the user.
While ensuring a certain level of accuracy, the randomness of the exploration method was avoided, and efficient exploration results were achieved.
Smart Images

Figure CN119003856B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a recommended method, electronic device, and medium. Background Technology
[0002] Exploration and Exploitation (EE) is an important strategy in recommender systems. Exploration refers to using historical data to make optimal decisions, that is, learning from existing data what users are interested in. Exploration refers to exploring unknown areas. EE aims to balance diversity and accuracy in recommender systems.
[0003] Exploration methods in related technologies often rely on randomness and cannot achieve efficient exploration. Summary of the Invention
[0004] This application provides a recommended method, electronic device, and medium that enable efficient exploration.
[0005] The first aspect of this application discloses a recommendation method applied to an electronic device. The method includes: receiving a user request; obtaining a first user vector; adding a random perturbation to the first user vector to obtain a second user vector; obtaining a candidate data set corresponding to the second user vector; and obtaining candidate data based on the candidate data set and pushing it to the user.
[0006] In one possible implementation of the first aspect described above, adding a random perturbation to the first user vector includes adding noise to the first user vector, wherein the noise follows a normal distribution.
[0007] In one possible implementation of the first aspect described above, the method further includes using the normal distribution mean of the noise as a hyperparameter.
[0008] In one possible implementation of the first aspect above, obtaining the candidate data set corresponding to the second user vector includes accessing a nearest neighbor retrieval service for the second user vector and obtaining the candidate data set corresponding to each second user vector.
[0009] In one possible implementation of the first aspect described above, the method further includes merging the candidate data set.
[0010] In one possible implementation of the first aspect above, obtaining the first user vector includes inputting user features into multiple models respectively, and obtaining multiple user vectors corresponding to the multiple models.
[0011] In one possible implementation of the first aspect above, obtaining candidate data based on the candidate data set includes sorting the candidate data set to obtain a recall candidate set; and processing the user information and the recall candidate set as key-value pairs and saving them.
[0012] In one possible implementation of the first aspect above, the method further includes excluding exposure samples from the candidate data set.
[0013] In one possible implementation of the first aspect above, obtaining the first user vector includes obtaining the first user vector when the user is an active user.
[0014] A second aspect of this application discloses an electronic device including a memory storing computer-executable instructions and a processor; when the instructions are executed by the processor, the device performs the method according to the first aspect of this application.
[0015] A third aspect of this application discloses a computer-readable medium storing one or more programs that can be executed by one or more processors to implement the method of the first aspect of this application.
[0016] The fourth aspect of this application discloses a computer program product that, when executed by a processor, implements the method of the first aspect of this application.
[0017] The recommendation method, electronic device, and medium provided in this application, upon receiving a user request, obtain the corresponding user vector, add a random perturbation to the user vector to obtain an updated user vector, use the updated user vector to obtain a corresponding candidate data set, and then obtain candidate data based on the candidate data set and push it to the user. The method of this application adds a controllable small-amplitude perturbation to an already confident vector, which can avoid the randomness of exploration methods in related technologies and efficiently obtain exploration results while ensuring a certain level of accuracy. Attached Figure Description
[0018] Figure 1 This is a scene diagram of one embodiment of this application;
[0019] Figure 2 This is a flowchart illustrating a recommended method 200 according to an embodiment of this application;
[0020] Figure 3 This is a flowchart illustrating a recommended method 300 according to an embodiment of this application;
[0021] Figure 4 This is a block diagram of an electronic device 400 according to an embodiment of this application. Detailed Implementation
[0022] The present application will be further described below with reference to specific embodiments and accompanying drawings. It is understood that the illustrative embodiments of this disclosure include, but are not limited to, recommended methods, electronic devices, and media. The specific embodiments described herein are merely for explaining the present application and not for limiting it. Furthermore, for ease of description, the accompanying drawings show only the parts relevant to the present application, and not all of the structures or processes.
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0024] Figure 1 The illustration shows a scenario diagram of one embodiment of this application. A user initiates a search request to server 102 by entering a search query on client 101. For this search request, server 102 can retrieve multiple candidate data sets from database 103 and recommend the candidate data with the highest ranking or score to client 101 through calculation. The recommended content includes, but is not limited to, news, products, videos, articles, and images / text.
[0025] Exploration and Exploitation (EE) is a crucial strategy in recommender systems. It aims to balance diversity and accuracy. Exploration refers to using historical data to make optimal decisions, essentially learning from existing data what content might interest the user. If users are constantly recommended content based on known and relatively accurate interests, they will quickly become bored, and the system will struggle to discover other areas of interest. Exploration refers to venturing into uncharted territory.
[0026] Typically, exploration methods include algorithms such as UCB and Bandit. The UCB (Upper Confidence Bound) algorithm quantifies uncertainty using a probability distribution (only the upper bound of the confidence interval). The Bandit algorithm's general framework is as follows: Each user interest is represented by a category, and through several trials, the probability of the user being interested in each category is characterized. If the user expresses interest in a category through explicit or implicit feedback, the recommendation system gains a benefit. If a category that the user is not interested in is recommended, the recommendation system expresses regret. Through this cycle of "selection-observation-update-selection," it is theoretically possible to derive categories that increasingly approximate the user's true interests. All of the above exploration methods have a certain degree of randomness and cannot efficiently obtain exploration results.
[0027] To address the aforementioned problems, one embodiment of this application provides a recommended method 200, see [link to relevant documentation]. Figure 2 .
[0028] In S210, user requests are received.
[0029] Users can initiate requests on the client side. Users can enter search terms in the client's search box, and the recommendation system can return a list of recommended data based on the search terms. The recommendation process typically includes recall and ranking phases.
[0030] In S220, a first user vector is obtained, and a random perturbation is added to the first user vector to obtain a second user vector.
[0031] The first user vector is obtained based on the requesting user. This first user vector can be a vector obtained based on the user's characteristics, historical behavior, etc. For example, it can be obtained from one or more of the user's age, gender, residence, favorites, likes, and purchased items.
[0032] In some implementations, one or more models can be used to obtain the first user vector. Models include, but are not limited to: Dssm, contrast, samplebias, and mind.
[0033] After obtaining the user vector, a random perturbation can be added to the first user vector for further exploration, resulting in an updated user vector, i.e., the second user vector. In some implementations, the random perturbation is noise, and the noise follows a normal distribution. For example, the first user vector obtained from the model is called `uservector`. m Where m∈Dssm,contras,samplebias,mind, the added noise following a normal distribution is N(0,λ). m ), where λ m The magnitude of the noise. Update the user vector (uservector). ‘ m =uservector m +N(0,λ m ).
[0034] In some implementations, the normal distribution mean of the added noise is used as a hyperparameter. For each model acquiring user vectors, different hyperparameters can be set for each channel. Setting the hyperparameters allows for a better assessment of the confidence and exploration levels, leading to more efficient exploration results.
[0035] In some examples, random perturbations can also be set based on user activity levels. For example, the updated user vector can be a uservector. ‘ m =uservector m +N(0,λ m )*[daysactive>μ], where μ is the number of active user days that are active.
[0036] In S230, the candidate data set corresponding to the second user vector is obtained.
[0037] Based on the acquired second user vector, a candidate data set matching the second user vector is calculated according to similarity. In some implementations, a nearest neighbor retrieval service can be accessed to obtain the corresponding candidate data set for the second user vector. For example, the candidate data can be clustered first, and then the similarity between the second user vector and the centroids of each cluster can be calculated to obtain the candidate data set. This can reduce the computational load, for example, from tens of millions of calculations to a few thousand.
[0038] In S240, candidate data is obtained based on the candidate data set and pushed to the user.
[0039] Typically, recommendations consist of a recall phase and a ranking phase. The recall phase selects a set of candidate content that the user is interested in from the existing content set. The ranking phase performs more precise calculations on the recall, calculating the click probability for each piece of content, and further selecting a small number of high-quality content items that are most interesting to the user from the candidate set. The candidate set obtained in the recall phase can range from hundreds to thousands, while the small number of high-quality content items obtained in the ranking phase can be as few as a dozen.
[0040] Following steps S210-S230, the candidate dataset can be sorted, and candidate data can be extracted from it. In some implementations, when multiple user vectors are obtained from multiple models, these candidate datasets can be merged after obtaining multiple corresponding candidate datasets. This merging process removes duplicate data and simplifies subsequent calculations.
[0041] The application method 200, upon receiving a user request, obtains the corresponding user vector, adds a random perturbation to this user vector to obtain an updated user vector, uses the updated user vector to obtain a corresponding candidate data set, and then obtains candidate data based on the candidate data set and pushes it to the user. Method 200 adds a controllable small-amplitude perturbation to an already confident vector, which avoids the randomness of exploration methods in related technologies and efficiently obtains exploration results while ensuring a certain level of accuracy.
[0042] Figure 3 This is a flowchart illustrating a recommended method 300 according to an embodiment of this application. Method 300 includes the following steps.
[0043] In S310, user requests are received.
[0044] Users can initiate requests on the client side. Users can enter search terms in the client's search box, and the recommendation system can return a list of recommended data based on the search terms.
[0045] In S320, it determines whether a user is an active user.
[0046] If the user is an active user, proceed to step 330; if the user is an inactive user, end the process (S360). User activity can be determined based on factors such as the user's last login time, client login frequency, and usage duration.
[0047] In S330, the candidate data set is obtained.
[0048] S330 may include S220-S230 in method 200, which will not be described in detail here.
[0049] In S340, the candidate data set is sorted.
[0050] The acquired candidate dataset can be input into a coarse-ranking and / or fine-ranking model to sort the data in the candidate dataset.
[0051] In S350, the recall candidate set is obtained based on the candidate data set, and the user information and the recall candidate set are processed as key-value pairs and saved.
[0052] Candidate datasets of a certain ranking can be combined into a recall candidate set. In some examples, a certain number of candidate datasets can be selected based on the scores of the fine-ranking model. In other examples, candidate datasets of a certain order in the fine-ranking model can be combined into a recall candidate set, and that order can be set as a hyperparameter.
[0053] Additionally, the user information is used as the key, the candidate retrieval set is used as the value, and this key-value pair is saved. The user information can be a user account, user ID, or user device number.
[0054] When a user makes another request, the recommendation system can use the user's key to find all values corresponding to that key and use them as a recall candidate set. For example, all values from the user's historical requests. This method of combining a sorted dataset of candidate values related to historical behavior into a recall candidate set—that is, retaining the exploration results as candidates for the next recommendation—improves recommendation efficiency.
[0055] In some implementations, exposed samples in the candidate dataset can be excluded when acquiring the recall candidate set. In related technologies, it is common to rely on exposed samples to obtain confidence results for exploration, such as based on click-through rates or viewing durations of exposed samples. This method is limited by the number of exposed samples and also constrained by the amount of data viewed. For example, when the client's viewing time is small, such as 3-5 samples, obtaining confidence results solely based on the feedback from exposed samples is inefficient and wasteful of resources. The method in this application can use a sorted candidate dataset, such as a set that has undergone coarse-sorting, fine-sorting, and re-sorting, as a funnel, to complete the exploration without increasing confidence or resource consumption. Furthermore, by exploring in an adaptive manner based on limited user feedback, compared to methods using continuous functions, the method in this application is discrete yet fast and efficient.
[0056] Now for reference Figure 4 The diagram shown is a block diagram of an electronic device 400 according to an embodiment of the present application. The electronic device 400 may include one or more processors 402, system control logic 408 connected to at least one of the processors 402, system memory 404 connected to the system control logic 408, non-volatile memory (NVM) 406 connected to the system control logic 408, and network interface 410 connected to the system control logic 408.
[0057] Processor 402 may include one or more single-core or multi-core processors. Processor 402 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments herein, processor 402 may be configured to perform operations according to... Figure 2-3 One or more embodiments of the various embodiments shown.
[0058] In some embodiments, system control logic 408 may include any suitable interface controller to provide any suitable interface to at least one of the processors 402 and / or any suitable device or component communicating with system control logic 408.
[0059] In some embodiments, system control logic 408 may include one or more memory controllers to provide an interface to system memory 404. System memory 404 may be used to load and store data and / or instructions. In some embodiments, memory 404 of device 400 may include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).
[0060] NVM / Memory 406 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / Memory 406 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of HDD (Hard Disk Drive), CD (Compact Disc) drive, and DVD (Digital Versatile Disc) drive.
[0061] NVM / Storage 406 may include a portion of storage resources mounted on the device 400, or it may be accessible by the device but is not necessarily part of the device. For example, NVM / Storage 406 may be accessed over a network via network interface 410.
[0062] Specifically, system memory 404 and NVM / memory 406 may each include a temporary copy and a permanent copy of instruction 420. Instruction 420 may include, when executed by at least one of processors 402, causing device 400 to perform, as Figure 2-3 The instructions for the method shown. In some embodiments, instructions 420, hardware, firmware and / or their software components may additionally / alternatively be located in system control logic 408, network interface 410 and / or processor 402.
[0063] Network interface 410 may include a transceiver for providing a radio interface to device 400, thereby enabling communication with any other suitable device (such as a front-end module, antenna, etc.) via one or more networks. In some embodiments, network interface 410 may be integrated into other components of device 400. For example, network interface 410 may be integrated into at least one of processor 402, system memory 404, NVM / memory 406, and firmware device (not shown) with instructions that, when at least one of processor 402 executes the instructions, enable device 400 to implement... Figure 2-3 One or more embodiments of the various embodiments shown.
[0064] The network interface 410 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 410 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0065] In one embodiment, at least one of the processors 402 may be packaged together with the logic of one or more controllers for system control logic 408 to form a system-in-package (SiP). In another embodiment, at least one of the processors 402 may be integrated on the same die with the logic of one or more controllers for system control logic 408 to form a system-on-a-chip (SoC).
[0066] Device 400 may further include: input / output (I / O) device 412. I / O device 412 may include a user interface that enables a user to interact with device 400; the design of the peripheral component interface enables peripheral components to also interact with device 400.
[0067] In some embodiments, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light-emitting diode flash), and a keyboard.
[0068] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0069] All methods and implementations of this application can be implemented in the form of software, magnetic files, firmware, etc.
[0070] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application-specific integrated circuit (ASIC), or a microprocessor.
[0071] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this paper are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0072] One or more aspects of at least one embodiment can be implemented by representational instructions stored on a computer-readable storage medium, the instructions representing various logics in a processor, which, when read by a machine, cause the machine to create logic for performing the techniques described herein. These representations, referred to as “IP cores,” can be stored on a tangible computer-readable storage medium and provided to multiple customers or production facilities for loading into manufacturing machines that actually manufacture the logic or processor.
[0073] One embodiment of this application discloses a computer-readable medium storing one or more programs executable by one or more processors to implement the methods of this application.
[0074] One embodiment of this application discloses a computer program product, including a computer program that, when executed by a processor, implements the method of this application.
[0075] The above description illustrates the implementation of this application through specific embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Although the description of this application is presented in conjunction with preferred embodiments, this does not mean that the features of this invention are limited to this embodiment. On the contrary, the purpose of describing the invention in conjunction with embodiments is to cover other options or modifications that may be derived based on the claims of this application. To provide a thorough understanding of this application, many specific details will be included in the following description. This application may also be implemented without using these details. Furthermore, to avoid confusion or obscuring the focus of this application, some specific details will be omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.
[0076] Furthermore, the various operations will be described as multiple discrete operations in a manner most conducive to understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations must depend on the order. In particular, these operations do not need to be performed in the order presented.
[0077] Unless the context otherwise specifies, the terms “contains,” “has,” and “includes” are synonyms. The phrase “A / B” means “A or B.” The phrase “A and / or B” means “(A and B) or (A or B).”
[0078] As used herein, the terms “module” or “unit” may refer to, be, or include: application-specific integrated circuits (ASICs), electronic circuits, (shared, dedicated, or group) processors and / or memories that execute one or more software or firmware programs, combinational logic circuits, and / or other suitable components that provide the described functionality.
[0079] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism, but not limited to, for storing or transmitting information in a machine-readable (e.g., computer-readable) form, such as floppy disks, optical disks, CD-ROMs, magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information over the Internet via electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0080] In the accompanying drawings, certain structural or methodological features are shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0081] It should be understood that although terms such as "first," "second," etc., may be used herein to describe various units or data, these units or data should not be limited by these terms. These terms are used merely to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiments, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.
[0082] It should be noted that in this specification, similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0083] Although the invention has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.
Claims
1. A recommended method applied to electronic devices, characterized in that, The method includes, Receive user requests; The user's user features are input into multiple models respectively to obtain multiple first user vectors corresponding to the multiple models; For each first user vector, a random perturbation is added to the first user vector according to the perturbation parameters set for the model used to obtain the first user vector, so as to obtain the corresponding second user vector, wherein different perturbation parameters are set for different models; For each of the second user vectors, access the nearest neighbor retrieval service to obtain the candidate data set corresponding to the second user vector; Merge multiple candidate data sets corresponding to multiple second user vectors; and Candidate data is obtained from the merged candidate data set and pushed to the user.
2. The method according to claim 1, characterized in that, Adding a random perturbation to the first user vector includes adding noise to the first user vector, wherein the noise follows a normal distribution.
3. The method according to claim 2, characterized in that, The normal distribution mean of the noise is a hyperparameter.
4. The method according to claim 1, characterized in that, Obtaining candidate data from the candidate data set includes: The candidate data set is sorted to obtain the recall candidate set; The user information and the recall candidate set are processed into key-value pairs and saved.
5. The method according to claim 4, characterized in that, It also includes excluding exposure samples from the candidate data set.
6. The method according to claim 1, characterized in that, Obtaining the first user vector includes obtaining the first user vector when the user is an active user.
7. An electronic device, characterized in that, The device includes a memory storing computer-executable instructions and a processor; when the instructions are executed by the processor, the device performs the method according to any one of claims 1 to 6.
8. A computer-readable medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the method of any one of claims 1 to 6.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data processing method and device, storage medium and computer equipment
CN113656688A
Data processing method and device and storage medium
CN116049550A
