A method, system and medium for recommending information flow content

Through the Bloom filter and grouping policy, the problem of content exposed or read by users taking up storage space and inefficient query efficiency is solved, and the content that users are interested in is quickly recommended and data resources are released.

CN113220992BActive Publication Date: 2024-11-08SUZHOU MODUO INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110493581.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-07
Publication Date
2024-11-08
Estimated Expiration
2041-05-07

AI Technical Summary

Technical Problem

Content that users exposed or read takes up a lot of database storage space, resulting in traversing all content during filtering. The result is a long return time and the data volume is large. There is a problem with hash data storage and query.

Method used

The Bloom filter is used to divide the user's interaction behavior into positive and negative behaviors, establish an information recommendation data set, and set a mapping relationship through the Bloom filter, store and clean the data in groups, and delete redundant data regularly using time parameters. Improve query efficiency.

Benefits of technology

Through Bloom filters and grouping policies, reduce memory usage and improve response speed, ensure that the content users see is not seen recently, improve processing efficiency and free up data resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113220992B_ABST
    Figure CN113220992B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and medium for recommending content in an information stream, the method comprising the following steps: analyzing the interactive behavior of a first user, dividing the interactive behavior of the first user into positive behavior and negative behavior, and establishing a first information recommendation data set according to the positive behavior; obtaining a first data set of the first user, setting a first flag for first data in the first data set, and setting a second flag for recommended data in the first information recommendation data set; storing the first flag in a Bloom filter, and setting a mapping relationship corresponding to the first data through the Bloom filter; setting a time parameter, grouping the first data set, and performing storage operations and data cleaning operations according to the grouping results and the time parameter; and pushing messages according to the first information recommendation data set, the first flag, the second flag and the mapping relationship. The present invention can solve the problem of a huge amount of historical record data and improve the response speed between users and APPs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to an information flow content recommendation method, system and medium. Background Art

[0002] With the development of the Internet and the popularization of smart phones, people have entered the era of electronic reading from the era of paper reading. People are more likely to use smart phones to obtain various information from major APPs or software through the Internet, and major APPs or software will recommend information flow content from time to time.

[0003] In the information flow recommendation of APP or software, showing users the content that they have not been exposed to or read is a very important function, which can greatly improve the user experience. However, it is necessary to record the content that users have been exposed to or read and store it in a database or cache such as Mysql, Redis, MongoDB, Elasticsearch, etc., and filter out the existing records stored in the database when showing the content to users. However, there are several problems when filtering through the above methods;

[0004] 1. Content that users have been exposed to or read takes up a lot of storage space in the database. When filtering, all the content in the database needs to be traversed, and the data and results return time is long;

[0005] 2. Usually, when querying user historical data, taking Redis as an example, KV storage may be used for get / Set judgment, or the HashMap data structure may be considered. This method is completely acceptable when the amount of data is small, but as the amount of data increases dramatically, there will be some problems in the storage and query of hash data. Summary of the invention

[0006] The present invention mainly solves the problems that the content that users have exposed or read occupies a large amount of storage space in the database, takes a long time to display the content, and errors may occur in the storage of hash data and in query when the data volume is large.

[0007] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide an information flow content recommendation method, comprising the following steps:

[0008] Analyzing the interaction behavior of the first user, dividing the interaction behavior of the first user into positive behavior and negative behavior, and establishing a first information recommendation data set according to the positive behavior;

[0009] Acquire a first data set of the first user, set a first flag for first data in the first data set, and set a second flag for recommended data in the first information recommendation data set;

[0010] storing the first flag in a Bloom filter, and setting a mapping relationship corresponding to the first data through the Bloom filter;

[0011] Setting a time parameter, grouping the first data set, and performing a storage operation and a data cleaning operation according to the grouping result and the time parameter;

[0012] A message is pushed according to the first information recommendation data set, the first flag, the second flag, and the mapping relationship.

[0013] Preferably, the step of setting a mapping relationship with the first data through the Bloom filter further comprises:

[0014] Setting a hash function corresponding to the number of the first flags;

[0015] Calculating a hash value of the first flag by using the hash function;

[0016] A first array is set, the hash value is mapped into the first array, and the bit value of the position in the first array mapped to the hash value is set to a first bit value.

[0017] Preferably, the time parameters include: a time threshold, a storage time, and a detection time period.

[0018] Preferably, the step of grouping the first data set and performing storage operations and data cleaning operations according to the grouping results and the time parameters further includes: dividing the first data set into reading groups and exposure groups;

[0019] The reading group stores first data, and the exposure group stores second data;

[0020] Performing a storage operation according to the grouping result and the storage time;

[0021] A data cleaning operation is performed according to the detection time period, the time threshold and the grouping result.

