US-12621535-B2 - Bullet-screen comment processing method and system
Abstract
A bullet-screen comment processing method is provided. The method includes: evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool; and obtaining corresponding bullet-screen comment information from the bullet-screen comment recall pool based on a video identifier of a video viewed by a user of a client and a time period in which the user views the video, performing screening based on a feature algorithm, and displaying bullet-screen comment information obtained through screening on the client.
Inventors
- Jiaqi Sun
Assignees
- SHANGHAI BILIBILI TECHNOLOGY CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20230911
Claims (16)
- 1 . A method, comprising: evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool, comprising: obtaining a bullet-screen comment material from the bullet-screen comment database, and evaluating each bullet-screen comment by using a pre-ranking model; aggregating all bullet-screen comment materials in a second preset time period, and performing ranking and elimination on all bullet-screen comments in the second preset time period based on an evaluation result; evaluating an uneliminated bullet-screen comment by using all models, and obtaining a bullet-screen comment index based on an evaluation result; and respectively storing a material list and an index list of the uneliminated bullet-screen comment in a material pool and an index pool of the bullet-screen comment recall pool, wherein the material pool is used to store a bullet-screen comment material that is basic data of a bullet-screen comment, and the index pool is used to store a bullet-screen comment index that is a model evaluation result of each bullet-screen comment corresponding to the material pool; and obtaining corresponding bullet-screen comment information from the bullet-screen comment recall pool based on a video identifier of a video viewed by a user of a client and a time period in which the user views the video, performing screening based on a feature algorithm, and displaying bullet-screen comment information obtained through screening on the client.
- 2 . The method according to claim 1 , further comprising: in response to that a pre-ranking model does not need to be updated, updating only the bullet-screen comment index in the bullet-screen comment recall pool through index refresh, to implement model policy iteration.
- 3 . The method according to claim 2 , wherein the index refresh comprises: obtaining a highly hot video list and a real-time incremental video list; evaluating bullet-screen comments corresponding to the highly hot video list and the real-time incremental video list by using all models; and obtaining a new index based on an evaluation result, and updating the new index to the bullet-screen comment recall pool.
- 4 . The method according to claim 1 , further comprising: in response to that a pre-ranking model needs to be updated, updating both the bullet-screen comment material and the index in the bullet-screen comment recall pool through material refresh, to implement model policy iteration.
- 5 . The method according to claim 4 , wherein the material refresh comprises: obtaining a full bullet-screen comment and a real-time incremental bullet-screen comment; evaluating the full bullet-screen comment and the real-time incremental bullet-screen comment by using the pre-ranking model; performing ranking and elimination on a bullet-screen comment based on an evaluation result, and evaluating an uneliminated bullet-screen comment by using all models, to obtain a new index; and updating a material and the new index of the uneliminated bullet-screen comment to the bullet-screen comment recall pool.
- 6 . The method according to claim 1 , wherein the bullet-screen comment recall pool is a key-value database, and a recalled bullet-screen comment of a video in a first preset time period is stored in a value corresponding to a key.
- 7 . The method according to claim 1 , wherein the material pool and the index pool are separately stored in the bullet-screen comment recall pool by using different keys, and data consistency is ensured by using a Redis segment lock.
- 8 . The method according to claim 1 , wherein the time period is determined based on a video playing time point at which the user currently views the video and a segment size dynamically delivered by a server based on an application scenario.
- 9 . The method according to claim 1 , wherein the performing screening based on a feature algorithm comprises: establishing ranking logic for personalized recommendation based on a preset feature algorithm that comprises a user feature and a video feature, evaluating a corresponding bullet-screen comment by using all models, then performing ranking and extraction based on an evaluation result, and returning a recommendation result.
- 10 . An electronic apparatus, wherein the electronic apparatus comprises a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and when the computer-readable instructions are executed by the processor, the processor performs operations comprising: evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool, comprising: obtaining a bullet-screen comment material from the bullet-screen comment database, and evaluating each bullet-screen comment by using a pre-ranking model; aggregating all bullet-screen comment materials in a second preset time period, and performing ranking and elimination on all bullet-screen comments in the second preset time period based on an evaluation result; evaluating an uneliminated bullet-screen comment by using all models, and obtaining a bullet-screen comment index based on an evaluation result; and respectively storing a material list and an index list of the uneliminated bullet-screen comment in a material pool and an index pool of the bullet-screen comment recall pool, wherein the material pool is used to store a bullet-screen comment material that is basic data of a bullet-screen comment, and the index pool is used to store a bullet-screen comment index that is a model evaluation result of each bullet-screen comment corresponding to the material pool; and obtaining corresponding bullet-screen comment information from the bullet-screen comment recall pool based on a video identifier of a video viewed by a user of a client and a time period in which the user views the video, performing screening based on a feature algorithm, and displaying bullet-screen comment information obtained through screening on the client.
- 11 . The electronic apparatus according to claim 10 , wherein the operations performed by the processor further comprises: in response to that a pre-ranking model does not need to be updated, updating only the bullet-screen comment index in the bullet-screen comment recall pool through index refresh, to implement model policy iteration.
- 12 . The electronic apparatus according to claim 10 , wherein the operations performed by the processor further comprises: in response to that a pre-ranking model needs to be updated, updating both the bullet-screen comment material and the index in the bullet-screen comment recall pool through material refresh, to implement model policy iteration.
- 13 . The electronic apparatus according to claim 10 , wherein the bullet-screen comment recall pool is a key-value database, and a recalled bullet-screen comment of a video in a first preset time period is stored in a value corresponding to a key.
- 14 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the processor performs operations comprising: evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool, comprising: obtaining a bullet-screen comment material from the bullet-screen comment database, and evaluating each bullet-screen comment by using a pre-ranking model; aggregating all bullet-screen comment materials in a second preset time period, and performing ranking and elimination on all bullet-screen comments in the second preset time period based on an evaluation result; evaluating an uneliminated bullet-screen comment by using all models, and obtaining a bullet-screen comment index based on an evaluation result; and respectively storing a material list and an index list of the uneliminated bullet-screen comment in a material pool and an index pool of the bullet-screen comment recall pool, wherein the material pool is used to store a bullet-screen comment material that is basic data of a bullet-screen comment, and the index pool is used to store a bullet-screen comment index that is a model evaluation result of each bullet-screen comment corresponding to the material pool; and obtaining corresponding bullet-screen comment information from the bullet-screen comment recall pool based on a video identifier of a video viewed by a user of a client and a time period in which the user views the video, performing screening based on a feature algorithm, and displaying bullet-screen comment information obtained through screening on the client.
- 15 . The non-transitory computer-readable storage medium according to claim 14 , wherein the operations performed by the processor further comprises: in response to that a pre-ranking model does not need to be updated, updating only the bullet-screen comment index in the bullet-screen comment recall pool through index refresh, to implement model policy iteration.
- 16 . The non-transitory computer-readable storage medium according to claim 14 , wherein the operations performed by the processor further comprises: in response to that a pre-ranking model needs to be updated, updating both the bullet-screen comment material and the index in the bullet-screen comment recall pool through material refresh, to implement model policy iteration.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202211449707.1, filed on Nov. 18, 2022, the entire contents of which is hereby incorporated by reference in its entirety for all purposes. TECHNICAL FIELD This application relates to data processing technologies, and in particular, to bullet-screen comment processing. BACKGROUND With popularization and development of computer technologies, there are increasingly more video website users. Sending a bullet-screen comment for interaction while viewing a video gradually becomes a habit of the video website user. The bullet-screen comment is a comment caption that pops up during video viewing in a network, and can give viewers an illusion of “real-time interaction”. In a current development phase of bullet-screen comment engineering construction, stability and high availability of a bullet-screen comment service need to be ensured in high-concurrency and hot scenarios, and to optimize video consumption experience, high-quality bullet-screen comment content is obtained through screening, and is displayed on a screen, and a personalized bullet-screen comment recommendation capability is built. SUMMARY A main objective of this application is to provide a bullet-screen comment processing method and system, an electronic apparatus, and a computer-readable storage medium. An embodiment of this application provides a bullet-screen comment processing method. The method includes: evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool; andobtaining corresponding bullet-screen comment information from the bullet-screen comment recall pool based on a video identifier of a video viewed by a user of a client and a time period in which the user views the video, performing screening based on a feature algorithm, and displaying bullet-screen comment information obtained through screening on the client. Optionally, the bullet-screen comment recall pool includes a material pool and an index pool, the material pool is used to store a bullet-screen comment material that is basic data of a bullet-screen comment, and the index pool is used to store a bullet-screen comment index that is a model evaluation result of each bullet-screen comment corresponding to the material pool. Optionally, the method further includes: when a pre-ranking model does not need to be updated, updating only the bullet-screen comment index in the bullet-screen comment recall pool through index refresh, to implement model policy iteration. Optionally, the method further includes: when the pre-ranking model needs to be updated, updating both the bullet-screen comment material and the index in the bullet-screen comment recall pool through material refresh, to implement model policy iteration. Optionally, the bullet-screen comment recall pool is a key-value database, and a recalled bullet-screen comment of a video in a first preset time period is stored in a value corresponding to a key. Optionally, the material pool and the index pool are separately stored in the bullet-screen comment recall pool by using different keys, and data consistency is ensured by using a Redis segment lock. Optionally, the evaluating, by using a model, bullet-screen comment information obtained from a bullet-screen comment database, and storing the bullet-screen comment information in a bullet-screen comment recall pool includes: obtaining a bullet-screen comment material from the bullet-screen comment database, and evaluating each bullet-screen comment by using a pre-ranking model;aggregating all bullet-screen comment materials in a second preset time period, and performing ranking and elimination on all bullet-screen comments in the second preset time period based on an evaluation result;evaluating an uneliminated bullet-screen comment by using all models, and obtaining a bullet-screen comment index based on an evaluation result; andrespectively storing a material list and an index list of the uneliminated bullet-screen comment in the material pool and the index pool. Optionally, the time period is determined based on a video playing time point at which the user currently views the video and a segment size dynamically delivered by a server based on an application scenario. Optionally, the performing screening based on a feature algorithm includes: establishing ranking logic for personalized recommendation based on a preset feature algorithm that includes a user feature and a video feature, evaluating a corresponding bullet-screen comment by using all models, then performing ranking and extraction based on an evaluation result, and returning a recommendation result. Optionally, the index refresh includes: obtaining a highly hot video list and a real-time incremental video list;evaluating bullet-screen comments corresponding to the highly