Content recommendation method, apparatus, device, medium, and product
By comparing the user data generation time and updating the data in the target database, the problem of inaccurate recommended content caused by inconsistent data storage is solved, thus improving the accuracy and effectiveness of recommended content.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN FUTU NETWORK TECH CO LTD
- Filing Date
- 2022-12-06
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, inaccurate content recommendations are caused by inconsistent data storage, such as errors in recommended content due to differences in the running speed between processes.
By comparing the generation time of user data, the data in the target database is updated to ensure that the latest user data is stored, and the recommended content is determined based on the latest data.
It improves the accuracy of recommended content, ensures the effectiveness of recommendations, and reduces errors caused by inconsistent data storage.
Smart Images

Figure CN115757974B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a content recommendation method, apparatus, device, medium, and product. Background Technology
[0002] Currently, servers typically store user actions such as "liking" articles in databases like RemoteDictionary Server (Redis) or ElasticSearch. This allows the server to determine recommended content based on these stored user actions when recommending content to users. For example, if a user likes article A, the server can store this like in the database using process 1. If the user then unlikes article A, the server can update the stored like information using process 2. Then, when recommending content, the server can use this unliked information to determine that content related to article A will not be included in the recommended recommendations.
[0003] However, the above storage method can lead to inaccurate recommended content. For example, if process 1 runs slower than process 2, the server will first store the cancel like operation in the database through process 2, and then update the stored cancel like operation through process 1 using the like operation. In this case, the server will determine that the recommended content includes content related to article A based on the user's like operation for article A stored in the database. Obviously, this recommended content is inaccurate. Summary of the Invention
[0004] This application provides a content recommendation method, apparatus, device, medium, and product to improve the accuracy of recommended content and ensure recommendation effectiveness by addressing the problem of inaccurate recommended content caused by data storage in the prior art.
[0005] Firstly, this application provides a content recommendation method, which includes: obtaining the generation times of first user data and second user data, wherein the second user data is stored in a target database, and the second user data and the first user data belong to the same user based on meaning-based user data; if the generation time of the first user data is later than the generation time of the second user data, then the second user data is updated using the first user data; if the generation time of the first user data is not later than the generation time of the second user data, then the first user data is not stored in the target database; and determining recommended content based on the user data in the target database.
[0006] Secondly, this application provides a content recommendation device, comprising: a first acquisition module, a processing module, and a determination module, wherein the first acquisition module is used to acquire the generation time of first user data and second user data, the second user data being stored in a target database, and the second user data and the first user data belonging to the same user based on meaning-based user data; the processing module is used to: update the second user data using the first user data if the generation time of the first user data is later than the generation time of the second user data; and not store the first user data in the target database if the generation time of the first user data is not later than the generation time of the second user data; and the determination module is used to determine recommended content based on the user data in the target database.
[0007] Thirdly, an electronic device is provided, comprising: a processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory, and performing the methods as described in the first aspect or its various implementations.
[0008] Fourthly, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods described in the first aspect or its various implementations.
[0009] Fifthly, a computer program product is provided, including computer program instructions that cause a computer to perform the methods as described in the first aspect or its various implementations.
[0010] Sixthly, a computer program is provided that causes a computer to perform the methods described in the first aspect or its various implementations.
[0011] Through the technical solution of this application, the server can first obtain the generation times of first user data and second user data. The second user data is stored in the target database. The second user data and the first user data belong to the same user and are classified as the same type of user data based on meaning. Next, the server can determine whether the generation time of the first user data is later than the generation time of the second user data: if the generation time of the first user data is later than the generation time of the second user data, the server can use the first user data to update the second user data; if the generation time of the first user data is not later than the generation time of the second user data, the server does not need to store the first user data in the target database. Finally, the server can determine the recommended content based on the user data in the target database. In the above process, the server can ensure that the user data stored in the target database is the most recently acquired user data by comparing the generation times of the first user data and the second user data already stored in the target database. This ensures that the server can determine more accurate recommended content based on the user data stored in the target database. In other words, the technical solution of this application can solve the problem of inaccurate recommended content due to data storage in the prior art, improve the accuracy of recommended content, and ensure the recommendation effect. Attached Figure Description
[0012] 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.
[0013] Figure 1 An application scenario diagram provided for an embodiment of this application;
[0014] Figure 2 A flowchart illustrating a content recommendation method provided in this application embodiment;
[0015] Figure 3 A flowchart illustrating another content recommendation method provided in this application embodiment;
[0016] Figure 4 A schematic diagram illustrating a content recommendation method provided in an embodiment of this application;
[0017] Figure 5 A schematic diagram illustrating another content recommendation method provided in an embodiment of this application;
[0018] Figure 6 A schematic diagram illustrating another content recommendation method provided in an embodiment of this application;
[0019] Figure 7A schematic diagram illustrating yet another content recommendation method provided in an embodiment of this application;
[0020] Figure 8 A schematic diagram illustrating yet another content recommendation method provided in an embodiment of this application;
[0021] Figure 9 A schematic diagram of a content recommendation device 900 provided in an embodiment of this application;
[0022] Figure 10 This is a schematic block diagram of the electronic device 1000 provided in the embodiments of this application. Detailed Implementation
[0023] 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 some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0025] As mentioned above, servers typically store user actions such as "liking" articles in a database. This allows the server to determine recommended content based on these stored user actions when recommending content to users. For example, if a user likes article A, the server can store this "like" action in the database via process 1. If the user then unlikes article A, the server can update the stored "like" action via process 2. When recommending content, the server can then determine that the recommended content does not include content related to article A based on the user's unliked actions stored in the database. However, this storage method can lead to inaccurate recommendations. For instance, if process 1 runs slower than process 2, the server might first store the unliked actions via process 2, and then update the stored unliked actions via process 1. In this case, the server might determine that the recommended content includes content related to article A based on the user's like actions stored in the database, which is clearly inaccurate.
[0026] To address the aforementioned technical issues, the server can first obtain the generation times of first user data and second user data. The second user data is stored in the target database. The second user data and the first user data belong to the same user and are classified as the same type of user data based on meaning. Next, the server can determine if the generation time of the first user data is later than the generation time of the second user data: if the generation time of the first user data is later, the server can use the first user data to update the second user data; if the generation time of the first user data is not later than the generation time of the second user data, the server may not store the first user data in the target database. Finally, the server can determine the recommended content based on the user data in the target database. In this process, the server can ensure that the user data stored in the target database is the most recently acquired user data by comparing the generation times of the first user data and the second user data already stored in the target database. This ensures that the server can determine more accurate recommended content based on the user data stored in the target database. In other words, the technical solution of this application can solve the problem of inaccurate recommended content due to data storage in the prior art, improve the accuracy of recommended content, and guarantee the recommendation effect.
[0027] It should be understood that the technical solution of this application can be applied to the following scenarios, but is not limited to:
[0028] In some possible ways, Figure 1 An application scenario diagram provided for an embodiment of this application, such as... Figure 1As shown, this application scenario may include terminal device 110 and server 120. Terminal device 110 and server 120 can communicate with each other.
[0029] For example, a user can perform actions such as liking, forwarding, and commenting on articles, audio, and video content using terminal device 110. After receiving these actions from the user, terminal device 110 can send the corresponding user data to server 120. Then, server 120 can store the user data sent by terminal device 110 in a target database to determine recommended content based on the user data in the target database. This recommended content can then be sent to terminal device 110 to provide personalized recommendations and improve user experience. The target database can be an internal database of server 120, or a database within server 120; this application does not impose any restrictions on this.
[0030] For example, terminal device 110 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, in-vehicle device, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, and this application does not limit it. Server 120 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, and this application embodiment does not limit it.
[0031] It should be understood that Figure 1 The number of terminal devices and servers shown is merely illustrative. In reality, any number of terminal devices and servers can be set up as needed, and this application does not impose any restrictions on this.
[0032] After introducing the application scenarios of the embodiments of this application, the technical solution of this application will be described in detail below:
[0033] Figure 2 A flowchart illustrating a content recommendation method provided in this application embodiment, the method can be performed by, for example... Figure 1 The server 120 shown is executed; this application does not impose any restrictions on this. Figure 2 As shown, the method may include the following steps:
[0034] S210: Obtain the generation time of the first user data and the second user data. The second user data is stored in the target database. The second user data and the first user data belong to the same user based on the meaning of the same category of user data.
[0035] S220: Determine whether the generation time of the first user data is later than the generation time of the second user data. If the generation time of the first user data is later than the generation time of the second user data, then execute S230. If the generation time of the first user data is not later than the generation time of the second user data, then execute S240.
[0036] S230: Update the second user data using the first user data;
[0037] S240: Do not store the first user data in the target database;
[0038] S250: Determine recommended content based on user data in the target database.
[0039] In some feasible implementations, the various types of user data categorized based on meaning can include, but are not limited to: like data, comment data, forwarding data, browsing data, preference list data, frequently used language data, gender data, age data, and region data. Specifically, like data indicates whether a user has liked or unliked articles, audio, or video content; comment data indicates whether a user has commented on or unliked articles, audio, or video content; forwarding data indicates whether a user has forwarded or unliked articles, audio, or video content; browsing data indicates whether a user has viewed or read articles, audio, or video content; preference list data indicates whether a user prefers certain types of articles, audio, or video content, such as the type of content or the publisher; frequently used language data indicates the system language displayed on the terminal device when a user browses articles, audio, or video content; gender data indicates the user's gender; age data indicates the user's age; and region data indicates the user's usual location, preferred locations, etc.
[0040] For example, the user data corresponding to User 1 liking Article 1 and the user data corresponding to User 1 unliking Article 1 belong to the same user, that is, User 1's user data of the same category based on meaning; the user data corresponding to User 1 liking Video 1 and the user data corresponding to User 1 unliking Video 1 belong to the same user, that is, User 1's user data of the same category based on meaning; the user data corresponding to User 1 selecting System Language 1 and the user data corresponding to User 1 selecting System Language 2 belong to the same user, that is, User 1's user data corresponding to User 1 selecting Permanent Location 1 and the user data corresponding to User 1 selecting Permanent Location 2 belong to the same user, that is, User 1's user data of the same category based on meaning.
[0041] In some implementations, assuming user 1 likes article 1 on November 26, 2022 at 12:00, the terminal device can send user data 1 (user 1; tag 1, 0) to the server to indicate that user 1 liked article 1. Here, "user 1" indicates that user data 1 belongs to user 1, and "tag 1, 0" indicates that the like operation was performed on article 1. After receiving user data 1, the server can store it in the target database based on process 1. Then, if user 1 cancels liking article 1 on November 26, 2022 at 12:01, the terminal device can send user data 2 (user 1; tag 1, 1) to the server to indicate that user 1 canceled liking article 1. Here, "user 1" indicates that user data 1 belongs to user 1. In this context, "tag1,1" indicates that the like operation for article 1 has been cancelled. After the server receives user data 2 sent by the terminal device, when storing user data 2 in the target database based on process 2, it can first determine that user data 1 and user data 2 belong to the same user based on the meaning-based classification of the same user category, according to "tag1" and "user 1" in user data 1 and user data 2. Then, it is determined that the generation time of user data 2 is later than the generation time of user data 1. Therefore, the server can use user data 2 to update user data 1 stored in the target database based on process 2. Thus, the server can determine the recommended content based on user data 2, i.e., the user data corresponding to the cancelled like operation, instead of determining the recommended content based on user data 1, i.e., the user data corresponding to the liked operation. In other words, the server can determine more accurate recommended content based on the latest user data, ensuring the recommendation effect. If process 1 runs slower than process 2, the server will first store user data 2 in the target database based on process 2. Then, when the server needs to store user data 1 in the target database based on process 1, it will first determine that the generation time of user data 1 is no later than the generation time of user data 2, and will not store user data 1 in the target database. In this way, the server can determine the recommended content based on user data 2 stored in the target database. That is, the server can determine more accurate recommended content based on the latest user data, thus ensuring the recommendation effect.
[0042] In some implementations, assuming user 2 sets their preferred region to region 1 on November 26, 2022 at 13:00, the terminal device can send user data 3 (user 2; tag2, 0) to the server to indicate that user 2's preferred region is region 1. Here, "user 2" indicates that user data 3 belongs to user 2, and "tag2, 0" indicates that the preferred region is region 1. After receiving user data 3, the server can store it in the target database based on process 3. Then, if user 2 sets their preferred region to region 2 on November 26, 2022 at 13:01, the terminal device can send user data 4 (user 2; tag2, 1) to the server to indicate that user 2's preferred region is region 2. Here, "user 2" indicates that user data 3 belongs to user 2, and "tag2, 0" indicates that the preferred region is region 1. "2,1" indicates that the preferred region is region 2. After the server receives user data 2 sent by the terminal device, when storing user data 4 in the target database based on process 4, it can first determine that user data 3 and user data 4 belong to the same user based on the meaning-based classification of the same category of user data, according to "tag2" and "user 2" in user data 3 and user data 4. Then, it is determined that the generation time of user data 4 is later than the generation time of user data 3. Then, the server can use user data 4 to update user data 3 stored in the target database. Therefore, the server can determine the recommended content based on user data 4, that is, the user data corresponding to user 2's preferred region is region 2, instead of determining the recommended content based on user data 3, that is, the user data corresponding to user 2's preferred region is region 2. In other words, the server can determine more accurate recommended content based on the latest user data, ensuring the recommendation effect. If process 3 runs slower than process 4, the server will first store user data 4 in the target database based on process 4. Then, when the server needs to store user data 3 in the target database based on process 3, it will first determine that the generation time of user data 3 is no later than the generation time of user data 4, and will not store user data 3 in the target database. In this way, the server can determine the recommended content based on user data 4 stored in the target database. That is, the server can determine more accurate recommended content based on the latest user data, thus ensuring the recommendation effect.
[0043] In some feasible implementations, since accurate recommendation services require real-time user characteristics, i.e., user data, the server can obtain user data from the terminal device in real time. Specifically, when a user updates user attributes based on terminal device settings, such as preference list data, system language, or behavioral data, such as likes and comments, the terminal device can report the user data to the server in real time. The server can then store the real-time user data in the target database, ensuring the accuracy of the recommended content.
[0044] In some implementations, the target database can be a message queue, such as Kafka, but it is not limited to this. It's understandable that the speed at which a server queries user data in offline databases like Redis and Elasticsearch is directly proportional to the amount of user data being queried. In high-concurrency scenarios, where a large amount of user data needs to be queried, if the server queries user data based on these databases, the query time will be longer, leading to increased recommendation latency. Accurate recommendations require real-time user data, which could result in inaccurate recommendations determined by the server. Kafka, however, is a streaming service. The server can quickly read user data from Kafka, achieving shorter query times, reducing processing time, and optimizing user data retrieval (i.e., feature retrieval). This avoids the time-consuming queries of the aforementioned databases, enabling real-time content recommendations, improving recommendation effectiveness, and enhancing user experience. Furthermore, message queues have lower storage costs than the aforementioned databases, further reducing costs by storing user data in message queues.
[0045] In the above embodiments, the server can ensure that the user data stored in the target database is the most recently acquired user data by comparing the generation time of the first user data with that of the second user data already stored in the target database. This ensures that the server can determine more accurate recommended content based on the user data stored in the target database. In other words, the technical solution of this application can solve the problem of inaccurate recommended content caused by data storage in the prior art, improve the accuracy of recommended content, and ensure the recommendation effect.
[0046] In the following embodiments, this application will provide a detailed description of S250:
[0047] Figure 3 A flowchart illustrating another content recommendation method provided in an embodiment of this application. Based on Figure 2 ,like Figure 3 As shown, prior to S250, it also includes:
[0048] S310: Get content recommendation request.
[0049] Accordingly, S250 may include:
[0050] S320: In response to a content recommendation request, retrieve target user data from the target database;
[0051] S330: Based on a neural network model, target user data is transformed into target recommendation vectors;
[0052] S340: Determine the target recommendation content based on the target recommendation vector.
[0053] In some implementation methods, after receiving a user's refresh operation on the target page or a user's click operation on a certain icon on the target page, the terminal device can send a content recommendation request to the server. Then, the server can receive the content recommendation request sent by the terminal device, determine the target recommended content based on the content recommendation request, and send the target recommended content to the terminal device, which can then display the target recommended content.
[0054] In some implementations, the server may include a unified interface layer, a recommendation proxy service module, and at least one recommendation service module. The unified interface layer receives each request sent by the terminal device, determines the type of each received request, and sends each request to the corresponding proxy service module based on the determination result. For example... Figure 4 As shown, the unified interface layer can send the obtained content recommendation request to the recommendation proxy service module. The recommendation proxy service module is used to determine the type of the content recommendation request based on the content recommendation request and forward the content recommendation request to the corresponding recommendation service module. The recommendation service module is used to determine the recommended content corresponding to the content recommendation request based on the user data in the target database.
[0055] For example, assuming the content recommendation request includes an Internet Protocol (IP) address, the recommendation proxy service module can determine the type of the content recommendation request based on the IP address, that is, determine the recommendation service module that handles the content recommendation request based on the IP address, thereby identifying the local recommendation service module corresponding to the content recommendation request. Figure 5 As shown, the server can first determine the local recommendation service module corresponding to the content recommendation request based on the IP address in the content recommendation request, using the recommendation proxy service module. Then, the server can determine the target recommendation content based on the local recommendation service module and user data in the target database. For example, the server can forward recommendation request 1 to recommendation service module 1 corresponding to IP address 1, based on the recommendation proxy service module. In this way, when overseas internet services or servers are deployed in multiple locations, i.e., when the server needs to provide recommendation services for multiple regions such as multiple countries or multiple cities, the server can determine the corresponding recommendation service module, i.e., the local recommendation service module, based on the IP address in the content recommendation request, and process the corresponding content recommendation request based on the local recommendation service module. This can reduce network latency, further improve the accuracy of the recommended content, and enhance the recommendation effect.
[0056] In the above embodiments, the server can forward content recommendation requests to different processing interfaces, such as recommendation service modules, based on the recommendation proxy service module. Then, different recommendation service modules determine the recommended content according to specific calculation logic. This can achieve parallel processing of different interfaces, improve server processing efficiency, and thus improve the efficiency of the recommendation system.
[0057] In some implementations, the server can store user data and its corresponding Identity Document (ID) in the target database. This allows the server to quickly retrieve the relevant user data based on the user ID, reducing processing time and improving recommendation accuracy. The user ID can be the user's name, but is not limited to this. For example, assuming user data 1 (user1; tag1, 0) is user data for user 1, and "user1" is user 1's user ID (i.e., user 1's name), the server can store user data 1 and its corresponding user ID in the target database using a key-value storage method. The key can be the user ID corresponding to user data 1, i.e., "user1", and the value can be user data 1, i.e., "(user1; tag1, 0)". Alternatively, the server can first encrypt the user ID, such as through hash encryption, to obtain the ciphertext of the user. Then, the user data and the corresponding ciphertext are stored in the target database. When the server retrieves user data, it can use the same encryption method (such as hash encryption) used during storage to find the corresponding user data in the target database. This not only reduces processing time and improves recommendation accuracy but also avoids user privacy leaks, reduces the risk of user data being stored in the target database, and ensures user data security.
[0058] In other possible implementations, the server can first store at least one user identifier corresponding to user data in the target database. Then, the server can convert each of the at least one user identifier into at least one user ciphertext based on an encryption algorithm, which can be hash encryption, but is not limited to this. Next, the server can use the at least one user ciphertext to update at least one user identifier in the target database, thus storing the user data and the ciphertext in the target database accordingly. Therefore, when the content recommendation request received by the server includes target user ciphertext, and the target user ciphertext belongs to at least one user ciphertext, the server can respond to the content recommendation request by retrieving the target user data from the target database based on the target user ciphertext. This not only reduces processing time and improves recommendation accuracy but also avoids user privacy leaks and ensures user data security.
[0059] In some possible implementations, such as Figure 6As shown, the server can simultaneously transform different user data in the target database based on multiple identical neural network models, enabling the server to process multiple user data in parallel, and thus process multiple content recommendation requests in parallel. The server can store recommendation vectors based on the feature service module, and then retrieve these recommendation vectors from the feature service module using the recommendation service module. Specifically, as... Figure 7 As shown, the server can first preprocess the user data in the target database, such as filtering out non-compliant user data or deduplicating identical user data. Then, the server can input the preprocessed user data into a neural network model to obtain the recommendation vector corresponding to the user data. The neural network model can be a deep neural network (DNN), but is not limited to this. Next, the server can store the recommendation vector in a hash map based on the feature service module. The server can use a key-value storage method to store the encrypted user ID and recommendation vector in the hash map. The server can use the same encryption algorithm, such as hash encryption, to encrypt the user ID when storing it in the target database. This allows the same user ciphertext to be used to obtain the recommendation vector. In this way, the server can quickly determine the recommendation vector based on the encrypted user ID, improving the efficiency of determining the recommendation content. It can also protect user privacy, prevent user privacy leakage, and improve security. Moreover, by using the same user ciphertext to determine the user data and recommendation vector, it can be guaranteed that the determined user data and recommendation vector correspond to the same user ID, improving the accuracy of the determined data. The hashmap can be a Sync.map that has concurrency capabilities and high security, but it is not limited to this.
[0060] For example, suppose the target user data is ("time": 16245646, "ID": A90ECBFSEDDDD324, "type": 3, "event": click). Here, "A90ECBFSEDDDD324" is the user ID encrypted using hash, i.e., the user's ciphertext. "type" can represent a certain content such as an article or video, or it can be the target page or a certain identifier of the target page. "time" represents the timestamp corresponding to the time when the target user data was generated. The server can store the user's encrypted text "A90ECBFSEDDDD324" and the target user data in the target database. Then, the server can retrieve the target user data from the target database based on the encrypted text "A90ECBFSEDDDD324". Next, the server can input the target user data into the DNN to obtain the target recommendation vector (0.375, -0.138, 0.0047). After that, the server can store the target recommendation vector and the encrypted text "A90ECBFSEDDDD324" in Sync.map. Then, based on the recommendation service module, the server can retrieve the target recommendation vector from Sync.map based on the encrypted text "A90ECBFSEDDDD324" to determine the target recommendation content.
[0061] In the above embodiments, the neural network model can convert the user data into a format to obtain a recommendation vector. This recommendation vector not only represents the user characteristics corresponding to the user data but also serves as data directly usable by the recommendation service module, facilitating the module's determination of recommended content. Furthermore, the server can determine recommended content that is more relevant to the user characteristics based on the recommendation vector, improving the accuracy and effectiveness of the recommendations. For example, if the target user data ("time": 16245646, "ID": A90ECBFSEDDDD324, "type": 3, "event": click) indicates that the user clicked on article A at timestamp 16245646, the target recommendation vector converted from the target user data can represent the user's interest in article A. Therefore, the server can determine recommended content related to article A based on the target recommendation vector.
[0062] In some implementations, before determining the target recommendation content based on the target recommendation vector, the server can first obtain at least one historical recommendation vector, each historical recommendation vector corresponding to at least one known recommendation content. Then, the server can determine the target recommendation content based on the target recommendation vector Ver_tar and at least one historical recommendation vector Ver_his_i. For example, the server can first determine the target historical recommendation vector Ver_his_sim that is most similar to the target recommendation vector among at least one historical recommendation vector:
[0063]
[0064] Where i represents the identifier corresponding to each vector in at least one historical recommendation vector, which is also the identifier of the relevant parameters below. In this embodiment, the target historical recommendation vector calculated is the one used in the calculation of the numerical value. The historical recommendation vector corresponding to the minimum value is determined. Then, the target recommendation content is determined based on at least one known recommendation from the target historical recommendation vector.
[0065] For example, the server can calculate the relevant parameter Par_con_i for each historical recommendation vector Ver_tar in the target recommendation vector and at least one historical recommendation vector Ver_his_i:
[0066]
[0067] After calculating the relevant parameters, the historical recommendation vector corresponding to the smallest relevant parameter is determined as the target historical recommendation vector. It can be understood that the smaller the relevant parameter between two vectors, the more similar the two vectors are.
[0068] For example, suppose the server predetermines three historical recommendation vectors: vector 1, vector 2, and vector 3. These three historical recommendation vectors represent that the user likes article A, the user likes publisher A, and the user likes region A, respectively. The method by which the server determines the historical recommendation vectors is similar to the method for determining the target recommendation vectors described above, and will not be elaborated upon here. At least one known recommended content corresponding to a historical recommendation vector can be determined by the server manually or by the server based on a recommendation model. The input of the recommendation model is the recommendation vector, and the output is the recommended content related to the recommendation vector. For example, the recommended content corresponding to vector 1 could be articles of a similar type to article A; the recommended content corresponding to vector 2 could be other articles, videos, etc., published by publisher A; and the recommended content corresponding to vector 3 could be articles, videos, etc., published in region A.
[0069] It should be noted that this application does not impose any restrictions on the recommendation model, nor on the method for determining at least one known recommendation content corresponding to a historical recommendation vector.
[0070] In the above embodiments, since the historical recommendation vectors and the recommended content corresponding to the historical recommendation vectors are known, the server can quickly determine the target recommended content based on the similarity between the historical recommendation vectors and the target recommendation vector, thereby improving server processing efficiency and the accuracy of the recommended content.
[0071] In some implementation methods, when the server determines the target recommended content based on at least one known recommended content in the target historical recommendation vector, it can first sort the at least one known recommended content in the target historical recommendation vector according to the recommendation priority. Then, it can reorder the first preset number of known recommended content in the sorted target historical recommendation vector so that the known recommended content that meets the same target condition among the first preset number of known recommended content is not adjacent. The target condition includes at least one of the following: publisher, publishing location, and content category. Finally, the server can determine the reordered first preset number of known recommended content as the target recommended content.
[0072] For example, recommendation priorities can be determined based on a user's personalized needs. For instance, the server can determine that content related to region A is the highest priority recommendation content based on the user's data, specifically their preferred region.
[0073] For example, the recommendation service module includes a recall service module, a ranking service module, and a re-ranking service module, such as... Figure 8 As shown, the server can first obtain the target recommendation vector from the feature service module based on the recall service module, and determine at least one known recommendation content of the target historical recommendation vector based on the target recommendation vector and the historical recommendation vector. In other words, the server can first match user features and product features, i.e., recommendation content, based on the recall service module. Next, the server can sort the above at least one known recommendation content according to recommendation priority based on the sorting module. That is, it can perform personalized sorting on the recall results obtained in the recall stage. For example, the server can rank the content related to region A among the above at least one known recommendation content first. Then, the server can re-sort the first preset number of known recommendation content among the sorted at least one known recommendation content based on the re-sorting module. That is, it can scatter and mix the sorting results obtained in the sorting stage to improve the diversity of the results. For example, assuming the sorting results are content 1, content 2, and content 3, which belong to category A, category B, and category C, respectively, the re-sorting module can determine that content 1 and content 2 satisfy the same content category, and the re-sorting module can determine the re-sorting result as content 1, content 3, and content 2. The preset quantity can be the number of recommended content items to be displayed on the terminal device, or any quantity; this application does not impose any restrictions on this. Finally, the server can determine the reordered known recommended content as the target recommended content.
[0074] In the above embodiments, the server can sort and reorder known recommended content according to recommendation priority and target conditions. This not only enables personalized recommendations based on user characteristics but also increases the diversity of recommended content, thereby improving the recommendation effect and enhancing the user experience.
[0075] It should be noted that in the specific implementation of this application, user data, recommended content and other related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission, consent or authorization is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0076] Figure 9 A schematic diagram of the content recommendation device 900 provided in the embodiments of this application is shown below. Figure 9 As shown, the device 900 includes:
[0077] The first acquisition module 901 is used to acquire the generation time of the first user data and the second user data. The second user data is stored in the target database. The second user data and the first user data belong to the same user based on the meaning of the same category of user data.
[0078] The processing module 902 is used to: update the second user data with the first user data if the generation time of the first user data is later than the generation time of the second user data; and not store the first user data in the target database if the generation time of the first user data is not later than the generation time of the second user data.
[0079] The determination module 903 is used to determine recommended content based on user data in the target database.
[0080] In some implementations, the device 900 further includes: a second acquisition module 904, wherein the second acquisition module 904 is used to acquire a content recommendation request; and the determination module 903 is specifically used to: in response to the content recommendation request, acquire target user data from a target database; convert the target user data into a target recommendation vector based on a neural network model; and determine the target recommended content based on the target recommendation vector.
[0081] In some implementations, the apparatus 900 further includes: a third acquisition module 905, wherein the third acquisition module 905 is used to acquire at least one historical recommendation vector, each historical recommendation vector corresponding to at least one known recommendation content; and the determination module 903 is specifically used to: determine the target recommendation content based on the target recommendation vector and at least one historical recommendation vector.
[0082] In some implementations, the determining module 903 is specifically used to: determine at least one historical recommendation vector that is most similar to the target recommendation vector; and determine the target recommendation content based on at least one known recommendation content of the target historical recommendation vector.
[0083] In some possible implementations, the determining module 903 is specifically used to: sort at least one known recommended content of the target historical recommendation vector according to the recommendation priority; reorder the first preset number of known recommended content in the sorted target historical recommendation vector so that the known recommended content that meets the same target condition among the first preset number of known recommended content is not adjacent, the target condition including at least one of the following: publisher, publishing location, content category; and determine the reordered first preset number of known recommended content as the target recommended content.
[0084] In some implementations, the apparatus 900 further includes: a conversion module 906 and an update module 907, wherein the conversion module 906 is used to convert at least one user identifier into at least one user ciphertext based on an encryption algorithm, and the at least one user identifier is stored in a target database corresponding to user data; the update module 907 is used to update at least one user identifier in the target database using at least one user ciphertext; the content recommendation request includes target user ciphertext, and the target user ciphertext belongs to at least one user ciphertext, and the determination module 903 is specifically used to: in response to the content recommendation request, obtain target user data from the target database according to the target user ciphertext.
[0085] In some implementations, the content recommendation request includes an IP address, and the determining module 903 is specifically used to: determine the local recommendation service module corresponding to the content recommendation request based on the IP address; and determine the target recommended content based on the local recommendation service module and user data in the target database.
[0086] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 9 The apparatus 900 shown can execute the above-described method embodiments, and the aforementioned and other operations and / or functions of each module in the apparatus 900 are respectively for implementing the corresponding processes in the above-described methods. For the sake of brevity, they will not be described in detail here.
[0087] The apparatus 900 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in this application embodiment can be directly manifested as execution by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.
[0088] Figure 10 This is a schematic block diagram of the electronic device 1000 provided in the embodiments of this application.
[0089] like Figure 10 As shown, the electronic device 1000 may include:
[0090] The system includes a memory 1010 and a processor 1020. The memory 1010 stores computer programs and transfers the program code to the processor 1020. In other words, the processor 1020 can retrieve and run the computer program from the memory 1010 to implement the methods described in the embodiments of this application.
[0091] For example, the processor 1020 can be used to execute the above-described method embodiments according to instructions in the computer program.
[0092] In some embodiments of this application, the processor 1020 may include, but is not limited to:
[0093] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0094] In some embodiments of this application, the memory 1010 includes, but is not limited to:
[0095] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0096] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 1010 and executed by the processor 1020 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.
[0097] like Figure 10 As shown, the electronic device 1000 may further include:
[0098] Transceiver 1030, which can be connected to processor 1020 or memory 1010.
[0099] The processor 1020 can control the transceiver 1030 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 1030 may include a transmitter and a receiver. The transceiver 1030 may further include antennas, and the number of antennas may be one or more.
[0100] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0101] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0102] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0103] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0105] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0106] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A content recommendation method, characterized in that, include: The generation times of the first user data and the second user data are obtained. The second user data is stored in the target database. The second user data and the first user data belong to the same user and are classified as the same type of user data based on meaning. If the generation time of the first user data is later than the generation time of the second user data, then the second user data is updated using the first user data; If the generation time of the first user data is not later than the generation time of the second user data, then the first user data will not be stored in the target database; Obtain a content recommendation request, and in response to the content recommendation request, obtain target user data from the target database; The target user data is transformed into a target recommendation vector based on a neural network model; The target recommendation content is determined based on the target recommendation vector.
2. The method according to claim 1, characterized in that, Before determining the target recommendation content based on the target recommendation vector, the method further includes: Obtain at least one historical recommendation vector, each of which corresponds to at least one known recommendation content; Determining the target recommendation content based on the target recommendation vector includes: The target recommendation content is determined based on the target recommendation vector and the at least one historical recommendation vector.
3. The method according to claim 2, characterized in that, Determining the target recommendation content based on the target recommendation vector and the at least one historical recommendation vector includes: Determine the target historical recommendation vector that is most similar to the target recommendation vector among the at least one historical recommendation vector; The target recommendation content is determined based on at least one known recommendation content from the target historical recommendation vector.
4. The method according to claim 3, characterized in that, Determining the target recommendation content based on at least one known recommendation content from the target historical recommendation vector includes: Sort at least one known recommendation from the target historical recommendation vector according to recommendation priority; The first preset number of known recommended contents in at least one known recommended content of the sorted target historical recommendation vector are reordered so that known recommended contents that meet the same target conditions are not adjacent. The target conditions include at least one of the following: publisher, publishing location, and content category. The previously pre-set number of known recommended content items, after being reordered, are determined as the target recommended content.
5. The method according to any one of claims 1-4, characterized in that, Also includes: Based on the encryption algorithm, at least one user identifier is converted into at least one user ciphertext, and the at least one user identifier is stored in the target database corresponding to the user data; Update at least one user identifier in the target database using the at least one user ciphertext; The content recommendation request includes target user encrypted text, which belongs to the at least one user encrypted text. The step of retrieving target user data from the target database in response to the content recommendation request includes: In response to the content recommendation request, the target user data is retrieved from the target database based on the target user's encrypted text.
6. The method according to any one of claims 1-4, characterized in that, The content recommendation request includes an Internet Protocol (IP) address, and the step of determining the target recommended content based on user data in the target database includes: The local recommendation service module corresponding to the content recommendation request is determined based on the IP address; The target recommended content is determined based on the local recommendation service module and the user data in the target database.
7. A content recommendation device, characterized in that, include: The first acquisition module is used to acquire the generation time of the first user data and the second user data. The second user data is stored in the target database. The second user data and the first user data belong to the same user and are the same type of user data based on meaning classification. Processing module, used for: If the generation time of the first user data is later than the generation time of the second user data, then the second user data is updated using the first user data; If the generation time of the first user data is not later than the generation time of the second user data, then the first user data will not be stored in the target database; The determination module is configured to: obtain a content recommendation request; in response to the content recommendation request, obtain target user data from the target database; and convert the target user data into a target recommendation vector based on a neural network model. The target recommendation content is determined based on the target recommendation vector.
8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 6.
10. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Information recommendation method, device and apparatus
CN110647685A
Data processing method and device
CN113495918A