[0022] Preferably, the step of performing a storage operation according to the grouping result and the saving time further includes: periodically storing the second data in the exposure group into the first data slice according to the saving time.

[0023] Preferably, the step of performing a data cleaning operation according to the detection time period, the time threshold and the grouping result further comprises: when the detection time period is reached, acquiring a first time and a creation time of a first exposure group;

[0024] Calculate the time difference between the first time and the creation time;

[0025] The magnitude of the time difference and the time threshold is determined, and the first exposure group is cleared according to the determination result.

[0026] Preferably, the step of clearing the first exposure group according to the judgment result further includes: if the time difference is greater than the time threshold, deleting the first exposure group;

[0027] If the time difference is not greater than the event threshold, the data cleaning operation is performed again when the detection time period is reached again.

[0028] Preferably, the step of pushing a message according to the first information recommendation data set, the first flag, the second flag and the mapping relationship further includes:

[0029] Acquire first recommended data from the first information recommendation data set, and acquire the second flag corresponding to the first recommended data;

[0030] The second flag is judged by using the Bloom filter, the first flag and the mapping relationship to obtain a return value;

[0031] judging the return value, and if the return value is the first return value, not recommending the first recommendation data;

[0032] If the return value is the second return value, the first recommended data is recommended to the first user.

[0033] The present invention also provides an information flow content recommendation system, including: a creation module, an acquisition module, a setting module, a grouping operation module and a push module;

[0034] The analysis module is used to analyze the interaction behavior of the first user and divide the interaction behavior of the first user into positive behavior and negative behavior;

[0035] The establishing and analyzing module is used to establish a first information recommendation data set according to the positive behavior;

[0036] The acquisition module is used to acquire a first data set of the first user;

[0037] The setting module is used to set a first flag for the first data in the first data set, and set a second flag for the recommended data in the first information recommendation data set.

[0038] The setting module is used to set a mapping relationship corresponding to the first data and set a time parameter through a Bloom filter;

[0039] The grouping operation module is used to group the first data set, and to perform storage operations and data cleaning operations according to the grouping result and the time parameter;

[0040] The push module is used to push a message according to the first information recommendation data set, the first flag, the second flag and the mapping relationship.

[0041] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the information flow content recommendation method are implemented.

[0042] The beneficial effects of the present invention are:

[0043] 1. The information stream content recommendation method described in the present invention can fully recommend content that users are interested in based on the positive behavior of users, and occupies very little memory through Bloom filters and corresponding mapping relationships, thereby improving the response speed.

[0044] 2. The information flow content recommendation method described in the present invention uses a grouping strategy to divide the information into two groups: a reading group and an exposure group. At the same time, the creation time of the exposure group is judged, thereby regularly cleaning up redundant data, releasing data resources and improving processing efficiency.

[0045] 3. In actual application, when a user refreshes the information flow content in the APP, the computer-readable storage medium described in the present invention obtains recommended data and its ID, and judges this batch of IDs through the exposure segment and reading segment in the Bloom filter. Unqualified IDs do not correspond to recommendations, thereby ensuring that all articles seen by the user must be those that have not been read recently, and then pushed to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 This is a schematic diagram of a flow chart of a method for recommending content in an information stream according to Embodiment 1 of the present invention;

[0048] Figure 2 This is a schematic diagram of the architecture of an information stream content recommendation system described in Example 2 of the present invention. DETAILED DESCRIPTION

[0049] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] In the description of the present invention, it should be noted that the terms “first” and “second” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0051] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "positive behavior", "negative behavior", "first information recommendation data set", "first sign", etc. should be understood in a broad sense. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0052] It should be noted that in the description of the present invention:

[0053] Bloom filter is a space-complexity-optimized implementation of searching whether an element is in a set. It is a data structure, a relatively clever probabilistic data structure, characterized by efficient insertion and query, which can be used to tell you "something definitely does not exist or may exist".

[0054] KV storage refers to storage through a KV database. A KV database is a Key-value database that stores data in key-value pairs, similar to a map in Java. The entire database can be understood as a large map, where each key corresponds to a unique value.

[0055] The key-value distributed storage system has fast query speed, large data storage volume, and supports high concurrency. It is very suitable for querying by primary key, but cannot perform complex conditional queries.

[0056] Hash, generally translated as hash, or transliterated as hash, is the process of transforming an input of arbitrary length (also called pre-image) into an output of fixed length through a hash algorithm. The output is the hash value.

[0057] The first bit value is 1; the first data is the read data; the second data is the exposed data;

[0058] Example 1

[0059] The present invention provides a method for recommending content in an information stream. Figure 1 , including the following steps:

