Data processing method and device, storage medium and computer device
Patent Information
- Application Number
- CN202310937282.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-07-27
AI Technical Summary
[0003]常规的召回方案中,通过内容的向量来进行内容召回,但是常规的内容向量生成方案存在生成的内容向量的表达能力差的问题
[0017] The technical solution provided in this application embodiment obtains a content behavior sequence of a reference user and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. Multiple attribute browsing sequences are generated based on the content behavior sequence and attribute values. A word vector model is trained based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values across multiple attribute dimensions. A second vector of the content to be processed is calculated based on the first vector of target attribute values across multiple dimensions. The solution in this application embodiment comprehensively considers the attributes of content across multiple attribute dimensions to determine the content vector, thereby improving the expressive power of the content vector.
Smart Images

Figure CN117725298B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a data processing method, apparatus, storage medium, and computer equipment. Background Technology
[0002] In content distribution scenarios on content platforms, recommendation systems are used to filter and display suitable content to users. Common recommendation systems generally include two phases: a recall phase and a ranking phase. The recall phase primarily involves obtaining a small candidate set that the user might be interested in from the entire product database.
[0003] Conventional content recall schemes use content vectors for content recall, but conventional content vector generation schemes suffer from poor expressive power in the generated content vectors. Summary of the Invention
[0004] This application provides a data processing method, apparatus, storage medium, and computer device that can improve the expressive power of content vectors.
[0005] This application provides a data processing method, including:
[0006] Obtain the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions;
[0007] Based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions, multiple attribute browsing sequences are generated.
[0008] Train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions;
[0009] The second vector of the content to be processed is calculated based on the first vector of the multiple target attribute values of the content to be processed across the multiple attribute dimensions.
[0010] Accordingly, embodiments of this application also provide a data processing apparatus, including:
[0011] The acquisition module is used to acquire the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions;
[0012] The generation module is used to generate multiple attribute browsing sequences based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions.
[0013] The mapping module is used to train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions;
[0014] The calculation module is used to calculate the second vector of the content to be processed based on the first vector of multiple target attribute values of the content to be processed across the multiple attribute dimensions.
[0015] Furthermore, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when run on a computer, causes the computer to perform a data processing method as provided in any embodiment of this application.
[0016] Furthermore, embodiments of this application also provide a computer device, including a processor and a memory, wherein the memory has a computer program, and the processor executes a data processing method as provided in any embodiment of this application by calling the computer program.
[0017] The technical solution provided in this application embodiment obtains a content behavior sequence of a reference user and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. Multiple attribute browsing sequences are generated based on the content behavior sequence and attribute values. A word vector model is trained based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values across multiple attribute dimensions. A second vector of the content to be processed is calculated based on the first vector of target attribute values across multiple dimensions. The solution in this application embodiment comprehensively considers the attributes of content across multiple attribute dimensions to determine the content vector, thereby improving the expressive power of the content vector. Attached Figure Description
[0018] 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.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of the data processing method provided in the embodiments of this application.
[0020] Figure 2 This is a schematic flowchart of a data processing method provided in an embodiment of this application.
[0021] Figure 3 This is a schematic diagram of a graph network in an embodiment of this application.
[0022] Figure 4 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application.
[0023] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.
[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0026] This application provides a data processing method, apparatus, computer device, and computer-readable storage medium. The data processing apparatus can be integrated into the computer device, which may be a server or a terminal, etc.
[0027] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can include tablets, laptops, and personal computers (PCs), but is not limited to these. The terminal and server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.
[0028] For example, see Figure 1Taking the data processing method provided in this application embodiment integrated into a computer device as an example, the computer device acquires a content behavior sequence of a reference user, and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. Multiple attribute browsing sequences are generated based on the content behavior sequence and attribute values. A word vector model is trained based on the attribute browsing sequences of the multiple reference users to obtain a first vector of attribute values across multiple attribute dimensions. A second vector of the content to be processed is calculated based on the first vector of target attribute values across multiple dimensions. The solution in this application embodiment comprehensively considers the attributes of the content across multiple attribute dimensions to determine the content vector, thereby improving the expressive power of the content vector.
[0029] The following is a detailed description. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0030] This application embodiment will describe the specific process of the data processing method from the perspective of a computer device.
[0031] Please see Figure 2 , Figure 2 This is a schematic flowchart of a data processing method provided in an embodiment of this application. The specific flow of the data processing method provided in this embodiment of the application can be as follows:
[0032] 101. Obtain the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions.
[0033] The solution proposed in this application can be applied to the recall phase of a recommendation system, and can be applied to various scenarios that require the use of a recommendation system for content recommendation. For example, homepage recommendations on a content platform.
[0034] Content platforms can receive and display multimedia content posted by users, and users can also search for content that interests them on the platform. Content formats include, but are not limited to, text, images, and videos.
[0035] Reference users can be a subset of users selected from all users on the content platform, or all users on the content platform.
[0036] This involves referencing users' browsing behavior on content platforms to generate browsing records. These browsing records can be used to create a content behavior sequence based on the chronological order of their occurrence. Browsing behaviors include, but are not limited to: clicking and viewing, commenting, liking, forwarding, and saving.
[0037] Content published on a content platform has attribute values across multiple attribute dimensions. For example, in one embodiment, these multiple attribute dimensions include content ID, author ID, content category, keywords, etc. In some embodiments, the content category may further include primary category, secondary category, etc. For example, if user A clicks to view a piece of content whose primary category is sports and its secondary category is football, then the attribute value of this content in the primary category attribute dimension is "sports," and the attribute value in the secondary category attribute dimension is "football."
[0038] For each reference user, the computer device acquires the user's browsing history within a preset time interval, generates a content behavior sequence based on the browsing history, and for each historical content in the content behavior sequence, acquires the attribute values of that historical content across various attribute dimensions. For example, using days as the time unit, the device acquires the reference user's content behavior sequence for the past day. Assuming the number of reference users is M, then M content behavior sequences are obtained.
[0039] 102. Generate multiple attribute browsing sequences based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions.
[0040] Assuming there are N attribute dimensions, for each content behavior sequence, based on the attribute values of each historical content in the content behavior sequence across the N attribute dimensions, we can obtain the attribute browsing sequence corresponding to each attribute dimension, thus resulting in N attribute browsing sequences. For example, the attribute browsing sequence generated for the content category attribute dimension of a certain content behavior sequence is "Sports, Entertainment, Health, Health, Food, Food...Film and Television". The attribute sequence generated for the author ID attribute dimension is "anthor1, author10, anthor2, anthor2, anthor4...author18".
[0041] 103. Train a word vector model based on the attribute browsing sequences of multiple reference users to obtain the first vector of attribute values in multiple attribute dimensions.
[0042] Assuming there are M reference users, there are corresponding M content behavior sequences. Following the method described above, we can obtain M×N attribute browsing sequences. Using these attribute browsing sequences, we train a word vector model to obtain the vector of each attribute value in the attribute browsing sequence, denoted as the first vector.
[0043] In some embodiments, these M×N attribute browsing sequences can be directly used as sample sequences to train the word vector model. Alternatively, in other embodiments, the step of training the word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for multiple attribute dimensions may include: generating a graph network corresponding to the attribute dimensions based on the attribute browsing sequences of multiple reference users; performing sampling processing on the graph network to obtain multiple sample attribute sequences, wherein the length of the sample attribute sequences is less than the length of the attribute browsing sequences; and training the word vector model based on the multiple sample attribute sequences to obtain a first vector of attribute values for multiple attribute dimensions.
[0044] In this embodiment, for each attribute dimension, a corresponding graph network is constructed based on the attribute browsing sequences of multiple reference users for that attribute dimension. Assuming there are M attribute dimensions and N reference users, each attribute dimension has N attribute browsing sequences. These N attribute browsing sequences are then used to construct a graph network. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of a graph network in an embodiment of this application. The diagram shows a graph network with content ID as the attribute dimension, where item1, etc., are all content IDs.
[0045] After generating the graph network, a random walk algorithm can be used to sample the graph network, obtaining multiple sample attribute sequences. For each graph network, A sequences of length B are sampled, where the value of B can be preset as needed. Assuming there are N reference users, N×A sample attribute sequences can be obtained. For each attribute dimension, a word vector model, such as the word2vec model, is trained using its corresponding N×A sample attribute sequences to generate vectors for individual elements of the attribute sequence, thus obtaining the first vector corresponding to each attribute value in that attribute dimension.
[0046] In one embodiment, the graph network is a weighted undirected graph. The step of generating a graph network corresponding to an attribute dimension based on the attribute browsing sequences of multiple reference users may include: aggregating the attribute browsing sequences of multiple reference users, creating an undirected graph corresponding to the attribute dimension, and recording the number of times an adjacency relationship occurs between two adjacent attribute nodes in the undirected graph during the creation of the undirected graph; determining the weight value of each edge in the undirected graph based on the number of times an adjacency relationship occurs between two adjacent attribute nodes, thereby obtaining a weighted undirected graph corresponding to the attribute dimension, wherein the higher the number of times an adjacency relationship occurs between two adjacent attribute nodes, the higher the weight value of the edge between the two adjacent attribute nodes.
[0047] In this embodiment, the computer device aggregates attribute browsing sequences from multiple reference users to create a weighted undirected graph corresponding to the attribute dimensions. During the generation of the weighted undirected graph, a connection can be established as long as there is at least one common node among the attribute browsing sequences. During the creation of the weighted undirected graph, the number of times adjacent attribute nodes appear in the graph is recorded. The weight value of the edge between the two adjacent attribute nodes is determined based on this number of occurrences, thus obtaining the weight value of each edge in the weighted undirected graph. The more times two attribute nodes appear adjacent, the higher the weight value of the edge between them.
[0048] After obtaining the weighted undirected graph, the computer device can sample the sequence of samples on the weighted undirected graph according to the random walk algorithm to obtain A sequences of length B.
[0049] 104. Calculate the second vector of the content to be processed based on the first vector of the target attribute values of the content across multiple attribute dimensions.
[0050] The content to be processed can be any content published on the content platform. For example, in one embodiment, the computer device constructs a content library from all the content on the content platform, and each piece of content in the content library can be used as the content to be processed. The second vector of the content to be processed is calculated in the manner described below.
[0051] After obtaining the first vector of each attribute value across all attribute dimensions, for any content, as long as the target attribute values of that content across one or more attribute dimensions can be obtained, the corresponding vector for that content can be generated based on the first vector of each target attribute value. Here, to distinguish the attribute vectors, the content vector is denoted as the second vector.
[0052] For example, for each piece of content to be processed, obtain the target attribute values of the content to be processed in multiple attribute dimensions to obtain multiple target attribute values, obtain the first vector corresponding to each of the multiple target attribute values, and calculate the average of the multiple first vectors to obtain the second vector of the content to be processed.
[0053] For example, in another embodiment, the step of calculating the second vector of the content to be processed based on a first vector of multiple target attribute values across multiple attribute dimensions may include: for each target attribute value of the content to be processed, determining similar attribute values from the attribute dimension corresponding to the target attribute value based on the first vector of the target attribute value; obtaining a third vector of the similar attribute values; determining a fourth vector of the target attribute values based on the first vector of the target attribute values and the third vector of the similar attribute values; and calculating the second vector of the content to be processed based on the fourth vectors of the multiple target attribute values.
[0054] In this embodiment, for each target attribute value of the content to be processed, similar attributes are searched from other attribute values of the same attribute dimension based on the first vector of the target attribute value. The final vector of the target attribute value is generated by combining the vector of the target attribute value itself and the vector of the similar attributes.
[0055] For example, the correlation between target attribute values and the content to be processed is obtained, and the target number of similar attribute values is determined based on the correlation. The target number is negatively correlated with the correlation. Based on the first vector of the target attribute values, the target number of similar attribute values is determined from the attribute dimension corresponding to the target attribute values. The computer device obtains the correlation between the target attribute values and the content to be processed, and determines the target number of similar attribute values to be obtained based on this correlation. A preset range for the target attribute can be set, for example, a lower limit of 1 and an upper limit of 5 for the target number. The higher the correlation, the fewer similar attribute values need to be obtained, but at least one. The lower the correlation, the more similar attribute values need to be obtained, but at most five.
[0056] After determining the target quantity, similarity attribute values are determined from the attribute dimension corresponding to the target attribute value. For example, a similar vector search is performed based on a vector similarity search library to find the target quantity of similar vectors with the highest similarity to the first vector of the target attribute value. The attribute values corresponding to these similar vectors are then the similarity attribute values of the target attribute value.
[0057] After determining the similarity values of the target attribute value, obtain the third vector of the similar attribute values. Based on the first vector of the target attribute value and the third vector of the similar attribute values, calculate the fourth vector of the target attribute value. For example, calculate the average of the first vector of the target attribute value and the third vector of the similar attribute values as the fourth vector.
[0058] For the content to be processed, after obtaining the vectors of attribute values in each attribute dimension, these multiple vectors are merged to obtain the second vector of the content to be processed. For example, in one embodiment, the average of the vectors of attribute values in each attribute dimension of the content to be processed is calculated to obtain the second vector of the content to be processed.
[0059] In one embodiment, the step of determining the fourth vector of the target attribute value based on the first vector of the target attribute value and the third vector of the similar attribute values may include: determining the first weight value corresponding to the target attribute value and the second weight value of the similar attribute value based on the correlation, wherein the first weight value is positively correlated with the correlation; and performing a weighted average calculation based on the first vector and the first weight value of the target attribute value, the third vector and the second weight value of the similar attribute values to obtain the fourth vector of the target attribute value.
[0060] In this embodiment, the computer device acquires the correlation between the target attribute value and the content to be processed, and determines a first weight value corresponding to the target attribute value and a second weight value corresponding to the similar attribute value based on the correlation. Specifically, the higher the correlation between the target attribute value and the content to be processed, the higher the first weight value corresponding to the target attribute value, and the lower the second weight value corresponding to the similar attribute value. After determining the first and second weight values, a weighted average is calculated based on the first vector and first weight value of the target attribute value, and the third vector and second weight value of the similar attribute values to obtain a fourth vector of the target attribute value.
[0061] In another embodiment, for multiple target attribute values of the content to be processed, the first vector of the content ID remains unchanged. For attribute dimensions other than the content ID, a fourth vector of the target attribute value is determined by identifying similar attribute values and fusing the vectors of similar attribute values and the target attribute value. Finally, a second vector of the content to be processed is calculated based on the first vector of the content ID and the fourth vectors of the other attribute dimensions. For example, the second vector of the content to be processed can be calculated by averaging or by weighted averaging.
[0062] Following the method provided in the above embodiments, a vector representation of content published on the content platform can be obtained. In some embodiments, the computer device can also periodically calculate the content vectors. For example, the content platform can collect all users' historical browsing data from the previous 24 hours at a fixed time each day, and calculate the second vector of each piece of content in the content library according to the method described in this application.
[0063] In some embodiments, after calculating a second vector of the content to be processed based on a first vector of multiple target attribute values across multiple attribute dimensions, the method further includes: determining a first preset number of similar contents for each content to be processed based on the second vector of each content to be processed in the content library.
[0064] After obtaining the second vector for each piece of content to be processed in the content library, a similarity vector search can be performed based on the corresponding second vector using a vector similarity search library to obtain multiple similar contents most similar to the content to be processed. For example, if the first preset number is 50, the 50 most similar contents for each piece of content to be processed are found. When a content recall request is received, in response to the content recall request, the target user corresponding to the content recall request is determined; the second preset number of pieces of content to be processed recently viewed by the target user are obtained as the target content; and the similar contents of the target content are determined as the recall result of the content recall request. For example, if the second preset number is 10 and the first preset number is 50, then the 10 pieces of content recently viewed by the target user are obtained, and for each of these 10 pieces of content, 50 similar contents are obtained, resulting in 500 pieces of content, which are used as the recall result of the content recall request.
[0065] As can be seen from the above, the solution in this application integrates multiple dimensions of the content's attributes to determine the content's vector, greatly enhancing the expressiveness and generalization ability of the generated material vector, thereby improving the accuracy of subsequent content recommendations and increasing user click-through rates for recommended content. Furthermore, for content that has not been viewed by others after publication, its vector can also be calculated using attribute vectors, potentially serving as a recall result and solving the problem of cold-start materials being difficult to expose.
[0066] In practice, this application is not limited by the execution order of the described steps. Without causing conflicts, some steps may be performed in other orders or simultaneously.
[0067] As can be seen from the above, the data processing method provided in this application embodiment obtains a content behavior sequence of a reference user, and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. It then generates multiple attribute browsing sequences based on the content behavior sequence and attribute values, trains a word vector model based on the attribute browsing sequences of multiple reference users, obtains a first vector of attribute values across multiple attribute dimensions, and calculates a second vector of the content to be processed based on the first vector of target attribute values across multiple dimensions. The solution in this application embodiment comprehensively considers the attributes of content across multiple attribute dimensions to determine the content vector, thereby improving the expressive power of the content vector.
[0068] To better implement the above methods, embodiments of this application also provide a data processing apparatus. This data processing apparatus can be integrated into a computer device, such as a server or terminal, which may include a tablet computer, laptop computer, and / or personal computer.
[0069] like Figure 4 As shown, the data processing apparatus may include:
[0070] The acquisition module 301 is used to acquire the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions;
[0071] The generation module 302 is used to generate multiple attribute browsing sequences based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence on multiple attribute dimensions.
[0072] The mapping module 303 is used to train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions.
[0073] The calculation module 304 is used to calculate the second vector of the content to be processed based on the first vector of the multiple target attribute values of the content to be processed across the multiple attribute dimensions.
[0074] In some embodiments, the mapping module 303 is configured to: generate a graph network corresponding to the attribute dimension based on the attribute browsing sequences of multiple reference users; perform sampling processing on the graph network to obtain multiple sample attribute sequences, wherein the length of the sample attribute sequences is less than the length of the attribute browsing sequences; and train a word vector model based on the multiple sample attribute sequences to obtain a first vector of attribute values for the multiple attribute dimensions.
[0075] In some embodiments, the mapping module 303 is configured to: for each target attribute value of the content to be processed, determine similar attribute values of the target attribute value from the attribute dimension corresponding to the target attribute value based on a first vector of the target attribute value; obtain a third vector of the similar attribute values; determine a fourth vector of the target attribute value based on the first vector of the target attribute value and the third vector of the similar attribute values; and calculate a second vector of the content to be processed based on the fourth vectors of the plurality of target attribute values.
[0076] In some embodiments, the mapping module 303 is configured to: obtain the correlation degree between the target attribute value and the content to be processed, and determine the target number of similar attribute values based on the correlation degree, wherein the target number is negatively correlated with the correlation degree; and determine the target number of similar attribute values from the attribute dimension corresponding to the target attribute value based on the first vector of the target attribute value.
[0077] In some embodiments, the mapping module 303 is configured to: determine a first weight value corresponding to the target attribute value and a second weight value of the similar attribute value based on the correlation degree, wherein the first weight value is positively correlated with the correlation degree; and perform a weighted average calculation based on the first vector of the target attribute value, the first weight value, the third vector of the similar attribute value, and the second weight value to obtain a fourth vector of the target attribute value.
[0078] In some embodiments, the generation module 302 is configured to: aggregate attribute browsing sequences of multiple reference users, create an undirected graph corresponding to the attribute dimension, and record the number of times an adjacency relationship occurs between two adjacent attribute nodes in the undirected graph during the creation of the undirected graph; determine the weight value of each edge in the undirected graph based on the number of times an adjacency relationship occurs between two adjacent attribute nodes, and obtain a weighted undirected graph corresponding to the attribute dimension, wherein the higher the number of times an adjacency relationship occurs between two adjacent attribute nodes, the higher the weight value of the edge between the two adjacent attribute nodes.
[0079] In some embodiments, the data processing apparatus further includes a recall module, which is configured to: determine a first preset number of similar contents for each of the contents to be processed based on the second vector of each of the contents to be processed in the content library.
[0080] In some embodiments, the recall module is further configured to: in response to a content recall request, determine the target user corresponding to the content recall request; obtain a second preset number of pending content items recently viewed by the target user as target content; and determine similar content items of the target content as the recall result of the content recall request.
[0081] It should be noted that the data processing device provided in this application embodiment and the data processing method in the above embodiment belong to the same concept. The data processing device can implement any of the methods provided in the data processing method embodiment. For details of the specific implementation process, please refer to the data processing method embodiment, which will not be repeated here.
[0082] As can be seen from the above, the data processing apparatus proposed in this application acquires a content behavior sequence of a reference user, and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. It generates multiple attribute browsing sequences based on the content behavior sequence and attribute values, trains a word vector model based on the attribute browsing sequences of multiple reference users, obtains a first vector of attribute values across multiple attribute dimensions, and calculates a second vector of the content to be processed based on the first vector of target attribute values across multiple dimensions. The solution in this application comprehensively considers the attributes of content across multiple attribute dimensions to determine the content vector, thereby improving the expressive power of the content vector.
[0083] This application also provides a computer device, such as... Figure 5 As shown, it illustrates a structural schematic diagram of a computer device involved in an embodiment of this application, specifically:
[0084] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 5 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0085] The processor 401 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and computer programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0086] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0087] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0088] The computer device may also include an input unit 404, which can be used to receive input digital or character information communication, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0089] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the computer programs stored in the memory 402 to realize various functions, as follows:
[0090] Obtain the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions;
[0091] Based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions, multiple attribute browsing sequences are generated.
[0092] Train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions;
[0093] The second vector of the content to be processed is calculated based on the first vector of the multiple target attribute values of the content to be processed across the multiple attribute dimensions.
[0094] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0095] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute any of the data processing methods provided in embodiments of this application.
[0096] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0097] The computer-readable storage medium may include, but is not limited to, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk.
[0098] Since the instructions stored in the computer-readable storage medium can execute any of the steps in the data processing provided in the embodiments of this application, the beneficial effects that can be achieved by any of the data processing provided in the embodiments of this application can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0099] Furthermore, the terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments may also include steps or modules not listed, or some embodiments may include other steps or modules inherent to these processes, methods, products, or devices.
[0100] The data processing method, apparatus, storage medium, and computer equipment provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application; at the same time, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method, characterized in that, include: Obtain the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions; Based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions, multiple attribute browsing sequences are generated. Train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions; Based on the first vector of the content to be processed across the multiple target attribute values in the multiple attribute dimensions, calculate the second vector of the content to be processed. The step of calculating the second vector of the content to be processed based on the first vector of multiple target attribute values of the content to be processed across the multiple attribute dimensions includes: For each target attribute value of the content to be processed, the mean of the first vector of the target attribute values is calculated to obtain the second vector of the content to be processed; Alternatively, calculating the second vector of the content to be processed based on the first vector of multiple target attribute values of the content to be processed across the multiple attribute dimensions includes: For each target attribute value of the content to be processed, based on the first vector of the target attribute value, the similar attribute value of the target attribute value is determined from the attribute dimension corresponding to the target attribute value. Obtain the third vector of the similarity attribute values; Based on the first vector of the target attribute value and the third vector of the similar attribute values, a fourth vector of the target attribute value is determined; The second vector of the content to be processed is calculated based on the fourth vector of the multiple target attribute values using either an average or a weighted average method. The determination of the fourth vector of the target attribute value based on the first vector of the target attribute value and the third vector of the similar attribute values includes: The average of the first vector of the target attribute value and the third vector of the similar attribute value is used as the fourth vector of the target attribute value. Alternatively, based on the first vector of the target attribute values and the third vector of the similarity attribute values, a fourth vector of the target attribute values is determined, including: The fourth vector of the target attribute value is obtained by performing a weighted average calculation based on the first vector of the target attribute value and the first weight value corresponding to the target attribute value, the third vector of the similar attribute value and the second weight value corresponding to the similar attribute value.
2. The data processing method as described in claim 1, characterized in that, The step of training a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions includes: Based on the attribute browsing sequences of multiple reference users, a graph network corresponding to the attribute dimension is generated; Sampling processing is performed on the graph network to obtain multiple sample attribute sequences, the length of which is less than the length of the attribute browsing sequence; A word vector model is trained based on the multiple sample attribute sequences to obtain a first vector of attribute values for the multiple attribute dimensions.
3. The data processing method as described in claim 1, characterized in that, The step of determining similarity attribute values of the target attribute value from the attribute dimension corresponding to the target attribute value based on the first vector of the target attribute value includes: Obtain the correlation between the target attribute value and the content to be processed, and determine the target number of similar attribute values based on the correlation, wherein the target number is negatively correlated with the correlation. Based on the first vector of the target attribute value, determine the target number of similar attribute values from the attribute dimension corresponding to the target attribute value.
4. The data processing method as described in claim 3, characterized in that, The method further includes: Based on the correlation, a first weight value corresponding to the target attribute value and a second weight value corresponding to the similar attribute value are determined, wherein the first weight value is positively correlated with the correlation.
5. The data processing method as described in claim 2, characterized in that, The graph network is a weighted undirected graph; the step of generating the graph network corresponding to the attribute dimension based on the attribute browsing sequences of multiple reference users includes: Aggregate attribute browsing sequences from multiple reference users, create an undirected graph corresponding to the attribute dimension, and record the number of times an adjacent relationship occurs between two adjacent attribute nodes in the undirected graph during the creation process; The weight value of each edge in the undirected graph is determined based on the number of times an adjacency relationship occurs between any two adjacent attribute nodes, thus obtaining the weighted undirected graph corresponding to the attribute dimension. The higher the number of times an adjacency relationship occurs between two adjacent attribute nodes, the higher the weight value of the edge between the two adjacent attribute nodes.
6. The data processing method according to any one of claims 1 to 5, characterized in that, After calculating the second vector of the content to be processed based on the first vector of multiple target attribute values of the content to be processed across multiple attribute dimensions, the method further includes: Based on the second vector of each content to be processed in the content library, a first preset number of similar contents are determined for each content to be processed.
7. The data processing method as described in claim 6, characterized in that, The method further includes: In response to a content recall request, determine the target user corresponding to the content recall request; Obtain a second preset number of recently viewed content items from the target user, and use them as the target content; Similar content to the target content is identified as the recall result of the content recall request.
8. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire the content behavior sequence of the reference user, and the attribute values of each historical content in the content behavior sequence in multiple attribute dimensions; The generation module is used to generate multiple attribute browsing sequences based on the content behavior sequence and the attribute values of each historical content in the content behavior sequence across multiple attribute dimensions. The mapping module is used to train a word vector model based on the attribute browsing sequences of multiple reference users to obtain a first vector of attribute values for the multiple attribute dimensions; The calculation module is used to calculate the second vector of the content to be processed based on the first vector of multiple target attribute values of the content to be processed across the multiple attribute dimensions. The mapping module is used to perform: For each target attribute value of the content to be processed, the mean of the first vector of the target attribute values is calculated to obtain the second vector of the content to be processed; Alternatively, for each target attribute value of the content to be processed, similar attribute values of the target attribute value are determined from the attribute dimension corresponding to the target attribute value based on the first vector of the target attribute value; Obtain the third vector of the similarity attribute values; Based on the first vector of the target attribute value and the third vector of the similar attribute values, a fourth vector of the target attribute value is determined; The second vector of the content to be processed is calculated based on the fourth vector of the multiple target attribute values using either an average or a weighted average method. The determination of the fourth vector of the target attribute value based on the first vector of the target attribute value and the third vector of the similar attribute values includes: The average of the first vector of the target attribute value and the third vector of the similar attribute value is used as the fourth vector of the target attribute value. Alternatively, based on the first vector of the target attribute values and the third vector of the similarity attribute values, a fourth vector of the target attribute values is determined, including: The fourth vector of the target attribute value is obtained by performing a weighted average calculation based on the first vector of the target attribute value and the first weight value corresponding to the target attribute value, the third vector of the similar attribute value and the second weight value corresponding to the similar attribute value.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run on a computer, it causes the computer to perform the data processing method as described in any one of claims 1 to 7.
10. A computer device comprising a processor and a memory, the memory storing a computer program, characterized in that, The processor executes the data processing method as described in any one of claims 1 to 7 by invoking the computer program.
Citation Information
Patent Citations
Similar song recommendation method and related equipment
CN109857900A
Information recommendation method, device and equipment and computer readable storage medium
CN109960761A