Data processing method, device, server and storage medium

By converting the historical behavior data of user IDs into bit arrays, the problem of large storage occupancy of massive content IDs is solved, efficient content filtering is achieved, and storage space utilization and filtering service efficiency are improved.

CN112347355BActive Publication Date: 2024-10-11GUANGZHOU KUGOU COMP TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011251902.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-11
Publication Date
2024-10-11
Estimated Expiration
2040-11-11

AI Technical Summary

Technical Problem

In massive data scenarios, the storage of content identifiers takes up huge storage space, resulting in low storage space utilization and making it difficult to efficiently filter content that has been recommended by users.

Method used

The historical behavior data corresponding to the user identification is generated into a bit array, the bit array is used to represent the content identification, the corresponding relationship between the user identification and the bit array is stored, and the filtering request is processed based on the bit array to determine the filtering result of the content identification.

Benefits of technology

It greatly reduces storage space usage, improves storage space utilization, and improves the efficiency of filtering services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112347355B_ABST
    Figure CN112347355B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device, server and storage medium, belonging to the field of big data technology. The method includes: based on multiple first content identifiers in multiple first historical behavior data corresponding to any user identifier in the data warehouse, generate a first bit array, each first content identifier corresponds to multiple bits in the first bit array; store the correspondence between any user identifier and the first bit array; in response to a filtering request, based on the stored correspondence between the user identifier and the bit array, determine the target bit array corresponding to the user identifier carried by the filtering request; based on the target bit array, determine the filtering result of the content identifier carried by the filtering request. The present application represents a large number of content identifiers by a binary bit array, and supports filtering services by storing bit arrays, which can greatly reduce the storage space occupied to support filtering services and improve the utilization of storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a data processing method, device, server and storage medium. Background Art

[0002] In some scenarios, in order to provide better services to users, there is a need to filter based on massive data. For example, in the scenario of recommending content to users, it is necessary to filter out the content that has been recommended to the user from the candidate content, and then determine the content recommended to the user from the remaining candidate content.

[0003] In the related art, the user identification and the content identification of the recommended content are stored in correspondence in advance, so that the recommended content can be determined according to the correspondence between the stored user identification and the content identification of the recommended content, and then the recommended content can be filtered.

[0004] Since the content identifier is usually in the format of a character string, when a large number of content identifiers are stored, directly storing the content identifiers will occupy a huge storage space, resulting in a low utilization rate of the storage space. Summary of the invention

[0005] The embodiments of the present application provide a data processing method, device, server and storage medium, which can improve the utilization rate of storage space. The technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a data processing method is provided, the method comprising:

[0007] Generate a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse, wherein the first historical behavior data is used to record the content of the executed interactive behavior, and each of the first content identifiers corresponds to a plurality of bits in the first bit array;

[0008] Storing a correspondence between any one of the user identifiers and the first bit group;

[0009] In response to the filtering request, determining a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array;

[0010] Based on the target bit array, a filtering result of the content identifier carried in the filtering request is determined.

[0011] In an optional implementation, the generating of the first bit array based on the plurality of first content identifiers in the plurality of first historical behavior data corresponding to any user identifier in the data warehouse includes:

[0012] In response to the query compression statement, the query compression module is called to execute, in the memory corresponding to the data warehouse tool hive, the step of generating a first bit array based on the plurality of first content identifiers in the plurality of first historical behavior data corresponding to any user identifier in the data warehouse;

[0013] The query compression statement is used to instruct to obtain a first bit array for representing a plurality of first content identifiers corresponding to any one of the user identifiers, and the query compression module is a functional module extended based on the hive.

[0014] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior performed in the first time period;

[0015] The storing the correspondence between any one of the user identifiers and the first bit group includes:

[0016] generating a first keyword based on the any one user identifier and the first time period;

[0017] The correspondence between the first keyword and the first bit group is stored.

[0018] In another optional implementation, after storing the correspondence between any one of the user identifiers and the first bit group, the method further includes:

[0019] In response to reaching the bit array update time, generating a second bit array based on a plurality of second content identifiers in a plurality of second historical behavior data corresponding to any one of the user identifiers in the data warehouse, wherein the second historical behavior data is used to record the content of the interactive behavior performed within a second time period to which the bit array update time belongs;

[0020] The stored bit array corresponding to the second time period is updated to the second bit array.

[0021] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior of the target type executed in the first time period;

[0022] The storing the correspondence between any one of the user identifiers and the first bit group includes:

[0023] generating a second keyword based on the any one user identifier, the first time period, and the target type of interactive behavior in the first historical behavior data;

[0024] The correspondence between the second keyword and the first bit group is stored.

[0025] In another optional implementation, before storing the correspondence between any one of the user identifiers and the first bit group, the method further includes:

[0026] Encoding the first bit array to generate a character string;

[0027] The storing the correspondence between any one of the user identifiers and the first bit group includes:

[0028] The corresponding relationship between any one of the user identifiers and the character string is stored.

[0029] In another optional implementation, before determining the filtering result of the content identifier carried in the filtering request based on the target bit array, the method further includes:

[0030] receiving at least one real-time behavior data corresponding to any one of the user identifiers, wherein the real-time behavior data is used to record the content of the executed interactive behavior;

[0031] storing a correspondence between any one of the user identifiers and at least one content identifier in at least one real-time behavior data corresponding to the any one of the user identifiers;

[0032] The determining, based on the target bit array, a filtering result of the content identifier carried in the filtering request includes:

[0033] Based on the target bit array and at least one third content identifier corresponding to the user identifier carried in the filtering request, a filtering result for the content identifier carried in the filtering request is determined, wherein the at least one third content identifier is derived from at least one real-time behavior data corresponding to the user identifier carried in the filtering request.

[0034] In another optional implementation, the generating of the first bit array based on the plurality of first content identifiers in the plurality of first historical behavior data corresponding to any user identifier in the data warehouse includes:

[0035] Processing each of the first content identifiers based on a hash processing method corresponding to the first bit array to obtain a plurality of bits of the first bit array corresponding to each of the first content identifiers;

[0036] The values ​​of multiple bits of the first bit group corresponding to each of the first content identifiers are set to 1.

[0037] In another optional implementation, determining the filtering result of the content identifier carried in the filtering request based on the target bit array includes:

[0038] Based on the hash processing method corresponding to the target bit array, the content identifier carried by the filtering request is processed to obtain a plurality of bits of the target bit array corresponding to the content identifier carried by the filtering request;

