CN111984854A - Method and apparatus for presenting category information - Google Patents
Method and apparatus for presenting category information Download PDFInfo
- Publication number
- CN111984854A CN111984854A CN201910434577.6A CN201910434577A CN111984854A CN 111984854 A CN111984854 A CN 111984854A CN 201910434577 A CN201910434577 A CN 201910434577A CN 111984854 A CN111984854 A CN 111984854A
- Authority
- CN
- China
- Prior art keywords
- category
- user
- categories
- sequence
- candidate
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000004044 response Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000012163 sequencing technique Methods 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000013278 delphi method Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012847 principal component analysis method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9538—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a method and a device for presenting category information. One embodiment of the method comprises: sorting the categories in the category list according to the latest access time and access times of the user to the categories in the pre-created category list to generate a candidate category sequence; adjusting the ordering of the categories in the candidate category sequence according to the most recently accessed category of the user; and presenting the category information according to the adjusted category sequence. According to the method and the device, the categories are presented after being sorted according to the latest access categories of the users, so that the category information is presented differently for different users, the order of presenting the categories is more in line with the requirements of the users, and the efficiency of presenting the category information is improved.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to the technical field of networks, and particularly relates to a method and a device for presenting category information.
Background
With the development and popularization of the internet, people use the network to browse information and shop more and more. At present, the classification category ordering method for network application is usually presented to the user through a preset category ordering. The preference difference of different users is large, and the requirement of carrying out personalized customization category information sequencing aiming at a single user exists.
Disclosure of Invention
The embodiment of the application provides a method and a device for presenting category information.
In a first aspect, an embodiment of the present disclosure provides a method for presenting category information, including: sorting the categories in the category list according to the latest access time and access times of a user to the categories in the pre-created category list to generate a candidate category sequence; adjusting the sorting of the categories in the candidate category sequence according to the latest accessed category of the user; and presenting the category information according to the adjusted category sequence.
In some embodiments, the sorting the categories in the category table according to the latest access time and access times of the user to the categories in the pre-created category table to generate the candidate category sequence includes: according to the preset weight of the latest access time and the preset weight of the access times, carrying out weighted summation on the latest access time and the access times of the categories in the category table, and determining the sorting value of the categories in the category table; and sorting the categories in the category list according to the sorting value from large to small, and selecting the categories of preset bits before sorting to generate a candidate category sequence.
In some embodiments, said adjusting the ordering of categories in said sequence of candidate categories according to the most recently visited category of said user comprises: in response to determining that the most recently accessed category of the user is located in the sequence of candidate categories, adjusting the most recently accessed category of the user to the top of the sequence of candidate categories.
In some embodiments, said adjusting the ordering of categories in said sequence of candidate categories according to the most recently visited category of said user further comprises: in response to determining that the most recently accessed category of the user is not located in the candidate category sequence, inserting the most recently accessed category of the user into a top of the candidate category sequence; and deleting the category which is sequenced at the last position in the candidate category sequence after the latest access category of the user is inserted at the first position in response to the fact that the length of the candidate category sequence after the latest access category of the user is inserted at the first position exceeds the maximum length of the candidate category sequence.
In some embodiments, the above method is applied to a client.
In some embodiments, the pre-created category table is obtained by the following creation steps: creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time; determining a category identification of a category to which the article information accessed by the user belongs, in response to determining that the category identification of the category to which the article information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table to the time for the user to access the article information.
In some embodiments, the creating step further comprises: in response to determining that the category list does not have the category identification of the category to which the item information accessed by the user belongs, adding the category identification of the category to which the item information accessed by the user belongs to the category list, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category list after the adding operation.
In some embodiments, the creating step further comprises: and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero.
In a second aspect, an embodiment of the present disclosure provides an apparatus for presenting category information, including: the sorting unit is configured to sort the categories in the category list according to the latest access time and access times of a user to the categories in the pre-created category list to generate a candidate category sequence; an adjusting unit configured to adjust the ordering of the categories in the candidate category sequence according to the most recently accessed category of the user; and the presentation unit is configured to present the category information according to the adjusted category sequence.
In some embodiments, the sorting unit is further configured to: according to the preset weight of the latest access time and the preset weight of the access times, carrying out weighted summation on the latest access time and the access times of the categories in the category table, and determining the sorting value of the categories in the category table; and sorting the categories in the category list according to the sorting value from large to small, and selecting the categories of preset bits before sorting to generate a candidate category sequence.
In some embodiments, the adjusting unit is further configured to: in response to determining that the most recently accessed category of the user is located in the sequence of candidate categories, adjusting the most recently accessed category of the user to the top of the sequence of candidate categories.
In some embodiments, the adjusting unit is further configured to: in response to determining that the most recently accessed category of the user is not located in the candidate category sequence, inserting the most recently accessed category of the user into a top of the candidate category sequence; and deleting the category which is sequenced at the last position in the candidate category sequence after the latest access category of the user is inserted at the first position in response to the fact that the length of the candidate category sequence after the latest access category of the user is inserted at the first position exceeds the maximum length of the candidate category sequence.
In some embodiments, the apparatus is provided to a client.
In some embodiments, the pre-created category table is obtained by the following creation steps: creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time; determining a category identification of a category to which the article information accessed by the user belongs, in response to determining that the category identification of the category to which the article information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table to the time for the user to access the article information.
In some embodiments, the creating step further comprises: in response to determining that the category list does not have the category identification of the category to which the item information accessed by the user belongs, adding the category identification of the category to which the item information accessed by the user belongs to the category list, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category list after the adding operation.
In some embodiments, the creating step further comprises: and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; storage means for storing one or more programs which, when executed by one or more processors, cause the one or more processors to carry out a method for presenting category information as provided in the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method for presenting category information provided in the first aspect.
According to the method and the device for presenting the category information in the embodiment of the application, firstly, the categories in the category list are sequenced according to the latest access time and access times of a user to the categories in the pre-created category list, and a candidate category sequence is generated; then, adjusting the sorting of the categories in the candidate category sequence according to the latest access category of the user; and finally, presenting the category information according to the adjusted category sequence. According to the method for presenting the category information, the categories are presented after being sorted according to the latest access categories of the user, so that the category information is presented differently for different users, the order of presenting the categories is more in line with the requirements of the user, and the efficiency of presenting the category information is improved. Meanwhile, the mode of the category list can realize efficient category information management.
In some implementation modes, the processing process of presenting the category information is transferred to the client from the background, so that a series of problems of flow, privacy, particularly data effectiveness and the like are solved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for presenting category information in accordance with the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for presenting category information according to an embodiment of the present application;
FIG. 4 is a flow diagram of another embodiment of a method for presenting category information in accordance with the present application;
FIG. 5 is a schematic diagram of an application scenario of a method for presenting category information according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating the structure of one embodiment of an apparatus for presenting category information in accordance with the present application;
FIG. 7 is a block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which the method for presenting category information or the apparatus for presenting category information of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a user 101, a terminal device 102 for presenting category information, a network 103, and a server 104.
The user may browse the web content and the like through a screen installed on the terminal device 102, where the web content may be a text, a picture, a video, or other web content that can be browsed, and is not limited in this respect. Various content browsing applications, such as a browser application, a shopping-type application, social platform software, etc., may be installed on the terminal device 102.
The terminal device 102 may be hardware or software. When the terminal device 102 is hardware, it may be various electronic devices having a display screen and supporting web content browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal device 102 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 104 may be a server that provides various services, such as a backend server for network applications on the terminal device 102. The background server may receive the category sorting information reported by the terminal device 102, search for corresponding category information (network contents such as text, picture, and video) in the category information base, and feed back the category sorting information to the terminal device 102 for presentation to the user 101.
It should be noted that the method for presenting category information provided in the embodiment of the present application may be executed by the terminal device 102. Accordingly, means for presenting category information may be provided in the terminal device 102.
It should be understood that the number of terminal devices, networks, servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for presenting category information in accordance with the present application is shown. The method for presenting category information comprises the following steps:
In this embodiment, the pre-created category table includes the latest access time and the access times of the category, where the user is a specified user, for example, a user using the terminal device, or a user corresponding to a specified user ID; the latest access time is the time when the user has accessed the product content under the category for the latest time; the access times are obtained by statistics, and may be the times of accessing the product content of the category by the user within a set time period, where the set time period is a time period from the current time, set according to an actual application scenario, for example, one month, one week, 60 days, and the like, and is not limited herein. The execution subject may sort the categories in the category table according to the latest access time and access times of the user, and generate a candidate category sequence. Specifically, the execution subjects may be sorted according to the size of the access times, may also be sorted according to the order of the latest access time, and may also be sorted according to other specified sorting manners, which is not specifically limited herein.
Access times optionally, the method for presenting category information is applied to a client, can overcome the defect that sorted sequencing information is still not real-time and accurate enough due to limited user information collected by a server, can avoid the privacy disclosure of a user, can acquire more information (such as browsing records and shopping records) of the user, can acquire the information in real time at the client, and solves a series of problems of flow, privacy, particularly data effectiveness and the like.
Optionally, the pre-created category table is obtained through the following creation steps: firstly, creating a category table, wherein each piece of data in the category table comprises a category identifier, access times and latest access time; then, the executive body determines the category identification of the category to which the article information accessed by the user belongs, and in response to determining that the category identification of the category to which the article information accessed by the user belongs exists in the category table, adds one to the access frequency corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table, and updates the latest access time corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table to the time when the user accesses the article information.
The category identifier may be preset information for identifying the category, such as a character string composed of numbers, letters, or the like, or a character identifier, or may be identification information in other formats such as pictures. . The item information may refer to item information that the user browses to the web content, such as a title, a picture, a video, and the like of an item in a shopping application. The execution main body for creating the category list can be a client or a server, and the creating of the category list by the client can be realized by creating an empty list comprising fields such as category identification, access times, latest access time and the like and then adding content to the category list according to the access record of the user; the step of creating the category table by the server may be adding a plurality of pieces of data consisting of a plurality of preset common categories to the category table, setting an initial value, for example, 0, for the number of accesses and the latest access time in the category table, and then sending the category table created by the server to the client for the client to use.
Optionally, the creating step may further include: in response to determining that the category list does not have the category identification of the category to which the item information accessed by the user belongs, adding the category identification of the category to which the item information accessed by the user belongs to the category list, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category list after the adding operation.
Optionally, the creating step may further include: and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero. The preset time may be set according to an actual application scenario, for example, 60 days ago, 7 days ago, and the like, and is not limited herein.
By creating the category list and maintaining the category list in the above manner, the high-efficiency management of the category information can be realized, and the memory space occupied by the category information is reduced. When the method is applied to the client, the influence of excessive storage and calculation resources occupied by the local management category information of the client on the data processing efficiency of the client can be avoided.
In this embodiment, the latest access category generally refers to the last category accessed by the user at the current time, and may also refer to the last category in the user's history access categories. The execution agent may adjust the ordering of categories in the sequence of candidate categories by: firstly, determining whether the latest access category of the user is in the candidate category sequence, if so, adding one to the access times of the latest access category in the category list, updating the latest access time of the latest access category to the time when the user last accesses the latest access category, and then re-sorting the operated category list, for example, sorting according to the size of the access times or sorting according to the latest access time.
And step 203, presenting the category information according to the adjusted category sequence.
In this embodiment, the execution subject may present the category sequence adjusted in step 202 on a page, and optionally, the method for presenting the category information may be applied to a client, where the execution subject may be a client, and present the display page of the client according to the adjusted order of the categories.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for presenting category information according to the present embodiment. In the application scenario 300 of fig. 3, the client 301 accesses the category in the pre-created category table 303 according to the latest access time and access times "category a, 12 o ' clock, 10 o ' clock, 3 o ' clock of the user 302; category b, 11 points 8 points, 2 times; category c, 10 points 30 points, 4 times; category d, 10 points 13 points, 3 times; category e, 9 points 7 points, 5 times; category f, 8 points, 10 points, 7 times; sorting the categories g, 5 points, 10 points and 3 times' to generate a candidate category sequence 304, specifically, sorting the categories in the category table from large to small according to the access times of the categories in the category table by the client 301, wherein the categories with the same access times are sorted according to the latest access time; finally obtaining a candidate category sequence 304' category f, 8 points and 10 points, 7 times; category e, 9 points 7 points, 5 times; category c, 10 points 30 points, 4 times; category a, 12 points, 10 points, 3 times; category d, 10 points 13 points, 3 times; category g, 5 points, 10 points, 3 times; category b, 11 points 8 points, 2 times "; adjusting the sorting of the categories in the candidate category sequence 304 according to the latest access category 305 "category h, 13 points 18 points, 1 time" of the user, specifically, adding the latest access category 305 to the first position in the candidate category sequence 304 to obtain a category sequence 306 "category h, 13 points 18 points, 1 time; category f, 8 points, 10 points, 7 times; category e, 9 points 7 points, 5 times; category c, 10 points 30 points, 4 times; category a, 12 points, 10 points, 3 times; category d, 10 points 13 points, 3 times; category g, 5 points, 10 points, 3 times; category b, 11 points 8 points, 2 times "; the category information is presented in the adjusted category ordering 306.
The method for presenting the category information is provided by the embodiment of the application. The client displays the sorted categories according to the latest accessed categories of the user, so that the category information is displayed differently for different users, the order of displaying the categories is more in line with the requirements of the user, and the efficiency of displaying the category information is improved. .
With continued reference to FIG. 4, a flow 400 of one embodiment of a method for presenting category information in accordance with the present application is shown. The method for presenting category information comprises the following steps:
In this embodiment, the latest visit time weight and the visit number weight may be values set according to a subjective weighting Method or an objective weighting Method, and the subjective weighting Method may be an Analytic Hierarchy Process (AHP) or a Delphi Method (Delphi Method), which is not specifically limited herein. The objective weighting method may be a principal component analysis method or a coefficient of variation method. Alternatively, the execution subject may traverse the categories in the category table, and add the product of the latest access time weight and the latest access time to the product of the access time weight and the access time to obtain the ranking value of the categories in the category table. And the execution subject determines the sorting value of the categories in the category table according to the latest access time weight and the access times weight. According to different weight settings of the access times, the influence of the access times in the category sorting can be determined. For example, if the access frequency weight is set to be larger, the category with the larger ranking value may be determined as the category with the larger access frequency, and if the access frequency is larger, the popularity of the category is higher, and then the popularity of the category is determined according to the size of the ranking value. According to different weight settings of the recent access time, the influence of the recent access time in the category ordering can be determined. For example, if the weight of the latest access time is set to be larger, the category with the larger ranking value may be determined as the category with the later latest access time, and the later access time indicates that the category is accessed by the latest time, and further, the recent heat of the category is determined according to the size of the ranking value. For another example, if the latest access time weight and the access frequency weight are set closer to each other, the category with the higher recent access frequency can be obtained from the categories with the higher ranking value, and can be used for subsequent recommendation to the user as the category of potential interest of the user, for example, the category is ranked at a higher position. In shopping applications, the method and the device are beneficial to improving the efficiency of accessing information of interest by a user and improving the shopping experience of the user.
Optionally, the execution body may further calculate the ranking value according to the following formula: y is count w _ count + time/a w _ time, where y represents a ranking value, count represents the number of accesses, w _ count represents the weight of the number of accesses, time represents the latest access time (time converted into Unix timestamp), w _ time represents the weight of the latest access time, represents an equal sign, + represents a plus sign, + represents a divide sign,/represents a constant, a represents a constant, and since the value of a Unix timestamp is large, it is not easy to calculate, so that the timestamp is divided by a constant a, and the specific value of the constant can be set and adjusted according to the actual scene, so that the result of calculation can be optimized. By the method, the sorting value of each category is calculated, and then the values are sorted, so that the purpose of sorting by using the user heat can be obtained. The access times and the latest access time can represent the user popularity of the category.
Optionally, the method for presenting category information is applied to a client, and can overcome the defect that the server collects limited user information and sorted sequencing information of the categories is still not real-time and accurate enough, so that privacy of the user can be prevented from being disclosed, further more information (such as browsing records and shopping records) of the user can be acquired, and the information can be acquired in real time at the client, so that a series of problems of flow, privacy, particularly data effectiveness and the like are solved.
Optionally, the pre-created category table may be obtained through the following creation steps: creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time; determining a category identification of a category to which the article information accessed by the user belongs, in response to determining that the category identification of the category to which the article information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table to the time for the user to access the article information.
The category identifier may be set according to actual needs, such as characters like numbers and letters, and is not limited specifically herein. The item information may refer to item information that the user browses to the web content, such as a title, a picture, a video, and the like of an item in a shopping application. The execution main body for creating the category list can be a client or a server, and the creating of the category list by the client can be realized by creating an empty list comprising fields such as category identification, access times, latest access time and the like and then adding content to the category list according to the access record of the user; the step of creating the category table by the server may be adding a plurality of pieces of data consisting of a plurality of preset common categories to the category table, setting an initial value, for example, 0, for the number of accesses and the latest access time in the category table, and then sending the category table created by the server to the client for the client to use.
Optionally, the creating step may further include: in response to determining that the category list does not have the category identification of the category to which the item information accessed by the user belongs, adding the category identification of the category to which the item information accessed by the user belongs to the category list, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category list after the adding operation.
Optionally, the creating step may further include: and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero. The preset time may be set according to an actual application scenario, for example, 30 days ago, 10 days ago, and the like, and is not limited specifically herein.
And step 402, sorting the categories in the category list according to the sorting values from large to small, and selecting the categories with preset bits before sorting to generate a candidate category sequence.
In this embodiment, the execution subject may select a category with a preset bit before the sorting to generate a candidate category sequence, that is, select a preset number of categories with a larger sorting value as the candidate category sequence. The preset number may be set according to actual needs, for example, may be set according to the size of the display page of the client.
In this embodiment, the latest access category generally refers to the last category accessed by the user at the current time, and may also refer to the last category in the user's history access categories. The execution agent may adjust the ordering of categories in the sequence of candidate categories by: firstly, determining whether the latest access category of the user is in the candidate category sequence, if so, adding one to the access times of the latest access category in the category list, updating the latest access time of the latest access category to the time when the user last accesses the latest access category, and then re-sorting the operated category list, for example, sorting according to the size of the access times or sorting according to the latest access time.
Optionally, the adjusting the ordering of the categories in the candidate category sequence according to the recently accessed category of the user may further include: firstly, whether the latest access category of the user is in the candidate category sequence is determined, and if the latest access category of the user exists, the latest access category of the user is adjusted to the first position of the candidate category sequence. The execution main body adjusts the latest access category of the user to the first position of the candidate category sequence, when the display page is displayed, the latest access category is arranged at the first position, and the high probability of the latest access category of the user is the category which is most interested by the user, so that the latest access category is arranged at the first position, and the access experience and the searching efficiency of the user can be improved.
Optionally, the adjusting the ordering of the categories in the candidate category sequence according to the recently accessed category of the user may further include: in response to determining that the most recently accessed category of the user is not located in the candidate category sequence, inserting the most recently accessed category of the user into a top of the candidate category sequence; and deleting the category which is sequenced at the last position in the candidate category sequence after the latest access category of the user is inserted at the first position in response to the fact that the length of the candidate category sequence after the latest access category of the user is inserted at the first position exceeds the maximum length of the candidate category sequence. The execution main body inserts the latest access category of the user into the first position of the candidate category sequence, when the display page is displayed, the latest access category is arranged at the first position, the user can more obviously check the latest access category, the user can click to check the latest access category, and generally the most probability of the latest access category of the user is the category which is most interested by the user, so that the latest access category is arranged at the first position, and the access experience and the searching efficiency of the user can be improved.
The maximum length may be set according to an actual application scenario, for example, may be set according to a size of a display page of the client. Specifically, for example, if the maximum length is 8, the candidate category sequence has at most 8 categories. For example, if the maximum length is 8, then there are at most 8 categories in the candidate category sequence. The subject can obtain the candidate category sequence within the set maximum length range by the method. The above method takes into account that if data has been accessed recently, then the probability of future access is higher. The method uses an LRU (Least recently used) algorithm to eliminate data according to the historical access records of the data. And eliminating the data according to the historical access records of the data. The main idea of the algorithm is as follows:
The LRU algorithm generally uses a linked list to store data, as shown in fig. 5, to establish a linked list structure capable of storing 8 category IDs (category identifiers), and the specific processing steps are as follows: firstly, when a user accesses a new category information, the category ID needs to be inserted into the head of a linked list, but before the new category information is accessed, whether the category ID exists in the linked list is searched for firstly; then, if the category ID already exists in the linked list, the category ID is moved to the head of the linked list; if the linked list does not exist, inserting the category ID into the head of the linked list; and finally, when the linked list is full, discarding the category ID at the tail part of the linked list. In this way, the category IDs in the LRU linked list are inserted in front of the sorting result calculated according to the user popularity (i.e., the access times and the latest access time), completing the calculation result that considers both the user popularity and the LRU algorithm. The number of data stored in the linked list of the middle LRU (i.e. the maximum length of the candidate category sequence in step 405) may also be adjusted according to the actual situation.
And step 404, presenting the category information according to the adjusted category sequence.
In this embodiment, the execution main body may present the category sequence adjusted in step 403 on a page, and optionally, the method for presenting category information may be applied to a client, where the execution main body may be a client, and present the display page of the client according to the adjusted order of the categories.
With further reference to fig. 6, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for presenting category information, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices in particular.
As shown in fig. 6, the apparatus 600 for presenting category information in the present embodiment includes: a sorting unit 601 configured to sort the categories in the category table according to the latest access time and access times of the user to the categories in the pre-created category table, and generate a candidate category sequence; an adjusting unit 602, configured to adjust the sorting of the categories in the candidate category sequence according to the most recently accessed category of the user; a presentation unit 603 configured to present the category information in an order of the adjusted categories.
In the present embodiment, in the apparatus 600 for presenting category information: the specific processing of the sorting unit 601, the adjusting unit 602, and the presenting unit 603 and the technical effects thereof can refer to the related descriptions of step 201, step 202, and step 203 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of this embodiment, the sorting unit 601 is further configured to: according to the preset weight of the latest access time and the preset weight of the access times, carrying out weighted summation on the latest access time and the access times of the categories in the category table, and determining the sorting value of the categories in the category table; and sorting the categories in the category list according to the sorting value from large to small, and selecting the categories of preset bits before sorting to generate a candidate category sequence.
In some optional implementations of the present embodiment, the adjusting unit 602 may be further configured to: in response to determining that the most recently accessed category of the user is located in the sequence of candidate categories, adjusting the most recently accessed category of the user to the top of the sequence of candidate categories.
In some optional implementations of this embodiment, the adjusting unit 602 may be further configured to: in response to determining that the most recently accessed category of the user is not located in the candidate category sequence, inserting the most recently accessed category of the user into a top of the candidate category sequence; and deleting the category which is sequenced at the last position in the candidate category sequence after the latest access category of the user is inserted at the first position in response to the fact that the length of the candidate category sequence after the latest access category of the user is inserted at the first position exceeds the maximum length of the candidate category sequence.
In some optional implementation manners of this embodiment, the apparatus for presenting category information may be disposed in the client, and a disadvantage that the apparatus at the server collects limited user information, which may cause sorting information of the categories to be still not real-time and accurate enough, can be overcome. The method has the advantages that the privacy of the user is prevented from being revealed, so that more information (such as browsing records and shopping records) of the user can be acquired, the information can be acquired in real time at the client, and a series of problems of flow, privacy, particularly data effectiveness and the like are solved.
In some optional implementations of this embodiment, the pre-created category table is obtained through the following creation steps: creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time; determining a category identification of a category to which the article information accessed by the user belongs, in response to determining that the category identification of the category to which the article information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the article information accessed by the user belongs in the category table to the time for the user to access the article information.
In some optional implementation manners of this embodiment, the creating step further includes: in response to determining that the category list does not have the category identification of the category to which the item information accessed by the user belongs, adding the category identification of the category to which the item information accessed by the user belongs to the category list, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category list after the adding operation.
In some optional implementation manners of this embodiment, the creating step may further include: and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero.
In the apparatus provided in the foregoing embodiment of the present application, the sorting unit 601 is configured to sort the categories in the category table according to the latest access time and access times of the user to the categories in the pre-created category table, and generate a candidate category sequence; the adjusting unit 602 is configured to adjust the ordering of the categories in the candidate category sequence according to the most recently accessed category of the user; the presentation unit 603 is configured to present the category information in the order of the adjusted categories. The device provided by the embodiment of the application displays the sorted categories according to the latest access categories of the user, so that the category information can be displayed differently for different users, the order of the displayed categories is more in line with the requirements of the user, and the efficiency of displaying the category information is improved. .
Referring now to FIG. 7, a block diagram of an electronic device (e.g., the server of FIG. 1) 700 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 700 may include a processing means (e.g., a Central Processing Unit (CPU), a graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage means 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Generally, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 708 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates an electronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 7 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium of the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: sorting the categories in the category list according to the latest access time and access times of a user to the categories in the pre-created category list to generate a candidate category sequence; adjusting the sorting of the categories in the candidate category sequence according to the latest accessed category of the user; and presenting the category information according to the adjusted category sequence.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (18)
1. A method for presenting category information, comprising:
sorting the categories in a category list according to the latest access time and access times of a user to the categories in the pre-created category list to generate a candidate category sequence;
adjusting the ordering of categories in the candidate category sequence according to the most recently accessed category of the user;
and presenting the category information according to the adjusted category sequence.
2. The method of claim 1, wherein the sorting the categories in the category table according to the latest access time and access times of the user to the categories in the pre-created category table to generate the candidate category sequence comprises:
according to the preset weight of the latest access time and the preset weight of the access times, carrying out weighted summation on the latest access time and the access times of the categories in the category table, and determining the sorting value of the categories in the category table;
and sorting the categories in the category list according to the sorting value from large to small, and selecting the categories of preset bits before sorting to generate a candidate category sequence.
3. The method of claim 2, wherein said adjusting an ordering of categories in the sequence of candidate categories according to a most recently accessed category of the user comprises:
In response to determining that the user's most recently accessed category is located in the sequence of candidate categories, adjusting the user's most recently accessed category to the top of the sequence of candidate categories.
4. The method of claim 2 or 3, wherein said adjusting the ordering of categories in the sequence of candidate categories according to the user's most recently accessed category further comprises:
in response to determining that the user's most recently accessed category is not located in the sequence of candidate categories, inserting the user's most recently accessed category into a top of the sequence of candidate categories;
deleting the last ranked category in the sequence of candidate categories inserted first into the user's most recently accessed category in response to the length of the sequence of candidate categories inserted first into the user's most recently accessed category exceeding the maximum length of the sequence of candidate categories.
5. The method of claim 1, wherein the method is applied to a client.
6. The method of claim 1, wherein the pre-created category table is obtained by the following creation steps:
creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time;
Determining a category identification of a category to which the item information accessed by the user belongs, in response to determining that the category identification of the category to which the item information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the item information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs in the category table to the time for the user to access the item information.
7. The method of claim 6, wherein the creating step further comprises:
in response to determining that the category identification of the category to which the item information accessed by the user belongs does not exist in the category table, adding the category identification of the category to which the item information accessed by the user belongs to the category table, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category table after the adding operation.
8. The method of claim 6, wherein the creating step further comprises:
And setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero.
9. An apparatus for presenting category information, comprising:
the sorting unit is configured to sort the categories in the category list according to the latest access time and access times of a user to the categories in the pre-created category list, and generate a candidate category sequence;
an adjusting unit configured to adjust the ordering of categories in the sequence of candidate categories according to the most recently accessed category of the user;
and the presentation unit is configured to present the category information according to the adjusted category sequence.
10. The apparatus of claim 9, wherein the ordering unit is further configured to:
according to the preset weight of the latest access time and the preset weight of the access times, carrying out weighted summation on the latest access time and the access times of the categories in the category table, and determining the sorting value of the categories in the category table;
and sorting the categories in the category list according to the sorting value from large to small, and selecting the categories of preset bits before sorting to generate a candidate category sequence.
11. The apparatus of claim 10, wherein the adjustment unit is further configured to:
In response to determining that the user's most recently accessed category is located in the sequence of candidate categories, adjusting the user's most recently accessed category to the top of the sequence of candidate categories.
12. The apparatus of claim 10 or 11, wherein the adjustment unit is further configured to:
in response to determining that the user's most recently accessed category is not located in the sequence of candidate categories, inserting the user's most recently accessed category into a top of the sequence of candidate categories;
deleting the last ranked category in the sequence of candidate categories inserted first into the user's most recently accessed category in response to the length of the sequence of candidate categories inserted first into the user's most recently accessed category exceeding the maximum length of the sequence of candidate categories.
13. The apparatus of claim 9, wherein the apparatus is provided to a client.
14. The apparatus of claim 9, wherein the pre-created category table is obtained by the following creation steps:
creating a category table, wherein each piece of data in the category table comprises a category identification, access times and latest access time;
determining a category identification of a category to which the item information accessed by the user belongs, in response to determining that the category identification of the category to which the item information accessed by the user belongs exists in the category table, adding one to the access times corresponding to the category identification of the category to which the item information accessed by the user belongs in the category table, and updating the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs in the category table to the time for the user to access the item information.
15. The apparatus of claim 14, wherein the creating step further comprises:
in response to determining that the category identification of the category to which the item information accessed by the user belongs does not exist in the category table, adding the category identification of the category to which the item information accessed by the user belongs to the category table, setting the access frequency of the category identification of the category to which the item information accessed by the user belongs to 1, setting the latest access time corresponding to the category identification of the category to which the item information accessed by the user belongs to the time for the user to access the item information, and storing the category table after the adding operation.
16. The apparatus of claim 14, wherein the creating step further comprises:
and setting the access times and the latest access time corresponding to the category identification with the latest access time earlier than the preset time in the category list to zero.
17. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
18. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434577.6A CN111984854A (en) | 2019-05-23 | 2019-05-23 | Method and apparatus for presenting category information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910434577.6A CN111984854A (en) | 2019-05-23 | 2019-05-23 | Method and apparatus for presenting category information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111984854A true CN111984854A (en) | 2020-11-24 |
Family
ID=73436550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910434577.6A Pending CN111984854A (en) | 2019-05-23 | 2019-05-23 | Method and apparatus for presenting category information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111984854A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102682005A (en) * | 2011-03-10 | 2012-09-19 | 阿里巴巴集团控股有限公司 | Method and device for determining preference categories |
CN103795788A (en) * | 2014-01-20 | 2014-05-14 | 中国建设银行股份有限公司 | Load balancing method of instant messaging server and load balancing server |
CN105528392A (en) * | 2015-11-27 | 2016-04-27 | 网易传媒科技(北京)有限公司 | Class label ordering method and apparatus |
-
2019
- 2019-05-23 CN CN201910434577.6A patent/CN111984854A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102682005A (en) * | 2011-03-10 | 2012-09-19 | 阿里巴巴集团控股有限公司 | Method and device for determining preference categories |
CN103795788A (en) * | 2014-01-20 | 2014-05-14 | 中国建设银行股份有限公司 | Load balancing method of instant messaging server and load balancing server |
CN105528392A (en) * | 2015-11-27 | 2016-04-27 | 网易传媒科技(北京)有限公司 | Class label ordering method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105320766B (en) | Information-pushing method and device | |
CN107203894B (en) | Information pushing method and device | |
JP6334696B2 (en) | Hashtag and content presentation | |
US8893011B2 (en) | Chronology display and feature for online presentations and webpages | |
CN107426328B (en) | Information pushing method and device | |
CN111414498A (en) | Multimedia information recommendation method and device and electronic equipment | |
CN110298716B (en) | Information pushing method and device | |
CN108228906B (en) | Method and apparatus for generating information | |
WO2019080662A1 (en) | Information recommendation method, device and apparatus | |
KR20130028916A (en) | Customizing content displayed for a user based on user preferences of another user | |
CN109992715B (en) | Information display method, device, medium and computing equipment | |
CN108540508B (en) | Method, device and equipment for pushing information | |
CN111258988B (en) | Asset management method, device, electronic equipment and medium | |
CN110674400B (en) | Sorting method, sorting device, electronic equipment and computer-readable storage medium | |
CN111709732A (en) | Display method and device and electronic equipment | |
US20200081930A1 (en) | Entity-based search system using user engagement | |
US20120203865A1 (en) | Apparatus and methods for providing behavioral retargeting of content from partner websites | |
CN113589991A (en) | Text input method and device, electronic equipment and storage medium | |
US11256722B2 (en) | Techniques for modeling aggregation records | |
CN108600780A (en) | Method for pushed information | |
CN109116718B (en) | Method and device for setting alarm clock | |
CN107077473A (en) | System, method and computer-readable medium for display content | |
CN113221572B (en) | Information processing method, device, equipment and medium | |
CN111723201A (en) | Method and device for clustering text data | |
CN111984854A (en) | Method and apparatus for presenting category information |
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 |