CN109213922B - Method and device for sequencing search results - Google Patents

Method and device for sequencing search results Download PDF

Info

Publication number
CN109213922B
CN109213922B CN201710523512.XA CN201710523512A CN109213922B CN 109213922 B CN109213922 B CN 109213922B CN 201710523512 A CN201710523512 A CN 201710523512A CN 109213922 B CN109213922 B CN 109213922B
Authority
CN
China
Prior art keywords
comparison
search
result
search results
records
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710523512.XA
Other languages
Chinese (zh)
Other versions
CN109213922A (en
Inventor
白凡
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yami Technology Guangzhou Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710523512.XA priority Critical patent/CN109213922B/en
Publication of CN109213922A publication Critical patent/CN109213922A/en
Application granted granted Critical
Publication of CN109213922B publication Critical patent/CN109213922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of computers, in particular to a method and a device for sequencing search results. The method comprises the following steps: searching N search results based on search requirements, wherein N is a positive integer; acquiring the click volume, the click user volume and the update time stamp of each search result; obtaining an influence factor of each search result based on the click rate, the click user rate, the update timestamp and the current timestamp of each search result; and sorting the N search results based on the influence factors of the N search results to obtain a sorting result. The method and the device are used for achieving the technical effect of sequencing the search results according to the influence of the search results.

Description

Method and device for sequencing search results
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for sequencing search results.
Background
With the dramatic development of informatization in China and the arrival of a big data era, it is very important to search influential or representative data from hundreds of billions of data.
Although there are many search methods for searching according to the search requirements of the user in the prior art, the inventor of the present application finds that most search methods have a common technical problem in the process of implementing the technical solution of the present application, that is, the ranking of the search results is still not good enough, so that the user has to further find out powerful search results from a large number of search results.
Disclosure of Invention
The embodiment of the invention provides a method and a device for sequencing search results, which are used for sequencing the search results according to the influence of the search results.
In a first aspect, the present invention provides a method for ranking search results, comprising:
searching N search results based on search requirements, wherein N is a positive integer;
acquiring the click volume, the click user volume and the update time stamp of each search result;
obtaining an influence factor of each search result based on the click rate, the click user rate, the update timestamp and the current timestamp of each search result;
and sorting the N search results based on the influence factors of the N search results to obtain a sorting result.
Optionally, when N is greater than or equal to 2, ranking the N search results based on the influence factors of the N search results to obtain a ranking result, including:
comparing the influence factors of every two search results, and obtaining a first comparison record of each search result according to the comparison result;
comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results;
comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results;
if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result;
if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records;
judging whether the N search results are all determined to be sorted or not;
if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results;
and if the N search results are determined to be sorted, obtaining the sorting result.
Optionally, the second comparison record includes the number of times that the comparison result is a larger value and the number of times that the comparison result is a smaller value, and the search result ranked the most front and the search result ranked the most rear are determined based on the two second comparison records, including:
determining that the search result ranking with the largest number of times of larger values and the smallest number of times of smaller values in the second comparison record is the most front;
and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
Optionally, the second comparison record includes a weight determined according to the comparison result, and the search result ranked the top and the search result ranked the back are determined based on the two second comparison records, including:
determining that the search result with the largest weight in the second comparison record is ranked most front;
and determining that the search result with the minimum weight in the second comparison record is ranked most backwards.
Optionally, obtaining an influence factor of each search result based on the click amount, the click user amount, the update timestamp, and the current timestamp of each search result, includes:
attenuating the click rate of each search result to obtain a first value, wherein the first value is positively correlated with the click rate;
obtaining a second value according to the number of clicked users of each search result, wherein the second value is positively correlated with the number of clicked users;
obtaining a third value according to a time interval between the update timestamp and the current timestamp, wherein the third value is inversely related to the time interval;
calculating the influence factor based on the first value, the second value, and the third value.
In a second aspect, the present invention provides an apparatus for ranking search results, comprising:
the search module is used for searching N search results based on search requirements, wherein N is a positive integer;
the acquisition module is used for acquiring the click volume, the click user volume and the update time stamp of each search result;
an obtaining module, configured to obtain an influence factor of each search result based on the click amount, the click user amount, the update timestamp, and a current timestamp of each search result;
and the sorting module is used for sorting the N search results based on the influence factors of the N search results to obtain a sorting result.
Optionally, when N is greater than or equal to 2, the sorting module is configured to compare the influence factors of every two search results, and obtain a first comparison record of each search result according to the comparison result; comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results; comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results; if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result; if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records; judging whether the N search results are all determined to be sorted or not; if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results; and if the N search results are determined to be sorted, obtaining the sorting result.
Optionally, the second comparison record includes the number of times that the comparison result is a larger value and the number of times that the comparison result is a smaller value, and the ranking module is configured to determine that the ranking of the search result that the number of times that is a larger value in the second comparison record is the largest and the number of times that is a smaller value is the smallest is the most front; and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
Optionally, the second comparison record includes a weight determined according to the comparison result, and the ranking module is configured to determine that the search result with the largest weight in the second comparison record is ranked most ahead; and determining that the search result with the minimum weight in the second comparison record is ranked most backwards.
Optionally, the obtaining module is configured to perform attenuation processing on the click rate of each search result to obtain a first value, where the first value is positively correlated to the click rate; obtaining a second value according to the number of clicked users of each search result, wherein the second value is positively correlated with the number of clicked users; obtaining a third value according to a time interval between the update timestamp and the current timestamp, wherein the third value is inversely related to the time interval; calculating the influence factor based on the first value, the second value, and the third value.
In a third aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspect.
In a fourth aspect, a computer device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of the first aspect when executing the program.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
in the technical scheme of the embodiment of the invention, N search results are searched based on search requirements, wherein N is a positive integer, then the click rate, the click user rate and the update time stamp of each search result are obtained, then the influence factor of each search result is obtained based on the click rate, the click user rate, the update time stamp and the current time stamp of each search result, and then the N search results are sorted based on the influence factors of the N search results to obtain a sorting result. Therefore, the influence of each search result is determined through the click amount, the click user amount, the update timestamp and the current timestamp, and the N search results are sorted according to the influences of the N search results, so that the search results with higher influence can be sorted in the front and are easy to observe and select by a user, the technical problem that the user finds out the search results with influence from a large number of search results is solved, and the technical effect of sorting according to the influence of the search results is achieved.
Drawings
FIG. 1 is a flow chart of a method for ranking search results in an embodiment of the present invention;
FIG. 2 is a diagram illustrating an apparatus for ranking search results according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for sequencing search results, which are used for sequencing the search results according to the influence of the search results.
In order to solve the technical problems, the technical scheme provided by the invention has the following general idea:
in the technical scheme of the embodiment of the invention, N search results are searched based on search requirements, wherein N is a positive integer, then the click rate, the click user rate and the update time stamp of each search result are obtained, then the influence factor of each search result is obtained based on the click rate, the click user rate, the update time stamp and the current time stamp of each search result, and then the N search results are sorted based on the influence factors of the N search results to obtain a sorting result. Therefore, the influence of each search result is determined through the click amount, the click user amount, the update timestamp and the current timestamp, and the N search results are sorted according to the influences of the N search results, so that the search results with higher influence can be sorted in the front and are easy to observe and select by a user, the technical problem that the user finds out the search results with influence from a large number of search results is solved, and the technical effect of sorting according to the influence of the search results is achieved.
The technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are described in detail in the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
A first aspect of the present invention provides a method for ranking search results, please refer to fig. 1, which is a flowchart illustrating a method for ranking search results according to an embodiment of the present invention. The method comprises the following steps:
s101: searching N search results based on search requirements, wherein N is a positive integer;
s102: acquiring the click volume, the click user volume and the update time stamp of each search result;
s103: obtaining an influence factor of each search result based on the click rate, the click user rate, the update timestamp and the current timestamp of each search result;
s104: and sorting the N search results based on the influence factors of the N search results to obtain a sorting result.
Specifically, first, in S101, a search is performed based on a search requirement input by the user, and N search results are obtained. N is a positive integer, such as 1, 2, 3, or 20, etc., and the present invention is not particularly limited. In one embodiment, the search may be performed in a network according to a search requirement, and the search result is specifically a web page. Alternatively, in another embodiment, the search may be performed in big data, and the search result is a data record. Alternatively, in another embodiment, the search may be performed in news, and the search result is news. Alternatively, in another embodiment, a search may be conducted in a social platform, and the search result is social content. There are, of course, other embodiments, which are not listed here.
Next, in S102, the click amount, the click user amount, and the update time stamp of each search result are further acquired.
Specifically, the click volume of a search result refers to the number of times the search result was clicked within a preset historical period of time. The number of clicked users indicates how many users clicked on the search result within a preset historical period of time. The update timestamp refers to the timestamp of the last update of the search result. A historical period of time such as 7 days, one month, or two months, etc. is preset, and the present invention is not particularly limited. The update of the search result includes, but is not limited to, an update of content, an update of a comment or an update of a reprint, and the like.
Then, in S103, an influence factor of each search result is obtained based on the click amount, the click user amount, the update time stamp, and the current time stamp of each search result.
The current timestamp refers to the timestamp of when the search was performed. The influence factor represents the influence of a search result by the search. The larger the influence factor is, the larger the influence representing the search result is, whereas the smaller the influence factor is, the smaller the influence representing the search result is.
Further, in a specific implementation process, if the number of clicks of a search result is higher, the number of clicked users is greater, and the update time is closer to the current time, the influence of the search result is greater; conversely, if the number of clicks on the search result is lower, the number of clicked users is less, and the update time is farther from the current time, the search result is less influential. Therefore, in the embodiment of the present invention, the higher the click rate of the search result is, the larger the click user rate is, the closer the update timestamp is to the current timestamp is, and the larger the calculated influence factor is. On the contrary, the lower the click rate of the search result is, the smaller the click user rate is, the farther the update timestamp is from the current timestamp, and the smaller the calculated influence factor is.
Specifically, S103 may be specifically realized by the following process:
attenuating the click rate of each search result to obtain a first value, wherein the first value is positively correlated with the click rate;
obtaining a second value according to the number of clicked users of each search result, wherein the second value is positively correlated with the number of clicked users;
obtaining a third value according to a time interval between the update timestamp and the current timestamp, wherein the third value is inversely related to the time interval;
calculating the influence factor based on the first value, the second value, and the third value.
Specifically, since the same user may repeatedly click on the same search result in a specific implementation, the click amount may be a possibility of repeated clicks. In order to reduce errors caused by repeated clicks, in the embodiment of the present invention, the click amount of the search result is attenuated, and then the first value is obtained. The first value is obtained by attenuating the click rate, so that the first value is less than or equal to the click rate. Meanwhile, in order to guarantee the influence of the click rate on the influence factor, the first value is positively correlated with the click rate. In other words, the higher the click rate, the larger the first value, and the lower the click rate, the smaller the first value.
Further, one embodiment of obtaining the first value may be to root the click volume. Alternatively, in another embodiment, the click rate may be multiplied by a damping factor, which is a number greater than 0 and less than 1. In another embodiment, the click rate may be subtracted by an attenuation number, and the attenuation value is set by a person skilled in the art according to the actual implementation, for example, set to 1000 or 20000, and the invention is not limited in particular. In the specific implementation process, a person skilled in the art to which the present invention pertains may select any one of the above embodiments or other embodiments according to practical considerations, and the present invention is not particularly limited.
The statistical amount of the clicked users is the number of users, and the users are not repeated usually, so that in the embodiment of the invention, the second value can be directly obtained. In order to ensure the influence of the clicking user quantity on the influence factor, the second value is positively correlated with the clicking user quantity. In other words, the larger the amount of clicked users, the larger the second value, and the smaller the amount of clicked users, the smaller the second value.
Further, one embodiment of obtaining the second value may be to make the second value equal to the number of clicking users. Alternatively, in another embodiment, the number of clicked users may be multiplied by a factor greater than 0. In the specific implementation process, a person skilled in the art to which the present invention pertains may select any one of the above embodiments or other embodiments according to practical considerations, and the present invention is not particularly limited.
For the timestamp, in the embodiment of the present invention, a time interval is obtained according to the update timestamp and the current timestamp, specifically, the update timestamp is subtracted from the current timestamp. Further, a third value is obtained from the time interval. To ensure that the update time has an influence on the influence factor, the third value is also inversely related to the time interval. In other words, the smaller the time interval, the larger the third value, and the larger the time interval, the smaller the third value.
Further, one embodiment of obtaining the third value may be taking the logarithm of the time interval. Alternatively, in another embodiment, the reciprocal of the time interval may be obtained. Alternatively, in another embodiment, the acquisition time interval may be multiplied by a number less than 0. In the specific implementation process, a person skilled in the art to which the present invention pertains may select any one of the above embodiments or other embodiments according to practical considerations, and the present invention is not particularly limited.
And finally, adding the first value, the second value and the third value, and taking the sum of the first value, the second value and the third value as the influence factor.
The embodiment of the invention does not distinguish the sequence of obtaining the first value, the second value and the third value.
In addition, in a specific implementation process, the first value, the second value and the third value may not be obtained separately, but the influence factor is obtained directly from the click amount, the click user amount, the update timestamp and the current timestamp according to a method for obtaining the first value, the second value and the third value.
For example, assuming that a first value is obtained by rooting the click amount, the click user amount is equal to a second value, and a third value is obtained by taking the logarithm of the time interval, the influence factor may also be obtained by the following formula in the specific implementation process:
Figure BDA0001338017200000091
wherein score represents an influence factor, pv represents the click rate of a certain search result, uv represents the click user rate of the search result, unix _ now represents the current timestamp, and update _ time represents the update timestamp.
Next, at S104: and sorting the N search results based on the influence factors of the N search results to obtain a sorting result.
Specifically, when N is 1, that is, when there is only one search result, the search result is the ranking result. And when N is 2, comparing the influence factors of the two search results, sorting the search result with the larger influence factor before the search result with the smaller influence factor, and then obtaining a sorting result. And when N is 3, respectively comparing every two search results, sequencing the search result with the largest influence factor at the top, sequencing the search result with the middle influence factor at the middle, and sequencing the search result with the smallest influence factor at the last. When N is more than or equal to 2, especially N is more than or equal to 4, sequencing is carried out through the following processes:
comparing the influence factors of every two search results, and obtaining a first comparison record of each search result according to the comparison result;
comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results;
comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results;
if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result;
if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records;
judging whether the N search results are all determined to be sorted or not;
if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results;
and if the N search results are determined to be sorted, obtaining the sorting result.
In embodiments of the present invention, multiple rounds of comparisons will be made for the N search results until the rank of each search result is determined.
Specifically, first, in the first round of comparison, the influence factors of every two search results are compared, and a first comparison record of each search result is obtained based on the comparison results.
Specifically, every two adjacent search results may be compared in the order in which the search results are obtained, or N search results may be randomly divided into N/2(N is an even number) groups each including two search results. And then comparing the influence factors of every two search results, and obtaining a first comparison record according to the comparison result.
In one embodiment, the comparison record includes a number of times the comparison result is a larger value and a number of times the comparison result is a smaller value. For convenience of description, hereinafter, "win" means that the comparison result is a large value, and "minus" means that the comparison result is a small value. Further, in this embodiment, the comparison record further includes the number of times that the comparison results are equal. In another embodiment, the comparison record includes a weight determined according to the comparison result, specifically: if the comparison result shows that a certain search result is a larger value, the weight of the comparison record is increased by a; if the comparison result shows that the search result is a smaller value, the weight of the comparison record is increased by b; if the comparison result indicates that the search result is equal to another search result, the weight of the comparison record is increased by c, wherein a > c > b. For convenience of description, the following description will be given by a being 1 and b being 0.
And recording a first comparison record of each search result according to the first round of comparison results.
Next, in a second round of comparison, the influence factors of search results that agree for every two first comparison records are compared. A second comparison record for each search result is then recorded based on the second round of comparison results. Next, in a third round of comparison, in search results in which the second comparison records agree, the influence factors of search results in which every two second comparison records agree are continuously compared.
After the third round of comparison is finished and the second comparison records are updated based on the comparison results, whether 2 of the N second comparison records are inconsistent with other N-2 second comparison results is judged. If 2 second comparison results which are inconsistent with the other N-2 second comparison results do not exist, namely the N second comparison results all have the same second comparison result as the N second comparison results, the fourth round of comparison is continuously executed. The manner of each comparison from the third comparison is similar to the third comparison and thus is not repeated. After the fourth comparison is finished and the second comparison records are updated based on the comparison results, whether 2 of the N second comparison records are inconsistent with the other N-2 second comparison results is judged again. If 2 conditions inconsistent with other N-2 second comparison results still do not occur, the next round of comparison is continued until 2 second comparison results inconsistent with other N-2 second comparison results occur.
And if 2 pieces of search results are inconsistent with the other N-2 second comparison results, determining the search result ranked earlier and the search result ranked later from the search results with the inconsistent 2 second comparison results.
Specifically, if the second comparison record includes the number of times that the comparison result is a large value and the number of times that the comparison result is a small value, the search result ranked the most forward and the search result ranked the most backward are determined based on the second comparison record, specifically by the following procedure:
determining that the search result ranking with the largest number of times of larger values and the smallest number of times of smaller values in the second comparison record is the most front;
and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
Specifically, for the second comparison result of the two search results, the most-wining and least-negative search result is ranked in the order of the most-forward order among the yet-to-be-determined orders, and the least-wining and most-negative search result is ranked in the order of the most-backward order among the yet-to-be-determined orders.
Or, if the second comparison record includes a weight determined according to the comparison result, determining the search result ranked the top and the search result ranked the bottom based on the second comparison record, and specifically implementing the following processes:
determining that the search result with the largest weight in the second comparison record is ranked most front;
and determining that the search result with the minimum weight in the second comparison record is ranked most backwards.
Specifically, for the two inconsistent second comparison results, the search result with the largest weight is ranked in the top order among the yet-to-be-determined orders, and the search result with the smallest weight is ranked in the bottom order among the yet-to-be-determined orders.
After the ranking of the two search results each time, next, whether the N search results are all determined to be ranked is judged, namely whether the N ranking has corresponding search results. And if the N search results are not determined to be sorted, namely the search results of which the rank is not determined exist, continuing to execute the next round of comparison, and continuing to determine the ranks of the other two search results according to the updated second comparison record until the N search results are determined to be sorted.
If the N search results are determined to be sorted, namely the N bits have corresponding search results, the sorting is finished, and the sorting results of the N search results are obtained.
The above sorting process is described below by referring to a specific example. The number of wins and losses is described as the comparison record. Suppose there are 8 search results, A, B, C, D, E, F, G and H respectively. The influence factor of A is 5, the influence factor of B is 2, the influence factor of C is 4, the influence factor of D is 3, the influence factor of E is 1, the influence factor of F is 7, the influence factor of G is 8, and the influence factor of H is 6.
In the first round of comparison, two adjacent search results are compared, and the specific comparison result is as follows:
a > B, so A is more negative than B;
c > D, so C wins D negatively;
e < F, so E minus F wins;
g > H, so G wins H negatively.
According to the comparison result, recording:
the first comparison result of A is 1 win 0 minus;
the first comparison of B is 0 over 1 negative;
the first comparison of C is 1 win 0 negative;
the first comparison of D is 0 over 1 negative;
the first comparison of E is 0 over 1 negative;
the first comparison of F is 1 to 0 minus;
the first comparison of G is 1 over 0 negative;
the first comparison of H is 0 over 1 negative.
Next, in the second round of comparison, each two of A, C, F and G whose first comparison results agree to 1 win 0 minus and B, D, E and H whose first comparison results agree to 0 win 1 minus are compared. The specific comparison results are:
a > C, so A is more negative than C;
f < G, so G is more negative than F;
b < D, so B is negative D;
e < H, so E minus H wins.
According to the comparison result, recording:
a is negative for a second comparison result of 2 wins 0;
b, second comparison result 0 wins 2 negatively;
c, the second comparison result 1 wins 1 negatively;
d, a second comparison result of 1 wins 1 negatively;
e is negative for a second comparison of 0 to 2;
the second comparison of F yields 1 and 1 minus;
g is negative winning 0 by a second comparison result 2;
the second comparison of H yields a 1-win negative.
Next, in a third comparison, A and G, with the second comparison result matching 2 wins 0 minus, B and E, with the second comparison result matching 0 wins 2 minus, and C, D, F and H, with the second comparison result matching 1 wins 1 minus, are compared. The specific comparison results are:
a < G, so G is more negative than A;
b > E, so B wins E negatively;
c is greater than D, so D is minus C;
f > H, so H minus F wins.
According to the comparison result, updating:
the second comparison result of A is 2 wins 1 and is negative;
b, second comparison result 1 wins 2 negatively;
the second comparison result of C is 2 wins 1 negatively;
d, the second comparison result is 1 win 2 negative;
e is negative for a second comparison of 0 to 3;
the second comparison of F is positive, 2 wins 1;
g is negative winning 0 by a second comparison result of 3;
the second comparison of H yields a 1 win and a 2 win.
And finishing the third comparison, and judging that the second comparison records of E and G are inconsistent with the other 6 second comparison records in the updated 8 second comparison records. Further, the second comparison record of G is the largest among the 8 second comparison records, thus determining that G should be ordered at the top 1 st bit among the yet undetermined bit orders (1 st-8 th bits). And the second comparison record of E is the smallest among the 8 second comparison records, it is determined that E should be sorted at the 8 th bit that is the most backward among the yet-to-be-determined bit orders (1-8 th bits).
Next, it is judged that all of the 8 search results do not determine the ranking, and therefore a fourth comparison is performed. In the fourth comparison, A, C and F with the second comparison result of matching 2 wins 1 and minus are compared, and B, D and H with the second comparison result of matching 1 wins 2 and minus are compared. The specific comparison results are:
a > C, so A is more negative than C;
a < F, so A minus F wins;
c < F, so C minus F wins;
b < D, so B is negative D;
b < H, so B minus H wins;
d < H, so D minus H wins.
According to the comparison result, updating:
the second comparison result of A is 3 wins 2 is negative;
b, a second comparison result of 1 wins 4 negatively;
the second comparison of C is 2 wins 3 negatively;
the second comparison of D is positive 2 and negative 3;
the second comparison of F yields a negative 1 over 4;
the second comparison of H is negative for 3 wins 2.
And after the fourth comparison, judging that the second comparison records of B and F are inconsistent with the rest 4 second comparison records in the updated 6 second comparison records. Further, the second comparison record of B is the smallest among the 6 second comparison records, and thus it is determined that B should be sorted to the 7 th bit most behind the yet undetermined number of bits (bits 2-7). And the second comparison record of F is the largest among the 6 second comparison records, it is determined that F should be sorted at the 2 nd bit, which is the most advanced of the yet-to-be-determined bit orders (bits 2-7).
Next, it is judged that all of the 8 search results are not determined to be sorted, and therefore a fifth round of comparison is performed. In the fifth round of comparison, A and H with the second comparison result of 3 win and 2 negative are compared, and C and D with the second comparison result of 2 win and 3 negative are compared. The specific comparison results are:
a < H, so A minus H wins;
c > D, so C wins D negatively.
According to the comparison result, updating:
the second comparison result of A is 3 wins 3 minus;
the second comparison of C is 3 wins 3 minus;
d, the second comparison result 2 wins 4 negatively;
the second comparison of H is 4 wins 2 minus.
And after the fifth round of comparison is finished, judging that the second comparison records of D and H are inconsistent with the rest 2 second comparison records in the updated 4 second comparison records. Further, the second comparison record of D is the smallest among the 4 second comparison records, thus determining that D should be sorted to the 6 th bit that is the most posterior of the yet undetermined number of bits (3-6 bits). And the second comparison record of H is the largest among the 4 second comparison records, it is determined that F should be ordered at the 3 rd bit which is the most forward of the yet undetermined number of bits (bits 3-6).
Next, it is judged that all of the 8 search results are not determined to be sorted, and therefore a sixth round of comparison is performed. In the sixth round of comparison, the second comparison result is compared to match 3 wins 3 minus A and C. The specific comparison results are:
a > C, so A is more negative than C.
According to the comparison result, updating:
the second comparison result of A is 4 wins 3 negatively;
the second comparison of C is 3 wins 4 negatives.
And after the sixth round of comparison is finished, judging that the second comparison records of A and C are inconsistent in the updated 2 second comparison records. Further, the second comparison record of C is the smallest among the 2 second comparison records, and thus it is determined that C should be sorted at the 5 th bit most backward in the yet-to-be-determined bit order (4 th-5 th bits). And the second comparison record of a is the largest among the 2 second comparison records, it is determined that a should be sorted at the 4 th bit, which is the top most among the yet undetermined number of bits (4 th-5 th bits).
Then, the 8 search results are judged to determine the ranking, and the comparison is finished, so that the ranking results G, F, H, A, C, D, B and E are obtained.
For the above example, if the comparison record is used as the weight to perform the sorting, the specific process is similar, and will not be described in detail here.
Furthermore, if N is more than or equal to 4 and N is an odd number, the specific sorting mode is also various. For example, in one embodiment, any N-1 search results are sorted according to the above-described method, and after N-1 search results are sorted, the rank of the last search result is determined by a bubble sorting method, so as to obtain the sorting result of the N search results. In another embodiment, before each round of comparison, any one of the search results is selected, the comparison result of the current round of the search result is made to be a success (or a failure), then the search result is made to wait for the next round of comparison, and the rest search results are still compared and sorted in the above-described manner until the final sorting is completed for N search results. In another embodiment, 3 search results are arbitrarily divided in the first round of comparison to perform pairwise comparison, and then the third round of comparison is performed after the 3 search results are compared, and the remaining N-3 search results are still subjected to the first round of comparison and the second round of comparison in the manner described above. In the third round of comparison, 3 search results with the same second comparison record are arbitrarily divided for pairwise comparison, then the 3 search results directly enter the fifth round of comparison, the rest N-3 search results are still subjected to the third round and the fourth round of comparison according to the manner introduced above, and so on until the N search results are all determined to be sorted.
In the specific implementation process, a person skilled in the art to which the present invention pertains may select the above-described embodiment or other embodiments according to practical considerations, and the present invention is not particularly limited.
Based on the same inventive concept as the method for ranking search results in the foregoing embodiment, a second aspect of the present invention further provides an apparatus for ranking search results, as shown in fig. 2, including:
the search module 101 is configured to search out N search results based on search requirements, where N is a positive integer;
an obtaining module 102, configured to obtain a click amount, a click user amount, and an update timestamp of each search result;
an obtaining module 103, configured to obtain an influence factor of each search result based on the click amount, the click user amount, the update timestamp, and the current timestamp of each search result;
a sorting module 104, configured to sort the N search results based on the influence factors of the N search results, so as to obtain a sorting result.
Specifically, when N is greater than or equal to 2, the sorting module 104 is configured to compare the influence factors of every two search results, and obtain a first comparison record of each search result according to the comparison result; comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results; comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results; if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result; if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records; judging whether the N search results are all determined to be sorted or not; if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results; and if the N search results are determined to be sorted, obtaining the sorting result.
Optionally, the second comparison record includes the number of times that the comparison result is a larger value and the number of times that the comparison result is a smaller value, and the sorting module 104 is configured to determine that the search result that the number of times that is a larger value in the second comparison record is the largest and the number of times that is a smaller value in the second comparison record is the smallest is sorted most forward; and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
Optionally, the second comparison record includes a weight determined according to the comparison result, and the ranking module 104 is configured to determine that the search result with the largest weight in the second comparison record is ranked most ahead; and determining that the search result with the minimum weight in the second comparison record is ranked most backwards.
Further, the obtaining module 103 is configured to perform attenuation processing on the click rate of each search result to obtain a first value, where the first value is positively correlated to the click rate; obtaining a second value according to the number of clicked users of each search result, wherein the second value is positively correlated with the number of clicked users; obtaining a third value according to a time interval between the update timestamp and the current timestamp, wherein the third value is inversely related to the time interval; calculating the influence factor based on the first value, the second value, and the third value.
Various changes and specific examples of the method for sorting search results in the foregoing embodiment in fig. 1 are also applicable to the apparatus for sorting search results in this embodiment, and a person skilled in the art can clearly know the implementation method of the apparatus for sorting search results in this embodiment through the foregoing detailed description of the method for sorting search results, so for brevity of the description, detailed descriptions are omitted here.
Based on the same inventive concept as the method of ranking search results in the previous embodiments, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods of ranking search results described above.
Based on the same inventive concept as the method for ranking search results in the previous embodiment, the present invention further provides a computer device, as shown in fig. 3, comprising a memory 204, a processor 202 and a computer program stored on the memory 204 and executable on the processor 202, wherein the processor 202 executes the program to implement the steps of any one of the methods for ranking search results described above.
Where in fig. 3 a bus architecture (represented by bus 200), bus 200 may include any number of interconnected buses and bridges, bus 200 linking together various circuits including one or more processors, represented by processor 202, and memory, represented by memory 204. The bus 200 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 206 provides an interface between the bus 200 and the receiver 201 and transmitter 203. The receiver 201 and the transmitter 203 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium.
The processor 202 is responsible for managing the bus 200 and general processing, while the memory 204 may be used for storing data used by the processor 202 in performing operations.
Various changes and specific examples of the method for sorting search results in the foregoing embodiment in fig. 1 are also applicable to the computer device in this embodiment, and a person skilled in the art can clearly know the implementation method of the computer device in this embodiment through the foregoing detailed description of the method for sorting search results, so that the detailed description is omitted here for the sake of brevity of the description.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
in the technical scheme of the embodiment of the invention, N search results are searched based on search requirements, wherein N is a positive integer, then the click rate, the click user rate and the update time stamp of each search result are obtained, then the influence factor of each search result is obtained based on the click rate, the click user rate, the update time stamp and the current time stamp of each search result, and then the N search results are sorted based on the influence factors of the N search results to obtain a sorting result. Therefore, the influence of each search result is determined through the click amount, the click user amount, the update timestamp and the current timestamp, and the N search results are sorted according to the influences of the N search results, so that the search results with higher influence can be sorted in the front and are easy to observe and select by a user, the technical problem that the user finds out the search results with influence from a large number of search results is solved, and the technical effect of sorting according to the influence of the search results is achieved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method of ranking search results, comprising:
searching N search results based on search requirements, wherein N is a positive integer;
acquiring the click volume, the click user volume and the update time stamp of each search result;
obtaining an influence factor of each search result based on the click rate, the click user rate, the update timestamp and the current timestamp of each search result;
ranking the N search results based on the influence factors of the N search results to obtain a ranking result;
when N >2, ranking the N search results based on the influence factors of the N search results to obtain a ranked result, comprising:
comparing the influence factors of every two search results, and obtaining a first comparison record of each search result according to the comparison result;
comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results;
comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results;
if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result;
if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records;
judging whether the N search results are all determined to be sorted or not;
if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results;
and if the N search results are determined to be sorted, obtaining the sorting result.
2. The method of claim 1, wherein said second comparison record includes a number of times that the comparison result is a larger value and a number of times that the comparison result is a smaller value, determining said search result ranked most forward and said search result ranked most rearward based on said two second comparison records comprises:
determining that the search result ranking with the largest number of times of larger values and the smallest number of times of smaller values in the second comparison record is the most front;
and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
3. The method of claim 1, wherein the second comparison record includes a weight determined according to a comparison result, determining the search result ranked the first most and the search result ranked the last most based on the two second comparison records, comprising:
determining that the search result with the largest weight in the second comparison record is ranked most front;
and determining that the search result with the minimum weight in the second comparison record is ranked most backwards.
4. The method of claim 1, wherein obtaining an influence factor for each of the search results based on the click volume, the click user volume, the update timestamp, and a current timestamp for each of the search results comprises:
attenuating the click rate of each search result to obtain a first value, wherein the first value is positively correlated with the click rate;
obtaining a second value according to the number of clicked users of each search result, wherein the second value is positively correlated with the number of clicked users;
obtaining a third value according to a time interval between the update timestamp and the current timestamp, wherein the third value is inversely related to the time interval;
calculating the influence factor based on the first value, the second value, and the third value.
5. An apparatus for ranking search results, comprising:
the search module is used for searching N search results based on search requirements, wherein N is a positive integer;
the acquisition module is used for acquiring the click volume, the click user volume and the update time stamp of each search result;
an obtaining module, configured to obtain an influence factor of each search result based on the click amount, the click user amount, the update timestamp, and a current timestamp of each search result;
the sorting module is used for sorting the N search results based on the influence factors of the N search results to obtain a sorting result;
when N >2, the sorting module is used for comparing the influence factors of every two search results and obtaining a first comparison record of each search result according to the comparison result; comparing the influence factors of the search results with the consistency of every two first comparison records, and updating the first comparison records into second comparison records according to comparison results; comparing the influence factors of the search results with the consistency of every two second comparison records, and updating the second comparison records according to the comparison results; if two second comparison records which are inconsistent with the rest N-2 second comparison records do not exist, the influence factor of the search result which is consistent with every two second comparison records is executed again, and the second comparison records are updated according to the comparison result; if two of the second comparison records which are inconsistent with the rest N-2 of the second comparison records appear, determining the search result which is ranked the most front and the search result which is ranked the most rear based on the two second comparison records; judging whether the N search results are all determined to be sorted or not; if the N search results are not all determined to be sorted, the influence factor of the search result of every two second comparison records which are consistent is executed again, and the second comparison records are updated according to the comparison results; and if the N search results are determined to be sorted, obtaining the sorting result.
6. The apparatus of claim 5, wherein the second comparison record includes a number of times that the comparison result is a larger value and a number of times that the comparison result is a smaller value, the ranking module for determining that the search result in the second comparison record having the largest number of times that the larger value is and the smallest number of times that the smaller value is ranked most forward; and determining that the search result with the smallest number of times of the larger value and the largest number of times of the smaller value in the second comparison record is ranked most backwards.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-4 are implemented when the program is executed by the processor.
CN201710523512.XA 2017-06-30 2017-06-30 Method and device for sequencing search results Active CN109213922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710523512.XA CN109213922B (en) 2017-06-30 2017-06-30 Method and device for sequencing search results

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710523512.XA CN109213922B (en) 2017-06-30 2017-06-30 Method and device for sequencing search results

Publications (2)

Publication Number Publication Date
CN109213922A CN109213922A (en) 2019-01-15
CN109213922B true CN109213922B (en) 2020-07-10

Family

ID=64977103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710523512.XA Active CN109213922B (en) 2017-06-30 2017-06-30 Method and device for sequencing search results

Country Status (1)

Country Link
CN (1) CN109213922B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046308B (en) * 2019-03-07 2021-05-25 北京搜狗科技发展有限公司 Sequencing strategy determination method and device and electronic equipment
CN111581452B (en) * 2020-03-26 2023-10-17 浙江口碑网络技术有限公司 Recommendation object data obtaining method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663048A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for providing search result
CN103744918A (en) * 2013-12-27 2014-04-23 东软集团股份有限公司 Vertical domain based micro blog searching ranking method and system
CN103902687A (en) * 2014-03-25 2014-07-02 百度在线网络技术(北京)有限公司 Search result generating method and search result generating device
CN104008170A (en) * 2014-05-30 2014-08-27 广州金山网络科技有限公司 Search result providing method and device
CN104537059A (en) * 2014-12-27 2015-04-22 小米科技有限责任公司 Object ranking method and device
CN106708817A (en) * 2015-07-17 2017-05-24 腾讯科技(深圳)有限公司 Information searching method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172035A1 (en) * 2007-12-31 2009-07-02 Pieter Lessing System and method for capturing and storing casino information in a relational database system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663048A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for providing search result
CN103744918A (en) * 2013-12-27 2014-04-23 东软集团股份有限公司 Vertical domain based micro blog searching ranking method and system
CN103902687A (en) * 2014-03-25 2014-07-02 百度在线网络技术(北京)有限公司 Search result generating method and search result generating device
CN104008170A (en) * 2014-05-30 2014-08-27 广州金山网络科技有限公司 Search result providing method and device
CN104537059A (en) * 2014-12-27 2015-04-22 小米科技有限责任公司 Object ranking method and device
CN106708817A (en) * 2015-07-17 2017-05-24 腾讯科技(深圳)有限公司 Information searching method and device

Also Published As

Publication number Publication date
CN109213922A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109062919B (en) Content recommendation method and device based on deep reinforcement learning
JP5450842B2 (en) Determination of word information entropy
CN110998558B (en) Delayed updating of database hash codes in a blockchain
CN110825966B (en) Information recommendation method and device, recommendation server and storage medium
CN108833458B (en) Application recommendation method, device, medium and equipment
CN108388509B (en) Software testing method, computer readable storage medium and terminal equipment
CN111967971A (en) Bank client data processing method and device
CN102193993A (en) Method, device and facility for determining similarity information between character string information
WO2019120093A1 (en) Cardinality estimation in databases
CN108809704B (en) Data deduplication statistical method and device based on dynamic time window
CN109213922B (en) Method and device for sequencing search results
EP3221801A1 (en) Offline evaluation of ranking functions
CN106874332B (en) Database access method and device
CN110019380B (en) Data query method, device, server and storage medium
CN106708875B (en) Feature screening method and system
CN116847132B (en) Video updating method and device based on time slicing, electronic equipment and storage medium
CN107277118B (en) Method and device for generating common access path of node
CN108228598B (en) Media information sorting method, server and system
CN114722048B (en) Data processing method and device, electronic equipment and storage medium
CN111125158A (en) Data table processing method, device, medium and electronic equipment
US11200547B2 (en) Payment collection control method and device, server, and computer-readable storage medium
CN115563310A (en) Method, device, equipment and medium for determining key service node
CN113112084B (en) Training plane rear body research and development flow optimization method and device
CN109561349B (en) Method and device for pushing video
CN104636366B (en) Method and device for acquiring search result queue

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240129

Address after: Room 801, 85 Kefeng Road, Huangpu District, Guangzhou City, Guangdong Province

Patentee after: Yami Technology (Guangzhou) Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China