[0039] In response to the fact that the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request include 0, the multiple content identifiers represented by the target bit array do not include the content identifier carried in the filtering request, and the filtering result is determined to be not filtering the content identifier carried in the filtering request;

[0040] In response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request being 1, the multiple content identifiers represented by the target bit array include the content identifier carried in the filtering request, and the filtering result is determined to be filtering the content identifier carried in the filtering request.

[0041] According to another aspect of an embodiment of the present application, a data processing device is provided, the device comprising:

[0042] A bit array generation module, configured to generate a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse, wherein the first historical behavior data is used to record the content of the executed interactive behavior, and each of the first content identifiers corresponds to a plurality of bits in the first bit array;

[0043] A first correspondence storage module, used for storing a correspondence between any one of the user identifiers and the first bit group;

[0044] A bit array determination module, configured to determine, in response to a filtering request, a target bit array corresponding to the user identifier carried in the filtering request based on a stored correspondence between the user identifier and the bit array;

[0045] The filtering result determination module is used to determine the filtering result of the content identifier carried in the filtering request based on the target bit array.

[0046] In an optional implementation, the bit array generation module is used to:

[0047] In response to the query compression statement, the query compression module is called to generate a first bit array in a memory corresponding to the data warehouse tool hive based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse;

[0048] The query compression statement is used to instruct to obtain a first bit array for representing a plurality of first content identifiers corresponding to any one of the user identifiers, and the query compression module is a functional module extended based on the hive.

[0049] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior performed in the first time period;

[0050] The first corresponding relationship storage module is used to:

[0051] generating a first keyword based on the any one user identifier and the first time period;

[0052] The correspondence between the first keyword and the first bit group is stored.

[0053] In another optional implementation, the bit array generation module is further used to generate a second bit array based on a plurality of second content identifiers in a plurality of second historical behavior data corresponding to any one of the user identifiers in the data warehouse in response to reaching the bit array update time, wherein the second historical behavior data is used to record the content of the interactive behavior performed in the second time period to which the bit array update time belongs;

[0054] The first corresponding relationship storage module is further used to update the stored bit array corresponding to the second time period to the second bit array.

[0055] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior of the target type executed in the first time period;

[0056] The first corresponding relationship storage module is used to:

[0057] generating a second keyword based on the any one user identifier, the first time period, and the target type of interactive behavior in the first historical behavior data;

[0058] The correspondence between the second keyword and the first bit group is stored.

[0059] In another optional implementation, the device further includes:

[0060] A bit array encoding module, used for encoding the first bit array to generate a character string;

[0061] The first corresponding relationship storage module is further used to store the corresponding relationship between any one of the user identifiers and the character string.

[0062] In another optional implementation, the device further includes:

[0063] A real-time behavior data receiving module, used to receive at least one real-time behavior data corresponding to any one of the user identifiers, wherein the real-time behavior data is used to record the content of the executed interactive behavior;

[0064] A second corresponding relationship storage module, used to store a corresponding relationship between any one of the user identifiers and at least one content identifier in at least one real-time behavior data corresponding to the any one of the user identifiers;

[0065] The filtering result determination module is used to determine the filtering result of the content identifier carried by the filtering request based on the target bit array and at least one third content identifier corresponding to the user identifier carried by the filtering request, wherein the at least one third content identifier is derived from at least one real-time behavior data corresponding to the user identifier carried by the filtering request.

[0066] In another optional implementation, the bit array generation module is used to:

[0067] Processing each of the first content identifiers based on a hash processing method corresponding to the first bit array to obtain a plurality of bits of the first bit array corresponding to each of the first content identifiers;

[0068] The values ​​of multiple bits of the first bit group corresponding to each of the first content identifiers are set to 1.

[0069] In another optional implementation, the filtering result determination module is used to:

[0070] Based on the hash processing method corresponding to the target bit array, the content identifier carried by the filtering request is processed to obtain a plurality of bits of the target bit array corresponding to the content identifier carried by the filtering request;

[0071] In response to the fact that the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request include 0, the multiple content identifiers represented by the target bit array do not include the content identifier carried in the filtering request, and the filtering result is determined to be not filtering the content identifier carried in the filtering request;

[0072] In response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request being 1, the multiple content identifiers represented by the target bit array include the content identifier carried in the filtering request, and the filtering result is determined to be filtering the content identifier carried in the filtering request.

[0073] According to another aspect of an embodiment of the present application, a server is provided, comprising a processor and a memory, wherein the memory stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the data processing method described in any of the above optional implementations.

[0074] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the data processing method described in any of the above optional implementation methods.

[0075] According to another aspect of an embodiment of the present application, a computer program product or a computer program is provided, which includes a computer program code, and the computer program code is stored in a computer-readable storage medium. A processor of a server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the server executes the data processing method described in any of the above optional implementations.

[0076] The technical solution provided by the embodiment of the present application maps the content identifier in each historical behavior data corresponding to any user identifier to multiple bits of the bit array, and the bit array is used to represent multiple content identifiers corresponding to the user identifier that have been interactively executed, so that when a filtering request carrying any user identifier is received, the filtering result of the content identifier carried by the filtering request can be determined based on the bit array corresponding to the user identifier. In a big data scenario with a large number of content identifiers, a large number of content identifiers are represented by a binary bit array, and filtering services are supported by storing the bit array, which greatly reduces the storage space occupied to support filtering services and improves the utilization rate of storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0079] Figure 2 is a flow chart of a data processing method provided in an embodiment of the present application;

[0080] Figure 3 is a flow chart of a data processing method provided in an embodiment of the present application;

[0081] Figure 4 is a schematic diagram of a data processing method provided in an embodiment of the present application;

[0082] Figure 5is a block diagram of a data processing device provided in an embodiment of the present application;

[0083] Figure 6 This is a block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0085] The terms "first", "second", "third" and "fourth" in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0086] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 The implementation environment includes a terminal 110 , a first server 120 , and a second server 130 .

[0087] Optionally, the terminal 110 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker or a smart watch, etc., but is not limited thereto. The terminal 110 is provided with a client, and the client has a content recommendation function. For example, the client is an audio playback client, and has an audio recommendation function; for another example, the client is a video client, and has a video recommendation function.

