Method and apparatus for processing user behavior data
The present disclosure provides methods and apparatuses for processing user behavior data. One exemplary processing method comprises: acquiring behavior data of a user, and a time at which the behavior data is generated; determining at least one of a timeliness factor and a periodicity factor corresponding to the behavior data according to the time at which the behavior data is generated and a current time; and adjusting the behavior data according to the at least one of the timeliness factor and the periodicity factor. With the processing methods provided by the present disclosure, the timeliness of the user behavior data can be improved. The preference and interest of the user can be acquired more effectively. That way, tailor search results can be provided to meet the demand of the user, thereby improving user experience.
1 . A method for providing ranked search results to a user based on user behavior data, comprising:
acquiring behavior data of the user from a search engine user behavior log, wherein the search engine user behavior log comprises a plurality of entries comprising:
feature data associated with the behavior data;
label data associated with click behavior; and
a time corresponding to the behavior data being generated according to the search engine;
determining a timeliness factor and a periodicity factor corresponding to the behavior data according to a time at which the behavior data is generated and a current time, wherein
the time at which the behavior data is generated and the current time are an i th day and a j th day in a preset time period having N days;
the timeliness factor provides a higher weight to behavior data closer to the current time;
the periodicity factor provides a higher weight to behavior data closer to a start of a time period and farther from the current time, wherein the behavior data repeats during each time period of a same length; and
determining the periodicity factor comprises:
determining a date difference between the i th day on which the behavior data is generated and the j th day; and
generating the periodicity factor according to the date difference;
weighting the behavior data of the time at which the behavior data is generated and the current time to generate a weighted value, wherein the weighted value is based on at least one of the timeliness factor or the periodicity factor;
adjusting the behavior data using the weighted value;
ranking the search results based on the adjusted behavior data; and
providing the ranked search results to the user.
2 . The method for providing ranked search results to a user based on user behavior data according to claim 1 , wherein adjusting the behavior data comprises:
obtaining a product of the timeliness factor and the behavior data as first behavior data; and
generating second behavior data according to the periodicity factor, the behavior data, and the first behavior data.
3 . The method for providing ranked search results to a user based on user behavior data according to claim 2 , wherein generating second behavior data according to the periodicity factor, the behavior data, and the first behavior data comprises:
generating third behavior data according to the periodicity factor and the behavior data; and
generating the second behavior data according to the first behavior data and the third behavior data.
4 . The method for providing ranked search results to a user based on user behavior data according to claim 3 , wherein the first behavior data is added to or multiplied by the third behavior data to generate the second behavior data.
5 . The method for providing ranked search results to a user based on user behavior data according to claim 1 , wherein determining the timeliness factor comprises:
determining a time difference between a date on which the behavior data is generated and a current date; and
determining the timeliness factor according to the time difference and a time attenuation function.
6 . The method for providing ranked search results to a user based on user behavior data according to claim 5 , wherein the time attenuation function comprises at least one of an exponential function and a power function.
7 . The method for providing ranked search results to a user based on user behavior data according to claim 5 , wherein determining the timeliness factor according to the time difference and a time attenuation function further comprising:
weighting the behavior data according to the time attenuation; and
generating a first weighted value to a first time before the current time and a second weighted value to a second time before the first time, wherein the second weighted value is smaller than the first weighted value.
8 . An apparatus for providing ranked search results to a user based on user behavior data, comprising:
a memory storing a set of instructions;
a processor configured to execute the set of instructions to cause the apparatus to perform:
acquiring behavior data of the user from a search engine user behavior log, wherein the search engine user behavior log comprises a plurality of entries comprising:
feature data associated with the behavior data;
label data associated with click behavior; and
a time corresponding to the behavior data being generated according to the search engine;
determining a timeliness factor and a periodicity factor corresponding to the behavior data according to a time at which the behavior data is generated and a current time, wherein
the time at which the behavior data is generated and the current time are an i th day and a j th day in a preset time period having N days;
the timeliness factor provides a higher weight to behavior data closer to the current time;
the periodicity factor provides a higher weight to behavior data closer to a start of a time period and farther from the current time, wherein the behavior data repeats during each time period of a same length; and
determining the periodicity factor comprises:
determining a date difference between the i th day on which the behavior data is generated and the j th day; and
generating the periodicity factor according to the date difference;
weighting the behavior data of the time at which the behavior data is generated and the current time to generate a weighted value, wherein the weighted value is based on at least one of the timeliness factor or the periodicity factor;
adjusting the behavior data using the weighted value;
ranking the search results based on the adjusted behavior data; and
providing the ranked search results to the user.
9 . The apparatus for providing ranked search results to a user based on user behavior data according to claim 8 , wherein adjusting the behavior data comprises:
obtaining a product of the timeliness factor and the behavior data as first behavior data; and
generating second behavior data according to the periodicity factor, the behavior data, and the first behavior data.
10 . The apparatus for providing ranked search results to a user based on user behavior data according to claim 8 , wherein determining the timeliness factor comprises:
determining a time difference between a date on which the behavior data is generated and a current date; and
determining the timeliness factor according to the time difference and a time attenuation function.
11 . A non-transitory computer readable medium that stores a set of instructions that is executable by at least one processor of a computer to cause the computer to perform method for providing ranked search results to a user based on user behavior data, comprising:
acquiring behavior data of the user from a search engine user behavior log, wherein the search engine user behavior log comprises a plurality of entries comprising:
feature data associated with the behavior data;
label data associated with click behavior; and
a time corresponding to the behavior data being generated according to the search engine;
determining a timeliness factor and a periodicity factor corresponding to the behavior data according to a time at which the behavior data is generated and a current time, wherein
the time at which the behavior data is generated and the current time are an i th day and a j th day in a preset time period having N days;
the timeliness factor provides a higher weight to behavior data closer to the current time;
the periodicity factor provides a higher weight to behavior data closer to a start of a time period and farther from the current time, wherein the behavior data repeats during each time period of a same length; and
determining the periodicity factor comprises:
determining a date difference between the i th day on which the behavior data is generated and the j th day; and
generating the periodicity factor according to the date difference;
weighting the behavior data of the time at which the behavior data is generated and the current time to generate a weighted value, wherein the weighted value is based on at least one of the timeliness factor or the periodicity factor;
adjusting the behavior data using the weighted value;
ranking the search results based on the adjusted behavior data; and
providing the ranked search results to the user.
12 . The non-transitory computer readable medium according to claim 11 , wherein adjusting the behavior data comprises:
obtaining a product of the timeliness factor and the behavior data as first behavior data; and
generating second behavior data according to the periodicity factor, the behavior data, and the first behavior data.
13 . The non-transitory computer readable medium according to claim 12 , wherein generating second behavior data according to the periodicity factor, the behavior data, and the first behavior data comprises:
generating third behavior data according to the periodicity factor and the behavior data; and
generating the second behavior data according to the first behavior data and the third behavior data.
14 . The non-transitory computer readable medium according to claim 13 , wherein the first behavior data is added to or multiplied by the third behavior data to generate the second behavior data.
15 . The non-transitory computer readable medium according to claim 11 , wherein determining the timeliness factor comprises:
determining a time difference between a date on which the behavior data is generated and a current date; and
determining the timeliness factor according to the time difference and a time attenuation function.
16 . The non-transitory computer readable medium according to claim 15 , wherein the time attenuation function comprises at least one of an exponential function and a power function.