[0060] S100, when users interact with information flow software, they will generate many behaviors, such as likes, shares, likes, comments, or the time they stay on a certain information. These behaviors can be divided into positive behaviors and negative behaviors based on the user's emotions. Those behaviors that reflect that the user likes the content are positive behaviors, while some behaviors, after analysis, will reflect that the user does not like the content, and these behaviors are negative behaviors;

[0061] A first information flow recommendation data set is established according to the positive behavior of the first user, wherein the first information flow recommendation data set stores some content and news information that the user likes more;

[0062] S200, obtaining a first data set of a first user, wherein the first data set is historical data of the first user, including data that the user has browsed, read, and exposed; setting an ID1 first mark for each group of data in the first data set, that is, setting an ID1 first mark for the first data in the first data set;

[0063] Setting an ID2 second mark for each of the plurality of recommended data in the first information flow recommended data set;

[0064] S300, storing a plurality of ID1 first flags of the first data set into a Bloom filter and setting a mapping relationship of the first data through the Bloom filter;

[0065] The specific steps of setting the mapping relationship of the first data through the Bloom filter are:

[0066] Setting a number of hash functions corresponding to the number of ID tags of the first data, wherein each hash function corresponds to one ID tag in the first data;

[0067] Each ID in the first data is hashed into a hash value by using a hash function to obtain a plurality of hash values;

[0068] Set an array with a length of the first bit, denoted as the first array, and the initial value of the position corresponding to each bit in the first array is 0;

[0069] A plurality of hash values ​​are mapped into a first array, and values ​​of bits corresponding to positions in the array where the hash values ​​are mapped are set to 1.

[0070] S400, setting a time parameter to group the first data set, and dividing the first data set into a reading group and an exposure group; the reading group stores the read data, and the exposure group stores the exposed data; performing a storage operation and a data cleaning operation according to the grouping result and the time parameter;

[0071] The specific steps are as follows: the time parameters include: the exposure group deletion time threshold, the exposure group storage time and the detection time period;

[0072] The exposure group data is periodically saved to different exposure group data slices according to the saving time. It should be noted that the records in the reading group are permanently saved;

[0073] Perform data cleaning operations according to the detection time period;

[0074] The specific steps of the data cleaning operation are: when the detection time period is reached, obtaining the current time as the first time and the creation time of the first exposure group data slice, calculating the time difference between the first time and the creation time of the first exposure group data slice; if the time difference is greater than the time threshold, deleting the first exposure group;

[0075] If the time difference is not greater than the time threshold, the first exposure group is not deleted, and waiting is performed. When the detection time period is reached again, the data cleaning operation is performed again.

[0076] S500, push information stream according to the first information recommendation data set, ID1 first flag, ID2 second flag and the mapping relationship. When the first user refreshes the content in the APP, obtain the first recommended data from the first information stream recommendation data set, and obtain the data ID2 second flag corresponding to the first recommended data. Judge the data ID2 second flag through the exposure segment and reading segment in the Bloom filter, ID1 first flag, and the mapping relationship, and get the return value; judge the return value. If the return value is 1, it means that the first user has read or exposed the recommended data. If the return value is 0, it means that the first user has not read or exposed the recommended data, and push the recommended data to the first user.

[0077] S400, specifically, the steps are: calculating the second flag of ID2 of the recommended data by hashing, and finding the bit value corresponding to the position in the first array in the mapping, if the corresponding bit values ​​are all 1, then the return value is 1, indicating that the recommended data exists;

[0078] The ID of the recommended data is calculated and mapped by hash, and there may be multiple positions in the first array.

[0079] If the bit value corresponding to the position in the first array is not 1, it means that the recommended data does not exist in the first data set, the user must not have read it or been exposed to it, and the return value is 0.

[0080] Example 2

[0081] The present invention also provides an information flow content recommendation system, see Figure 2 , including: establishment module, acquisition module, setting module, group operation module and push module;

[0082] Establishing an analysis module for analyzing the interaction behavior of the first user, and dividing the interaction behavior of the first user into positive behavior and negative behavior;

[0083] Establishing an analysis module for establishing a first information recommendation data set according to the positive behavior;

[0084] The acquisition module is used to acquire a first data set of the first user;

[0085] The setting module is used to set a first flag for the first data in the first data set, and set a second flag for the recommended data in the first information recommendation data set,

[0086] The setting module is used to set a mapping relationship corresponding to the first data and set a time parameter through a Bloom filter;

[0087] The grouping operation module is used to group the first data set, and to perform storage operations and data cleaning operations according to the grouping results and the time parameters;

[0088] The push module is used to push a message according to the first information recommendation data set, the first flag, the second flag and the mapping relationship.

[0089] Example 3

[0090] The present invention also provides a computer-readable storage medium, which stores a computer program that performs the above method when executed by a processor, thereby implementing the steps of the above-mentioned information flow content recommendation method.

[0091] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program, when executed, can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.