[0088] The first server 120 is used to provide content filtering services. The second server 130 is used to provide content recommendation services. Among them, the terminal 110 is connected to the first server 120 via a wireless or wired network; the terminal 110 is connected to the second server 130 via a wireless or wired network; the first server 120 is connected to the second server 130 via a wireless or wired network. The terminal 110 receives the content sent by the second server 130 for recommendation to the user corresponding to the terminal 110, and displays the received content in the recommendation interface; detects the interactive behavior performed on the displayed content, and reports the interactive behavior performed on the displayed content to the first server 120. The first server 120 stores the interactive behavior performed on the displayed content. The next time the second server 130 determines content to be recommended to the user corresponding to the terminal 110, it requests the first server 120 to determine whether there is content on which interactive actions have been performed among the candidate content to be recommended; based on the feedback from the first server 120, it filters out content on which interactive actions have been performed from the candidate content to be recommended; it determines content to be recommended to the user corresponding to the terminal 110 from the remaining candidate content, and sends the determined content to the terminal 110, so that the terminal 110 displays the received content in the recommendation interface, thereby reducing repeated recommendations of content.

[0089] Figure 2 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 2 , the embodiment comprises:

[0090] 201. The first server generates a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in a data warehouse, wherein the first historical behavior data is used to record the content of the executed interactive behavior, and each first content identifier corresponds to a plurality of bits in the first bit array.

[0091] Among them, the data warehouse is a large-scale data storage collection for storing historical data. The data warehouse is the data foundation for BI (Business Intelligence) projects to conduct data mining, analysis and processing. The data warehouse supports the distributed storage of large-scale data. In the embodiment of the present application, the data warehouse is used to store the historical behavior data of users, and the historical behavior data in the data warehouse is counted and analyzed to reduce the recommendation of duplicate content.

[0092] The historical behavior data is used to record the content of the executed interactive behavior. Optionally, the historical behavior data includes a user identifier, a content identifier, an interactive behavior, and an execution time, which is used to indicate that the user identified by the user identifier has executed an interactive behavior on the content identified by the content identifier at the execution time. Among them, the user identifier is used to uniquely identify the user. The user identifier is also referred to as a user ID (Identity Document), a user account, etc. Optionally, the user identifier is a UID (User Identification) assigned to the user. The content identifier is used to uniquely identify the content. The content identifier is also referred to as a content ID. Optionally, the type of content identified by the content identifier is an audio type or a short video type, etc., which is not limited in this application. Optionally, the interactive behavior refers to exposure behavior, playback behavior, collection behavior, or download behavior, etc., wherein the exposure behavior refers to the behavior of the user triggering the terminal to display content.

[0093] A bit array is also called a bit array, which consists of binary 0s and 1s. A bit array is used to represent multiple content identifiers corresponding to a user identifier. Each content identifier corresponds to different multiple bits in the bit array. For example, the bit array is 1001011101, where the 1st, 4th and 8th bits represent a content identifier; the 6th, 7th and 10th bits represent another content identifier.

[0094] 202. The first server stores the corresponding relationship between any user identifier and the first bit array.

[0095] The first server stores the user identifier and a bit array generated based on multiple content identifiers corresponding to the user identifier. Optionally, the first server stores the corresponding relationship between the arbitrary user identifier and the first bit array in the form of a key-value pair, wherein the key is the arbitrary user identifier and the value is the first bit array.

[0096] 203. In response to the filtering request, the first server determines a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array.

[0097] Before determining the content to be recommended to the user, the second server for providing recommendation service sends a filtering request to the first server to request the first server to determine whether there is any content on which interactive behavior has been performed in the content to be recommended. The filtering request carries a user identifier and a content identifier, wherein the user identifier carried in the filtering request is used to identify the recommendation object, and the content identifier carried in the filtering request is used to identify the candidate content to be recommended. Based on the user identifier carried in the filtering request, the first server queries the stored correspondence between the user identifier and the bit array, and obtains the target bit array corresponding to the content identifier carried in the filtering request.

[0098] 204. The first server determines a filtering result for the content identifier carried in the filtering request based on the target bit array.

[0099] The first server maps the content identifier carried in the filter request to multiple bits of the target bit array, and determines whether the content identifier carried in the filter request is among the multiple content identifiers represented by the target bit array according to the values ​​of 0 or 1 on the multiple bits. If the content identifier carried in the filter request is among the multiple content identifiers represented by the target bit array, it means that the content identifier carried in the filter request has been interactively executed, and it is determined that the content identified by the content identifier carried in the filter request is filtered out from the content to be recommended. If the content identifier carried in the filter request is not among the multiple content identifiers represented by the target bit array, it means that the content identifier carried in the filter request has not been interactively executed, and it is determined that the content identified by the content identifier carried in the filter request is not filtered.

[0100] The technical solution provided by the embodiment of the present application maps the content identifier in each historical behavior data corresponding to any user identifier to multiple bits of the bit array, and the bit array is used to represent multiple content identifiers corresponding to the user identifier that have been interactively executed, so that when a filtering request carrying any user identifier is received, the filtering result of the content identifier carried by the filtering request can be determined based on the bit array corresponding to the user identifier. In a big data scenario with a large number of content identifiers, a large number of content identifiers are represented by a binary bit array, and filtering services are supported by storing the bit array, which greatly reduces the storage space occupied to support filtering services and improves the utilization rate of storage space.

[0101] Figure 3 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 3 , the embodiment comprises:

[0102] 301. The first server generates a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in a data warehouse.

[0103] It should be noted that, in an optional implementation, the above-mentioned multiple first historical behavior data are all historical behavior data corresponding to any user identifier stored in the data warehouse, and the first server generates a first bit array corresponding to any user identifier based on multiple first content identifiers in the multiple first historical behavior data.

[0104] In another optional implementation, the first server generates a corresponding bit array with the time period of the target duration as the granularity. The above-mentioned multiple first historical behavior data are used to record the content of the interactive behavior executed within the time period of the target duration, and the execution time in the multiple first historical behavior data is within the time period of the target duration. Among them, the target duration can be flexibly configured, for example, the target duration is 1 week or 1 month, etc. In the embodiment of the present application, the target duration is 1 month, and the first server generates the corresponding bit array with the granularity of month as an example for explanation. For example, in January, the first server generates the first bit array of January corresponding to any user identifier based on the multiple first content identifiers in the multiple first historical behavior data corresponding to any user identifier in January; in February, the first server generates the first bit array of February corresponding to any user identifier based on the multiple first content identifiers in the multiple first historical behavior data corresponding to any user identifier in February, and so on.

