CN-116071123-B - Commodity data processing method, commodity data processing system, electronic equipment and storage medium
Abstract
The application provides a commodity data processing method, a system, electronic equipment and a storage medium, which comprise the steps of obtaining user historical exposure data corresponding to a historical access user of an access application program in a preset time period, wherein the user historical exposure data comprises user identifications and exposed commodities, constructing a storage database based on a counting bloom filter, updating the user historical exposure data corresponding to the historical access user to the storage database, generating commodity exposure data corresponding to each historical access user, obtaining user identifications of real-time access users in the application program, inquiring target commodity exposure data corresponding to the real-time access users in the storage database according to the user identifications of the real-time access users, and filtering a commodity list to be displayed based on the target commodity exposure data corresponding to the real-time access users, the commodity list to be displayed and preset rules to determine a displayed commodity list. And filtering the exposed commodity according to the service requirement while ensuring the storage performance, and recommending personalized commodity for the user.
Inventors
- ZHU JIANFENG
- LIU XINGHUA
- XIAO XIANG
Assignees
- 唯品会(广州)软件有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20221226
Claims (9)
- 1. A commodity data processing method, the method comprising: acquiring user historical exposure data corresponding to a historical access user accessing an application program in a preset time period, wherein the user historical exposure data comprises a user identifier and an exposed commodity; constructing a storage database based on a counting bloom filter, updating user historical exposure data corresponding to the historical access users to the storage database, and generating commodity exposure data corresponding to each historical access user, wherein the commodity exposure data comprises exposure commodities and corresponding exposure times; Acquiring a user identifier of a real-time access user in the application program, and inquiring target commodity exposure data corresponding to the real-time access user in the storage database according to the user identifier of the real-time access user; Filtering the commodity list to be displayed based on the target commodity exposure data corresponding to the real-time access user, the commodity list to be displayed and preset rules to determine a displayed commodity list; the method for generating commodity exposure data based on the counting bloom filter comprises the steps of constructing a storage database, updating user historical exposure data corresponding to historical access users to the storage database, generating commodity exposure data corresponding to each historical access user, and comprising the following steps: Based on the user identification in the user history exposure data, respectively placing the corresponding exposure commodities into a counting bloom filter; calculating at least one target digit corresponding to each exposure commodity in the counting bloom filter, and enabling a counter corresponding to the target digit to self-increment along with the occurrence times of the same exposure commodity; And acquiring the count value of the counter corresponding to each target bit number, and taking the minimum value in the count values of all the counters as the exposure times corresponding to the exposure commodity and storing the minimum value.
- 2. The method of claim 1, wherein the obtaining the user historical exposure data corresponding to the historical access user accessing the application program in the preset time period, the user historical exposure data including the user identifier and the exposed commodity comprises: Acquiring commodity display duration, commodity content loading rate and user identification corresponding to commodities browsed by each historical access user in an application program; If the display duration corresponding to the commodity exceeds a preset threshold value and the commodity content of the commodity is loaded effectively, determining that the commodity is the exposure commodity, and recording the exposure commodity and the user identification in the user historical exposure data.
- 3. The method of claim 1, wherein the counting bloom filter based building storage database further comprises: splitting the counting bloom filter into a preset number of counting bloom sub-filters; And if the storage space corresponding to the currently adopted counting bloom sub-filter is insufficient, calling the unused counting bloom sub-filter to store the user identification and the historical exposure commodity data.
- 4. The method of claim 3, wherein said calculating at least one target number of bits for each of said exposed goods in said counting bloom filter further comprises: when the exposed commodity is placed in a first counting bloom filter, calculating at least one target bit number corresponding to the exposed commodity in the counting bloom filter based on a hash function, and storing the target bit number in a commodity object; and when the exposed commodity is placed in other counting bloom sub-filters except the first counting bloom sub-filter, directly reading the at least one target bit number stored in the commodity object corresponding to the exposed commodity.
- 5. The method of claim 1, wherein the step of determining the position of the substrate comprises, The number of counter bits is determined by the maximum capacity of elements within the counting bloom filter and the false positive rate.
- 6. The method of claim 4, wherein filtering the list of items to be displayed based on the target item exposure data corresponding to the real-time access user, the list of items to be displayed, and a preset rule to determine a list of items to be displayed, comprises: Reading the exposure commodity with the exposure times exceeding a preset threshold value in the exposure data of the target commodity corresponding to the real-time access user; Filtering the exposed commodities, of which the exposure times exceed a preset threshold value, in the commodity list to be displayed; and taking the filtered commodity list to be displayed as a displayed commodity and recommending the displayed commodity to the real-time access user.
- 7. A commodity data processing system for implementing the commodity data processing method according to claim 1, wherein the commodity data processing system comprises: The off-line acquisition module is used for acquiring a user identifier corresponding to a historical access user accessing the application program in a preset time period and historical exposure commodity data, wherein the historical exposure data comprises repeated exposure commodities; the offline storage module is used for constructing a storage database based on the counting bloom filter and updating user identifiers corresponding to the historical access users and historical exposure commodity data to the storage database so as to acquire commodity exposure data corresponding to each user identifier, wherein the commodity exposure data comprises exposure commodities and corresponding exposure times; The real-time processing module is used for acquiring the user identification of the real-time access user in the application program so as to inquire the exposure data of the target commodity corresponding to the real-time access user in the storage database; And the commodity recommendation module is used for filtering the commodity list to be displayed based on the target commodity exposure data corresponding to the real-time access user, the commodity list to be displayed and a preset rule to determine a displayed commodity list.
- 8. An electronic device, the electronic device comprising: one or more processors; And a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the method of any of claims 1-6.
- 9. A computer readable storage medium, characterized in that it stores a computer program, which causes a computer to perform the method of any one of claims 1-6.
Description
Commodity data processing method, commodity data processing system, electronic equipment and storage medium Technical Field The present invention relates to the field of computer technologies, and in particular, to a commodity data processing method, a system, an electronic device, and a storage medium. Background In the commodity personalized recommendation scene, exposure filtering, exposure scattering and the like are all frequently used diversity rules, however, the user exposure data used by the rules often needs to consume a large amount of storage space to be placed, for example, 1000 ten thousand users are required to store exposure data for 7 days, if each user exposes 100 commodities every day, 52GB of space is required to store with commodity ids. In order to reduce the waste of storage resources, under the condition of receiving a certain misjudgment rate, the prior art stores a large amount of user exposure data by using a bloom filter (bloom filter), if the bloom filter is used in the foregoing example, under the condition that the misjudgment rate is 1e-4, only 15.6GB space is needed, and the whole bloom filter is loaded into an application memory, so that the advantage of time delay is also obtained, thus the bloom filter (a good solution; the bloom filter cannot solve all problems; in the exposure filtering rule, the constraint of the exposure times is often brought, for example, the exposure time is filtered for commodities which have been exposed for 3 times in the same day, and the traditional bloom filter cannot be applied. Therefore, a processing method for filtering the repeatedly exposed commodity is needed under the premise of ensuring data storage so as to solve the technical problems in the prior art. Disclosure of Invention In order to solve the deficiencies of the prior art, the present invention is directed to a method, a system, an electronic device and a storage medium for processing commodity data, so as to solve the above technical problems of the prior art. To achieve the above object, the present invention provides, in a first aspect, a commodity data processing method, the method comprising: acquiring user historical exposure data corresponding to a historical access user accessing an application program in a preset time period, wherein the user historical exposure data comprises a user identifier and an exposed commodity; constructing a storage database based on a counting bloom filter, updating user historical exposure data corresponding to the historical access users to the storage database, and generating commodity exposure data corresponding to each historical access user, wherein the commodity exposure data comprises exposure commodities and corresponding exposure times; Acquiring a user identifier of a real-time access user in the application program, and inquiring target commodity exposure data corresponding to the real-time access user in the storage database according to the user identifier of the real-time access user; and filtering the commodity list to be displayed based on the target commodity exposure data corresponding to the real-time access user, the commodity list to be displayed and a preset rule to determine a displayed commodity list. In some embodiments, the acquiring the user historical exposure data corresponding to the historical access user accessing the application program in the preset time period, where the user historical exposure data includes a user identifier and an exposed commodity includes: Acquiring commodity display duration, commodity content loading rate and user identification corresponding to commodities browsed by each historical access user in an application program; If the display duration corresponding to the commodity exceeds a preset threshold value and the commodity content of the commodity is loaded effectively, determining that the commodity is the exposure commodity, and recording the exposure commodity and the user identification in the user historical exposure data. In some embodiments, the counting bloom filter is used for constructing a storage database, updating user historical exposure data corresponding to the historical access users to the storage database, and generating commodity exposure data corresponding to each historical access user, wherein the commodity exposure data comprises exposure commodities and corresponding exposure times, and the method comprises the following steps: Based on the user identification in the user history exposure data, respectively placing the corresponding exposure commodities into a counting bloom filter; calculating at least one target digit corresponding to each exposure commodity in the counting bloom filter, and enabling a counter corresponding to the target digit to self-increment along with the occurrence times of the same exposure commodity; And acquiring the count value of the counter corresponding to each target bit number, and taking the minimum value in the count va