[0092] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0093] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0094] Furthermore, it should be understood that the computer-readable storage medium (eg, memory) herein may be either a volatile memory or a nonvolatile memory, or may include both volatile memory and nonvolatile memory.

[0095] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0096] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0097] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0098] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for recommending information stream content, characterized in that: The following steps are involved: Analyzing the interaction behavior of the first user, dividing the interaction behavior of the first user into positive behavior and negative behavior, and establishing a first information recommendation data set according to the positive behavior; Acquire a first data set of the first user, set a first flag for first data in the first data set, and set a second flag for recommended data in the first information recommendation data set; storing the first flag in a Bloom filter, and setting a mapping relationship corresponding to the first data through the Bloom filter; Setting a time parameter, grouping the first data set, and performing a storage operation and a data cleaning operation according to the grouping result and the time parameter; Pushing a message according to the first information recommendation data set, the first flag, the second flag, and the mapping relationship; The time parameters include: time threshold, storage time and detection time period; The step of grouping the first data set and performing storage operations and data cleaning operations according to the grouping result and the time parameter further includes: dividing the first data set into a reading group and an exposure group; storing the first data in the reading group and storing the second data in the exposure group; performing storage operations according to the grouping result and the storage time; and performing data cleaning operations according to the detection time period, the time threshold and the grouping result; The step of performing a storage operation according to the grouping result and the saving time further includes: periodically storing the second data in the exposure group into the first data slice according to the saving time.

2. The method for recommending information stream content according to claim 1, characterized in that: The step of setting a mapping relationship with the first data through the Bloom filter further includes: Setting a hash function corresponding to the number of the first flags; Calculating a hash value of the first flag by using the hash function; A first array is set, the hash value is mapped into the first array, and the bit value of the position in the first array mapped to the hash value is set to a first bit value.

3. The method for recommending information stream content according to claim 1, characterized in that: The step of performing a data cleaning operation according to the detection time period, the time threshold, and the grouping result further includes: when the detection time period is reached, obtaining a first time and a creation time of a first exposure grouping; Calculate the time difference between the first time and the creation time; The magnitude of the time difference and the time threshold is determined, and the first exposure group is cleared according to the determination result.

4. The method for recommending information stream content according to claim 3, characterized in that: The step of clearing the first exposure group according to the judgment result further includes: if the time difference is greater than the time threshold, deleting the first exposure group; If the time difference is not greater than the time threshold, the data cleaning operation is performed again when the detection time period is reached again.

5. The method for recommending information stream content according to claim 1, characterized in that: The step of pushing a message according to the first information recommendation data set, the first flag, the second flag and the mapping relationship further includes: Acquire first recommended data from the first information recommendation data set, and acquire the second flag corresponding to the first recommended data; The second flag is judged by using the Bloom filter, the first flag and the mapping relationship to obtain a return value; judging the return value, and if the return value is the first return value, not recommending the first recommendation data; If the return value is the second return value, the first recommended data is recommended to the first user.

6. An information flow content recommendation system, characterized in that: include: Create module, obtain module, set module, group operation module and push module; The establishing module is used to analyze the interactive behavior of the first user and divide the interactive behavior of the first user into positive behavior and negative behavior; The establishing module is used to establish a first information recommendation data set according to the positive behavior; The acquisition module is used to acquire a first data set of the first user; The setting module is used to set a first flag for the first data in the first data set, and set a second flag for the recommended data in the first information recommendation data set. The setting module is used to set a mapping relationship corresponding to the first data and set time parameters through a Bloom filter; the time parameters include: a time threshold, a storage time, and a detection time period; The grouping operation module is used to group the first data set, and to perform storage operations and data cleaning operations according to the grouping results and the time parameters; the step of grouping the first data set, and performing storage operations and data cleaning operations according to the grouping results and the time parameters further includes: the grouping operation module divides the first data set into a reading group and an exposure group; the grouping operation module stores the first data through the reading group, and stores the second data through the exposure group; the grouping operation module performs storage operations according to the grouping results and the saving time; the grouping operation module performs data cleaning operations according to the detection time period, the time threshold and the grouping results; the step of the grouping operation module performing storage operations according to the grouping results and the saving time further includes: the grouping operation module regularly stores the second data in the exposure group to the first data slice according to the saving time; The push module is used to push a message according to the first information recommendation data set, the first flag, the second flag and the mapping relationship.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the information stream content recommendation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Dynamically recommending learning content

    CN102822882A

  • Disk storage method and device, message pushing method and device and electronic equipment

    CN108572789A

  • Dynamically telescopic filtering method and device, computer equipment and storage medium

    CN110781392A

  • Media information recommendation method and device, electronic equipment and storage medium

    CN112052398A

  • Content recommendation method, apparatus and system

    WO2017156995A1