[0105] In another optional implementation, the first server also uses different types of interactive behaviors as a distinction, and generates corresponding bit arrays based on multiple content identifiers of the same type of interactive behaviors. The above multiple first historical behavior data are used to record the content of the interactive behaviors of the target type being executed. Optionally, the interactive behavior of the target type is one of exposure behavior, playback behavior, collection behavior and download behavior. For example, the first server generates a bit array based on multiple content identifiers of the exposure behavior executed corresponding to any user identifier; generates another bit array based on multiple content identifiers of the playback behavior executed corresponding to any user identifier, and so on.

[0106] In another optional implementation, the first server also uses different types of content as a distinction, and generates corresponding bit arrays based on multiple first historical behavior data of the same type of recorded content. Optionally, the content type includes audio type, video type, image type, and text type. For example, the first server generates a bit array based on multiple content identifiers in multiple historical behavior data for recording audio type content corresponding to any user identifier; or, the first server generates another bit array based on multiple content identifiers in multiple historical behavior data for recording video type content corresponding to any user identifier.

[0107] One point that needs to be explained is that, optionally, in addition to using the user ID as a distinction to generate a bit array corresponding to the user ID, the first server can further combine the division of time periods, the type of interactive behavior, and one or more of the types of content to generate a more finely classified bit array corresponding to the user ID. The embodiments of the present application are not limited to this.

[0108] The first server processes the plurality of first content identifiers according to the principle of bloom filter to generate a first bit array. The above step 301 includes: the first server processes each first content identifier based on the hash processing method corresponding to the first bit array to obtain a plurality of bits of the first bit array corresponding to each first content identifier; and sets the values ​​of the plurality of bits of the first bit array corresponding to each first content identifier to 1.

[0109] Bloom filter is a random data structure that occupies very little space and is highly efficient. It consists of a bit array and multiple hash functions. The hash processing method corresponding to the first bit array is to generate multiple hash functions based on the principle of bloom filter. The first server performs hash processing on the first content identifier based on each hash function to obtain a bit in the first bit array corresponding to the first content identifier, thereby obtaining multiple bits in the first bit array corresponding to the first content identifier based on multiple hash functions.

[0110] Among them, the number of multiple hash functions is consistent with the number of multiple bits in the first bit array corresponding to the first content identifier. That is to say, the first server performs hash processing on the first content identifier based on K hash functions to obtain K bits in the first bit array corresponding to the first content identifier. Among them, K is a positive integer, and K is less than the number of elements included in the first bit array. For example, the first bit array includes a total of 10 elements, that is, the first bit array consists of 10 bits, then K is a positive integer less than 10. The number of elements included in the first bit array and the specific value of K can be flexibly configured according to the storage quantity of content identifiers. The more the storage quantity of content identifiers, the larger the number of elements included in the first bit array, and the larger the value of K, so as to reduce the situation where multiple content identifiers correspond to the same bit, and improve the accuracy of judging whether a certain content identifier is in the multiple content identifiers represented by the bit array based on the values ​​of 0 or 1 on multiple bits.

[0111] It should be noted that, in an optional implementation, the first server queries, analyzes and processes the data stored in the data warehouse based on hive (a data warehouse tool). Hive supports the customization of UDF (User Defined Function) to provide scalability for data operations. The function of generating a first bit array based on multiple first content identifiers in multiple first historical behavior data corresponding to any user identifier in the data warehouse can be encapsulated in UDF to form a query compression module. The query compression module is a functional module extended based on hive, and has the functions of querying multiple content identifiers corresponding to user identifiers, generating a bit array for representing the multiple content identifiers, and outputting the bit array. Accordingly, the first server responds to the query compression statement, calls the query compression module, and executes the step of generating a first bit array based on multiple first content identifiers in multiple first historical behavior data corresponding to any user identifier in the data warehouse in the memory corresponding to hive.

[0112] The query compression statement is used to indicate obtaining a first bit array for representing multiple first content identifiers corresponding to any user identifier. The first server responds to the query compression statement and calls the query compression module to obtain a first bit array for representing multiple first content identifiers. The query compression module, based on the support of hive, executes the step of generating a first bit array based on multiple first content identifiers in multiple first historical behavior data corresponding to any user identifier in the data warehouse in the memory corresponding to hive, and outputs the first bit array.

[0113] The above technical solution, based on the data warehouse tool hive, extends a query compression module for generating bit arrays. By calling the query compression module, the bit array generated by compressing multiple content identifiers can be directly obtained, which improves the efficiency of obtaining the bit array. In addition, based on the support of hive, the query compression module executes the steps of generating the bit array in the memory corresponding to hive, without exporting the content identifier as a data file, storing the data file in another database, and then processing the data file to generate the bit array, thereby eliminating the intermediate links such as exporting and storing the data file in the process of generating the bit array, generating the bit array more efficiently and conveniently, and improving the efficiency of generating the bit array. At the same time, it also eliminates the occupation of storage space by the intermediate links, thereby improving the utilization rate of storage space.

[0114] In another optional implementation, the first server queries multiple first historical behavior data corresponding to any user identifier from the data warehouse; exports the first content identifier in the multiple first historical behavior data as a data file; stores the multiple first content identifiers in the data file in an intermediate database; and generates a first bit array based on the multiple first content identifiers in the intermediate database.

[0115] Another point to be explained is that, optionally, after the first server generates the first bit array, it also encodes the first bit array to generate a string. Optionally, the first server encodes the bit array based on the Base64 (based on 64 printable characters to represent binary data) encoding rules to generate a string for the convenience of transmission and storage of the bit array. Optionally, the above-mentioned encoding of the first bit array and the function of generating a string can also be encapsulated in a query compression module, and the query compression module performs the steps of encoding the first bit array and generating a string.

[0116] 302. The first server stores the corresponding relationship between any user identifier and the first bit array.

[0117] Optionally, the first server stores the correspondence between any user identifier and the first bit array in a MySQL (a relational database management system) database to achieve persistent storage of data; or, the first server also caches the correspondence between any user identifier and the first bit array in a Redis (remote dictionary server) database to achieve efficient reading of data.

[0118] The above technical solution uses a binary bit array to represent multiple content identifiers corresponding to the user identifier, and stores the user identifier and the bit array accordingly. When the number of multiple content identifiers corresponding to the user identifier is large, compared with storing multiple content identifiers in string format, it can greatly reduce the occupied storage space and improve the utilization rate of the storage space.

