Commodity data processing method and system, electronic device and storage medium
By using a count Bloom filter to record the number of times a product is exposed and filtering out products that are exposed repeatedly, the problem of wasted storage resources in Bloom filters for product recommendations is solved, thereby improving the accuracy of personalized recommendations and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
- Filing Date
- 2022-12-26
- Publication Date
- 2026-05-12
AI Technical Summary
In current technology for personalized product recommendations, Bloom filters cannot effectively handle products that are repeatedly exposed, leading to wasted storage resources and latency issues.
A counting Bloom filter is used to build a storage database. A counter records the number of times a product is exposed, and duplicate exposed products are filtered during queries. A hash function is used to optimize the storage and query process.
While ensuring storage performance, the system effectively filters out products that are repeatedly exposed, thereby improving the accuracy of personalized recommendations and the user experience.
Smart Images

Figure CN116071123B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, system, electronic device, and storage medium for processing commodity data. Background Technology
[0002] In personalized product recommendation scenarios, exposure filtering and exposure scattering are common diversity rules. However, the user exposure data used by these rules often requires a lot of storage space. For example, to store the exposure data of 10 million users for 7 days, if each user exposes 100 products per day, storing it using product IDs would require 52GB of space.
[0003] To reduce storage resource waste, existing technologies utilize Bloom filters to store large amounts of user exposure data, even with a certain false positive rate. In the aforementioned example, if a Bloom filter is used, only 15.6GB of space is needed with a false positive rate of 1e-4. Loading the entire Bloom filter into the application's memory becomes possible, thus gaining an advantage in latency. Therefore, Bloom filters are a good solution. However, Bloom filters cannot solve all problems. Exposure filtering rules often include constraints on the number of exposures, such as filtering products that have been exposed 3 times in a day. Traditional Bloom filters are not applicable in such cases.
[0004] Therefore, there is an urgent need for a processing method that can filter out repeatedly exposed products while ensuring data storage, in order to solve the above-mentioned technical problems of the existing technology. Summary of the Invention
[0005] In order to overcome the shortcomings of the prior art, the main objective of this invention is to provide a commodity data processing method, system, electronic device and storage medium to solve the above-mentioned technical problems of the prior art.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a product data processing method, the method comprising:
[0007] Obtain historical exposure data of users who accessed the application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products;
[0008] A storage database is constructed based on a count Bloom filter, and the historical exposure data of the users corresponding to the historical users is updated to the storage database. Product exposure data is generated for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures.
[0009] Obtain the user identifier of the real-time accessing user within the application, and query the target product exposure data corresponding to the real-time accessing user in the storage database based on the user identifier of the real-time accessing user.
[0010] The list of products to be displayed is determined based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules used to filter the list of products to be displayed.
[0011] In some embodiments, obtaining historical exposure data of users who accessed the application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products, includes:
[0012] Get the product display duration, product content load rate, and user ID for each product viewed by a historical user within the application.
[0013] If the display duration of the product exceeds a preset threshold and the product content is effectively loaded, then the product is determined to be the exposed product, and the exposed product and the user identifier are recorded in the user's historical exposure data.
[0014] In some embodiments, the step of constructing a storage database based on a count Bloom filter and updating the historical exposure data of the historical users to the storage database, and generating product exposure data for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures, including:
[0015] Based on the user identifier in the user's historical exposure data, the corresponding exposed products are placed into the count Bloom filter;
[0016] Calculate at least one target bit number corresponding to each of the exposed items in the counting Bloom filter, and increment the counter corresponding to the target bit number as the same exposed item appears multiple times;
[0017] Obtain the count value of the counter corresponding to each target bit, and store the minimum value among all the counter count values as the exposure count of the exposed product.
[0018] In some embodiments, the construction of the storage database based on the count Bloom filter further includes:
[0019] The counting Bloom filter is divided into a predetermined number of counting Bloom sub-filters;
[0020] If the storage space corresponding to the currently used count Bloom filter is insufficient, then unused count Bloom filters will be used to store user identifiers and historical exposed product data.
[0021] In some embodiments, calculating at least one target bit depth for each of the exposed items in the count Bloom filter further includes:
[0022] When the exposed product is placed into the first count Bloom sub-filter, the at least one target bit value corresponding to the exposed product in the count Bloom filter is calculated based on the hash function and stored in the product object;
[0023] When the exposed product is placed into other count Bloom filters besides the first count Bloom filter, the at least one target bit value stored in the product object corresponding to the exposed product is directly read.
[0024] In some embodiments, the number of bits in the counter is determined by the maximum capacity of elements within the count Bloom filter and the false positive rate.
[0025] In some embodiments, determining the list of products to be displayed based on the target product exposure data corresponding to the real-time accessing user, the list of products to be displayed, and preset rules filtering the list of products to be displayed includes:
[0026] Read the exposed products whose exposure count exceeds a preset threshold from the exposure data of the target product corresponding to the real-time accessing user;
[0027] Filter out products in the list of products to be displayed whose exposure count exceeds a preset threshold;
[0028] The filtered list of products to be displayed is then presented and recommended to the real-time accessing user.
[0029] Secondly, this application provides a commodity data processing system, the system comprising:
[0030] The offline acquisition module is used to acquire the user identifiers and historical exposed product data of users who accessed the application within a preset time period. The historical exposure data includes repeatedly exposed products.
[0031] The offline storage module is used to build a storage database based on the count Bloom filter and update the user identifiers and historical exposed product data corresponding to the historical access users to the storage database, so as to obtain the product exposure data corresponding to each user identifier, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0032] The real-time processing module is used to obtain the user identifier of the real-time accessing user within the application, so as to query the target product exposure data corresponding to the real-time accessing user in the storage database;
[0033] The product recommendation module is used to determine the list of products to be displayed based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed.
[0034] Thirdly, this application provides an electronic device, the electronic device comprising:
[0035] One or more processors;
[0036] and a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the following operations:
[0037] The offline acquisition module is used to acquire the user identifiers and historical exposed product data of users who accessed the application within a preset time period. The historical exposure data includes repeatedly exposed products.
[0038] The offline storage module is used to build a storage database based on the count Bloom filter and update the user identifiers and historical exposed product data corresponding to the historical access users to the storage database, so as to obtain the product exposure data corresponding to each user identifier, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0039] The real-time processing module is used to obtain the user identifier of the real-time accessing user within the application, so as to query the target product exposure data corresponding to the real-time accessing user in the storage database;
[0040] The product recommendation module is used to determine the list of products to be displayed based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed.
[0041] Fourthly, this application also provides a computer-readable storage medium storing a computer program that causes a computer to perform the following operations:
[0042] The offline acquisition module is used to acquire the user identifiers and historical exposed product data of users who accessed the application within a preset time period. The historical exposure data includes repeatedly exposed products.
[0043] The offline storage module is used to build a storage database based on the count Bloom filter and update the user identifiers and historical exposed product data corresponding to the historical access users to the storage database, so as to obtain the product exposure data corresponding to each user identifier, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0044] The real-time processing module is used to obtain the user identifier of the real-time accessing user within the application, so as to query the target product exposure data corresponding to the real-time accessing user in the storage database;
[0045] The product recommendation module is used to determine the list of products to be displayed based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed.
[0046] The beneficial effects achieved by this application are as follows:
[0047] This application provides a product data processing method, including: acquiring historical exposure data of users who have accessed an application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products; constructing a storage database based on a count Bloom filter and updating the historical exposure data of the users to the storage database, and generating product exposure data for each historical user, wherein the product exposure data includes exposed products and corresponding exposure counts; acquiring user identifiers of users accessing the application in real time, and querying the target product exposure data of the real-time users in the storage database based on the user identifiers of the real-time users; filtering the target product exposure data of the real-time users, a list of products to be displayed, and preset rules to determine the list of products to be displayed. Storing user exposure data based on a count Bloom filter, while ensuring storage performance, also allows filtering of exposed products according to business needs, enabling targeted personalized product recommendations for users and improving user experience. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:
[0049] Figure 1 This is a schematic diagram of the product recommendation method provided in the embodiments of this application;
[0050] Figure 2 This is a schematic diagram of the counting Bloom filter structure provided in an embodiment of this application;
[0051] Figure 3 This is a schematic diagram of the commodity data processing method provided in the embodiments of this application;
[0052] Figure 4 This is a diagram of the commodity data processing system architecture provided in the embodiments of this application;
[0053] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] It should be understood that, in the description of this application, unless the context explicitly requires it, the words "comprising," "including," and similar terms throughout the specification and claims should be interpreted as encompassing rather than being exclusive or exhaustive; that is, meaning "including but not limited to."
[0056] It should also be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0057] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0058] Example 1
[0059] like Figure 1 As shown in the figure, this application embodiment provides a product recommendation method. Specifically, the process of processing product data using the product recommendation method disclosed in this embodiment includes the following steps:
[0060] S1. Obtain historical exposure data of users who have accessed the application.
[0061] This application embodiment obtains offline the user identifiers of historical users who accessed the application within a preset time period and the corresponding exposed products. The preset time period can be set according to business needs; for example, if it is necessary to filter products that are repeatedly exposed within one day, the preset time period can be set to one day; if it is necessary to filter products that are repeatedly exposed within eight hours, the preset time period can be set to eight hours. Specifically, this application embodiment collects data by pre-implementing tracking points in the application. Based on the requirements of the product recommendation method disclosed in this application embodiment, this application can utilize tracking point technology to obtain the product display duration and product content loading rate corresponding to the products viewed by the user. The application reports the user identifier and the obtained tracking point data to Kafka (message queue), and then processes the reported tracking point data to determine the exposed products corresponding to the accessing user: if the display duration of the product viewed by the historical user exceeds a preset threshold and the product content is effectively loaded, then the product meeting the above conditions is determined as an exposed product to obtain all exposed products corresponding to the historical user. It is worth noting that there may be repeatedly exposed products among the exposed products. Preferably, the preset threshold can be set to 1 second. Obtain the user identifier of the historical visitor and associate it with the exposed product. The associated user identifier and exposed product constitute the user's historical exposure data. The user identifier can be a unique identifier such as the user's login account or user IP address. The above processing of the reported event tracking data to generate user historical exposure data and upload it to the storage database can be implemented using Flink (stream processing) job submission.
[0062] S2. Construct a storage database based on the count Bloom filter and update the historical exposure data of the users corresponding to the historical access users to the storage database.
[0063] Although Bloom filters are widely used in regular strata due to their advantages in space and performance, they have the following limitations:
[0064] 1. False positive error (TypeIError).
[0065] 2. You cannot delete an element from a Bloom filter; you need to rebuild a new Bloom filter if you want to delete it.
[0066] 3. Unable to record the number of times elements appear in the Bloom filter.
[0067] To better recommend products to users, it's necessary to filter out products that are repeatedly exposed. Therefore, how to achieve this technical effect using Bloom filters while ensuring storage effectiveness is a worthwhile consideration. One solution is to use Bloom filters for recording, for example, creating one Bloom filter every hour. Three Bloom filters can determine whether a product has appeared within three hours, filtering out products exposed more than twice within three hours. This determination can be made using three Bloom filters: as long as at least two of the three Bloom filters have discriminant elements, filtering is possible. However, this solution has a flaw: if product exposures occur within the same hour, the correct results cannot be obtained. Therefore, this application provides another approach, using a variant of Bloom filters: a counting Bloom filter, to solve this problem.
[0068] like Figure 2 As shown, a counting Bloom filter is essentially a Bloom filter with an additional counter added to each bit. The counter is represented as an n-bit BitSet. In the diagram above, the BitSet has n = 4 bits, meaning the counter can count up to 15 (binary 1111). Each time an element is added to the BitSet of the counting Bloom filter, the corresponding counter is incremented by 1. To count the occurrences of a particular element, the minimum value of the counters corresponding to all bits after hashing is taken as the count of that element in the counting Bloom filter. Therefore, based on this principle, after placing an exposed product into the counting Bloom filter, the minimum value of the counters corresponding to that product in the filter can be used to obtain the exposure count of that product. The BitSet is essentially a boolean array that can only store binary values, i.e., 0s and 1s.
[0069] It is worth noting that since an n-bit counter BitSet is introduced for each bit of the filter, the counting Bloom filter occupies n+1 times the memory of the Bloom filter. Therefore, in order to greatly reduce space, the value of n needs to be selected. Usually, the number of bits n of the counter is determined by the maximum capacity m of the elements in the counting Bloom filter and the false positive rate p. The specific formula is: n=ceil((m*log(p)) / log(1 / pow(2,log(2)))).
[0070] To save space, this application further proposes to split the count Bloom filter into several smaller count Bloom sub-filters. If it is determined that the currently written count Bloom sub-filter is full, a new count Bloom sub-filter is called to continue writing new data. Meanwhile, to avoid large key values (represented as product names in this application), the number of count Bloom sub-filters is truncated. When the number of count Bloom sub-filters reaches a set threshold, the number of count Bloom sub-filters is truncated according to the data production time from smallest to largest.
[0071] Furthermore, to improve the storage performance of the count Bloom filter, this application embodiment proposes that when multiple count Bloom sub-filters exist in the rule layer, upon first writing the exposed product into the count Bloom sub-filter, the target number of bits (hashvalue) of the exposed product in the count Bloom sub-filter is calculated according to a hash function and stored in the product object. When the exposed product is stored in the remaining count Bloom sub-filters, the target number of bits previously stored in the product object is used, which can avoid unnecessary and duplicate filter bit calculations. The number and selection of hash functions are well known in the art and will not be described in detail here.
[0072] S3. Query the exposure data of the target product corresponding to the real-time access user, and filter the list of products to be displayed according to the exposure data of the target product, the list of products to be displayed and preset rules to determine the list of products to be displayed and recommend the list of products to be displayed to the real-time access user.
[0073] Specifically, when a user revisits the application, the user identifier of the real-time accessing user within the application is obtained, and a data request is generated. Upon receiving the request, the reordering layer queries the target product exposure data corresponding to the real-time accessing user in the count Bloom filter within the storage database based on the user identifier. The target product exposure data includes the exposed products and their corresponding exposure counts. Based on the exposure counts of the exposed products in the target product exposure data corresponding to the real-time accessing user and business requirements, products with more than a specified number of exposures within a specified time are filtered, such as products with more than three exposures in a single day. The filtered list of products to be displayed is then recommended to the user as the product display list, i.e., the products in the product display list are reordered.
[0074] Example 2
[0075] Corresponding to Embodiment 1 above, this application also provides a product data processing method, such as... Figure 3 As shown, it specifically includes:
[0076] 3100. Obtain historical exposure data of users who accessed the application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products;
[0077] Preferably, the step of obtaining historical user exposure data corresponding to users who accessed the application within a preset time period includes user identifiers and exposed products, including:
[0078] 3110. Obtain the product display duration, product content load rate, and user identifier for each historical user browsing products within the application;
[0079] 3120. If the display duration of the product exceeds a preset threshold and the product content is effectively loaded, then the product is determined to be the exposed product, and the exposed product and the user identifier are recorded in the user's historical exposure data.
[0080] 3200. Construct a storage database based on a count Bloom filter and update the historical exposure data of the users corresponding to the historical users to the storage database, and generate product exposure data for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0081] Preferably, the step of constructing a storage database based on a count Bloom filter and updating the historical exposure data of the historical users to the storage database, and generating product exposure data for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures, including:
[0082] 3210. Based on the user identifier in the user's historical exposure data, put the corresponding exposed products into a count Bloom filter;
[0083] 3220. Calculate at least one target bit number corresponding to each of the exposed items in the counting Bloom filter, and increment the counter corresponding to the target bit number as the same exposed item appears multiple times;
[0084] Preferably, calculating at least one target bit depth for each of the exposed items in the count Bloom filter further includes:
[0085] 3221. When the exposed product is placed into the first count Bloom sub-filter, the at least one target bit number corresponding to the exposed product in the count Bloom filter is calculated based on the hash function and stored in the product object;
[0086] 3222. When the exposed product is placed into other counting Bloom filters besides the first counting Bloom filter, the at least one target bit number stored in the product object corresponding to the exposed product is directly read.
[0087] Preferably, the number of bits in the counter is determined by the maximum capacity of elements in the counting Bloom filter and the false positive rate.
[0088] 3230. Obtain the count value of the counter corresponding to each of the target bits, and store the minimum value among all the count values of the counters as the exposure count corresponding to the exposed product.
[0089] Preferably, the construction of the storage database based on the count Bloom filter further includes:
[0090] 3240. Divide the counting Bloom filter into a predetermined number of counting Bloom sub-filters;
[0091] 3250. If the storage space corresponding to the currently used count Bloom filter is insufficient, then an unused count Bloom filter will be used to store the user identifier and historical exposed product data.
[0092] 3300. Obtain the user identifier of the real-time accessing user within the application, and query the target product exposure data corresponding to the real-time accessing user in the storage database based on the user identifier of the real-time accessing user;
[0093] 3400. Based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules, the list of products to be displayed is filtered to determine the list of products to be displayed.
[0094] Preferably, the method for determining the list of products to be displayed based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed includes:
[0095] 3410. Read the exposed products whose exposure count exceeds a preset threshold from the exposure data of the target product corresponding to the real-time accessing user;
[0096] 3420. Filter out products in the list of products to be displayed whose exposure count exceeds a preset threshold;
[0097] 3430. The filtered list of products to be displayed is presented as the products to be showcased and recommended to the real-time accessing user.
[0098] Example 3
[0099] like Figure 4 As shown, corresponding to Embodiments 1 and 2 above, this application provides a commodity data processing system, which includes:
[0100] The offline acquisition module 410 is used to acquire the user identifiers and historical exposed product data corresponding to the historical users who accessed the application within a preset time period. The historical exposure data includes repeatedly exposed products.
[0101] Offline storage module 420 is used to build a storage database based on a count Bloom filter and update the user identifiers and historical exposed product data corresponding to the historical access users to the storage database, so as to obtain the product exposure data corresponding to each user identifier, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0102] The real-time processing module 430 is used to obtain the user identifier of the real-time access user in the application, so as to query the target product exposure data corresponding to the real-time access user in the storage database;
[0103] The product recommendation module 440 is used to determine the product list to be displayed based on the real-time access user's target product exposure data, the product list to be displayed, and preset rules filtering the product list to be displayed.
[0104] In some embodiments, the offline acquisition module 410 is further configured to acquire the product display duration, product content loading rate, and user identifier corresponding to each historical user browsing a product within the application; if the display duration corresponding to the product exceeds a preset threshold and the product content of the product is effectively loaded, the offline acquisition module 410 is further configured to determine that the product is the exposed product, and record the exposed product and the user identifier in the user's historical exposure data.
[0105] In some embodiments, the offline storage module 420 is further configured to place the corresponding exposed products into a count Bloom filter based on the user identifier in the user's historical exposure data; the offline storage module 420 is further configured to calculate at least one target number of bits corresponding to each exposed product in the count Bloom filter and increment the counter corresponding to the target number of bits as the number of times the same exposed product appears; the offline storage module 420 is further configured to obtain the count value of the counter corresponding to each target number of bits, and store the minimum value among all the count values of the counters as the number of exposures corresponding to the exposed product.
[0106] In some embodiments, the offline storage module 420 is further configured to split the count Bloom filter into a preset number of count Bloom sub-filters; if the storage space corresponding to the currently used count Bloom sub-filter is insufficient, the offline storage module 420 is further configured to call unused count Bloom sub-filters to store user identifiers and historical exposed product data.
[0107] In some embodiments, the offline storage module 420 is further configured to calculate, based on a hash function, the at least one target number of bits corresponding to the exposed product in the first count Bloom filter and store it in the product object when the exposed product is placed in the first count Bloom filter; when the exposed product is placed in other count Bloom filters besides the first count Bloom filter, the offline storage module 420 is further configured to directly read the at least one target number of bits stored in the product object corresponding to the exposed product. The number of counter bits is determined by the maximum capacity of the elements in the count Bloom filter and the false positive rate.
[0108] In some embodiments, the product recommendation module 440 is further configured to read exposed products whose exposure counts exceed a preset threshold from the target product exposure data corresponding to the real-time accessing user; the product recommendation module 440 is further configured to filter exposed products whose exposure counts exceed the preset threshold from the list of products to be displayed; the product recommendation module 440 is further configured to use the filtered list of products to be displayed as display products and recommend them to the real-time accessing user.
[0109] Example 4
[0110] Corresponding to all the above embodiments, this application provides an electronic device, including:
[0111] One or more processors; and memory associated with the one or more processors, the memory storing program instructions that, when read and executed by the one or more processors, perform the following steps:
[0112] Step A: Obtain the historical exposure data of users who accessed the application within a preset time period. The historical exposure data includes user identifiers and exposed products.
[0113] Step B: Construct a storage database based on the count Bloom filter and update the historical exposure data of the users corresponding to the historical users to the storage database, and generate product exposure data for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures;
[0114] Step C: Obtain the user identifier of the real-time accessing user within the application, and query the target product exposure data corresponding to the real-time accessing user in the storage database based on the user identifier of the real-time accessing user;
[0115] Step D: Based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules, filter the list of products to be displayed to determine the list of products to be shown.
[0116] in, Figure 5An exemplary architecture of an electronic device is shown, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, and memory 520 can communicate with each other via a bus 530.
[0117] The processor 510 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0118] The memory 520 can be implemented in the form of ROM (Read-Only Memory), RAM (Random Access Memory), static terminal device, dynamic terminal device, etc. The memory 520 can store the operating system 521 for controlling the execution of the electronic device 500, and the basic input / output system (BIOS) 522 for controlling the low-level operations of the electronic device 500. Additionally, it can store a web browser 523, a data storage management system 524, and an icon font processing system 524, etc. The aforementioned icon font processing system 524 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when implementing the technical solution provided in this application through software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.
[0119] Input / output interface 513 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0120] Network interface 514 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0121] Bus 530 includes a pathway for transmitting information between various components of the device, such as processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, and memory 520.
[0122] In addition, the electronic device 500 can also obtain information on specific claim conditions from the virtual resource object claim condition information database for use in condition judgment, etc.
[0123] It should be noted that although the above-described device only shows the processor 510, video display adapter 511, disk drive 512, input / output interface 513, network interface 514, memory 520, bus 530, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0124] Example 6
[0125] Corresponding to all the above embodiments, this application also provides a computer-readable storage medium, characterized in that it stores a computer program that causes a computer to operate as follows:
[0126] Obtain historical exposure data of users who accessed the application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products;
[0127] A storage database is constructed based on a count Bloom filter, and the historical exposure data of the users corresponding to the historical users is updated to the storage database. Product exposure data is generated for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures.
[0128] Obtain the user identifier of the real-time accessing user within the application, and query the target product exposure data corresponding to the real-time accessing user in the storage database based on the user identifier of the real-time accessing user.
[0129] The list of products to be displayed is determined based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules used to filter the list of products to be displayed.
[0130] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a cloud server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0131] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0132] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for processing commodity data, characterized in that, The method includes: Obtain historical exposure data of users who accessed the application within a preset time period, wherein the historical exposure data includes user identifiers and exposed products; A storage database is constructed based on a count Bloom filter, and the historical exposure data of the users corresponding to the historical users is updated to the storage database. Product exposure data is generated for each historical user, wherein the product exposure data includes the exposed products and the corresponding number of exposures. Obtain the user identifier of the real-time accessing user within the application, and query the target product exposure data corresponding to the real-time accessing user in the storage database based on the user identifier of the real-time accessing user. Based on the real-time access user's target product exposure data, the product list to be displayed, and preset rules to filter the product list to be displayed, the product list to be displayed is determined. The step of constructing a storage database based on a count Bloom filter and updating the historical exposure data of the historical users to the storage database, and generating product exposure data for each historical user, includes: Based on the user identifier in the user's historical exposure data, the corresponding exposed products are placed into the count Bloom filter; Calculate at least one target bit number corresponding to each of the exposed items in the counting Bloom filter, and increment the counter corresponding to the target bit number as the same exposed item appears multiple times; Obtain the count value of the counter corresponding to each target bit, and store the minimum value among all the counter count values as the exposure count of the exposed product.
2. The method according to claim 1, characterized in that, The step of obtaining historical exposure data for users who accessed the application within a preset time period includes user identifiers and exposed products, including: Get the product display duration, product content load rate, and user ID for each product viewed by a historical user within the application. If the display duration of the product exceeds a preset threshold and the product content is effectively loaded, then the product is determined to be the exposed product, and the exposed product and the user identifier are recorded in the user's historical exposure data.
3. The method according to claim 1, characterized in that, The method of building a storage database based on a count Bloom filter also includes: The counting Bloom filter is divided into a predetermined number of counting Bloom sub-filters; If the storage space corresponding to the currently used count Bloom filter is insufficient, then unused count Bloom filters will be used to store user identifiers and historical exposed product data.
4. The method according to claim 3, characterized in that, The step of calculating at least one target bit depth for each of the exposed items in the count Bloom filter further includes: When the exposed product is placed into the first count Bloom sub-filter, the at least one target bit value corresponding to the exposed product in the count Bloom filter is calculated based on the hash function and stored in the product object; When the exposed product is placed into other count Bloom filters besides the first count Bloom filter, the at least one target bit value stored in the product object corresponding to the exposed product is directly read.
5. The method according to claim 1, characterized in that, The number of bits in the counter is determined by the maximum capacity of elements in the count Bloom filter and the false positive rate.
6. The method according to claim 4, characterized in that, Based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed to determine the list of products to be shown, including: Read the exposed products whose exposure count exceeds a preset threshold from the exposure data of the target product corresponding to the real-time accessing user; Filter out products in the list of products to be displayed whose exposure count exceeds a preset threshold; The filtered list of products to be displayed is then presented and recommended to the real-time accessing user.
7. A commodity data processing system for implementing the commodity data processing method as described in claim 1, characterized in that, The commodity data processing system includes: The offline acquisition module is used to acquire the user identifiers and historical exposed product data of users who accessed the application within a preset time period. The historical exposure data includes repeatedly exposed products. The offline storage module is used to build a storage database based on the count Bloom filter and update the user identifiers and historical exposed product data corresponding to the historical access users to the storage database, so as to obtain the product exposure data corresponding to each user identifier, wherein the product exposure data includes the exposed products and the corresponding number of exposures; The real-time processing module is used to obtain the user identifier of the real-time accessing user within the application, so as to query the target product exposure data corresponding to the real-time accessing user in the storage database; The product recommendation module is used to determine the list of products to be displayed based on the real-time access user's target product exposure data, the list of products to be displayed, and preset rules filtering the list of products to be displayed.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; And a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, It stores a computer program that causes the computer to perform the method described in any one of claims 1-6.