Data processing method and device and electronic equipment
By embedding and hashing resource identifiers, combined with discretization, the problem of inaccurate user interest representation is solved, thereby improving the accuracy and comprehensiveness of user interest representation while reducing the amount of data processing.
Patent Information
- Application Number
- CN202410632202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, the video sequences played by users are coarsely screened, resulting in inaccurate representation of user interests. Consequently, the videos pushed to users may not be the ones that interest them.
By embedding resource identifiers in the interaction sequence between the first resource and the target object, and using K different hash operators for hash mapping and discretization, candidate feature vectors are obtained. The target candidate feature vectors are matched to determine the object's representation features, thereby reducing the amount of data processing and improving matching accuracy.
While reducing the amount of data processing, it improves the accuracy and comprehensiveness of user interest representation, ensuring that the pushed resources are more in line with user interests.
Smart Images

Figure CN120994869A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a data processing method, apparatus, and electronic device. Background Technology
[0002] With the popularization of internet technology, online resources (such as videos and articles) have experienced explosive growth. Faced with the massive amount of online resources, taking videos as an example, personalized recommendations are usually made to users to push videos that they are interested in, so that users do not need to search multiple times to find the videos they are interested in, thus improving the user experience.
[0003] In related technologies, user interests are analyzed by analyzing video sequences played over a period of time, and then videos are selected for recommendation based on these interests. However, since users typically play a large number of videos within a given timeframe, resulting in lengthy video sequences, subsequent data processing becomes very complex. To reduce this, related technologies generally perform a preliminary screening of the video sequences played over a period of time, and then use the selected video sequences to analyze the user's interest representation. Because this preliminary screening uses only the video sequences played by the user, rather than using complete video sequences to determine the user's interest representation, the obtained user interest representation is not accurate enough, which may lead to the recommendation of videos that are not of interest to the user. Summary of the Invention
[0004] In view of this, embodiments of this application propose a data processing method, apparatus, and electronic device that can determine the object representation features of the target object relative to the first resource from the complete interaction sequence of the target object while reducing the amount of data processing.
[0005] The embodiments of this application are implemented using the following technical solutions:
[0006] In a first aspect, embodiments of this application provide a data processing method, the method comprising: embedding a first resource identifier of a first resource and a second resource identifier in an interaction sequence of a target object respectively to obtain a first embedding vector of the first resource and a second embedding vector of each second resource; the interaction sequence of the target object includes second resource identifiers of multiple second resources that trigger interaction operations by the target object; performing hash mapping on the first embedding vector and the second embedding vector respectively using K different hash operators to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource, where K is an integer greater than 1; discretizing the values in the first intermediate feature vector and the values in each second intermediate feature vector respectively to obtain a first candidate feature vector of the first resource and a second candidate feature vector of each second resource; determining a target candidate feature vector that matches the first candidate feature vector among the multiple second candidate feature vectors of the second resources; and determining the object representation feature of the target object relative to the first resource based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0007] Secondly, embodiments of this application provide a data processing apparatus, comprising: an embedding module, configured to embed a first resource identifier of a first resource and a second resource identifier in an interaction sequence of a target object, respectively, to obtain a first embedding vector of the first resource and a second embedding vector of each second resource; the interaction sequence of the target object includes second resource identifiers of multiple second resources that trigger interaction operations by the target object; a hash mapping module, configured to perform hash mapping on the first embedding vector and the second embedding vector using K different hash operators, respectively, to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource; K is an integer greater than 1; a discretization processing module, configured to discretize the values in the first intermediate feature vector and the values in the second intermediate feature vector, respectively, to obtain a first candidate feature vector of the first resource and a second candidate feature vector of each second resource; a matching module, configured to determine a target candidate feature vector that matches the first candidate feature vector among multiple second candidate feature vectors of the second resources; and an output module, configured to determine the object representation feature of the target object relative to the first resource based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0008] In some implementations, the hash mapping module is further configured to initialize the seed constants of the K different hash operators to obtain a hash seed matrix; perform hash mapping on the first embedding vector according to the hash seed matrix to obtain a first intermediate feature vector of the first resource; and perform hash mapping on the second embedding vector according to the hash seed matrix to obtain a second intermediate feature vector of each of the second resources.
[0009] In some implementations, there are multiple target candidate feature vectors, and the output module is further used to add the second embedding vectors of the second resource corresponding to the multiple target candidate feature vectors to obtain a candidate representation vector; and to normalize the candidate representation vector to obtain the object representation feature of the target object relative to the first resource.
[0010] In some implementations, the matching module is further configured to calculate the distance between the first candidate feature vector and each of the second candidate feature vectors; and to use the second candidate feature vector whose distance from the first candidate feature vector does not exceed a distance threshold as the target candidate feature vector that matches the first candidate feature vector.
[0011] In some implementations, the discrete processing module is used to determine the numerical interval in which each value in the first intermediate feature vector lies; based on the correspondence between numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in which each value in the first intermediate feature vector lies are determined as the discrete values corresponding to each value in the first intermediate feature vector; the discrete values corresponding to each value in the first intermediate feature vector are combined to obtain a first candidate feature vector of the first resource; and, for each second intermediate feature vector, the module determines the numerical interval in which each value in the second intermediate feature vector lies; based on the correspondence between the numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in which each value in the second intermediate feature vector lies are determined as the discrete values corresponding to each value in the second intermediate feature vector; the discrete values corresponding to each value in the second intermediate feature vector are combined to obtain a second candidate feature vector of the second resource.
[0012] In some embodiments, the data processing apparatus further includes a filtering module, which is used to obtain resource description features of the first resource, wherein the resource description features are obtained by feature extraction of the resource description information of the first resource; an interaction prediction model predicts the probability that the target object will trigger an interaction operation on the first resource based on the resource description features of the first resource and the object representation features of the target object relative to the first resource; and determines the target resource to be pushed to the target object from among a plurality of first resources based on the probability that the target object will trigger an interaction operation on the first resource.
[0013] In some embodiments, the data processing apparatus further includes a training module, which is used to acquire the interaction sequence of sample objects, the resource identifier of sample resources, and the interaction label of the sample objects for the sample resources; determine the object representation features of the sample objects relative to the sample resources based on the interaction sequence of the sample objects and the sample resources; obtain the predicted probability of the sample objects triggering an interaction operation on the sample resources by the interaction prediction model according to the resource description features of the sample resources and the object representation features of the sample objects relative to the sample resources; calculate the prediction loss based on the prediction probability corresponding to the sample resources and the interaction label of the sample objects for the sample resources; and update the parameters of the interaction prediction model according to the prediction loss until the training termination condition is met.
[0014] In some implementations, the filtering module is further configured to identify, among a plurality of first resources, the first resource to which the probability of the target object triggering an interactive operation on the first resource is greater than a probability threshold as the target resource to be pushed to the target object.
[0015] In some embodiments, the data processing apparatus further includes a storage module, which is configured to determine the interest representation features of the target object relative to a target category based on the object representation features of the target object relative to a plurality of first resources; the resource category to which the plurality of first resources belong is the target category; and to associate and store the object identifier of the target object, the category identifier of the target category, and the interest representation features of the target object relative to the target category in a feature set.
[0016] In some implementations, the filtering module is further configured to: determine the reference resource category to which each candidate resource belongs for each candidate resource in the candidate resource set; obtain the interest representation features of the target object relative to the reference resource category from the feature set based on the category identifier of the reference resource category and the object identifier of the target object; predict the probability that the target object will trigger an interaction operation on each candidate resource by the interaction prediction model based on the resource description features of each candidate resource and the interest representation features of the target object relative to the reference resource category; and determine the target resource to be pushed to the target object from the candidate resource set based on the probability that the target object will trigger an interaction operation on each candidate resource.
[0017] Thirdly, embodiments of this application provide an electronic device, including: a processor; and a memory storing computer instructions, which, when executed by the processor, implement the above-described method.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the above-described method.
[0019] Fifthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the above-described method.
[0020] In this application, after embedding the first resource identifier to obtain the first embedding vector and embedding each second resource identifier in the interaction sequence of the target object to obtain the corresponding second embedding vector, the embedding vectors (i.e., the first embedding vector and the second embedding vector) are hashed using K different hash operators. This achieves dimensionality reduction of the embedding vectors and reduces the amount of data to be processed subsequently. At the same time, by hashing the embedding vectors using multiple hash operators, collisions only occur between the intermediate feature vectors (the first intermediate feature vector and the second intermediate feature vector) obtained by hashing the embedding vectors using multiple hash operators. This reduces the possibility of false collisions between the intermediate feature vectors after hashing, thereby ensuring the representation of resources by the intermediate feature vectors obtained by hashing and thus ensuring the accuracy of subsequent matching.
[0021] Furthermore, if the first intermediate feature vector and the second intermediate feature vector are directly matched to determine the second embedding vector of the resource indicated by the second intermediate feature vector that matches the first intermediate feature vector, the matching accuracy is too high, which may result in too few second embedding vectors being determined. This will lead to fewer second embedding vectors used to determine the object representation features, and consequently, the target object's interest in the resource as reflected by the object representation features of the first resource will not be accurate or comprehensive enough.
[0022] This application discretizes the values in the first intermediate feature vector to obtain the first candidate feature vector, and discretizes the values in the second intermediate feature vector to obtain the second candidate feature vector. This allows similar intermediate feature vectors to obtain completely identical candidate feature vectors. Therefore, compared to matching the first and second intermediate feature vectors, under the same matching accuracy, matching based on the first and second candidate feature vectors yields a larger number of target candidate feature vectors and a larger number of corresponding second embedding vectors. This ensures the accuracy and comprehensiveness of the subsequent determination of the target object's object representation features relative to the first resource for user interest representation based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0023] Furthermore, after matching and determining the target candidate feature vector, the second embedding vector of the second resource indicated by the target candidate feature vector is used to determine the object representation feature of the target object relative to the first resource, instead of directly using the target candidate feature vector. Since the target candidate feature vector is obtained by hashing and discretizing the second embedding vector, it expresses more information than the target candidate feature vector. Using the second embedding vector of the second resource indicated by the target candidate feature vector to determine the object representation feature of the target object relative to the first resource can ensure the accuracy of the determined object representation feature. Moreover, by using the hash operator to reduce the dimensionality of the embedding vector, the amount of data processing is greatly reduced without the need for a coarse screening of the target object's interaction sequence. This achieves the goal of ensuring the accuracy of the determined object representation feature of the target object relative to the first resource in representing the target object's interest while significantly reducing the amount of data processing.
[0024] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 A schematic diagram of an application scenario provided by an embodiment of this application is shown.
[0027] Figure 2 A first flowchart of the data processing method provided in an embodiment of this application is shown.
[0028] Figure 3 The embodiments provided in this application are shown. Figure 2 A flowchart illustrating step e in step S130.
[0029] Figure 4 The embodiments provided in this application are shown. Figure 2 A flowchart illustrating step f in step S130.
[0030] Figure 5 The embodiments provided in this application are shown. Figure 2 A flowchart of step S140.
[0031] Figure 6 The embodiments provided in this application are shown. Figure 2 A flowchart of step S150.
[0032] Figure 7 This illustration shows another scenario provided by an embodiment of this application.
[0033] Figure 8 A second flowchart of the data processing method provided in an embodiment of this application is shown.
[0034] Figure 9 A schematic diagram of the third process of the data processing method provided in the embodiments of this application is shown.
[0035] Figure 10 The diagram illustrates the fourth process flow of the data processing method provided in this application embodiment.
[0036] Figure 11 The diagram shows the fifth flowchart of the data processing method provided in the embodiments of this application.
[0037] Figure 12 A schematic diagram of a data processing apparatus provided in an embodiment of this application is shown.
[0038] Figure 13 A schematic diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0039] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0040] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.
[0041] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0042] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0043] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0044] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and pre-trained learning. Pre-trained models are the latest development in deep learning, integrating all of these techniques.
[0045] The object representation features of the target object relative to the first resource obtained by the data processing method of this application can be used together with the resource description features of the first resource to input into an interaction prediction model (a model based on machine learning or deep learning) to predict the probability of the target object triggering an interaction operation on the first resource. Based on the probability of the target object triggering an interaction operation on the first resource, the target resource to be pushed to the target object is determined from multiple first resources to ensure that the target resource determined for the target object meets the needs of the target object.
[0046] Hash operator: also called hash algorithm or hash function, is a function that compresses a message of arbitrary length into a message digest of a fixed length; that is, it transforms an input of arbitrary length into a fixed-length output through a hash operator, and the output is the hash value; this transformation is a compression mapping, that is, the space of hash values is usually much smaller than the space of input, and different inputs may hash to the same output.
[0047] Locality-Sensitive Hash (LSH) is a special type of hashing method mainly used for fast nearest neighbor retrieval of vectors. Unlike traditional hashing algorithms, LSH emphasizes "locality sensitivity," meaning that if the original data are similar, the hashed data will also maintain a certain degree of similarity; conversely, data that were not similar before will remain dissimilar after hashing.
[0048] Interaction sequence: refers to the sequence formed by the resource identifiers of resources that trigger interactive operations by users.
[0049] Embedding processing refers to the process of vectorizing data (such as text, images, and audio). For example, text can be mapped into a vector, and semantically similar texts will have similar vectors in the vector space, which facilitates subsequent processing and analysis by electronic devices.
[0050] In related technologies, user interests are analyzed by analyzing video sequences played over a period of time, and then videos are selected to be pushed to the user based on these interests. However, since a user plays a large number of videos within a given period, and the length of these video sequences is often quite long, the subsequent data processing is intensive. To reduce this processing load, related technologies typically perform a coarse screening of the video sequences played over a period of time, and then use the sequences formed by these selected videos to analyze the user's interest in the videos. Because this coarse screening is performed on the video sequences played by the user, rather than using complete video sequences to determine the user's interest, this technology discards some of the user's historical behavior (i.e., discarding the video identifiers of some videos the user has previously played). This results in an inaccurate representation of the user's video interest, which may lead to the subsequent videos pushed to the user not being videos that the user is interested in.
[0051] To address the aforementioned issues, this application, after embedding the first resource identifier to obtain a first embedding vector and embedding each second resource identifier in the interaction sequence of the target object to obtain a corresponding second embedding vector, performs hash mapping on the embedding vectors (i.e., the first and second embedding vectors) using K different hash operators. This achieves dimensionality reduction of the embedding vectors, reducing the amount of data processed subsequently. Simultaneously, by performing hash mapping on the embedding vectors using multiple hash operators, a collision only occurs between the intermediate feature vectors (the first and second intermediate feature vectors) obtained through hash mapping on multiple hash operators, provided that all hash mapping results obtained by multiple hash operators collide. This reduces the possibility of false collisions between intermediate feature vectors after hash mapping, thereby ensuring the representational effect of the intermediate feature vectors obtained by hash mapping on resources and thus ensuring the accuracy of subsequent matching. Related technologies require the use of reference information (such as video identifiers of some videos) to filter video identifiers from the video sequence played by the user to construct the user's video interest representation, i.e., the coarse screening process mentioned above. This process is time-consuming. The solution of this application uses hash operators to reduce dimensionality. Compared with the coarse screening process in related technologies, dimensionality reduction using hash operators reduces the amount of subsequent data processing and takes less time. This can solve the problem of the serious time consumption of coarse screening in related technologies.
[0052] Furthermore, if the first intermediate feature vector and the second intermediate feature vector are directly matched to determine the second embedding vector of the resource indicated by the second intermediate feature vector that matches the first intermediate feature vector, the matching accuracy is too high, which may result in too few second embedding vectors being determined. This will lead to fewer second embedding vectors used to determine the object representation features, and consequently, the target object's interest in the resource as reflected by the object representation features of the first resource will not be accurate or comprehensive enough.
[0053] This application discretizes the values in the first intermediate feature vector to obtain the first candidate feature vector, and discretizes the values in the second intermediate feature vector to obtain the second candidate feature vector. This allows similar intermediate feature vectors to obtain completely identical candidate feature vectors. Therefore, compared to matching the first and second intermediate feature vectors, under the same matching accuracy, matching based on the first and second candidate feature vectors yields a larger number of target candidate feature vectors and a larger number of corresponding second embedding vectors. This ensures the accuracy and comprehensiveness of the subsequent determination of the target object's object representation features relative to the first resource for user interest representation based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0054] Furthermore, after matching and determining the target candidate feature vector, the second embedding vector of the second resource indicated by the target candidate feature vector is used to determine the object representation feature of the target object relative to the first resource, instead of directly using the target candidate feature vector. Since the target candidate feature vector is obtained by hashing and discretizing the second embedding vector, the second embedding vector expresses more information than the target candidate feature vector. Using the second embedding vector of the second resource indicated by the target candidate feature vector to determine the object representation feature of the target object relative to the first resource can ensure the accuracy of the determined object representation feature. Moreover, by using the hash operator to reduce the dimensionality of the embedding vector, the amount of data processing is greatly reduced, without the need to first coarsely screen the interaction sequence of the target object to reduce the amount of data processing. That is, it is not necessary to discard some resource identifiers in the interaction sequence of the target object. In this way, all resource identifiers in the interaction sequence of the target object participate in the subsequent processing, achieving the accuracy of the determined object representation feature of the target object relative to the first resource in representing the interest of the target object while greatly reducing the amount of data processing.
[0055] Please see Figure 1 , Figure 1 A schematic diagram of an application scenario according to an embodiment of this application is provided, including a terminal device 10 and a server 20, wherein the terminal device 10 and the server 20 are connected via wired or wireless network communication.
[0056] Terminal device 10 can run an application. The user (i.e., the user of the application) can log in to the application and interact with it through the application's interface. The application can perform interactive operations on the resources displayed by the user in the application interface (interactive operations such as clicks, play, favorites, comments, shares, and sending bullet comments, etc.) and generate interaction records (e.g., interaction logs). These records include the user's account information. Based on the resource identifiers of the resources whose interactive operations were triggered by the user in the target user's interaction records, the target user's interaction sequence can be obtained. This sequence can be stored on terminal device 10 or on server 20. Server 20 can also store multiple first resources to be pushed and the resource identifiers of each first resource.
[0057] In response to a specified triggering operation (such as login, page refresh, etc.) triggered by an object in the application interface, terminal device 10 sends a resource request to server 20. Based on the received resource request from the target object, server 20 obtains the interaction sequence of the target object and the first resource identifier of the first resource, and determines the object representation characteristics of the target object relative to the first resource using the data processing method provided in this application. Then, based on the object representation characteristics of the target object relative to the first resource and the resource description characteristics of the first resource, it predicts the probability that the target object will trigger an interaction operation on the first resource. According to the probability that the target object will trigger an interaction operation on the first resource, it determines the target resource to be pushed to the target object from multiple first resources and sends the determined target resource to terminal device 10. Terminal device 10 displays the received target resource in the application interface.
[0058] Taking a video application running on terminal device 10 as an example, server 20 stores multiple first resources to be pushed and resource identifiers for each first resource, which are various video resources to be pushed and their video identifiers (such as video IDs). When the target user logs into the video application on terminal device 10 with their own account, server 20 returns multiple target video resources to terminal device 10. Terminal device 10 then displays the target video resources to the target user through the application interface of the video application. The target video resources can be displayed in the form of video cards. Figure 1 An example application interface 102 for a video application is provided. The application interface 102 includes cards 104 for target video resource AAA and cards 104 for target video resource BBB. Cards 104 may also include a follow-up control 106. When a user clicks to view card 104 or clicks the follow-up control 106 on the application interface 102, it can be considered that the target object has triggered a trigger operation with the video resource. An interaction record is generated based on the trigger operation. The interaction record includes the resource identifier of the interacted video resource and the object identifier of the target object (the object identifier is such as the object's account). Subsequently, the interaction sequence of the target object can be updated based on the resource identifier in the interaction record. When the target object logs in again or triggers a target operation (such as refreshing the page), the server 20 can redetermine the target video resource for push based on the updated interaction sequence of the target object.
[0059] In some implementations, the application interface 102 may also include a category control 108. Figure 1The example provided shows that the category control 108 can include categories such as homepage, live streaming, animation, children's content, and movies. In addition, the server 20 can also store the interaction sequence of the target object under each category, as well as the first resource and the resource identifier of the first resource under each category. In response to the user's trigger operation on the category control 108, the server 20 can determine the target resource based on the interaction sequence of the target object under the corresponding category and the resource identifier of the first resource under that category, and then push the target video resource, and write the interaction operation of the target object in the application interface 102 into the interaction sequence of the target object under that category.
[0060] In other embodiments, after determining the object representation characteristics of the target object relative to each resource according to the data processing method provided in this application, the server 20 determines the target resource to be pushed to the target object accordingly. Subsequently, if a resource request from the target object is received, the server 20 obtains the target resource determined for the target object and sends the target resource determined for the target object to the terminal device 10 where the target object is located.
[0061] It should be understood that the application scenarios of the methods and steps described above are merely illustrative and are not intended to limit this solution.
[0062] Please see Figure 2 , Figure 2 A first flowchart of the data processing method provided in this application embodiment is shown. This method can be executed by an electronic device, which can be a server, edge computing device, or other device with certain processing capabilities. The data processing method includes steps S110-S150:
[0063] S110. Embedding processing is performed on the first resource identifier of the first resource and the second resource identifier in the interaction sequence of the target object to obtain the first embedding vector of the first resource and the second embedding vector of each second resource; the interaction sequence of the target object contains the second resource identifiers of multiple second resources that trigger the interaction operation of the target object.
[0064] In this application, for ease of distinction, the resources indicated by each resource identifier in the interaction sequence are referred to as second resources, and the resource identifier of the second resource is referred to as the second resource identifier, while the resource identifier of the first resource is referred to as the first resource identifier. The resource identifier of a resource is used to uniquely identify the corresponding resource. The resource identifier can be a string that uniquely indicates the resource, such as a video ID or product code. The target object refers to the object whose characteristics are to be determined. The object refers to the user of the application, and the object identifier can be the account registered by the object in the application, etc.
[0065] It is understandable that the interaction sequence of the target object includes multiple second resource identifiers. These multiple second resource identifiers refer to the resource identifiers of multiple resources that trigger the interaction operation of the target object. The interaction operation is such as the click operation, view operation, play operation, favorite operation, comment operation, forward operation, send bullet screen operation, place order operation, etc. mentioned above, and no specific limitation is made here.
[0066] The resources (including primary and secondary resources) can be in the form of video resources, text resources, image resources, product resources, advertising resources, game equipment resources, etc., without specific limitations.
[0067] It should be noted that in the embodiments of this application, the first resource and the second resource are resources of the same type; for example, both are video resources, both are text resources, both are product resources, etc. The first resource may not be the resource indicated by the resource identifier in the interaction sequence of the target object, that is, the first resource may be a resource for which the target object has not triggered an interaction operation.
[0068] In some implementations, before step S110, it is also necessary to obtain the interaction sequence of the target object and the resource identifier of the first resource. Obtaining the interaction sequence of the target object can involve acquiring all interaction records of the target object within a preset time period. Then, the recorded interaction operations are selected as candidate interaction records for preset interaction operations, and the resource identifier of the interacted resource is extracted from the candidate interaction records. The extracted resource identifiers are arranged in chronological order according to their corresponding interaction times (i.e., the times when the interaction operation was triggered), thus obtaining the interaction sequence. The preset interaction operation can be one or more types. For example, the preset interaction operation can be a playback operation; or it can be a comment operation, a forwarding operation, or a favorite operation, etc.
[0069] It should be noted that, in this application, when the interaction sequence and other information of the target object are applied to specific products or technologies in the above embodiments of this application, the relevant data collection, use and processing process should comply with the requirements of national laws and regulations. Before collecting relevant information of the target object, the information processing rules should be informed and the separate consent of the target object should be obtained. The relevant information should be processed in strict accordance with the requirements of laws and regulations and personal information processing rules, and technical measures should be taken to ensure the security of relevant data.
[0070] Step S110 may specifically include step a and step b.
[0071] Step a: Embed the first resource identifier to obtain the first embedding vector of the first resource.
[0072] The first embedding vector refers to the embedding vector obtained by embedding the first resource identifier. In some implementations, the embedding process can be implemented by looking up an embedding table; wherein, the embedding table contains resource identifiers and their corresponding embedding vectors; it is worth mentioning that the vector dimensions of different embedding vectors need to be the same to facilitate subsequent data processing.
[0073] In some implementations, an embedding representation model can be used to update the embedding table. The specific process may include: initializing the parameters of the embedding representation model, wherein the parameters include an initial embedding table containing resource identifiers and corresponding initial embedding vectors; obtaining multiple training samples and labels for each training sample, each training sample including two sample resource identifiers, the labels of which indicate the similarity between the resources indicated by the two sample resource identifiers in that training sample; the embedding representation model determining the initial embedding vectors corresponding to each sample resource identifier based on the initial embedding table, calculating the distance between the two initial embedding vectors in each training sample, calculating a loss function based on the labels of the training samples and the distance between the two initial embedding vectors in that training sample, and updating the parameters of the embedding representation model (i.e., the initial embedding table) based on the gradient of the loss function until a termination condition is met, such as reaching the required number of iterations or the loss function being less than a preset threshold; by updating the initial embedding table through the above process, similar resources can have similar embedding vectors.
[0074] Step b: Embed the second resource identifiers in the interaction sequence to obtain the second embedding vectors for each second resource.
[0075] The second embedding vector refers to the embedding vector obtained by embedding the second resource identifier.
[0076] Step b is similar to step a, so for a detailed description of step b, please refer to the detailed description of step a, which will not be repeated here. At the same time, there is no restriction on the execution order of steps a and b; they can be executed simultaneously or sequentially.
[0077] Through the above step S110, it is equivalent to mapping the first resource identifier and the second resource identifier to the same vector space. The resulting first embedding vector is the feature representation of the first resource identifier in this vector space (that is, the feature representation of the first resource in this vector space), and the second embedding vector is the feature identifier of the second resource identifier in this vector space (that is, the feature representation of the second resource in this vector space). The first embedding vector and the second embedding vector have the same dimension.
[0078] S120. Using K different hash operators, hash mapping is performed on the first embedding vector and the second embedding vector respectively to obtain the first intermediate feature vector of the first resource and the second intermediate feature vector of each second resource, where K is an integer greater than 1.
[0079] Specifically, step S120 may include steps c and d.
[0080] Step c: Perform hash mapping on the first embedding vector using K different hash operators to obtain the first intermediate feature vector of the first resource, where K is an integer greater than 1.
[0081] Specifically, each hash operator performs a hash mapping on the first embedding vector to obtain the hash value of the first embedding vector under that hash operator; the K hash values of the first embedding vector under K hash operators are combined to obtain the first intermediate feature vector of the first resource.
[0082] The first embedding vector is combined with the K hash values of the K hash operators in a preset order (e.g., in the order of (hash value under hash operator A1, hash value under hash operator A2, hash value under hash operator A3)) to obtain the first intermediate feature vector of the first resource.
[0083] Step d: Perform hash mapping on the second embedding vector using K different hash operators to obtain the second intermediate feature vector of each second resource.
[0084] Step c is similar to step d. Therefore, for a detailed description of step d, please refer to the detailed description of step c. It will not be repeated here.
[0085] It is understandable that by performing a hash mapping on an embedding vector (including the first embedding vector and the second embedding vector) using a hash operator, a unique hash value for that embedding vector can be obtained. However, different embedding vectors may obtain the same hash value after being hashed by the hash operator, which means a collision occurs. Obviously, if two originally dissimilar embedding vectors obtain the same hash value after being hashed, it will lead to the subsequent treatment of these two embedding vectors as representing the same resource.
[0086] It is understandable that the hash values obtained by hash mapping two different embedding vectors through the same hash operator may collide. However, the probability that the hash values obtained by hash mapping two different embedding vectors through multiple hash operators will all collide (for example, taking two hash operators A1 and A2 as examples, the hash values obtained by hash mapping two different embedding vectors through hash operator A1 collide, and the hash values obtained by hash mapping two different embedding vectors through hash operator A2 also collide) is obviously lower. Therefore, in this application, using K different hash operators to hash map the first embedding vector and the second embedding vector can greatly reduce the probability of collision between the first intermediate feature vector and the second intermediate feature vector, as well as the probability of collision between second intermediate feature vectors of different second resources. This ensures the identification function of the first intermediate feature vector for the first resource and the identification function of the second intermediate feature vector for the second resource. K can be set according to actual needs, for example, K is 2, 3, 4, 5, etc.
[0087] It is understandable that the larger K is, the smaller the probability of the first intermediate feature vector colliding with the second intermediate feature vector, and the smaller the probability of the second intermediate feature vectors from different second resources colliding. However, the corresponding computational load is also larger.
[0088] In some embodiments, to reduce the probability of collisions, the K different hash operators may include locality-sensitive hash operators. Locality-sensitive hash operators ensure that similar embedding vectors produce similar hash values, while more different embedding vectors produce more different hash values, thus reducing the probability of collisions after hash mapping between different embedding vectors.
[0089] Among the K different hash operators, some hash operators are locality-sensitive hash operators, and some hash operators are non-locality-sensitive hash operators.
[0090] In some implementations, the K different hash operators are K different locality-sensitive hash operators.
[0091] Understandably, by introducing K different locality-sensitive hash operators, for originally dissimilar embedding vectors, even if their corresponding hash values collide under a certain locality-sensitive hash operator, as long as the hash values under other locality-sensitive hash operators do not collide, it is possible to avoid collisions between their corresponding intermediate feature vectors (including the first intermediate feature vector and the second intermediate feature vector). This further reduces the possibility that different embedding vectors will obtain the same intermediate feature vector (the first intermediate feature vector and the second intermediate feature vector), so that the intermediate feature vector can more accurately represent the corresponding embedding vector (or the corresponding resource).
[0092] As described above, the larger K is, the lower the probability of a collision between the first intermediate feature vector and the second intermediate feature vector, and the lower the probability of a collision between second intermediate feature vectors from different second resources. However, the corresponding computational load is also larger. By introducing some or all locality-sensitive hash operators, a trade-off can be struck between reducing the probability of collisions and reducing the amount of computation introduced. That is, when introducing some or all locality-sensitive hash operators, K can be set to a smaller value to avoid increasing the amount of computation.
[0093] In some embodiments, prior to step S120, the data processing method may further include:
[0094] The seed constants of K different hash operators are initialized to obtain the hash seed matrix.
[0095] In some implementations, when the seed constant of the hash operator is unknown, initialization may refer to initializing and setting the seed constant in the hash operator. The seed constant can be set by randomly selecting it from a preset range based on a probability distribution model. For example, if the preset range is 0-1, a normal distribution probability model can be used to select multiple seed constants within the range of 0-1.
[0096] In other implementations, when the seed constant of the hash operator is known, initialization may refer to the random assignment of coefficients to the seed constant in the hash seed matrix.
[0097] For example, an initial matrix can be established based on the seed constants of multiple hash operators, and then coefficients can be assigned to the seed constants in the initial matrix based on a preset data distribution model to obtain a hash seed matrix. The values in the hash seed matrix are determined by the values of the seed constants at corresponding positions in the initial matrix and the coefficients assigned to those seed constants. For example, the values of the seed constants can be multiplied, added, or subjected to exponential operations (e.g., the assigned coefficients are used as the exponents of the seed constant's value).
[0098] The preset data distribution model can be a distribution model that satisfies uniform distribution, Gaussian distribution, or orthogonal distribution.
[0099] Taking a uniform distribution as an example, the range of the uniform distribution is set to 0-1, and the probability of each number being selected in 0-1 is the same. After establishing the initial matrix, for each seed constant, a number is randomly selected from 0-1 as the coefficient of the seed constant. Based on the initial matrix and the coefficients of various seed constants, such as multiplying or adding the seed constant with the coefficients, a new seed constant is obtained, and thus the hash seed matrix is obtained based on the new seed constant.
[0100] Based on the hash seed matrix, step 120 specifically includes: performing a hash mapping on the first embedding vector according to the hash seed matrix to obtain the first intermediate feature vector of the first resource; and performing a hash mapping on the second embedding vector according to the hash seed matrix to obtain the second intermediate feature vector of each second resource.
[0101] Understandably, by initializing the hash seed constants of K different hash operators to obtain the hash seed matrix, the randomness of the hash seed matrix (i.e., the seed constants of K hash operators) is ensured, thereby effectively avoiding the problem of symmetry in the initial hash operators and further reducing the possibility of hash collisions.
[0102] S130. Discretize the values in the first intermediate feature vector and the values in each of the second intermediate feature vectors to obtain the first candidate feature vector of the first resource and the second candidate feature vector of each of the second resources.
[0103] Specifically, step S130 may include step e and step f.
[0104] Step e: Discretize the values in the first intermediate feature vector to obtain the first candidate feature vector of the first resource.
[0105] Discretization refers to transforming continuous data into discrete data. There are various ways to implement discretization, such as using clustering algorithms to cluster continuous data and using the clustering results as the discretization result; using decision tree algorithms to partition continuous data, thereby achieving discretization; or using equal-width discretization, dividing the value range into equal-width intervals and assigning a discrete value to each interval, using the discrete value corresponding to the interval containing the continuous data as the discretization result of that continuous data.
[0106] In some implementations, please refer to Figure 3 , Figure 3 The embodiments provided in this application are given Figure 2 A flowchart illustrating step e in step S130, where step e includes steps S131-S133:
[0107] S131. Determine the numerical range of each value in the first intermediate feature vector.
[0108] S132. Based on the correspondence between numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in the first intermediate feature vector are determined as the discrete values corresponding to the numerical values in the first intermediate feature vector.
[0109] In this context, a numerical interval corresponds to a discrete value, and different numerical intervals correspond to different discrete values.
[0110] For example, the sign function can be used to determine the discrete values corresponding to each numerical value. The sign function is as follows:
[0111]
[0112] In the sign function, the numerical range includes three ranges: less than 0, equal to 0, and greater than 0. The variable x is also the value in the first intermediate feature vector. When the value is less than 0, the discrete value of the value is determined to be -1. When the value is equal to 0, the discrete value of the value is determined to be 0. When the value is greater than 0, the discrete value of the value is determined to be 1.
[0113] S133. Combine the discrete values corresponding to each value in the first intermediate feature vector to obtain the first candidate feature vector of the first resource.
[0114] Taking the discretization using the sign function as an example, it can be seen that the first candidate feature vector of the first resource obtained by combining the discrete values will only contain three values: -1, 0, and 1, which greatly simplifies the complexity of the data.
[0115] Step f: Discretize the values in each second intermediate feature vector to obtain the second candidate feature vector of the second resource.
[0116] In some implementations, please refer to Figure 4 , Figure 4 The embodiments provided in this application are given Figure 2 A flowchart illustrating step f in step S130 is provided. Step f includes steps S134-S136.
[0117] S134. For each second intermediate feature vector, determine the numerical range in which each value in the second intermediate feature vector is located.
[0118] S135. Based on the correspondence between numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in the second intermediate feature vector are determined as the discrete values corresponding to the numerical values in the second intermediate feature vector.
[0119] S136. Combine the discrete values corresponding to each value in the second intermediate feature vector to obtain the second candidate feature vector of the second resource.
[0120] Steps S134-S136 are similar to steps S131-S133. Therefore, for a detailed description of steps S134-S136, please refer to the detailed description of steps S131-S133. They will not be repeated here.
[0121] S140. Determine the target candidate feature vector that matches the first candidate feature vector among the second candidate feature vectors of multiple second resources.
[0122] The target candidate feature vector refers to the second candidate feature vector that matches the first candidate feature vector. There can be one or more target candidate feature vectors.
[0123] In some implementations, please refer to Figure 5 , Figure 5 The embodiments provided in this application are given Figure 2 The flowchart of step S140 is shown below. Step S140 includes steps S141-S142:
[0124] S141. Calculate the distance between the first candidate feature vector and each of the second candidate feature vectors.
[0125] The distance between vectors can be calculated in various ways, such as Hamming distance and Euclidean distance.
[0126] S142. The second candidate feature vector whose distance from the first candidate feature vector does not exceed the distance threshold is taken as the target candidate feature vector that matches the first candidate feature vector.
[0127] For example, if the Hamming distance is used as the distance between the first candidate feature vector and each second candidate feature vector, the distance threshold can be set to 0, that is, the second candidate feature vector that is exactly the same as the first candidate feature vector is determined as the target candidate feature vector.
[0128] Similarly, the calculated distance is the Euclidean distance between the first candidate feature vector and the second candidate feature vector. If the set distance threshold is 0, the second candidate feature vector that is exactly the same as the first candidate feature vector will be determined as the target candidate feature vector.
[0129] Of course, in other embodiments, the distance threshold can be other values, which are not specifically limited here. By constraining the distance threshold, it can be ensured that the second candidate feature vector with a smaller distance from the first candidate feature vector is determined as the target candidate feature vector that matches the first candidate feature vector.
[0130] S150. Determine the object representation features of the target object relative to the first resource based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0131] The interests of an object (user) are diverse, and the same object will exhibit different interest behaviors when faced with different resources. For example, when faced with a nature documentary, the focus is more on the user's interest in the content related to nature documentaries; when faced with a historical documentary, the focus is more on the user's interest in the content related to historical documentaries. The object representation characteristics of the target object relative to the primary resource refer to the characteristics of the target object's interest representation when faced with the primary resource.
[0132] The object representation features of the target object relative to the first resource are obtained based on the second embedding vector of the second resource corresponding to the target candidate feature vector. The second resource corresponding to the target candidate feature vector is a resource similar to the first resource. Therefore, the object representation features of the target object relative to the first resource can be understood as the target object's interest representation on content related to the first resource presented in the interaction sequence of the target object. This interest representation can reflect the target object's interest in content related to the first resource. The content related to the first resource can be a resource similar to the content of the first resource, or a resource belonging to the same category or a similar category as the first resource.
[0133] For ease of understanding, let's continue with video resources as an example. If the first resource is movie A, then the object representation features of the target object for the first resource reflect the target object's interest in videos related to movie A within the time period corresponding to the interaction sequence. Obviously, the closer the object representation features of the target object for the first resource are to the first embedding vector of the first resource, the more similar the target object has watched videos to movie A during the interaction time, and the more likely the target object is to be interested in movie A. Conversely, the farther the object representation features of the target object for the first resource are from the first embedding vector of the first resource, the less similar the target object has watched videos to movie A during the interaction time, and the lower the probability that the target object is interested in movie A.
[0134] It is understandable that the second embedding vector of the second resource retains more features of the second resource compared to the second intermediate feature vector and the second candidate feature vector of the second resource. Therefore, based on the second embedding vector of the second resource, the object representation features of the target object relative to the first resource can be determined more accurately.
[0135] In some implementations, when there is only one target candidate feature vector, the second embedding vector of the second resource corresponding to the target candidate feature vector can be used as the object representation feature of the target object relative to the first resource.
[0136] In other implementations, when there are multiple target candidate feature vectors, the second embedding vectors of the second resource corresponding to the multiple target candidate feature vectors can be weighted and summed to obtain a summing result, and the summing result can be used as the object representation feature of the target object relative to the first resource; alternatively, the summing result can be normalized to obtain a normalized result, and the normalized result can be used as the object representation feature of the target object relative to the first resource.
[0137] Please see Figure 6 , Figure 6 The embodiments provided in this application are given Figure 2 The flowchart of step S150 shows that when there are multiple target candidate feature vectors, step S150 includes steps S151-S152:
[0138] S151. Add the second embedding vectors of the second resources corresponding to the multiple target candidate feature vectors to obtain the candidate representation vector.
[0139] S152. Normalize the candidate representation vectors to obtain the object representation features of the target object relative to the first resource.
[0140] Normalization maps the values of each dimension in the candidate representation vector to the range of 0-1. Normalization can be implemented in various ways, such as L1 normalization, L2 normalization, and standard deviation normalization.
[0141] The method provided in this application, after embedding the first resource identifier to obtain the first embedding vector and embedding each second resource identifier in the interaction sequence of the target object to obtain the corresponding second embedding vector, performs hash mapping on the embedding vectors (i.e., the first embedding vector and the second embedding vector) using K different hash operators, achieves dimensionality reduction of the embedding vectors and reduces the amount of data to be processed subsequently. At the same time, by performing hash mapping on the embedding vectors using multiple hash operators, the intermediate feature vectors (the first intermediate feature vector and the second intermediate feature vector) obtained by hash mapping through multiple hash operators will only collide if the hash mapping results obtained by multiple hash operators all collide. This reduces the possibility of false collisions between intermediate feature vectors after hash mapping, thereby ensuring the representation of resources by the intermediate feature vectors obtained by hash mapping, and thus ensuring the accuracy of subsequent matching.
[0142] Furthermore, if the first intermediate feature vector and the second intermediate feature vector are directly matched to determine the second embedding vector of the resource indicated by the second intermediate feature vector that matches the first intermediate feature vector, the matching accuracy is too high, which may result in too few second embedding vectors being determined. This will lead to fewer second embedding vectors used to determine the object representation features, and consequently, the target object's interest in the resource as reflected by the object representation features of the first resource will not be accurate or comprehensive enough.
[0143] This application discretizes the values in the first intermediate feature vector to obtain the first candidate feature vector, and discretizes the values in the second intermediate feature vector to obtain the second candidate feature vector. This allows similar intermediate feature vectors to obtain completely identical candidate feature vectors. Therefore, compared to matching the first and second intermediate feature vectors, under the same matching accuracy, matching based on the first and second candidate feature vectors yields a larger number of target candidate feature vectors and a larger number of corresponding second embedding vectors. This ensures the accuracy and comprehensiveness of the subsequent determination of the target object's object representation features relative to the first resource for user interest representation based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0144] Furthermore, after matching and determining the target candidate feature vector, the second embedding vector of the second resource indicated by the target candidate feature vector is used to determine the object representation feature of the target object relative to the first resource, instead of directly using the target candidate feature vector. Since the target candidate feature vector is obtained by hashing and discretizing the second embedding vector, it expresses more information than the target candidate feature vector. Using the second embedding vector of the second resource indicated by the target candidate feature vector to determine the object representation feature of the target object relative to the first resource can ensure the accuracy of the determined object representation feature. Moreover, by using the hash operator to reduce the dimensionality of the embedding vector, the amount of data processing is greatly reduced without the need for a coarse screening of the target object's interaction sequence. This achieves the goal of ensuring the accuracy of the determined object representation feature of the target object relative to the first resource in representing the target object's interest while significantly reducing the amount of data processing.
[0145] For easier understanding, please refer to Figure 7 , Figure 7 A schematic diagram of the process for determining the target candidate feature vector in this application is provided.
[0146] like Figure 7 As shown, the object side provides the interaction sequence of the target object. The interaction sequence of the target object includes N resource identifiers of the second resource, such as... Figure 7 In the s1-s2…sN, si is the resource identifier of the i-th second resource, 1≤i≤N and i is an integer.
[0147] The resource side provides the resource identifier for the first resource. Figure 7 The example provided is a resource identifier q for a first resource.
[0148] For each resource identifier of the second resource in the interaction sequence, embedding processing is performed to obtain a second embedding vector for each second resource; such as... Figure 7 In the process, embedding s1 yields e1, embedding s2 yields e2, and embedding sN yields eN. If the dimension of each second embedding vector is D, then after the embedding process, a matrix R with dimension [N, D] can be obtained.
[0149] The object side then performs hash mapping on the second embedding vector according to multiple locality-sensitive hash operators to obtain the second intermediate feature vector of each second resource. Assuming that each locality-sensitive hash operator contains D seed constants, then K locality-sensitive hash operators can form a hash seed matrix H with dimensions [D, K]. The second embedding vector is hash mapped according to the hash seed matrix H to obtain the second intermediate feature vector of each second resource, that is, R*H = M, where M is a matrix of [N, K], and each row in M is also the second intermediate feature vector of a second resource.
[0150] Clearly, through hash mapping, the D-dimensional second embedding vector of the second resource is transformed into a K-dimensional second intermediate feature vector. By reasonably setting the values of D and K, the dimensionality of the second embedding vector can be reduced from D dimensions to K dimensions. Figure 7 Taking three locality-sensitive hash operators as an example, each locality-sensitive hash operator maps the second embedding vector to the range of -1 to 1, thereby mapping the D-dimensional second embedding vector to a 3-dimensional second intermediate feature vector. After hash mapping e1, the second intermediate feature vector is obtained as (-0.5, 0.3, 0), after hash mapping e2, the second intermediate feature vector is obtained as (0, 0.4, 0.6), and after hash mapping eN, the second intermediate feature vector is obtained as (0, 0.7, 0.8).
[0151] Finally, the matrix M is discretized based on the sign function to obtain the second candidate feature vector of the second resource, such as... Figure 7 As shown, the second intermediate feature vector (-0.5, 0.3, 0) is discretized to obtain the second candidate feature vector (-1, 1, 0), the second intermediate feature vector (0, 0.4, 0.6) is discretized to obtain the second candidate feature vector (0, 1, 1), and the second intermediate feature vector (0, 0.7, 0.8) is discretized to obtain the second candidate feature vector (0, 1, 1).
[0152] Similarly, the process of processing the resource identifier of the first resource on the resource side is similar to the process of processing the resource identifier of the second resource on the object side. After processing the resource identifier q of the first resource on the resource side, the first candidate feature vector (0, 1, 1) of the first resource q is obtained.
[0153] Among multiple second candidate feature vectors of the second resource, a target candidate feature vector equal to the first candidate feature vector is determined. The second embedding vectors of the second resource corresponding to the multiple target candidate feature vectors are added together to obtain the candidate representation vector. The candidate representation vector is then subjected to L2 normalization to obtain the object representation feature of the target object relative to the first resource. That is, the object representation feature B of the target object relative to the first resource can be calculated by the following expression:
[0154]
[0155] Where i is the index of the second resource in the interaction sequence corresponding to the second candidate feature vector that is equal to the first candidate feature vector; S1 is the matrix formed by multiple second candidate feature vectors, and S2 is the matrix formed by the first candidate feature vector.
[0156] by Figure 7 For example, the second embedding vectors of the second resource corresponding to the second candidate feature vector (0, 1, 1) that are equal to the first candidate feature vector of the first resource q are e2 and eN. Add e2 and eN and perform L2 normalization to obtain the object representation feature B of the target object relative to the first resource, that is, B = ‖s2 + sN‖2.
[0157] In some implementations, please refer to Figure 8 , Figure 8 A second flowchart of the data processing method provided in this application embodiment is shown. After step S150, the data processing method further includes steps S210-S230:
[0158] S210. Obtain the resource description features of the first resource. The resource description features are obtained by extracting features from the resource description information of the first resource.
[0159] The resource description information of the first resource may include a description of the attributes of the first resource itself. Examples of resource description information include the introduction of the first resource and its resource content.
[0160] For ease of understanding, taking video resources as an example, the resource description features of video resources can include resource attribute features, such as the video category, director, actors, release date, etc.
[0161] In some implementations, based on the fact that the resource description features of the first resource include multiple features, the resource description features can be obtained by combining multiple features, or by fusing multiple features.
[0162] S220. The interaction prediction model predicts the probability that the target object will trigger an interaction operation on the first resource based on the resource description features of the first resource and the object representation features of the target object relative to the first resource.
[0163] It should be noted that the interaction prediction model is pre-trained based on the resource description features of the sample resources and the object representation features of the target object relative to the sample resources. This interaction prediction model is constructed using one or more neural networks.
[0164] Interactive operations include, for example, clicking, forwarding, and saving, as mentioned above. Of course, the interaction prediction model can differ depending on the task—specifically, the task of predicting the probability of an object triggering different interactive operations on a resource. In a specific embodiment, the object representation features of the target object relative to the first resource can serve as input to multiple interaction prediction models corresponding to different tasks.
[0165] As described above, in related technologies, taking video as an example, to construct a user's interest representation, it is necessary to first coarsely screen the video sequences in which the user triggers interactive operations, and then construct the user's interest representation based on the identifiers in the coarsely screened video sequences. However, in the case of multiple different tasks (i.e., the task of predicting the probability of a user triggering different interactive operations on a video), it is necessary to perform coarse screening for each task specifically, so as to construct the user's interest representation for the corresponding interactive operation based on the coarsely screened video sequences. In other words, the interest representation determined for a user under an interactive operation corresponding to one task is not applicable to the user's interest representation under interactive operations corresponding to other tasks. In the above embodiment, the object representation features of the determined target object relative to the first resource can be used as input to an interactive prediction model corresponding to multiple different tasks. That is, the object representation features of the target object relative to the first resource can be applied to probability prediction tasks for different interactive operations. Therefore, the solution of this application has a wide range of applications, applicable not only to single-task situations but also to multi-target situations.
[0166] In some embodiments, the contextual features and statistical backflow features corresponding to the target object can also be input into the interactive prediction model as the data basis for the interactive prediction model to perform probability prediction.
[0167] The contextual features of the target object are extracted from the descriptive information of other influence prediction results related to the target object, such as the current time and the login device used by the target object. The statistical backflow features of the target object can include statistical features related to video resources, such as the click-through rate, playback frequency, and completion rate of videos of various video categories for the target object.
[0168] S230. Based on the probability that the target object triggers an interactive operation on the first resource, determine the target resource to be pushed to the target object from among multiple first resources.
[0169] In some implementations, the first resource that is more likely to trigger an interaction operation by the target object than a probability threshold can be identified as the target resource to be pushed to the target object.
[0170] In other implementations, the number of target resources can be set, for example, X, where X is an integer greater than or equal to 1. Therefore, step S230 can also be to select the X first resources with the highest probability of the target object triggering an interaction operation on the first resource as target resources based on the probability of the target object triggering an interaction operation on the first resource.
[0171] Please see Figure 9 , Figure 9 A third flowchart of the data processing method provided in this application embodiment is shown. Before step S220, the data processing method further includes steps S310-S350:
[0172] S310. Obtain the interaction sequence of the sample object, the resource identifier of the sample resource, and the interaction tag of the sample object for the sample resource.
[0173] It is understandable that the interaction sequence of the sample object contains resource identifiers of multiple resources that trigger the interaction operation. The interaction tags of the sample object for the sample resource are used to indicate the sample object's level of interest in the sample resource.
[0174] In some implementations, typically, if an object triggers an interaction with a resource, the greater the object's interest in that resource, i.e., the higher the object's level of interest in that resource. The interaction tags of a sample object with respect to a sample resource can include tags indicating interest and tags indicating disinterest. In this case, the interaction tags of a sample object with respect to a sample resource can be used to indicate whether the sample object has triggered an interaction with the sample resource. The interaction tags of a sample object with respect to a sample resource are obtained based on the sample object's interaction records with the resource. For example, if an interaction record exists, the tag for the sample object with respect to the sample resource is determined to be a tag indicating that the sample object has triggered an interaction with the sample resource, for example, represented as 1; if no interaction record exists, the tag for the sample object with respect to the sample resource is determined to be a tag indicating that the sample object has triggered an interaction with the sample resource, for example, represented as 0.
[0175] In other implementations, the interaction tags of the sample object with respect to the sample resource are obtained based on the interaction records of the sample object with respect to the sample resource. This can be achieved by assigning different interest scores to different interaction operations, and obtaining the tags of the sample object with respect to the sample resource based on the interest scores corresponding to various interaction operations in the interaction records. For example, the maximum value among the interest scores corresponding to various interaction operations in the interaction records can be used as the tag of the sample resource. Another example is to perform a weighted summation of the interest scores corresponding to multiple interaction operations in the interaction records, and use the summation result as the tag of the sample object with respect to the sample resource.
[0176] Taking video resources as an example, the interactive operations of the sample object on the video resource can include viewing the introduction, playing, adding to favorites, and clicking "don't recommend again". Assume that the interest score corresponding to the viewing of the introduction is 0.4, the interest score corresponding to the playing is 1, the interest score corresponding to the adding to favorites is 0.8, and the interest score corresponding to clicking "don't recommend again" is 0. If the interaction record of the sample object on the sample resource determines that the sample object triggered the viewing of the introduction and playing of the sample resource, the maximum of the interest scores corresponding to the two interactive operations, i.e., the score of 1 corresponding to the playing operation, can be used as the label of the sample object on the sample resource. Alternatively, the interest scores corresponding to the viewing of the introduction and playing of the introduction can be weighted and summed to obtain the summation result (e.g., mean 0.9 = (1 + 0.8) / 2), and the summation result can be used as the label of the sample resource.
[0177] S320. Based on the interaction sequence of the sample objects and the resource identifier of the sample resources, determine the object representation characteristics of the sample objects relative to the sample resources.
[0178] In step S320, the object representation features of the sample object relative to the sample resource can be determined through steps S110-S190 provided in the aforementioned embodiments.
[0179] S330. The interaction prediction model obtains the predicted probability of the sample object triggering an interaction operation on the sample resource based on the resource description characteristics of the sample resource and the object representation characteristics of the sample object relative to the sample resource.
[0180] S340. Calculate the prediction loss based on the prediction probability corresponding to the sample resource and the label of the sample resource.
[0181] The prediction loss can be calculated using a loss function, such as the L2 loss function, cross-entropy loss function, or softmax loss function. The specific loss function can be selected according to actual needs.
[0182] S350. Update the parameters of the interactive prediction model based on the prediction loss until the training termination condition is met.
[0183] In some implementations, the termination condition may be that the prediction loss is less than a preset threshold, or that the number of iterations of the interactive prediction model is greater than a set number of iterations. In this case, updating the parameters of the interactive prediction model once based on the prediction loss is considered as one iteration of the interactive prediction model.
[0184] In some implementations, please refer to Figure 10 , Figure 10 A fourth flowchart of the data processing method provided in this application embodiment is shown. After step S150, the data processing method may further include steps S410-S420:
[0185] S410. Based on the object representation characteristics of the target object relative to multiple first resources, determine the interest representation characteristics of the target object relative to the target category; the resource category to which the multiple first resources belong is the target category.
[0186] Among them, the interest representation features of the target object relative to the target category reflect the interest representation features of the target object in the face of resources belonging to the target category.
[0187] For ease of understanding, let's take video resources as an example again. If video resources can include movies, short videos, TV series, animation, original videos, etc., and multiple first resources include action movie a, action movie b, and action movie c, then the target category of the first resources is action movie. The object representation features corresponding to action movies a, b, and c represent the target object's focus on action movies in different directions. By combining the object representation features corresponding to action movies a, b, and c, we can obtain the target object's interest representation features relative to the target category, that is, the target object's interest expression relative to the action movie genre.
[0188] It is understandable that since multiple primary resources belong to the same target category, that is, multiple primary resources are resources of the same target category, the object representation characteristics of the target object relative to multiple primary resources can, to a certain extent, represent the target object's interest representation characteristics in the target category.
[0189] For example, the target object may be weighted and summed relative to the object representation features of multiple first resources, and the summation result may be used as the interest representation feature of the target object relative to the target category.
[0190] Furthermore, in some implementations, the interest representation features of the target object relative to the target category can be determined based on the object representation features of the target object relative to T first resources; wherein, the T value can be a pre-set fixed value, or it can be determined based on the number and preset ratio of resource identifiers of the second resources in the interaction sequence of the target object; for example, the preset ratio is 40%, if the interaction sequence of the target object contains 10 resource identifiers of the second resources, then T is 4; if the interaction sequence of the target object contains 20 resource identifiers of the second resources, then T is 8.
[0191] S420. The object identifier of the target object, the category identifier of the target category, and the interest representation features of the target object relative to the target category are associated and stored in the feature set.
[0192] For each category, the process described in S410 above can be followed to obtain the interest representation features of the target object relative to each category, and these features can be stored in the feature set. Similarly, the interest representation features of other objects relative to each category can be processed in a similar manner. The data in the feature set can be used for probability prediction in subsequent interactive prediction models.
[0193] For ease of description, the object identifier of the target object, the category identifier of the target category, and the interest representation feature of the target object relative to the target category are described as a feature data. In some implementations, a storage duration can also be set in the feature set. When the feature data in the feature set reaches the storage duration, the feature data is deleted, thereby facilitating the updating of the feature data in the feature set.
[0194] In some implementations, the feature set may also include a call count. When feature data in the feature set is called, the call count for that feature data is reduced. When the call count for a feature data item decreases to a preset value, such as 0, that feature data item is deleted. This avoids recommending the same resource to objects too many times in the future. It is understood that the feature data in the feature set can also be updated based on newly added resources, or new feature data can be added to the feature set.
[0195] In some implementations, please refer to Figure 11 , Figure 11 A fifth flowchart of the data processing method provided in this application embodiment is shown. The data processing method may further include steps S430-S460:
[0196] S430. For each candidate resource in the candidate resource set, determine the reference resource category to which the candidate resource belongs.
[0197] The reference resource category refers to the resource category to which the candidate resource belongs. In some implementations, the reference resource category to which the candidate resource belongs can be determined by looking up a category mapping table; wherein, the category mapping table contains the resource identifier of the candidate resource and the reference resource category corresponding to the resource identifier.
[0198] S440. Based on the category identifier of the reference resource category and the object identifier of the target object, obtain the interest representation features of the target object relative to the reference resource category from the feature set.
[0199] S450. The interaction prediction model predicts the probability that the target object will trigger an interaction operation on each candidate resource based on the resource description features of each candidate resource and the interest representation features of the target object relative to the reference resource category.
[0200] S460. Based on the predicted probability that the target object will trigger interactive operations on each candidate resource, determine the target resource to be pushed to the target object from the candidate resource set.
[0201] The process of steps S450-S460 is similar to that of steps S220-S230 in the previous embodiment. For a detailed description of steps S450-S460, please refer to the description of steps S220-S230 in the previous embodiment, which will not be repeated here.
[0202] When it is necessary to determine the target resource from multiple first resources, the interest representation features of the target object relative to the target category can be retrieved from the feature set based on the object identifier of the target object and the category identifier of the target category to which the first resource belongs. The interest representation features of the target object relative to the target category are used as the object representation features of the target object relative to the first resource. Thus, based on the interest representation features of the target object relative to the target category, it is not necessary to determine the object representation features of the target object relative to each first resource based on the interaction sequence of the target object and the first resource identifier of the first resource. This greatly reduces the processing load, improves the recommendation efficiency of the target resource, and ensures that the target resource determined for the target object is the resource with a high degree of interest to the target object.
[0203] In other embodiments, the data processing method provided in this application can be triggered in response to a target request from a target object; therefore, the push method of the target resource can be determined based on the frequency of the target object's target request; when the target object triggers a target request for the first time or the frequency of triggering the target request is lower than a preset threshold, for each first resource, the object representation characteristics of the target object relative to the first resource can be determined, and then the interaction prediction model can predict the probability of the target object triggering an interaction operation on the first resource based on the resource description characteristics of the first resource and the object representation characteristics of the target object relative to the first resource; based on the probability of the target object triggering an interaction operation on the first resource, in multiple first... The target resource to be pushed to the target object is determined from the resource set. When the frequency of the target object triggering the target request is not lower than a preset threshold, since the target resource has already been pushed, the feature set already stores the object identifier of the target object, the category identifier of the target category, and the interest representation features of the target object relative to the target category. Therefore, the interaction prediction model can predict the probability of the target object triggering an interaction operation on each candidate resource based on the resource description features of each candidate resource and the interest representation features of the target object relative to the reference resource category. Based on the predicted probability of the target object triggering an interaction operation on each candidate resource, the target resource to be pushed to the target object is determined from the candidate resource set.
[0204] For ease of understanding, let's take requesting video resources as an example. When a target user logs into the video application page for the first time, the target video resource to be pushed can be determined by the resource description features of the video resource and the object representation features of the target user relative to the video resource. When the target user frequently refreshes the video application page, the target video resource to be pushed can be determined by the resource description features of the video resource and the interest representation features of the target user relative to the reference video resource category. This improves the recommendation efficiency of the target resource and meets the real-time response requirements of page refresh.
[0205] In some implementations, please refer to Figure 12 , Figure 12 A schematic diagram of a data processing apparatus provided in an embodiment of this application is given. The data processing apparatus 500 includes:
[0206] The embedding module 510 is used to embed the first resource identifier of the first resource and the second resource identifier in the interaction sequence of the target object respectively, to obtain the first embedding vector of the first resource and the second embedding vector of each second resource; the interaction sequence of the target object contains the second resource identifiers of multiple second resources that trigger the interaction operation of the target object.
[0207] The hash mapping module 520 is used to perform hash mapping on the first embedding vector and the second embedding vector respectively using K different hash operators to obtain the first intermediate feature vector of the first resource and the second intermediate feature vector of each second resource; K is an integer greater than 1.
[0208] The discrete processing module 530 is used to discretize the values in the first intermediate feature vector and the values in the second intermediate feature vector respectively, to obtain the first candidate feature vector of the first resource and the second candidate feature vector of each second resource.
[0209] The matching module 540 is used to determine a target candidate feature vector that matches the first candidate feature vector among the second candidate feature vectors of multiple second resources.
[0210] The output module 550 is used to determine the object representation features of the target object relative to the first resource based on the second embedding vector of the second resource corresponding to the target candidate feature vector.
[0211] In some implementations, the hash mapping module 530 is further configured to initialize the seed constants of K different hash operators to obtain a hash seed matrix; perform hash mapping on the first embedding vector according to the hash seed matrix to obtain a first intermediate feature vector of the first resource; and perform hash mapping on the second embedding vector according to the hash seed matrix to obtain a second intermediate feature vector of each second resource.
[0212] In some implementations, there are multiple target candidate feature vectors, and the output module 560 is further used to add the second embedding vectors of the second resource corresponding to the multiple target candidate feature vectors to obtain candidate representation vectors; and to normalize the candidate representation vectors to obtain the object representation features of the target object relative to the first resource.
[0213] In some implementations, the matching module 540 is further configured to calculate the distance between the first candidate feature vector and each of the second candidate feature vectors; and to use the second candidate feature vector whose distance from the first candidate feature vector does not exceed a distance threshold as the target candidate feature vector that matches the first candidate feature vector.
[0214] In some implementations, the discrete processing module 530 is used to determine the numerical interval in which each value in the first intermediate feature vector lies; based on the correspondence between numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in which each value in the first intermediate feature vector lies are determined as the discrete values corresponding to each value in the first intermediate feature vector; the discrete values corresponding to each value in the first intermediate feature vector are combined to obtain a first candidate feature vector of the first resource; and for each second intermediate feature vector, the module determines the numerical interval in which each value in the second intermediate feature vector lies; based on the correspondence between numerical intervals and discrete values, the discrete values corresponding to the numerical intervals in which each value in the second intermediate feature vector lies are determined as the discrete values corresponding to each value in the second intermediate feature vector; the discrete values corresponding to each value in the second intermediate feature vector are combined to obtain a second candidate feature vector of the second resource.
[0215] In some embodiments, the data processing device 500 further includes a filtering module, which is used to obtain resource description features of the first resource, the resource description features being obtained by feature extraction of the resource description information of the first resource; the interaction prediction model predicts the probability of the target object triggering an interaction operation on the first resource based on the resource description features of the first resource and the object representation features of the target object relative to the first resource; and determines the target resource to be pushed to the target object from among multiple first resources based on the probability of the target object triggering an interaction operation on the first resource.
[0216] In some embodiments, the data processing apparatus 500 further includes a training module, which is used to acquire the interaction sequence of sample objects, the resource identifier of sample resources, and the interaction label of sample objects on sample resources; determine the object representation features of sample objects relative to sample resources based on the interaction sequence of sample objects and sample resources; obtain the predicted probability of sample objects triggering interaction operations on sample resources by the interaction prediction model according to the resource description features of sample resources and the object representation features of sample objects relative to sample resources; calculate the prediction loss based on the prediction probability corresponding to the sample resources and the interaction label of sample objects on sample resources; and update the parameters of the interaction prediction model according to the prediction loss until the training termination condition is met.
[0217] In some implementations, the filtering module is further configured to identify, among multiple first resources, the first resource to which the probability of the target object triggering an interactive operation is greater than a probability threshold as the target resource to be pushed to the target object.
[0218] In some embodiments, the data processing apparatus further includes a storage module, which is used to determine the interest representation features of the target object relative to a target category based on the object representation features of the target object relative to a plurality of first resources; the resource category to which the plurality of first resources belong is the target category; and to associate and store the object identifier of the target object, the category identifier of the target category, and the interest representation features of the target object relative to the target category in a feature set.
[0219] In some implementations, the filtering module is further configured to: determine the reference resource category to which each candidate resource belongs for each candidate resource in the candidate resource set; obtain the interest representation features of the target object relative to the reference resource category from the feature set based on the category identifier of the reference resource category and the object identifier of the target object; predict the probability of the target object triggering an interaction operation on each candidate resource by the interaction prediction model based on the resource description features of each candidate resource and the interest representation features of the target object relative to the reference resource category; and determine the target resource to be pushed to the target object from the candidate resource set based on the predicted probability of the target object triggering an interaction operation on each candidate resource.
[0220] Please see Figure 13 , Figure 13 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 13 The computer system 1300 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application. The electronic device can be used to perform the data processing methods described above.
[0221] like Figure 13 As shown, the computer system 1300 includes a Central Processing Unit (CPU).
[0222] CPU 1301 can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in read-only memory (ROM) 1302 or a program loaded from storage section 1308 into random access memory (RAM) 1303. RAM 1303 also stores various programs and data required for system operation. CPU 1301, ROM 1302, and RAM 1303 are interconnected via bus 1304. Input / output (I / O) interface 1305 is also connected to bus 1304.
[0223] The following components are connected to I / O interface 1305: an input section 1306 including a keyboard, mouse, microphone, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to I / O interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1310 as needed so that computer programs read from them can be installed into storage section 1308 as needed.
[0224] In particular, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising computer instructions. When these computer instructions are executed by the central processing unit (CPU) 1301, various functions defined in the system of this application are performed.
[0225] This application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the methods described in any of the above method embodiments.
[0226] It should be noted that the computer-readable storage medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0227] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal. It can be implemented wholly or partially using software, hardware (e.g., processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that functions as a whole.
[0228] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A data processing method, characterized by, The method comprises: respectively embedding a first resource identifier of a first resource and a second resource identifier in an interaction sequence of a target object to obtain a first embedding vector of the first resource and a second embedding vector of each second resource; the interaction sequence of the target object comprises second resource identifiers of a plurality of second resources triggered by the target object to interact; hash mapping the first embedding vector and the second embedding vector through K different hash operators to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource, K being an integer greater than 1; respectively discretizing values in the first intermediate feature vector and values in each second intermediate feature vector to obtain a first candidate feature vector of the first resource and a second candidate feature vector of each second resource; determining a target candidate feature vector matching the first candidate feature vector from the second candidate feature vectors of the plurality of second resources; determining an object representation feature of the target object with respect to the first resource according to the second embedding vector of the second resource corresponding to the target candidate feature vector.
2. The method of claim 1, wherein, Before the hash mapping the first embedding vector and the second embedding vector through K different hash operators to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource, the method further comprises: initializing seed constants of the K different hash operators to obtain a hash seed matrix; the hash mapping the first embedding vector and the second embedding vector through K different hash operators to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource comprises: hash mapping the first embedding vector according to the hash seed matrix to obtain the first intermediate feature vector of the first resource; hash mapping the second embedding vector according to the hash seed matrix to obtain the second intermediate feature vector of each second resource.
3. The method of claim 1, wherein, The target candidate feature vector is multiple; the determining an object representation feature of the target object with respect to the first resource according to the second embedding vector of the second resource corresponding to the target candidate feature vector comprises: adding the second embedding vectors of the second resources corresponding to the multiple target candidate feature vectors to obtain a candidate representation vector; normalizing the candidate representation vector to obtain the object representation feature of the target object with respect to the first resource.
4. The method of claim 1, wherein, The determining a target candidate feature vector matching the first candidate feature vector from the second candidate feature vectors of the plurality of second resources comprises: calculating distances between the first candidate feature vector and each second candidate feature vector; taking a second candidate feature vector having a distance not exceeding a distance threshold with the first candidate feature vector as the target candidate feature vector matching the first candidate feature vector.
5. The method of claim 1, wherein, The discrete processing is performed on the values in the first intermediate feature vector and the values in each of the second intermediate feature vectors respectively, to obtain a first candidate feature vector of the first resource and a second candidate feature vector of each of the second resources, including: determining the value interval in which each value in the first intermediate feature vector is located; determining, based on the correspondence between the value interval and the discrete value, the discrete value corresponding to the value interval in which each value in the first intermediate feature vector is located, as the discrete value corresponding to each value in the first intermediate feature vector; combining the discrete values corresponding to the values in the first intermediate feature vector to obtain the first candidate feature vector of the first resource; for each of the second intermediate feature vectors, determining the value interval in which each value in the second intermediate feature vector is located; determining, based on the correspondence between the value interval and the discrete value, the discrete value corresponding to the value interval in which each value in the second intermediate feature vector is located, as the discrete value corresponding to each value in the second intermediate feature vector; combining the discrete values corresponding to the values in the second intermediate feature vector to obtain the second candidate feature vector of the second resource.
6. The method according to any one of claims 1 to 5, characterized in that, After determining the object representation feature of the target object relative to the first resource according to the second embedding vector of the second resource corresponding to the target candidate feature vector, the method further includes: obtaining a resource description feature of the first resource, the resource description feature being obtained by performing feature extraction on resource description information of the first resource; predicting, by an interaction prediction model, a probability that the target object triggers an interactive operation on the first resource according to the resource description feature of the first resource and the object representation feature of the target object relative to the first resource; determining a target resource to be pushed to the target object from a plurality of first resources according to the probability that the target object triggers an interactive operation on the first resource.
7. The method of claim 6, wherein, Before predicting, by an interaction prediction model, a probability that the target object triggers an interactive operation on the first resource according to the resource description feature of the first resource and the object representation feature of the target object relative to the first resource, the method further includes: obtaining an interaction sequence of a sample object, a resource identifier of a sample resource, and an interaction label of the sample object for the sample resource; determining an object representation feature of the sample object relative to the sample resource based on the interaction sequence of the sample object and the resource identifier of the sample resource; obtaining, by an interaction prediction model, a prediction probability that the sample object triggers an interactive operation on the sample resource according to the resource description feature of the sample resource and the object representation feature of the sample object relative to the sample resource; calculating a prediction loss based on the prediction probability corresponding to the sample resource and the interaction label of the sample object for the sample resource; updating parameters of the interaction prediction model according to the prediction loss until a training end condition is reached.
8. The method of claim 6, wherein, The determining of the target resource to be pushed to the target object from a plurality of first resources according to the probability that the target object triggers an interactive operation on the first resource includes: In the plurality of first resources, a first resource in which a probability that the target object triggers an interactive operation on the first resource is greater than a probability threshold is determined as a target resource to be pushed to the target object.
9. The method according to any one of claims 1 to 5, characterized in that, After the object representation feature of the target object with respect to the first resource is determined according to the second embedding vector of the second resource corresponding to the target candidate feature vector, the method further comprises: According to the object representation feature of the target object with respect to the plurality of first resources, an interest representation feature of the target object with respect to a target category is determined; the resource category to which the plurality of first resources belong is the target category; The object identifier of the target object, the category identifier of the target category, and the interest representation feature of the target object with respect to the target category are stored in the feature set.
10. The method of claim 9, wherein, The method further comprises: For each candidate resource in the candidate resource set, a reference resource category to which the candidate resource belongs is determined; Based on the category identifier of the reference resource category and the object identifier of the target object, the interest representation feature of the target object with respect to the reference resource category is obtained from the feature set; According to the resource description feature of each candidate resource and the interest representation feature of the target object with respect to the reference resource category, an interaction prediction model predicts a prediction probability that the target object triggers an interactive operation on each candidate resource; According to the prediction probability that the target object triggers an interactive operation on each candidate resource, a target resource to be pushed to the target object is determined in the candidate resource set.
11. A data processing apparatus, characterized by Comprise: An embedding module is configured to embed a first resource identifier of a first resource and a second resource identifier in an interaction sequence of a target object to obtain a first embedding vector of the first resource and a second embedding vector of each second resource; the interaction sequence of the target object includes second resource identifiers of a plurality of second resources on which the target object triggers an interactive operation; A hash mapping module is configured to hash map the first embedding vector and the second embedding vector by K different hash operators to obtain a first intermediate feature vector of the first resource and a second intermediate feature vector of each second resource; K is an integer greater than 1; A discrete processing module is configured to discretize values in the first intermediate feature vector and values in the second intermediate feature vector to obtain a first candidate feature vector of the first resource and a second candidate feature vector of each second resource; A matching module is configured to determine a target candidate feature vector that matches the first candidate feature vector from the second candidate feature vectors of the plurality of second resources; An output module is configured to determine an object representation feature of the target object with respect to the first resource according to a second embedding vector of a second resource corresponding to the target candidate feature vector.
12. An electronic device, comprising: Comprise: A processor; A memory having computer instructions stored thereon, wherein the computer instructions are executed by the processor to implement the method of any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are executed by the processor to implement the method in any one of claims 1-10.
14. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the method in any one of claims 1-10.