[0119] In an optional implementation, the first bit array is used to represent all content identifiers of the executed interactive behaviors corresponding to the any user identifier, and accordingly, the first server stores the correspondence between the any user identifier and the first bit array in the form of the correspondence between the any user identifier and the first bit array. For example, the first server stores the correspondence between the any user identifier and the first bit array in the form of key-value, where the key is the any user identifier, such as 13753.

[0120] In another optional implementation, the first server generates a corresponding first bit array with the time period of the target duration as the granularity. The first historical behavior data based on which the first bit array is generated is used to record the content of the interactive behavior performed in the first time period. The first time period is the time period of the target duration. For example, the target duration is 1 month, and the first time period is January, February, or March. Correspondingly, the first server generates a first keyword based on the arbitrary user identifier and the first time period; and stores the correspondence between the first keyword and the first bit array. Optionally, the first keyword is in the form of user identifier_time period. For example, the first time period is August, the arbitrary user identifier is 13753, and the first server generates the first keyword as 13753_8, takes the first keyword as the key, and the first bit array as the value, and stores the first keyword and the first bit array in the form of key-value to indicate that the user identified by the arbitrary user identifier has performed an interactive behavior on the content identified by the multiple content identifiers represented by the first bit array in the first time period.

[0121] In the above technical solution, each bit array corresponding to the user identifier is used to represent the content of the interactive behavior executed within a time period of a target duration. By dividing a plurality of different bit arrays according to a certain time period for corresponding storage, the corresponding bit array can be flexibly obtained according to the filtering requirements to determine whether a certain content has been interactively executed. For example, if the filtering requirement is to filter out the recommended content within the last three months, if the target duration is one month and the current month is March, filtering can be performed based on the bit array corresponding to January, the bit array corresponding to February, and the bit array corresponding to March, thereby improving the availability of the stored bit arrays.

[0122] In another optional implementation, the first historical behavior data based on which the first bit array is generated is used to record the content of the target type of interactive behavior executed in the first time period. Accordingly, the first server generates a second keyword based on the interactive behavior of the target type in the any user identifier, the first time period, and the first historical behavior data; and stores the correspondence between the second keyword and the first bit array. Optionally, the second keyword is in the form of interactive behavior_user identifier_time period. For example, exposure behavior is represented by 1, playback behavior is represented by 2, collection behavior is represented by 3, and download behavior is represented by 4. If the second keyword is 3_13753_8, the bit array corresponding to the second keyword is used to indicate that the user identified by the user identifier 13753 performed a collection behavior on the content identified by multiple content identifiers represented by the bit array in August.

[0123] The above technical solution divides different bit arrays into corresponding storage according to different types of interactive behaviors, so that according to filtering requirements, the content that has executed any type of interactive behavior can be more flexibly filtered independently based on the bit array corresponding to any type of interactive behavior, thereby further improving the availability of the stored bit array.

[0124] In another optional implementation, the multiple first historical behavior data based on which the first bit array is generated are used to record the content of the target type of interactive behavior executed in the first time period, and the content identifiers in the above multiple first historical behavior data are all used to identify the same type of content. Correspondingly, the first server generates a third keyword based on any user identifier, the first time period, the target type of interactive behavior in the first historical behavior data, and the type of content identified by the content identifier in the first historical behavior data; and stores the correspondence between the third keyword and the first bit array. Optionally, the third keyword is in the form of content type_interactive behavior_user identifier_time period. For example, the audio type is represented by 1, the video type is represented by 2, the image type is represented by 3, and the text type is represented by 4. If the third keyword is 1_3_13753_8, the bit array corresponding to the third keyword is used to indicate that the user identified by the user identifier 13753 performed a collection behavior on the audio content identified by the multiple content identifiers represented by the bit array in August.

[0125] It should be noted that the first server generates a more finely classified bit array corresponding to the user identifier based on the division of time periods, the types of interactive behaviors, and one or more of the types of content. Accordingly, the first server generates corresponding keywords based on the division of time periods, the types of interactive behaviors, and one or more of the types of content, and stores the correspondence between the keywords and the bit arrays, which are not listed one by one in the embodiments of the present application.

[0126] Another point that needs to be explained is that if the first server encodes the first bit array to generate a character string after generating the first bit array, the first server stores the corresponding relationship between any user identifier and the character string.

[0127] Another point that needs to be explained is that after the first server stores the corresponding relationship between any user identifier and the first bit array, it also periodically updates the stored bit array. In an embodiment of the present application, the first server generates a corresponding bit array according to a time period of a target duration, and updates the bit array corresponding to the time period of the target duration as an example. Optionally, the update period of the bit array can be flexibly configured, for example, the update period is 1 hour, 1 day or 1 week, etc. In an embodiment of the present application, the update period of the bit array is 1 day, and the first server updates the bit array once every other day as an example. Correspondingly, the step of the first server updating the bit array includes: the first server generates a second bit array in response to the arrival of the bit array update time, based on multiple second content identifiers in multiple second historical behavior data corresponding to any user identifier in the data warehouse, wherein the second historical behavior data is used to record the content of the interactive behavior performed in the second time period to which the bit array update time belongs; the first server updates the stored bit array corresponding to the second time period to the second bit array.

[0128] For example, the update cycle of the bit array is 1 day, and the first server updates the bit array at 24:00 every day. If the bit array update time reaches 24:00 on November 5, 2020, the first server generates a second bit array based on multiple second content identifiers in the multiple second historical behavior data corresponding to any user identifier. Among them, the second historical behavior data is used to record the content of the interactive behaviors performed in November, that is, the content of the interactive behaviors performed from November 1 to November 5. The first server updates the stored bit array of multiple contents representing the interactive behaviors performed from November 1 to November 4 to the second bit array.

[0129] The above technical solution generates a corresponding bit array according to a time period of a target time length. When the bit array update time is reached, a bit array corresponding to the time period of the target time length is regenerated based only on the historical behavior data within the time period of the target time length where the bit array update time is located, and the update is performed. There is no need to process the full amount of historical behavior data corresponding to the user identifier and regenerate the bit array. In the case of a large amount of data, the amount of data based on which the bit array is generated can be greatly reduced, thereby greatly improving the updating efficiency of the bit array, and can greatly reduce the computing resources consumed in updating the bit array, thereby reducing the updating cost of the bit array.

[0130] 303. The first server receives at least one real-time behavior data corresponding to any user identification, where the real-time behavior data is used to record the content of the executed interactive behavior.

