Data processing method and related apparatus
By designing the propt and feature extraction network, combining the large language model and recommendation model, the existing recommendation system data limitations and low model accuracy are solved, more accurate recommendation results are achieved, and recommendation accuracy and user item knowledge are improved.
Patent Information
- Application Number
- PCT/CN2024/098847
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-16
- Filing Date
- 2024-06-13
- Publication Date
- 2024-12-19
AI Technical Summary
Due to the closed system structure and data limitations, the recommendation accuracy of the model is poor and cannot effectively utilize external knowledge. Moreover, the application of large language models in recommendation systems has problems such as language bias, reasoning delay and combination gap.
By designing a specific prompt guide large language model to analyze the attribute information of users and items, combine feature extraction networks and recommendation models, predict users' operation information on items, and improve recommendation accuracy.
It achieves more accurate and interpretable recommendation results, improves the recommendation accuracy of the recommendation model, significantly improves the AUC and Logloss indicators, and enhances the utilization effect of user reasoning knowledge and item fact knowledge.
Smart Images

Figure CN2024098847_19122024_PF_FP_ABST
Abstract
Description
A data processing method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 16, 2023, with application number 202310722631.3 and invention name “A data processing method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence, and in particular to a data processing method and related devices. Background Art
[0003] Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and develop new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0004] Machine learning systems, including personalized recommendation systems, train the parameters of machine learning models using optimization methods such as gradient descent based on input data and labels. Once the model parameters converge, the model can be used to predict unknown data. For example, in a personalized recommendation system, click-through rate prediction involves input data including user and product attributes. Predicting personalized recommendations based on user preferences plays a crucial role in improving the accuracy of the recommendation system.
[0005] Existing recommendation systems are essentially closed systems, meaning that models are trained and deployed on a given dataset within the closed system. The data used in recommendation systems is confined to one or a few specific application domains and isolated from knowledge from the outside world. This limits the information available for learning the recommendation model, resulting in poor recommendation accuracy.
[0006] Summary of the Invention
[0007] This application provides a data processing method that can improve the accuracy of recommendation models.
[0008] In a first aspect, the present application provides a data processing method, comprising: obtaining a first prompt, the first prompt including user attribute information and indicating inferring the user's preferences based on the user attribute information; obtaining first information based on the first prompt using a large language model (LLM); and predicting the user's operation information on an item using a recommendation model based on the first information and second information, wherein the second information is attribute information of the item. In an embodiment of the present application, a prompt (i.e., the first prompt) is used to guide the LLM to infer the user's preferences, and this preference information is used as input to the recommendation model. This combines the advantages of the LLM and traditional recommendation models to obtain more accurate and interpretable recommendation results, thereby improving the recommendation accuracy of the recommendation model.
[0009] In a possible implementation, the first prompt further includes historical operation information of the user, and the first prompt specifically indicates inferring the user's preferences based on the user's attribute information and the historical operation information.
[0010] In a possible implementation, the first prompt further includes factors associated with the user's preference for the item, and the first prompt specifically instructs to analyze the user's preference based on the user's attribute information and the factors.
[0011] In a possible implementation, the factor is determined by LLM according to a third prompt, where the third prompt indicates determining the factor associated with the user's preference for the item.
[0012] In a possible implementation, the first information is related to the user's preferences, and the preferences are not included in the attribute information.
[0013] In a possible implementation, the first prompt further indicates an explanation of the inferred user preference.
[0014] In a possible implementation, the method further includes: obtaining a second prompt, where the second prompt indicates providing attribute information of the item; and obtaining the second information through LLM according to the second prompt.
[0015] In a possible implementation, the attribute information of items in the preset database may be incomplete. A prompt can be used to guide the LLM to enrich the attribute information of the items.
[0016] In a possible implementation, the second prompt specifically instructs providing attribute information of the item related to factors associated with the user's preference for the item.
[0017] In the above embodiment, the first prompt may include factors related to the user's preference for the item, which may be some attribute dimensions of the item. This attribute dimension information may be missing in the preset database, so the LLM can be guided to provide it through the prompt.
[0018] In a possible implementation, the first information is a natural language description or a feature representation obtained by the LLM.
[0019] In a possible implementation, the first information is a natural language description; and the method further includes:
[0020] According to the first information and the second information, a feature representation of the first information and a feature representation of the second information are obtained through a feature extraction network; according to the first information and the second information, the operation information of the user on the item is predicted through a recommendation model, including: according to the feature representation of the first information and the feature representation of the second information, the operation information of the user on the item is predicted through a recommendation model.
[0021] In a possible implementation, the feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch; the feature representation of the first information and the feature representation of the second information are obtained through the feature extraction network according to the first information and the second information, including: determining, according to the first information, through the first weight determination network, a first weight corresponding to the first feature extraction branch and a second weight corresponding to the second feature extraction branch; determining, according to the second information, through the second weight determination network, a third weight corresponding to the first feature extraction branch and a fourth weight corresponding to the third feature extraction branch; determining, according to the first information, a first sub-feature and a second sub-feature respectively through the first feature extraction branch and the second feature extraction branch; determining, according to the second information, a third sub-feature and a fourth sub-feature respectively through the first feature extraction branch and the third feature extraction branch; fusing the first sub-feature and the second sub-feature according to the first weight and the second weight to obtain the feature representation of the user; fusing the third sub-feature and the fourth sub-feature according to the third weight and the fourth weight to obtain the feature representation of the item.
[0022] In the above-mentioned way, by hybrid multi-expert adapter, the text information is mapped from the semantic space to the recommendation space, and the dimension reduction and noise processing are performed while preserving the effective information.
[0023] In a possible implementation, the attribute information includes user attributes of the user, and the user attributes include at least one of the following: gender, age, occupation, income, hobbies, and education level.
[0024] In a possible implementation, the attribute information includes item attributes of the item, and the item attributes include at least one of the following: item name, developer, installation package size, category, and praise level.
[0025] The user's attribute information may be an attribute related to the user's preference characteristics, at least one of gender, age, occupation, income, hobbies, and education level. Gender may be male or female, age may be a number between 0 and 100, occupation may be teacher, programmer, chef, etc., hobbies may be basketball, tennis, running, etc., and education level may be elementary school, junior high school, high school, college, etc. This application does not limit the specific type of the user's attribute information.
[0026] Among them, the items can be physical items or virtual items, such as APPs, audio and video, web pages, and news information. The attribute information of the items can be at least one of the item name, developer, installation package size, category, and praise. Among them, taking the item as an application as an example, the category of the item can be chat, parkour games, office, etc., and the praise degree can be a score, comment, etc. for the item; this application does not limit the specific type of attribute information of the item.
[0027] In a possible implementation, the method introduced in the first aspect can be a feedforward process of model training, or a reasoning process of the model.
[0028] In a possible implementation, the method further includes: when the operation information meets a preset condition, recommending the item to the user.
[0029] In a possible implementation, the method further includes: updating the recommendation model according to the operation information and the corresponding label.
[0030] In a second aspect, the present application provides a data processing device, comprising:
[0031] a processing module, configured to obtain a first prompt, wherein the first prompt includes attribute information of a user, and the first prompt indicates inferring a preference of the user based on the attribute information of the user;
[0032] According to the first prompt, first information is obtained through a large language model (LLM);
[0033] Based on the first information and the second information, the user's operation information on the item is predicted through a recommendation model; the second information is the attribute information of the item.
[0034] In a possible implementation, the first prompt further includes historical operation information of the user, and the first prompt specifically indicates inferring the user's preferences based on the user's attribute information and the historical operation information.
[0035] In a possible implementation, the first prompt further includes factors associated with the user's preference for the item, and the first prompt specifically instructs to analyze the user's preference based on the user's attribute information and the factors.
[0036] In a possible implementation, the factor is determined by LLM according to a third prompt, where the third prompt indicates determining the factor associated with the user's preference for the item.
[0037] In a possible implementation, the first information is related to the user's preferences, and the preferences are not included in the attribute information.
[0038] In a possible implementation, the first prompt further indicates an explanation of the inferred user preference.
[0039] In a possible implementation, the processing module is further configured to:
[0040] Obtaining a second prompt, wherein the second prompt indicates providing attribute information of the item;
[0041] According to the second prompt, the second information is obtained through LLM.
[0042] In a possible implementation, the second prompt specifically instructs providing attribute information of the item related to factors associated with the user's preference for the item.
[0043] In a possible implementation, the first information is a natural language description or a feature representation obtained by the LLM.
[0044] In a possible implementation, the first information is a natural language description; and the processing module is further configured to:
[0045] Obtaining, through a feature extraction network, a feature representation of the first information and a feature representation of the second information based on the first information and the second information;
[0046] The processing module is specifically used to:
[0047] According to the feature representation of the first information and the feature representation of the second information, the user's operation information on the item is predicted through a recommendation model.
[0048] In one possible implementation, the feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch;
[0049] The processing module is specifically used to:
[0050] Determining, by the first weight determination network, a first weight corresponding to the first feature extraction branch and a second weight corresponding to the second feature extraction branch based on the first information;
[0051] Determining, by the second weight determination network, a third weight corresponding to the first feature extraction branch and a fourth weight corresponding to the third feature extraction branch based on the second information;
[0052] determining, according to the first information, a first sub-feature and a second sub-feature through the first feature extraction branch and the second feature extraction branch respectively;
[0053] determining, according to the second information, a third sub-feature and a fourth sub-feature through the first feature extraction branch and the third feature extraction branch respectively;
[0054] fusing the first sub-feature and the second sub-feature according to the first weight and the second weight to obtain a feature representation of the user;
[0055] The third sub-feature and the fourth sub-feature are fused according to the third weight and the fourth weight to obtain a feature representation of the object.
[0056] In a third aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform any optional method as described in the first aspect above.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and any optional method.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising code, which, when executed, is used to implement the above-mentioned first aspect and any optional method.
[0059] In a sixth aspect, the present application provides a chip system comprising a processor configured to support a data processing device in implementing the functions described in the aforementioned aspects, such as transmitting or processing the data or information described in the aforementioned methods. In one possible design, the chip system further comprises a memory configured to store program instructions and data necessary for executing or training the device. The chip system may consist of a single chip or may include a chip and other discrete components. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 is a schematic diagram of the structure of the artificial intelligence main framework;
[0061] FIG2 is a schematic diagram of a system architecture provided in an embodiment of the present application;
[0062] FIG3 is a schematic diagram of a system architecture provided in an embodiment of the present application;
[0063] FIG4 is a schematic diagram of a recommendation scenario provided in an embodiment of the present application;
[0064] FIG5 is a flow chart of a data processing method provided in an embodiment of the present application;
[0065] FIG6 is a schematic diagram showing an effect of the method provided in an embodiment of the present application;
[0066] FIG7 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;
[0067] FIG8 is a schematic diagram of an execution device provided in an embodiment of the present application;
[0068] FIG9 is a schematic diagram of a training device provided in an embodiment of the present application;
[0069] FIG10 is a schematic diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The following describes the embodiments of the present invention in conjunction with the accompanying drawings. The terms used in the embodiments of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0071] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0072] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0073] First, let's describe the overall workflow of an AI system. See Figure 1, which shows a schematic diagram of the main AI framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0074] (1) Infrastructure
[0075] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.
[0076] (2) Data
[0077] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0078] (3) Data processing
[0079] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0080] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0081] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0082] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0083] (4) General ability
[0084] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0085] (5) Smart products and industry applications
[0086] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
[0087] The embodiments of the present application can be applied to the field of information recommendation, which includes but is not limited to scenarios involving e-commerce product recommendations, search engine result recommendations, application market recommendations, music recommendations, video recommendations, etc. The recommended items in various application scenarios can also be called "objects" to facilitate subsequent descriptions, that is, in different recommendation scenarios, the recommended object can be an APP, or a video, or music, or a certain product (such as the presentation interface of an online shopping platform, which will display different products for presentation according to different users, which can actually be presented through the recommendation results of a recommendation model). These recommendation scenarios usually involve user behavior log collection, log data preprocessing (for example, quantization, sampling, etc.), sample set training to obtain a recommendation model, and analysis and processing of the objects involved in the scenario corresponding to the training sample items (such as APP, music, etc.) according to the recommendation model. For example, the samples selected in the recommendation model training link come from the user's operation behavior on the recommended APP in the mobile application market. The recommendation model trained thereby is applicable to the above-mentioned mobile APP application market, or can be used for the APP application market of other types of terminals to recommend terminal APPs. The recommendation model will ultimately calculate the recommendation probability or score of each object to be recommended. The recommendation system selects the recommendation results based on certain selection rules, such as sorting them by recommendation probability or score, and presents them to users through corresponding applications or terminal devices. Users operate on the objects in the recommendation results to generate user behavior logs, etc.
[0088] Referring to Figure 4, during the recommendation process, when a user interacts with the recommendation system, a recommendation request is triggered. The recommendation system inputs this request and its associated feature information into the deployed recommendation model, which then predicts the user's click-through rate for all candidate items. The candidate items are then sorted in descending order based on the predicted click-through rates and displayed in sequential order at different locations as the recommended results for the user. Users browse the displayed items and perform user actions, such as browsing, clicking, and downloading. These user actions are logged as training data, and the offline training module periodically updates the recommendation model parameters to improve the model's recommendation effectiveness.
[0089] For example, when a user opens a mobile app market, the app market's recommendation module is triggered. This module predicts the user's likelihood of downloading each candidate app based on historical download and click history, app features, and contextual information such as time and location. Based on these predictions, the app market displays apps in descending order of likelihood, increasing the probability of download. Specifically, apps more likely to be downloaded are ranked higher, while apps less likely to be downloaded are ranked lower. User behavior is also logged, and the prediction model parameters are trained and updated through an offline training module.
[0090] For example, in applications related to lifelong companions, based on the user's historical data in video, music, news and other domains, various models and algorithms can be used to imitate the human brain mechanism to build a cognitive brain and establish a user lifelong learning system framework. Lifelong companions can record past events of users based on system data and application data, understand users' current intentions, predict users' future actions or behaviors, and ultimately realize intelligent services. In the current first phase, based on music apps, video apps, browser apps, etc., user behavior data (including end-side text messages, photos, email events, etc.) is obtained. On the one hand, a user portrait system is built, and on the other hand, learning and memory modules based on user information filtering, association analysis, cross-domain recommendations, causal reasoning, etc. are implemented to build a user's personal knowledge graph.
[0091] Next, the application architecture of the embodiment of the present application is introduced.
[0092] Referring to FIG2 , an embodiment of the present invention provides a recommendation system architecture 200. The data acquisition device 260 is used to collect samples. A training sample can be composed of multiple feature information (or described as attribute information, such as user attributes and item attributes). Feature information can be of multiple types, specifically including user feature information, object feature information, and label features. User feature information is used to characterize user characteristics, such as gender, age, occupation, hobbies, etc. Object feature information is used to characterize the characteristics of the object pushed to the user. Different recommendation systems correspond to different objects, and the types of features that need to be extracted from different objects are also different. For example, the object features extracted from the training samples of the APP market can be the name (identification), type, size, etc. of the APP. ; The object features mentioned in the training samples of e-commerce apps can be the name of the product, the category it belongs to, the price range, etc.; the label feature is used to indicate whether the sample is a positive example or a negative example. Usually, the label feature of the sample can be obtained through the user's operation information on the recommended object. The sample in which the user operates the recommended object is a positive example, and the sample in which the user does not operate the recommended object or only browses the recommended object is a negative example. For example, when the user clicks, downloads, or purchases the recommended object, the label feature is 1, indicating that the sample is a positive example. If the user does not perform any operation on the recommended object, the label feature is 0, indicating that the sample is a negative example. After collection, the sample can be stored in the database 230. Some or all of the feature information in the sample in the database 230 can also be directly obtained from the client device 240, such as user feature information, user operation information on the object (used to determine the type identification), object feature information (such as object identification), etc. The training device 220 obtains a model parameter matrix based on the sample training in the database 230 for generating a recommendation model 201 (such as the feature extraction network and neural network in the embodiment of the present application). The following will describe in more detail how the training device 220 trains to obtain the model parameter matrix used to generate the recommendation model 201. The recommendation model 201 can be used to evaluate a large number of objects to obtain the scores of each object to be recommended. Furthermore, a specified or preset number of objects can be recommended from the evaluation results of a large number of objects. The calculation module 211 obtains the recommendation results based on the evaluation results of the recommendation model 201 and recommends them to the client device through the I / O interface 212.
[0093] In an embodiment of the present application, the training device 220 can select positive and negative samples from the sample set in the database 230 and add them to the training set, and then use the recommendation model to train the samples in the training set to obtain a trained recommendation model; the implementation details of the calculation module 211 can refer to the detailed description of the method embodiment shown in Figure 5.
[0094] After the training device 220 obtains the model parameter matrix based on sample training and uses it to construct the recommendation model 201, the recommendation model 201 is sent to the execution device 210, or the model parameter matrix is directly sent to the execution device 210, and a recommendation model is constructed in the execution device 210 for making recommendations for the corresponding system. For example, the recommendation model obtained based on video-related sample training can be used to recommend videos to users on video websites or APPs, and the recommendation model obtained based on APP-related sample training can be used to recommend APPs to users in the application market.
[0095] Execution device 210 is equipped with an I / O interface 212 for data exchange with external devices. Execution device 210 can obtain user characteristic information, such as user ID, user identity, gender, occupation, and hobbies, from client device 240 via I / O interface 212. This information can also be obtained from a system database. Recommendation model 201 recommends target objects to the user based on the user characteristic information and the characteristic information of the recommended objects. Execution device 210 can be located in a cloud server or in a user client.
[0096] The execution device 210 can call data, code, etc. in the data storage system 250, and can also store output data in the data storage system 250. The data storage system 250 can be set in the execution device 210, can be set independently, or can be set in other network entities, and can be one or more.
[0097] The calculation module 211 uses the recommendation model 201 to process the user characteristic information and the characteristic information of the object to be recommended. For example, the calculation module 211 uses the recommendation model 201 to analyze and process the user characteristic information and the characteristic information of the object to be recommended, so as to obtain the score of the object to be recommended, and sort the objects to be recommended according to the score, among which the objects with higher rankings will be recommended to the client device 240.
[0098] Finally, the I / O interface 212 returns the recommendation result to the client device 240 and presents it to the user.
[0099] More deeply, the training device 220 can generate corresponding recommendation models 201 based on different sample feature information for different goals to provide users with better results.
[0100] It is worth noting that Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present invention. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 2, the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.
[0101] In an embodiment of the present application, the training device 220, the execution device 210, and the client device 240 can be three different physical devices respectively. It is also possible that the training device 220 and the execution device 210 are on the same physical device or a cluster. It is also possible that the execution device 210 and the client device 240 are on the same physical device or a cluster.
[0102] Referring to FIG3 , a system architecture 300 is provided in an embodiment of the present invention. In this architecture, the execution device 210 is implemented by one or more servers, and optionally cooperates with other computing devices, such as data storage, routers, load balancers, and other devices. The execution device 210 can be arranged at one physical site or distributed across multiple physical sites. The execution device 210 can use the data in the data storage system 250, or call the program code in the data storage system 250 to implement the object recommendation function. Specifically, the information of the object to be recommended is input into the recommendation model. The recommendation model generates an estimated score for each object to be recommended, and then sorts the objects in descending order according to the estimated scores. The objects to be recommended are recommended to the user according to the sorting results. For example, the first 10 objects in the sorting results are recommended to the user.
[0103] Among them, the data storage system 250 is used to receive and store the parameters of the recommendation model sent by the training device, as well as the data for storing the recommendation results obtained by the recommendation model. Of course, it may also include the program code (or instructions) required for the normal operation of the storage system 250. The data storage system 250 can be a distributed storage cluster composed of one device or multiple devices deployed outside the execution device 210. In this case, when the execution device 210 needs to use the data on the storage system 250, the storage system 250 can send the data required by the execution device to the execution device 210. Accordingly, the execution device 210 receives and stores (or caches) the data. Of course, the data storage system 250 can also be deployed in the execution device 210. When deployed in the execution device 210, the distributed storage system can include one or more memories. Optionally, when there are multiple memories, different memories are used to store different types of data. For example, the model parameters of the recommendation model generated by the training device and the data of the recommendation results obtained by the recommendation model can be stored in two different memories respectively.
[0104] Users can operate their respective user devices (e.g., local device 301 and local device 302) to interact with execution device 210. Each local device can represent any computing device, such as a personal computer, a computer workstation, a smartphone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.
[0105] Each user's local device can interact with the execution device 210 through a communication network of any communication mechanism / communication standard. The communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.
[0106] In another implementation, the execution device 210 can be implemented by a local device. For example, the local device 301 can implement the recommendation function of the execution device 210 based on the recommendation model to obtain user feature information and feedback the recommendation results to the user, or provide services to the user of the local device 302.
[0107] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.
[0108] 1. Click-throughrate (CTR)
[0109] Click probability, also known as click-through rate, refers to the ratio of the number of clicks and exposures of recommended information (for example, recommended items) on a website or application. Click-through rate is usually an important indicator for measuring recommendation systems in recommendation systems.
[0110] 2. Personalized recommendation system
[0111] A personalized recommendation system refers to a system that uses machine learning algorithms to analyze users' historical data (such as the operation information in the embodiments of the present application), predicts new requests based on this data, and provides personalized recommendation results.
[0112] 3. Offline training
[0113] Offline training refers to a module in a personalized recommendation system that iteratively updates the recommendation model parameters according to the machine learning algorithm based on the user's historical data (such as the operation information in the embodiment of the present application) until the set requirements are met.
[0114] 4. Online Inference
[0115] Online prediction refers to predicting the user's preference for recommended items in the current context based on the characteristics of the user, item, and context based on the offline trained model, and predicting the probability of the user selecting the recommended item.
[0116] For example, Figure 4 is a schematic diagram of the recommendation system provided by an embodiment of the present application. As shown in Figure 4, when a user enters the system, a recommendation request will be triggered. The recommendation system will input the request and related information (such as the operation information in the embodiment of the present application) into the recommendation model, and then predict the user's selection rate of items in the system. Furthermore, the items are sorted in descending order according to the predicted selection rate or a function based on the selection rate, that is, the recommendation system can display the items in different positions in sequence as recommendation results for the user. The user browses items in different positions and performs user behaviors, such as browsing, selecting, and downloading. At the same time, the user's actual behavior will be stored in the log as training data, and the parameters of the recommendation model will be continuously updated through the offline training module to improve the prediction effect of the model.
[0117] For example, a user opening an app store on a smart device (e.g., a mobile phone) triggers the app store's recommendation system. The app store's recommendation system predicts the probability of the user downloading each recommended app based on the user's historical behavior logs, such as their download history and selection history, as well as the app store's own characteristics, such as time, location, and other environmental characteristics. Based on the calculated results, the app store's recommendation system can display the candidate apps in descending order of predicted probability, thereby increasing the download probability of the candidate apps.
[0118] For example, an APP with a higher predicted user selection rate may be displayed in a front recommendation position, and an APP with a lower predicted user selection rate may be displayed in a back recommendation position.
[0119] The above-mentioned recommendation model can be a neural network model. The following introduces the relevant terms and concepts of neural networks that may be involved in the embodiments of the present application.
[0120] (1) Neural Network
[0121] A neural network can be composed of neural units. A neural unit can refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input. The output of the operation unit can be:
[0122] Where s = 1, 2, ... n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal of the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0123] (2) Deep Neural Networks
[0124] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. Based on the position of different layers in DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since there are many DNN layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscript corresponds to the output of the third layer index 2 and the input of the second layer index 4. In summary, the coefficient from the kth neuron in the L-1th layer to the jth neuron in the Lth layer is defined as It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a model with more parameters has higher complexity and greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrices for all layers of a trained deep neural network (a weight matrix formed by the vectors W across many layers).
[0125] (3) Loss function
[0126] During the training of a deep neural network, because we want the output of the deep neural network to be as close as possible to the desired predicted value, we can compare the current network's predicted value with the desired target value and then update the weight vector of each layer of the neural network based on the difference between the two. (Of course, before the first update, there is usually an initialization process, which pre-configures the parameters for each layer in the deep neural network.) For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value. This adjustment is continued until the deep neural network can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value." This is the loss function (or objective function), which is an important equation used to measure the difference between the predicted value and the target value. For example, the loss function output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss.
[0127] (4) Backpropagation algorithm
[0128] The back propagation (BP) algorithm can be used to correct the size of the initial model parameters during training, reducing the model's error loss. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial model, thereby converging the error loss. The BP algorithm is a backpropagation algorithm driven by error loss, aiming to obtain optimal model parameters, such as the weight matrix.
[0129] (5) Machine Learning Systems
[0130] Based on the input data and labels, the parameters of the machine learning model are trained through optimization methods such as gradient descent, and finally the trained model is used to complete the prediction of unknown data.
[0131] (6) Personalized recommendation system
[0132] A system that uses machine learning algorithms to analyze and model users' historical data, predict new user requests, and provide personalized recommendation results.
[0133] (7) Prompt
[0134] A natural language term that can be categorized into hard templates and soft templates. Hard templates are generally natural language words or sentences with a specific meaning; soft templates are generally parameterized representation vectors without any meaning.
[0135] (8) Large language models (LLM)
[0136] A large language model refers to a language model that contains more than 10 billion parameters, which are trained on a large amount of text data, such as GPT-4, LLaMA, etc.
[0137] Machine learning systems, including personalized recommendation systems, train the parameters of machine learning models using optimization methods such as gradient descent based on input data and labels. Once the model parameters converge, the model can be used to predict unknown data. For example, in a personalized recommendation system, click-through rate prediction involves input data including user and product attributes. Predicting personalized recommendations based on user preferences plays a crucial role in improving the accuracy of the recommendation system.
[0138] Existing recommendation systems are essentially closed systems, meaning that models are trained and deployed on a given dataset within the closed system. The data used in recommendation systems is confined to one or a few specific application domains and isolated from knowledge from the outside world. This limits the information available for learning the recommendation model, resulting in poor recommendation accuracy.
[0139] Some existing research attempts to directly apply LLM to recommendation systems by converting recommendation tasks and user features into textual prompts. Although these efforts have yielded some initial findings, direct application of LLM to recommendation systems has not been ideal, primarily due to the following drawbacks:
[0140] 1) Language Bias: LLMs are not trained on specific recommendation data. The lack of recommendation domain knowledge and collaborative signals makes LLMs unable to adapt to individual user preferences.
[0141] 2) Inference Latency: Due to the excessive number of model parameters, directly using LLM as a recommendation system is impractical in industrial settings. With billions of users and thousands of user behaviors, LLM cannot meet the low latency requirements of recommendation systems. The large model size also hinders the use of real-time user feedback to update and optimize the model.
[0142] 3) Combinatorial Gap: LLMs often face the combinatorial gap problem, which means that when faced with complex combinatorial questions, LLMs have difficulty generating correct answers, even though they can correctly answer all sub-questions. Requiring LLMs to directly generate recommendation results is currently beyond their capabilities, as the recommendation task itself requires analyzing the complex and multifaceted interests of users, which is itself a complex, multi-step combinatorial problem.
[0143] In order to solve the above problems, the present application provides a data processing method, which can be an inference process of a model.
[0144] 5 , which is a schematic diagram of an embodiment of a data processing method provided in an embodiment of the present application, as shown in FIG5 , a data processing method provided in an embodiment of the present application includes:
[0145] 501. Obtain a first prompt, where the first prompt includes attribute information of a user and indicates inferring the user's preference based on the attribute information of the user;
[0146] In this embodiment, a prompt (i.e., the first prompt in this embodiment) is used to guide the LLM to analyze (or infer) user preferences. Preferences here can be expressed as: which type of item (or, which features) the user prefers (the item can be the item currently being processed by the recommendation system or items of the same category)?
[0147] Next, we introduce the first prompt in the embodiment of this application:
[0148] In a possible implementation, in order to enable LLM to predict the user's preferences, the first prompt may include the user's attribute information, and the attribute information may be the user's portrait features.
[0149] Among them, the user's attribute information can be attributes related to the user's preference characteristics, at least one of gender, age, occupation, income, hobbies and education level, among which gender can be male or female, age can be a number between 0-100, occupation can be teacher, programmer, chef, etc., hobbies can be basketball, tennis, running, etc., and education level can be elementary school, junior high school, high school, university, etc.; this application does not limit the specific type of user attribute information.
[0150] In one possible implementation, the first prompt may indicate inferring the user's preference based on the user's attribute information. For example, the first prompt may indicate in natural language that the LLM infers which item (or category) the user prefers based on the user's attribute information.
[0151] Exemplarily, the first prompt may include: Given a user who is {{user description}}, Analyze user's preferences; User description: female, 25-34, and in sales / marketing.
[0152] In one possible implementation, the first prompt may also include the user's historical operation information. For example, this may be the user's historical operation information on an item (the item may be the item currently being processed by the recommendation system or an item of the same category). For example, this historical operation information may include the user's browsing, clicking, adding to cart, and purchasing operations on the item. This historical operation information can, to a certain extent, reflect the user's preferences.
[0153] In one possible implementation, the first prompt may specifically indicate inferring the user's preferences based on the user's attribute information and historical operation information. For example, the first prompt may instruct the LLM in natural language to infer which item (or category) the user prefers based on the user's attribute information and historical operation information.
[0154] For example, the first prompt may include: Given a user who is {{user description}}, this user's movie viewing history over time is listed below: {{user history}}, Analyze user's preferences; User description: female, 25-34, and in sales / marketing. User history: What Lies Beneath(2000),5 star:Ghost(1990),3 star:Aladdin(1992),4 star:Toy Story(1995),5 star:Scream(1996),5 star….
[0155] When determining recommendation information, the recommendation system needs to base it on the user's attribute information and the item's attribute information. However, not every dimension of the item's attribute information will affect the user's preference for the item, and the degree to which information from different dimensions affects the user's preference for the item is also different. In addition, the item's attribute information obtained from the preset database may be incomplete (some attribute information that affects the user's preference for the item may not be in the preset database), resulting in low recommendation accuracy of the model.
[0156] In this embodiment of the present application, a prompt can be used to guide the LLM analysis of factors associated with a user's preference for an item, that is, factors associated with the user's preference for the item (or whether the user likes the item at all). The association here can be a causal relationship. For example, a user's preference for the item is higher due to certain specific factors.
[0157] The factors may be features of the item. For example, if the item is a movie, the director, style, duration, country of production, etc. may be features related to the user's preference for movies.
[0158] Through the above method, the prompt design based on preference factor decomposition combines language models and expert opinions to decompose the key factors affecting preference reasoning, effectively stimulate the reasoning and knowledge acquisition capabilities of the large language model, and obtain user reasoning knowledge and item factual knowledge.
[0159] In a possible implementation, the first prompt also includes factors associated with the user's preference for the item (or item category), and the first prompt specifically instructs to analyze the user's preference based on the user's attribute information and the factors.
[0160] For example, the first prompt may include: Given a user who is {{user description}}, Analyze user's preferences (consider factors like {{scenario-specific factors}}; User description: female, 25-34, and in sales / marketing. Scenario-specific factors: genre, director, actors, time period, countrycharacter, plot / theme, mood / tone, critical acclaim / award....
[0161] In one possible implementation, the factors are determined according to a third prompt through an LLM (it should be understood that the LLM here may be the same as or a different LLM as the LLM in step 502), and the third prompt indicates the factors associated with the user's preference for the item.
[0162] Because large language models cannot accurately answer complex reasoning questions, complex questions need to be broken down first. This embodiment of the application proposes dynamically breaking down complex preference reasoning and knowledge extraction problems into multiple key sub-factors for different recommendation scenarios, enabling the large language model to perform user interest reasoning and knowledge extraction based on these factors.
[0163] Optionally, these factors can be obtained by asking a large language model questions or by consulting domain experts. The following is an example of asking a large language model questions. The prompt is, "Please list ten key factors that determine whether a user will like a certain movie." The large language model can respond accordingly, such as "genre, actors, director," etc.
[0164] In one possible implementation, the first prompt further indicates an explanation of the inferred user preferences. That is, the prompt guides the LLM to output an explanation of the inferred user preferences. This explanation can more comprehensively portray the user's profile characteristics.
[0165] For example, the first prompt may include: Provide clear explanations based on details from the user's viewing history and other pertinent factors.
[0166] 502. Obtain first information through a large language model (LLM) according to the first prompt.
[0167] By constructing the first prompt, the LLM analysis can be guided to obtain the user's preferences, that is, the first information can be obtained. The first information can be related to the user's preferences and is not included in the attribute information.
[0168] In a possible implementation, the first information is a natural language description.
[0169] For example, the first message is: It appears that she enjoys a mix of different genres, including drama, thriller, comedy, and animation.
[0170] In a possible implementation, the first information is a feature representation obtained by the LLM, for example, an output of an intermediate network layer of the LLM.
[0171] 503. Predict the user's operation information on the item through a recommendation model based on the first information and the second information; the second information is attribute information of the item.
[0172] The second information may be attribute information of the item obtained from a preset database.
[0173] For example, the item may be a physical item or a virtual item, such as an application (APP), audio and video, web page, news information, etc. The attribute information of the item may be at least one of the item name, developer, installation package size, category, and praise. Taking the item as an application as an example, the category of the item may be chat, parkour games, office, etc., and the praise degree may be a score, comment, etc. for the item; this application does not limit the specific type of attribute information of the item.
[0174] In a possible implementation, the attribute information of items in the preset database may be incomplete. A prompt can be used to guide the LLM to enrich the attribute information of the items.
[0175] In one possible implementation, a second prompt may be obtained, wherein the second prompt indicates providing attribute information of the item, and the second information may be obtained according to the second prompt through the LLM (it should be understood that the LLM here may be the same as or a different LLM from the LLM in step 502).
[0176] For example, the second prompt may include: Introduce movie item description; Item description: Roman Holiday.
[0177] In a possible implementation, the second prompt specifically instructs providing attribute information of the item related to factors associated with the user's preference for the item.
[0178] In the above embodiment, the first prompt may include factors related to the user's preference for the item, which may be some attribute dimensions of the item. This attribute dimension information may be missing in the preset database, so the LLM can be guided to provide it through the prompt.
[0179] For example, the second prompt may include: Introduce movie description, and describe its attributesprecisely (including but not limited to fscenario-specific factors;). Item description: Roman Holiday. Scenario-specific factors:genre,director,actors,time period,countrycharacter,plot / theme,mood / tone,critical acclaim / award...
[0180] For example, the second information obtained by LLM can be: Roman Holiday is a classic romantic comedy film released in 1953. It was directed by William Wyler and stars Audrey Hepburn, Gregory Peck... It had a light and playful tone throughout, with a touch of melancholy towards the end... It was a critical and commercial success... The production quality istop-notch, with beautiful cinematography and stunning locations in Rome...
[0181] In a possible implementation, after obtaining the first information and the second information, the user's operation information on the item can be predicted based on the first information and the second information through a recommendation model.
[0182] Since the first information is information obtained by LLM, the first information can be processed so that the first information can adapt to the input of the recommendation model.
[0183] In a possible implementation, the first information is a natural language description, and feature extraction can be performed on the first information to obtain a feature representation (such as a low-dimensional feature vector) that can be adapted to the input of the recommendation model.
[0184] In a possible implementation, the first information is a high-dimensional feature obtained by LLM. The first information can be subjected to dimensionality reduction processing to obtain a feature representation (eg, a low-dimensional feature vector) that can be adapted to the input of the recommendation model.
[0185] In a possible implementation, the second information is a natural language description obtained based on LLM, and feature extraction can be performed on the second information to obtain a feature representation (such as a low-dimensional feature vector) that can be adapted to the input of the recommendation model.
[0186] In a possible implementation, the second information is a high-dimensional feature obtained by LLM, and the second information can be subjected to dimensionality reduction processing to obtain a feature representation (eg, a low-dimensional feature vector) that can be adapted to the input of the recommendation model.
[0187] Next, we will give a network diagram for feature extraction of the first information and the second information:
[0188] In one possible implementation, a feature representation of the first information and a feature representation of the second information can be obtained through a feature extraction network based on the first information and the second information; and based on the feature representation of the first information and the feature representation of the second information, the user's operation information on the item can be predicted through a recommendation model.
[0189] In one possible implementation, the feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch;
[0190] In a possible implementation, the first weight corresponding to the first feature extraction branch and the second weight corresponding to the second feature extraction branch can be determined through the first weight determination network based on the first information; the third weight corresponding to the first feature extraction branch and the fourth weight corresponding to the third feature extraction branch can be determined through the second weight determination network based on the second information; the first sub-feature and the second sub-feature can be determined through the first feature extraction branch and the second feature extraction branch respectively based on the first information; the third sub-feature and the fourth sub-feature can be determined through the first feature extraction branch and the third feature extraction branch respectively based on the second information; the first sub-feature and the second sub-feature can be fused based on the first weight and the second weight to obtain the feature representation of the user; the third sub-feature and the fourth sub-feature can be fused based on the third weight and the fourth weight to obtain the feature representation of the item.
[0191] The above feature extraction network is a hybrid multi-expert adapter structure that encodes, compresses, and maps the corresponding text knowledge into a low-dimensional continuous vector. Specifically, the embodiment of the present application designs three types of expert network sets: shared experts (S s , which is the first feature extraction branch mentioned above), user-specific experts (S p , which is the second feature extraction branch mentioned above), and item-specific experts (S ι , which is the third feature extraction branch mentioned above). and Represent the first information and the second information respectively, g p (.) and g ι (.) represent the gating networks corresponding to the user and item, respectively (i.e., the first and second weight determination networks in the above embodiment). e(.) represents a deep network, such as a multi-layer perceptron (MLP). In the first row, α represents the weight of each expert network. The feature representations of the first and second information are obtained by weighted summation of the corresponding experts.
[0192] In the above-mentioned way, by hybrid multi-expert adapter, the text information is mapped from the semantic space to the recommendation space, and the dimension reduction and noise processing are performed while preserving the effective information.
[0193] In addition, the feature representation of the first information obtained above and the feature representation obtained based on the attribute information of the user in the preset database can be fused as the feature representation corresponding to the user input into the recommendation model, and the feature representation of the second information and the feature representation obtained based on the attribute information of the item in the preset database can be fused as the feature representation corresponding to the item input into the recommendation model.
[0194] In a possible implementation, the user's operation information on the item can be predicted based on the first information and the second information through a recommendation model.
[0195] In one possible implementation, the predicted operation information can indicate whether the user has performed a target operation. The target operation can be a type of user behavior operation. On online platforms and applications, users often have a variety of interaction forms with items (that is, there are multiple types of operations), such as browsing, clicking, adding to shopping carts, purchasing, and other operation types in users' behavior on e-commerce platforms.
[0196] In a possible implementation, the operation information may be the probability that the user will perform a target operation on the item.
[0197] For example, the operation information may be whether the user clicks or the probability of clicking.
[0198] In a possible implementation, the method described in the embodiment corresponding to FIG5 may be a reasoning process of a model.
[0199] In one possible implementation, the method further includes recommending the item to the user when the operation information satisfies a preset condition. Through the above approach, the probability of the user performing an operation on the item can be determined, and information recommendation can be made based on the probability. Specifically, when the recommendation information satisfies the preset condition, the item can be recommended to the user.
[0200] When recommending information, the recommended information can be recommended to users in the form of a list page in the hope that users will take action.
[0201] In one possible implementation, the method described in the embodiment corresponding to FIG5 above may be a feedforward process of model training (eg, pre-training or model fine-tuning).
[0202] In a possible implementation, the recommendation model may also be updated according to the operation information and the corresponding label.
[0203] In the embodiment of the present application, a prompt (that is, the first prompt) is used to guide the LLM to infer the user's preferences, and the preference information is used as the input of the recommendation model. By combining the advantages of the LLM and the traditional recommendation model, more accurate and interpretable recommendation results can be obtained, thereby improving the recommendation accuracy of the recommendation model.
[0204] Next, the beneficial effects of the embodiments of the present application are described in conjunction with experiments:
[0205] The effectiveness of the embodiments of this application was verified on the MovieLens-1M dataset, using the classic accuracy (AUC) and Logloss (lower is better) as the measurement indicators. The experimental results are shown in Tables 1 and 2 below and Figure 6.
[0206] 1. In terms of versatility, the embodiment of the present application significantly improved the average AUC by 1.5% over 9 existing recommendation algorithms (an improvement of 3‰ or more in AUC is considered significant).
[0207] Table 1 *denotes statistically significant improvement (t-test with p-value<0.05)over the backbone model.
[0208] In terms of effectiveness, the AUC is significantly improved by more than 1% compared to existing pre-trained recommendation models. Both user reasoning knowledge and item factual knowledge provide significant enhancements, and the combined effect is even better.
[0209] Table 2 *denotes statistically significant improvement (t-test with p-value<0.05)over the baseline / backbone models.
[0210] Next, a data processing device provided by an embodiment of the present application will be described from the perspective of a device. Referring to FIG. 7 , FIG. 7 is a schematic diagram of the structure of a data processing device provided by an embodiment of the present application. As shown in FIG. 7 , a data processing device 700 provided by an embodiment of the present application includes:
[0211] The processing module 701 is configured to obtain a first prompt, where the first prompt includes attribute information of a user and indicates inferring a preference of the user based on the attribute information of the user;
[0212] According to the first prompt, first information is obtained through a large language model (LLM);
[0213] Based on the first information and the second information, the user's operation information on the item is predicted through a recommendation model; the second information is the attribute information of the item.
[0214] For a detailed introduction to the processing module 701 , reference may be made to the description of steps 501 to 503 in the above embodiment, which will not be repeated here.
[0215] In a possible implementation, the first prompt further includes historical operation information of the user, and the first prompt specifically indicates inferring the user's preferences based on the user's attribute information and the historical operation information.
[0216] In a possible implementation, the first prompt further includes factors associated with the user's preference for the item, and the first prompt specifically instructs to analyze the user's preference based on the user's attribute information and the factors.
[0217] In a possible implementation, the factor is determined by LLM according to a third prompt, where the third prompt indicates determining the factor associated with the user's preference for the item.
[0218] In a possible implementation, the first information is related to the user's preferences, and the preferences are not included in the attribute information.
[0219] In a possible implementation, the first prompt further indicates an explanation of the inferred user preference.
[0220] In a possible implementation, the processing module 701 is further configured to:
[0221] Obtaining a second prompt, wherein the second prompt indicates providing attribute information of the item;
[0222] According to the second prompt, the second information is obtained through LLM.
[0223] In a possible implementation, the second prompt specifically instructs providing attribute information of the item related to factors associated with the user's preference for the item.
[0224] In a possible implementation, the first information is a natural language description or a feature representation obtained by the LLM.
[0225] In a possible implementation, the first information is a natural language description; the processing module 701 is further configured to:
[0226] Obtaining, through a feature extraction network, a feature representation of the first information and a feature representation of the second information based on the first information and the second information;
[0227] The processing module 701 is specifically configured to:
[0228] According to the feature representation of the first information and the feature representation of the second information, the user's operation information on the item is predicted through a recommendation model.
[0229] In one possible implementation, the feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch, and a third feature extraction branch;
[0230] The processing module 701 is specifically configured to:
[0231] Determining, by the first weight determination network, a first weight corresponding to the first feature extraction branch and a second weight corresponding to the second feature extraction branch based on the first information;
[0232] Determining, by the second weight determination network, a third weight corresponding to the first feature extraction branch and a fourth weight corresponding to the third feature extraction branch based on the second information;
[0233] determining, according to the first information, a first sub-feature and a second sub-feature through the first feature extraction branch and the second feature extraction branch respectively;
[0234] determining, according to the second information, a third sub-feature and a fourth sub-feature through the first feature extraction branch and the third feature extraction branch respectively;
[0235] fusing the first sub-feature and the second sub-feature according to the first weight and the second weight to obtain a feature representation of the user;
[0236] The third sub-feature and the fourth sub-feature are fused according to the third weight and the fourth weight to obtain a feature representation of the object.
[0237] Next, a terminal device provided in an embodiment of the present application is introduced. Please refer to Figure 8. Figure 8 is a structural schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 800 can be specifically manifested as a mobile phone, a tablet, a laptop computer, a smart wearable device, etc., which is not limited here. Among them, the terminal device 800 implements the function of the data processing method in the embodiment corresponding to Figure 5. Specifically, the terminal device 800 includes: a receiver 801, a transmitter 802, a processor 803 and a memory 804 (wherein the number of processors 803 in the terminal device 800 can be one or more), wherein the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present application, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.
[0238] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0239] Processor 803 controls the operation of the terminal device. In specific applications, the various components of the terminal device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0240] The method disclosed in the above embodiment of the present application can be applied to the processor 803 or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 803. The above processor 803 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, and a vision processor (VPU), a tensor processing unit (TPU) and other processors suitable for AI computing. It can also further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 803 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, or a register. The storage medium is located in the memory 804. The processor 803 reads the information in the memory 804 and, in conjunction with its hardware, completes steps 501 to 503 in the above embodiment.
[0241] Receiver 801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the terminal device. Transmitter 802 can be used to output digital or character information through the first interface. Transmitter 802 can also be used to send instructions to the disk pack through the first interface to modify the data in the disk pack. Transmitter 802 can also include a display device such as a display screen.
[0242] The embodiment of the present application also provides a server. Please refer to Figure 9, which is a schematic diagram of the structure of the server provided by the embodiment of the present application. Specifically, the server 900 is implemented by one or more servers. The server 900 may have relatively large differences due to different configurations or performance. It may include one or more central processing units (CPU) 99 (for example, one or more processors) and memory 932, and one or more storage media 930 (for example, one or more mass storage devices) for storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 can be temporary storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 99 can be configured to communicate with the storage medium 930 to execute a series of instruction operations in the storage medium 930 on the server 900.
[0243] The server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958; or, one or more operating systems 941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0244] Specifically, the server may perform steps 501 to 503 or steps 701 to 703 in the above embodiment.
[0245] An embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.
[0246] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.
[0247] The execution device, training device or terminal device provided in the embodiments of the present application can specifically be a chip, and the chip includes: a processing unit and a communication unit, the processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute the computer execution instructions stored in the storage unit, so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0248] Specifically, see Figure 10, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 1000. NPU 1000 is mounted on the host CPU (host CPU) as a coprocessor and is assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1003, which is controlled by controller 1004 to extract matrix data from memory and perform multiplication operations.
[0249] The NPU 1000 can implement the data processing method provided in the embodiment described in FIG. 5 through the mutual cooperation between various internal components.
[0250] More specifically, in some implementations, the arithmetic circuit 1003 in the NPU 1000 includes multiple processing units (PEs). In some implementations, the arithmetic circuit 1003 is a two-dimensional systolic array. The arithmetic circuit 1003 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1003 is a general-purpose matrix processor.
[0251] For example, assume there are input matrix A, weight matrix B, and output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from weight memory 1002 and caches it on each PE in the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from input memory 1001 and performs a matrix operation on matrix B. The partial or final matrix result is stored in accumulator 1008.
[0252] Unified memory 1006 is used to store input and output data. Weight data is directly transferred to weight memory 1002 through the Direct Memory Access Controller (DMAC) 1005. Input data is also transferred to unified memory 1006 through the DMAC.
[0253] BIU stands for Bus Interface Unit, i.e., bus interface unit 1010 , which is used for interaction between the AXI bus, DMAC, and instruction fetch buffer (IFB) 1009 .
[0254] The bus interface unit 1010 (BIU) is used for the instruction fetch memory 1009 to obtain instructions from the external memory, and is also used for the storage unit access controller 1005 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0255] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1006 or transfer weight data to the weight memory 1002 or transfer input data to the input memory 1001.
[0256] The vector calculation unit 1007 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit 1003, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0257] In some implementations, the vector calculation unit 1007 can store the processed output vector in the unified memory 1006. For example, the vector calculation unit 1007 can apply a linear function or a nonlinear function to the output of the operation circuit 1003, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1007 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1003, for example, for use in subsequent layers in a neural network.
[0258] An instruction fetch buffer 1009 connected to the controller 1004 is used to store instructions used by the controller 1004;
[0259] Unified memory 1006, input memory 1001, weight memory 1002, and instruction fetch memory 1009 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0260] The processor mentioned in any of the above places can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
[0261] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0262] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., and includes a number of instructions to enable a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0263] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0264] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a training device or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A data processing method, It is characterized in that The method comprises: Obtaining a first prompt, wherein the first prompt includes attribute information of a user, and the first prompt indicates inferring a preference of the user based on the attribute information of the user; According to the first prompt, first information is obtained through a large language model LLM; Based on the first information and the second information, the operation information of the user on the item is predicted through a recommendation model; the second information is the attribute information of the item.
2. The method according to claim 1, It is characterized in that The first prompt also includes historical operation information of the user, and the first prompt specifically indicates to infer the user's preference based on the user's attribute information and the historical operation information.
3. The method according to claim 1 or 2, It is characterized in that The first prompt also includes factors associated with the user's preference for the item, and the first prompt specifically instructs analyzing the user's preference based on the user's attribute information and the factors.
4. The method according to claim 3, It is characterized in that The factors are determined by LLM according to a third prompt, and the third prompt indicates determining the factors associated with the user's preference for the item.
5. The method according to any one of claims 1 to 4, It is characterized in that The first information is related to the preference of the user, and the preference is not included in the attribute information.
6. The method according to any one of claims 1 to 5, It is characterized in that The first prompt also indicates an explanation for determining the inferred preference of the user.
7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: Obtaining a second prompt, wherein the second prompt indicates providing attribute information of the item; According to the second prompt, the second information is obtained through LLM.
8. The method according to any one of claims 3 to 7, It is characterized in that The second prompt specifically instructs providing attribute information of the item related to factors associated with the user's preference for the item.
9. The method according to any one of claims 1 to 8, It is characterized in that The first information is a natural language description; the method further includes: Obtaining, through a feature extraction network, a feature representation of the first information and a feature representation of the second information according to the first information and the second information; The predicting, based on the first information and the second information, the operation information of the user on the item by using a recommendation model includes: According to the feature representation of the first information and the feature representation of the second information, the operation information of the user on the item is predicted through a recommendation model.
10. The method according to claim 9, It is characterized in that The feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch and a third feature extraction branch; The step of obtaining a feature representation of the first information and a feature representation of the second information through a feature extraction network according to the first information and the second information includes: Determine, according to the first information, a first weight corresponding to the first feature extraction branch and a second weight corresponding to the second feature extraction branch through the first weight determination network; Determine, according to the second information, through the second weight determination network, a third weight corresponding to the first feature extraction branch and a fourth weight corresponding to the third feature extraction branch; Determine, according to the first information, a first sub-feature and a second sub-feature through the first feature extraction branch and the second feature extraction branch respectively; Determine, according to the second information, a third sub-feature and a fourth sub-feature through the first feature extraction branch and the third feature extraction branch respectively; fusing the first sub-feature and the second sub-feature according to the first weight and the second weight to obtain a feature representation of the user; The third sub-feature and the fourth sub-feature are fused according to the third weight and the fourth weight to obtain a feature representation of the object.
11. A data processing device, It is characterized in that The device comprises: A processing module, configured to obtain a first prompt, wherein the first prompt includes attribute information of a user, and the first prompt indicates inferring a preference of the user based on the attribute information of the user; According to the first prompt, first information is obtained through a large language model LLM; Based on the first information and the second information, the operation information of the user on the item is predicted through a recommendation model; the second information is the attribute information of the item.
12. The device according to claim 11, It is characterized in that The first prompt also includes historical operation information of the user, and the first prompt specifically indicates to infer the user's preference based on the user's attribute information and the historical operation information.
13. The device according to claim 11 or 12, It is characterized in that The first prompt also includes factors associated with the user's preference for the item, and the first prompt specifically instructs analyzing the user's preference based on the user's attribute information and the factors.
14. The device according to claim 13, It is characterized in that The factors are determined by LLM according to a third prompt, and the third prompt indicates determining the factors associated with the user's preference for the item.
15. The device according to any one of claims 11 to 14, It is characterized in that The first information is related to the preference of the user, and the preference is not included in the attribute information.
16. The device according to any one of claims 11 to 15, It is characterized in that The first prompt also indicates an explanation for determining the inferred preference of the user.
17. The device according to any one of claims 11 to 16, It is characterized in that The processing module is further used for: Obtaining a second prompt, wherein the second prompt indicates providing attribute information of the item; According to the second prompt, the second information is obtained through LLM.
18. The device according to any one of claims 11 to 17, It is characterized in that The first information is a natural language description or a feature representation obtained by the LLM.
19. The device according to any one of claims 11 to 18, It is characterized in that The first information is a natural language description; the processing module is further used to: Obtaining, through a feature extraction network, a feature representation of the first information and a feature representation of the second information according to the first information and the second information; The processing module is specifically used for: According to the feature representation of the first information and the feature representation of the second information, the operation information of the user on the item is predicted through a recommendation model.
20. The device according to claim 19, It is characterized in that The feature extraction network includes: a first weight determination network, a second weight determination network, a first feature extraction branch, a second feature extraction branch and a third feature extraction branch; The processing module is specifically used for: Determine, according to the first information, a first weight corresponding to the first feature extraction branch and a second weight corresponding to the second feature extraction branch through the first weight determination network; Determine, according to the second information, through the second weight determination network, a third weight corresponding to the first feature extraction branch and a fourth weight corresponding to the third feature extraction branch; Determine, according to the first information, a first sub-feature and a second sub-feature through the first feature extraction branch and the second feature extraction branch respectively; Determine, according to the second information, a third sub-feature and a fourth sub-feature through the first feature extraction branch and the third feature extraction branch respectively; fusing the first sub-feature and the second sub-feature according to the first weight and the second weight to obtain a feature representation of the user; The third sub-feature and the fourth sub-feature are fused according to the third weight and the fourth weight to obtain a feature representation of the object.
21. A computing device, It is characterized in that The computing device includes a memory and a processor; the memory stores codes, and the processor is configured to obtain the codes and execute the method according to any one of claims 1 to 10.
22. A computer storage medium, It is characterized in that The computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method of any one of claims 1 to 10.
23. A computer program product comprising code, It is characterized in that When the code is executed, it is used to implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data processing method and related device
CN117194766A
Article recommendation model training method, article screening method, device and equipment
CN113850654A
Operation prediction method and related device
CN115237732A
Performing image search based on user input using neural networks
US20230161808A1