[0131] Among them, real-time behavior data refers to behavior data generated after the bit array update time closest to the current time. For example, the current time is 18:00 on November 6, and the bit array update time closest to the current time is 24:00 on November 5, then the real-time behavior data includes behavior data generated between 0:00 on November 6 and 18:00 on November 6. Optionally, a real-time behavior data includes a user ID, a content ID, an interactive behavior, and an execution time, which is used to indicate that the user identified by the user ID performed an interactive behavior on the content identified by the content ID at the execution time.

[0132] Optionally, the first server subscribes to real-time behavior data through Kafka (a high-throughput distributed publish-subscribe messaging system). For example, the terminal displays audio content in the audio recommendation interface, detects interactive behavior on the displayed audio content, generates behavior data, and sends it to Kafka. Kafka sends the received behavior data to the first server that subscribes to the behavior data. The first server receives the behavior data sent by Kafka.

[0133] 304. The first server stores a correspondence between the any user identifier and at least one content identifier in the at least one real-time behavior data.

[0134] Since the amount of real-time behavior data is relatively small, the first server may optionally store the correspondence between any user identifier and the content identifier in each real-time behavior data in the form of key-value. Alternatively, the first server may also generate a bit array based on at least one content identifier, and store the correspondence between any user identifier and the bit array, which is not limited in the embodiments of the present application. Optionally, the first server stores the correspondence between any user identifier and the content identifier in each real-time behavior data in a redis database.

[0135] 305. In response to the filtering request, the first server determines a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array.

[0136] The first server provides filtering services, and other servers send filtering requests to the first server to request the first server to determine whether a user identified by a certain user identifier has performed interactive behavior on content identified by a certain content identifier. The filtering request carries a user identifier and a content identifier to be determined corresponding to the user identifier. Optionally, a filtering request carries a content identifier corresponding to a user identifier; or, a filtering request carries multiple content identifiers corresponding to a user identifier, which is not limited in the embodiments of the present application. In the embodiments of the present application, an example is taken of a filtering request carrying a content identifier. If a filtering request carries multiple content identifiers, the processing process for each content identifier is the same as the processing process for a content identifier carried by the filtering request.

[0137] In an optional implementation, the bit array corresponding to the user identifier carried by the filter request is cached in the redis database, and the first server obtains the bit array corresponding to the user identifier carried by the filter request from the redis database. In another optional implementation, the bit array corresponding to the user identifier carried by the filter request is stored in the mysql database, and the first server obtains the bit array corresponding to the user identifier carried by the filter request from the mysql database. In another optional implementation, if the bit array corresponding to the user identifier carried by the filter request is not cached in the redis database, the bit array corresponding to the user identifier carried by the filter request is obtained from the mysql database and cached in the redis database; if a filter request carrying the user identifier is received again within the cache validity period, the bit array corresponding to the user identifier can be directly obtained from the redis data, thereby ensuring the persistent storage of the bit array in the mysql database and quickly obtaining the corresponding bit array for processing through the cache, further improving the processing efficiency.

[0138] 306. The first server determines at least one third content identifier corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and at least one content identifier in the at least one real-time behavior data.

[0139] The at least one third content identifier is derived from at least one real-time behavior data corresponding to the user identifier carried in the filtering request. Optionally, the corresponding relationship between the user identifier and the content identifier in each real-time behavior data is stored in a redis database, and the first server obtains at least one third content identifier corresponding to the user identifier carried in the filtering request from the redis database.

[0140] 307. The first server determines a filtering result for the content identifier carried in the filtering request based on the target bit array and at least one third content identifier corresponding to the user identifier carried in the filtering request.

[0141] The first server determines whether the content identifier carried by the filtering request is among the multiple content identifiers represented by the target bit array, and determines whether the content identifier carried by the filtering request is among the at least one third content identifier; if it is determined that the content identifier carried by the filtering request is among the multiple content identifiers represented by the target bit array or among the at least one third content identifier, then the filtering result is determined to filter the content identifier carried by the filtering request; if it is determined that the content identifier carried by the filtering request is not among the multiple content identifiers represented by the target bit array, and is not among the at least one third content identifier, then the filtering result is determined to not filter the content identifier carried by the filtering request.

[0142] Among them, the step of the first server determining whether the content identifier carried by the filtering request is among the multiple content identifiers represented by the target bit array based on the target bit array includes: the first server processes the content identifier carried by the filtering request based on the hash processing method corresponding to the target bit array to obtain multiple bits of the target bit array corresponding to the content identifier carried by the filtering request; in response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried by the filtering request including 0, it is determined that the multiple content identifiers represented by the target bit array do not include the content identifier carried by the filtering request; in response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried by the filtering request are all 1, the multiple content identifiers represented by the target bit array include the content identifier carried by the filtering request.

[0143] The hash processing method corresponding to the above target bit array is also based on multiple hash functions when generating the target bit array according to the principle of bloom filter. For example, the first server generates the target bit array based on K hash functions, and then the first server processes the content identifier carried by the filter request based on the K hash functions to obtain multiple bits in the target bit array corresponding to the content identifier carried by the filter request.

[0144] The above technical solution, based on the content of historically executed interactive behaviors represented by the bit array and the content of real-time executed interactive behaviors, can determine the filtering results more accurately and in real time, thereby improving the accuracy and immediacy of the filtering results.

[0145] It should be noted that, optionally, the first server does not refer to the real-time behavior data, but only determines the filtering result of the content identifier carried by the filtering request based on the target bit array. That is, after the first server executes step 302, it does not execute steps 303 and 304, but directly executes step 305. After executing step 305, it does not execute step 306, but directly executes the following steps of determining the filtering result of the content identifier carried by the filtering request based on the target bit array: the first server processes the content identifier carried by the filtering request based on the hash processing method corresponding to the target bit array, and obtains multiple bits of the target bit array corresponding to the content identifier carried by the filtering request; in response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried by the filtering request including 0, the multiple content identifiers represented by the target bit array do not include the content identifier carried by the filtering request, and the filtering result is determined to be not filtering the content identifier carried by the filtering request; in response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried by the filtering request are all 1, the multiple content identifiers represented by the target bit array include the content identifier carried by the filtering request, and the filtering result is determined to be filtering the content identifier carried by the filtering request.

[0146] The technical solution provided by the embodiment of the present application, in a big data scenario with a large number of content identifiers, a large number of content identifiers are represented by a binary bit array, and filtering services are supported by storing the bit array, which greatly reduces the storage space occupied to support filtering services and improves the utilization rate of storage space. In addition, when storing data, the content identifiers are respectively mapped to multiple bits of the bit array. Accordingly, when a filtering request is received, by mapping the content identifier carried by the filtering request to multiple bits of the bit array, based on the values ​​of 0 or 1 on multiple bits, it can be determined whether the content identifier carried by the filtering request is among the multiple content identifiers represented by the bit array. Compared with determining the filtering result for a certain content identifier by one-to-one comparison of character strings, the efficiency of determining the filtering result is greatly improved.

[0147] After the first server determines the filtering result of the content identifier carried in the filtering request, it returns the filtering result to the second server that sent the filtering request. Optionally, the second server is used to provide a recommendation service. If the filtering result is to filter the content identifier carried in the filtering request, the second server filters out the content identifier indicated by the filtering result from the candidate content to be recommended; if the filtering result is not to filter the content identifier carried in the filtering request, the second server does not filter the content identifier indicated by the filtering result from the candidate content to be recommended; and then the second server makes recommendations based on the remaining candidate content to reduce repeated recommendations of content.

[0148] In order to make the process of the first server providing filtering services clearer, Figure 4 See Figure 4 , the first server includes a filtering service, a cache service, Kafka, MySQL and a data warehouse. Optionally, the cache service is implemented based on a redis database. Among them, the historical behavior data stored in the data warehouse is updated regularly every day; through the above steps 301 to 302, based on the historical behavior data in the data warehouse, a corresponding bit array is generated, and it is stored in MySQL regularly and synchronously; through the above steps 303 to 304, real-time behavior data is subscribed from Kafka, and the content identifier in the real-time behavior data is stored in the cache service; the filtering service responds to the filtering request through the above step 305, and obtains the corresponding bit array from the cache service; if the corresponding bit array does not exist in the cache service, the corresponding bit array is obtained from MySQL and cached in the cache service; and the filtering service obtains the content identifier derived from the real-time behavior data from the cache service; through the above step 306, based on the obtained bit array and the content identifier derived from the real-time behavior data, the filtering result corresponding to the filtering request is determined. Among them, optionally, the filtering service, the cache service, Kafka, MySQL and the data warehouse are deployed on different multiple servers respectively, and the first server is a server cluster composed of the above multiple servers. Optionally, the filtering service caches the bit array locally based on a LRU (Least recently used) mechanism, so that when the local cache is insufficient, the least recently used bit array is cleared first.

[0149] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0150] Figure 5 is a block diagram of a data processing device provided in an embodiment of the present application. Figure 5 , the device comprises:

[0151] A bit array generation module 501 is used to generate a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse, wherein the first historical behavior data is used to record the content of the executed interactive behavior, and each first content identifier corresponds to a plurality of bits in the first bit array;

[0152] A first correspondence storage module 502, used to store the correspondence between any user identifier and the first bit array;

[0153] The bit array determination module 503 is used to determine, in response to the filtering request, a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array;

[0154] The filtering result determination module 504 is used to determine the filtering result of the content identifier carried in the filtering request based on the target bit array.

[0155] The technical solution provided by the embodiment of the present application maps the content identifier in each historical behavior data corresponding to any user identifier to multiple bits of the bit array, and the bit array is used to represent multiple content identifiers corresponding to the user identifier that have been interactively executed, so that when a filtering request carrying any user identifier is received, the filtering result of the content identifier carried by the filtering request can be determined based on the bit array corresponding to the user identifier. In a big data scenario with a large number of content identifiers, a large number of content identifiers are represented by a binary bit array, and filtering services are supported by storing the bit array, which greatly reduces the storage space occupied to support filtering services and improves the utilization rate of storage space.

[0156] In an optional implementation, the bit array generation module 501 is used to:

[0157] In response to the query compression statement, the query compression module is called to generate a first bit array in a memory corresponding to the data warehouse tool hive based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse;

[0158] The query compression statement is used to instruct to obtain the first bit array for representing multiple first content identifiers corresponding to any user identifier, and the query compression module is a functional module extended based on hive.

[0159] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior performed in the first time period;

[0160] The first correspondence storage module 502 is used to:

[0161] Generate a first keyword based on the any user identifier and the first time period;

[0162] The corresponding relationship between the first keyword and the first bit array is stored.

[0163] In another optional implementation, the bit array generation module 501 is further used to generate a second bit array based on a plurality of second content identifiers in a plurality of second historical behavior data corresponding to any user identifier in the data warehouse in response to reaching the bit array update time, the second historical behavior data being used to record the content of the interactive behavior performed in the second time period to which the bit array update time belongs;

[0164] The first corresponding relationship storage module 502 is further configured to update the stored bit array corresponding to the second time period to a second bit array.

[0165] In another optional implementation, the first historical behavior data is used to record the content of the interactive behavior of the target type executed in the first time period;

[0166] The first correspondence storage module 502 is used to:

[0167] generating a second keyword based on the any user identifier, the first time period, and the target type of interactive behavior in the first historical behavior data;

[0168] The corresponding relationship between the second keyword and the first bit array is stored.

[0169] In another optional implementation, the device further includes:

[0170] A bit array encoding module, used for encoding the first bit array to generate a character string;

[0171] The first corresponding relationship storage module 502 is further used to store the corresponding relationship between any user identifier and the character string.

[0172] In another optional implementation, the device further includes:

[0173] A real-time behavior data receiving module, used to receive at least one real-time behavior data corresponding to any user identification, where the real-time behavior data is used to record the content of the executed interactive behavior;

[0174] A second corresponding relationship storage module, used for storing a corresponding relationship between the any user identifier and at least one content identifier in at least one real-time behavior data corresponding to the any user identifier;

[0175] The filtering result determination module 504 is used to determine the filtering result of the content identifier carried by the filtering request based on the target bit array and at least one third content identifier corresponding to the user identifier carried by the filtering request, where the at least one third content identifier is derived from at least one real-time behavior data corresponding to the user identifier carried by the filtering request.

[0176] In another optional implementation, the bit array generation module 501 is used to:

[0177] Based on the hash processing method corresponding to the first bit array, each first content identifier is processed to obtain a plurality of bits of the first bit array corresponding to each first content identifier;

[0178] The values ​​of the multiple bits of the first bit array corresponding to each first content identifier are set to 1.

[0179] In another optional implementation, the filtering result determination module 504 is used to:

[0180] Based on the hash processing method corresponding to the target bit array, the content identifier carried by the filtering request is processed to obtain a plurality of bits of the target bit array corresponding to the content identifier carried by the filtering request;

[0181] In response to the fact that the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request include 0, the multiple content identifiers represented by the target bit array do not include the content identifier carried in the filtering request, and it is determined that the filtering result is not to filter the content identifier carried in the filtering request;

[0182] In response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request being 1, the multiple content identifiers represented by the target bit array include the content identifier carried in the filtering request, and the filtering result is determined to be filtering the content identifier carried in the filtering request.

[0183] It should be noted that: the data processing device provided in the above embodiment only uses the division of the above functional modules as an example when performing data processing. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the data processing device provided in the above embodiment and the data processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0184] Figure 6 This is a block diagram of a server provided in an embodiment of the present application. The server 600 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 601 and one or more memories 602, wherein at least one program code is stored in the memory 602, and at least one program code is loaded and executed by the processor 601 to implement the data processing methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.

[0185] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program code is stored, and the at least one program code can be executed by a processor in a server to complete the data processing method in the above embodiment. For example, the computer-readable storage medium can be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0186] The present application also provides a computer program product or a computer program, which includes a computer program code, and the computer program code is stored in a computer-readable storage medium. The processor of the server reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the server executes the data processing method in each of the above-mentioned method embodiments.

[0187] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0188] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method, It is characterized in that The method comprises: Generate a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse, wherein the first historical behavior data is used to record the content of the interactive behavior performed in a first time period, and each of the first content identifiers corresponds to a plurality of bits in the first bit array; and the plurality of first content identifiers in the plurality of first historical behavior data are used to identify content of the same type; generating a third keyword based on the any one user identifier, the first time period, the target type of interactive behavior in the first historical behavior data, and the type of content identified by the content identifier in the first historical behavior data; Storing the correspondence between the third keyword and the first bit group; In response to the filtering request, determining a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array; Based on the target bit array, a filtering result of the content identifier carried in the filtering request is determined.

2. The method according to claim 1, It is characterized in that The step of generating a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse includes: In response to the query compression statement, the query compression module is called to execute, in the memory corresponding to the data warehouse tool hive, the step of generating a first bit array based on the plurality of first content identifiers in the plurality of first historical behavior data corresponding to any user identifier in the data warehouse; The query compression statement is used to instruct to obtain a first bit array for representing a plurality of first content identifiers corresponding to any one of the user identifiers, and the query compression module is a functional module extended based on the hive.

3. The method according to claim 1, It is characterized in that The first historical behavior data is used to record the content of the interactive behavior performed in the first time period; The storing the correspondence between any one of the user identifiers and the first bit group includes: generating a first keyword based on the any one user identifier and the first time period; The correspondence between the first keyword and the first bit group is stored.

4. The method according to claim 1, It is characterized in that After storing the correspondence between any one of the user identifiers and the first bit group, the method further includes: In response to reaching the bit array update time, generating a second bit array based on a plurality of second content identifiers in a plurality of second historical behavior data corresponding to any one of the user identifiers in the data warehouse, wherein the second historical behavior data is used to record the content of the interactive behavior performed within a second time period to which the bit array update time belongs; The stored bit array corresponding to the second time period is updated to the second bit array.

5. The method according to claim 1, It is characterized in that Before storing the correspondence between any one of the user identifiers and the first bit group, the method further includes: Encoding the first bit array to generate a character string; The storing the correspondence between any one of the user identifiers and the first bit group includes: The corresponding relationship between any one of the user identifiers and the character string is stored.

6. The method according to claim 1, It is characterized in that Before determining the filtering result of the content identifier carried in the filtering request based on the target bit array, the method further includes: receiving at least one real-time behavior data corresponding to any one of the user identifiers, wherein the real-time behavior data is used to record the content of the executed interactive behavior; storing a correspondence between any one of the user identifiers and at least one content identifier in at least one real-time behavior data corresponding to the any one of the user identifiers; The determining, based on the target bit array, a filtering result of the content identifier carried in the filtering request includes: Based on the target bit array and at least one third content identifier corresponding to the user identifier carried in the filtering request, a filtering result for the content identifier carried in the filtering request is determined, wherein the at least one third content identifier is derived from at least one real-time behavior data corresponding to the user identifier carried in the filtering request.

7. The method according to claim 1, It is characterized in that The step of generating a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in the data warehouse includes: Processing each of the first content identifiers based on a hash processing method corresponding to the first bit array to obtain a plurality of bits of the first bit array corresponding to each of the first content identifiers; The values ​​of multiple bits of the first bit group corresponding to each of the first content identifiers are set to 1.

8. The method according to claim 1, It is characterized in that The determining, based on the target bit array, a filtering result of the content identifier carried in the filtering request includes: Based on the hash processing method corresponding to the target bit array, the content identifier carried by the filtering request is processed to obtain a plurality of bits of the target bit array corresponding to the content identifier carried by the filtering request; In response to the fact that the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request include 0, the multiple content identifiers represented by the target bit array do not include the content identifier carried in the filtering request, and the filtering result is determined to be not filtering the content identifier carried in the filtering request; In response to the values ​​of multiple bits of the target bit array corresponding to the content identifier carried in the filtering request being 1, the multiple content identifiers represented by the target bit array include the content identifier carried in the filtering request, and the filtering result is determined to be filtering the content identifier carried in the filtering request.

9. A data processing device, It is characterized in that The device comprises: A bit array generation module, configured to generate a first bit array based on a plurality of first content identifiers in a plurality of first historical behavior data corresponding to any user identifier in a data warehouse, wherein the first historical behavior data is used to record the content of the interactive behavior performed in a first time period, and each of the first content identifiers corresponds to a plurality of bits in the first bit array; and the plurality of first content identifiers in the plurality of first historical behavior data are used to identify content of the same type; a first correspondence storage module, configured to generate a third keyword based on the any user identifier, the first time period, the target type of interaction behavior in the first historical behavior data, and the type of content identified by the content identifier in the first historical behavior data; and store the correspondence between the third keyword and the first bit group; A bit array determination module, configured to determine, in response to a filtering request, a target bit array corresponding to the user identifier carried in the filtering request based on the stored correspondence between the user identifier and the bit array; The filtering result determination module is used to determine the filtering result of the content identifier carried in the filtering request based on the target bit array.

10. A server, It is characterized in that The server includes a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device of filtering candidate results of recommendation videos

    CN108133031A

  • Data storage method and device and storage medium

    CN108874803A

  • Video recommendation system

    CN110069714A

  • Information recommendation method and apparatus, and Bloom filter creation method and apparatus

    CN110781386A

  • Location based recommendation and tagging of media content items

    US9569549B1