[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112347764B - Method and device for generating barrage cloud and computer equipment - Google Patents

Method and device for generating barrage cloud and computer equipment Download PDF

Info

Publication number
CN112347764B
CN112347764B CN202011224708.7A CN202011224708A CN112347764B CN 112347764 B CN112347764 B CN 112347764B CN 202011224708 A CN202011224708 A CN 202011224708A CN 112347764 B CN112347764 B CN 112347764B
Authority
CN
China
Prior art keywords
keywords
keyword
display
cloud
comment
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
CN202011224708.7A
Other languages
Chinese (zh)
Other versions
CN112347764A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202011224708.7A priority Critical patent/CN112347764B/en
Publication of CN112347764A publication Critical patent/CN112347764A/en
Application granted granted Critical
Publication of CN112347764B publication Critical patent/CN112347764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to big data technology, and discloses a method for generating barrage cloud, which comprises the following steps: capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text; extracting keywords corresponding to the comment texts respectively; calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment; and forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords. Keywords of each comment text obtained at certain statistical moment are collected in a barrage cloud, and focus vocabularies are highlighted to cluster comment focuses of each comment text, so that accurate information interaction is facilitated.

Description

Method and device for generating barrage cloud and computer equipment
Technical Field
The application relates to the field of big data, in particular to a method, a device and computer equipment for generating barrage cloud.
Background
The bullet screen refers to comment captions popped up when watching videos on a network, the bullet screen can give an illusion of real-time interaction to viewers, and although different bullet screens are different in sending time, the bullet screens only appear at a specific time point in the videos, so that the bullet screens sent at the same time basically have the same theme, and the illusion of simultaneous comments with other viewers exists when the bullet screens participate in comments. Many online live broadcasts also use a bullet screen-like approach to display real-time comments from the audience under the screen. However, the comment text which is rapidly scratched by the bullet screen has very short display time, and is submerged by the comment messages below when the comment text is flashed, so that the comment text is unfavorable for obtaining the speaking views or comments of most people.
Disclosure of Invention
The application mainly aims to solve the technical problem that the existing barrage display mode is unfavorable for information interaction.
The application provides a method for generating barrage cloud, which comprises the following steps:
capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text;
extracting keywords corresponding to the comment texts respectively;
Calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment;
And forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords.
Preferably, the step of calculating, according to the number of times of occurrence of the keywords in a preset time period and the time interval between the time information and the current statistical time, the display weights corresponding to the keywords respectively in a preset calculation mode includes:
counting the cumulative times of occurrence of the specified keywords in the preset time period, wherein the specified keywords are any one of all keywords in the preset time period;
calculating the time interval of the specified keyword from the current statistical moment according to the time information;
substituting the accumulated times and time intervals corresponding to the specified keywords into a specified calculation formula to calculate and obtain display weights corresponding to the specified keywords, wherein the specified calculation formula is that R w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical moment, T represents a preset time period, and m represents the occurrence number;
And calculating the display weight corresponding to each keyword according to the calculation mode of the display weight of the designated keyword.
Preferably, the step of extracting keywords corresponding to each comment text respectively includes:
Removing stop words respectively included in each comment text to form a sequence of ordered words respectively corresponding to each comment text;
And carrying out word segmentation on each ordered word sequence through a word segmentation model to obtain keywords corresponding to each evaluation paper.
Preferably, after the step of separating the ordered word sequences by a word separation model to obtain keywords corresponding to the respective evaluation papers, the method includes:
Judging whether a first keyword and a second keyword which are close meanings of each other exist in keyword sets respectively corresponding to the evaluation papers obtained at the current statistical moment;
If yes, acquiring accumulated occurrence times of the first keyword and the second keyword in the preset time period respectively;
And merging the second keywords with smaller cumulative occurrence times into the first keywords, and overlapping the cumulative occurrence times of the second keywords to the cumulative occurrence times of the first keywords.
Preferably, after the step of forming the barrage cloud formed by the keywords in the preset area according to the display weights respectively corresponding to the keywords, the method includes:
Judging whether a preset updating time is reached or not;
If yes, a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment are obtained;
Adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list;
according to the appointed calculation formula, updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updating moment;
And eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical moment, wherein the specific keywords are the keywords which are arranged at the tail end in the sequence from big to small in display weight, the first statistical moment is arranged before the updated moment, the second statistical moment is arranged after or equal to the updated moment, and an updating period is corresponding between the first statistical moment and the second statistical moment.
Preferably, the step of forming a barrage cloud formed by the keywords in a preset area according to the display weights respectively corresponding to the keywords includes:
Ordering the keywords in a manner of decreasing the display weight to form a display queue;
Matching the keywords in the display queue in proportion according to the display weight, wherein the display areas respectively correspond to the keywords;
And displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
Preferably, after the step of forming the barrage cloud formed by the keywords in the preset area according to the display weights respectively corresponding to the keywords, the method includes:
judging whether feedback information texts for the comment texts are received in a preset time interval or not;
If not, the keywords ranked in front in the display queue are input into an automatic dialogue reply model;
receiving dialogue replies corresponding to the keywords ranked at the front and output by the dialogue reply model;
and displaying the dialogue reply as a feedback information text for each comment text.
The application also provides a device for generating the barrage cloud, which comprises:
The system comprises a grabbing module, a storage module and a display module, wherein the grabbing module is used for grabbing comment texts respectively input by users, and each comment text carries time information for generating each comment text;
The extraction module is used for respectively extracting keywords corresponding to the comment texts;
the first calculation module is used for calculating the display weight respectively corresponding to each keyword in a preset calculation mode according to the occurrence times of the keyword in a preset time period and the time interval of the time information from the current statistical moment;
The forming module is used for forming bullet screen clouds formed by the keywords in a preset area according to the display weights respectively corresponding to the keywords.
The application also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described above.
According to the application, the keywords of each comment text obtained at certain statistical moment are collected in one barrage cloud, and the focus vocabulary is highlighted to cluster the comment focus of each comment text, so that accurate information interaction is facilitated.
Drawings
FIG. 1 is a schematic flow chart of a method for generating a barrage cloud according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an apparatus for generating a barrage cloud according to an embodiment of the present application;
FIG. 3 is a schematic diagram showing an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, a method for generating a barrage cloud according to an embodiment of the present application includes:
S1: capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text;
S2: extracting keywords corresponding to the comment texts respectively;
S3: calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment;
S4: and forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords.
In the embodiment of the application, through analyzing the generation time and the occurrence times of each keyword in the comment text, the comment focus corresponding to the current statistical moment is clustered, namely, the keyword with the occurrence time closest to the current statistical moment and the occurrence times most at the current statistical moment is the focus vocabulary, and the corresponding display weight is high and can be highlighted in the bullet screen cloud in a highlighting mode. The highlighting mode includes but is not limited to large display area of the barrage cloud occupied by the fonts, bright font colors, bold font lines, dynamic font display and the like. The bullet screen cloud of the embodiment of the application can be fixedly displayed in a certain area of the display screen, and can also be dynamically and slowly drawn above the display screen in a mode that each statistics moment corresponds to one bullet screen cloud. According to the embodiment of the application, the keywords of each comment text obtained at certain statistical moment are collected in one barrage cloud, and the focus vocabulary is highlighted to cluster the comment focus of each comment text, so that accurate information interaction is facilitated.
Further, according to the number of times of occurrence of the keywords in a preset time period and the time interval between the time information and the current statistical time, the step S3 of calculating the display weights corresponding to the keywords respectively in a preset calculation mode includes:
S31: counting the cumulative times of occurrence of the specified keywords in the preset time period, wherein the specified keywords are any one of all keywords in the preset time period;
S32: calculating the time interval of the specified keyword from the current statistical moment according to the time information;
S33: substituting the accumulated times and time intervals corresponding to the specified keywords into a specified calculation formula to calculate and obtain display weights corresponding to the specified keywords, wherein the specified calculation formula is that R w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical moment, T represents a preset time period, and m represents the occurrence number;
S34: and calculating the display weight corresponding to each keyword according to the calculation mode of the display weight of the designated keyword.
The embodiment of the application obtains the appointed calculation formula by taking the accumulated times of occurrence of the keywords and the time interval of the keywords from the current statistical moment as two important reference factors. The above-mentioned preset time period can be set according to actual needs, for example, the preset time period is 600 seconds, and then t is equal to 600. According to the method, the keywords are arranged through the display weight, a keyword list is formed, and then the corresponding barrage cloud is formed according to the keyword list.
Further, the step S2 of extracting keywords corresponding to each comment text includes:
s21: removing stop words respectively included in each comment text to form a sequence of ordered words respectively corresponding to each comment text;
S22: and carrying out word segmentation on each ordered word sequence through a word segmentation model to obtain keywords corresponding to each evaluation paper.
Before extracting keywords, the embodiment of the application carries out cleaning operation on each comment text, including but not limited to removing stop words such as a fluxing word, an exclamation word and the like; nonsensical characters such as punctuation marks are removed. The remaining words are arranged into a sequence of ordered words in their original arrangement order in the comment text. And then inputting the sequence of ordered words into a word segmentation model for word segmentation extraction to obtain keywords in comment texts, and classifying the keywords into the same set to obtain a keyword set, so that the keyword set at a certain statistical moment is conveniently subjected to centralized analysis and calculation to quickly generate barrage cloud, and a history query record can be formed. Such word segmentation models include, but are not limited to, hidden Markov models.
Further, after step S22 of separating the ordered word sequences by the word separation model to obtain keywords corresponding to the respective scoring papers, the method includes:
s23: judging whether a first keyword and a second keyword which are close meanings of each other exist in keyword sets respectively corresponding to the evaluation papers obtained at the current statistical moment;
S24: if yes, acquiring accumulated occurrence times of the first keyword and the second keyword in the preset time period respectively;
S25: and merging the second keywords with smaller cumulative occurrence times into the first keywords, and overlapping the cumulative occurrence times of the second keywords to the cumulative occurrence times of the first keywords.
In the embodiment of the application, the extracted keywords are subjected to the paraphrasing operation so as to make focus vocabulary more concentrated and comment focus more definite. For example, the first keyword is denoted as "feature 830s", the second keyword is denoted as "unique 350s", and then the second keyword is merged onto the first keyword, and the merged first keyword is denoted as "feature 1130s". Other embodiments of the application include combinations of words, including not only between close-meaning words, but also between different representation characters of the same meaning. For example, "Chinese" and "China" are the same meaning, and can be used for character combination, for example, by identifying whether the current context is a Chinese context or an English context, if the current context is a Chinese context, the current context is selected to be combined into "Chinese" as the final display vocabulary; if the English context is the English context, the English context is selected and combined into "China" to be used as the final display vocabulary.
Further, after step S4 of forming a barrage cloud composed of the keywords in the preset area according to the display weights respectively corresponding to the keywords, the method includes:
s401: judging whether a preset updating time is reached or not;
S402: if yes, a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment are obtained;
S403: adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list;
s404: according to the appointed calculation formula, updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updating moment;
S405: and eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical moment, wherein the specific keywords are the keywords which are arranged at the tail end in the sequence from big to small in display weight, the first statistical moment is arranged before the updated moment, the second statistical moment is arranged after or equal to the updated moment, and an updating period is corresponding between the first statistical moment and the second statistical moment.
In the embodiment of the application, the keyword list corresponding to the barrage cloud is formed, and the keyword list is updated at fixed time intervals so as to update the keywords of the newly appeared comment text into the keyword list, and the keywords which do not appear in the keyword list are removed in a gradual weakening mode. And continuously displaying the bullet screen cloud through a plurality of keyword tables at adjacent statistical moments in the display process of the bullet screen cloud, realizing real-time dynamic updating, and highlighting newly-appearing keywords and repeatedly-appearing keywords in the bullet screen cloud. The statistical time of the application is based on the time interval between two adjacent statistical moments, and the time interval between two adjacent statistical moments is used as a statistical period or updating period. In other embodiments of the present application, the statistical period may be from the current statistical time to the starting time of commencing on the topic, and the update period may be a fixed time interval, for example, 10 seconds.
Further, according to the display weights respectively corresponding to the keywords, a step S4 of forming a barrage cloud composed of the keywords in a preset area includes:
S41: ordering the keywords in a manner of decreasing the display weight to form a display queue;
s42: matching the keywords in the display queue in proportion according to the display weight, wherein the display areas respectively correspond to the keywords;
s43: and displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
In the embodiment of the application, each keyword is in a stacked display state in the bullet screen cloud, and the keywords are displayed on the upper layer of the stacked layer with large display weight, and are highlighted in a mode of largest occupied area and largest word size. In the embodiment of the application, the display area of each keyword in the barrage cloud is proportional to the display weight, a linear equation conforming to the assignment rule of each display weight can be inversely pushed by summarizing the display weights of each keyword, and the display areas corresponding to the display weights respectively are directly matched according to the linear equation and the actual display weights. In other embodiments of the present application, different display colors and/or display coordinate data may be matched according to different display areas. For example, the keyword with the greatest display weight is matched to be displayed in red, and is displayed at the display coordinate corresponding to the center position of the display area, so as to highlight the viewpoint that the keyword is the most focused in the comment text. In the embodiment of the application, the interaction process of the on-line anchor and audience is taken as an application scene, and the anchor can conveniently give accurate interaction information which accords with the current dialogue scene by focusing the most core comment keywords, so that the feedback effect is improved.
Further, after step S4 of forming a barrage cloud composed of the keywords in the preset area according to the display weights respectively corresponding to the keywords, the method includes:
s400: judging whether feedback information texts for the comment texts are received in a preset time interval or not;
s401: if not, the keywords ranked in front in the display queue are input into an automatic dialogue reply model;
S402: receiving dialogue replies corresponding to the keywords ranked at the front and output by the dialogue reply model;
s403: and displaying the dialogue reply as a feedback information text for each comment text.
In the embodiment of the application, the interactive process of the online anchor and the audience is still taken as an application scene example, when the online anchor can not timely give the interactive information, the interactive reply can be obtained by participating in the interactive reply by means of a dialogue reply model and by focusing the keywords which are ranked ahead, thereby not only meeting the symmetry degree of the information, but also improving the timeliness of the information feedback.
Referring to fig. 2, an apparatus for generating a barrage cloud according to an embodiment of the present application includes:
the system comprises a grabbing module 1, a storage module and a display module, wherein the grabbing module is used for grabbing comment texts respectively input by users, and each comment text carries time information for generating each comment text;
The extraction module 2 is used for respectively extracting keywords corresponding to the comment texts;
the first calculating module 3 is configured to calculate, according to the number of times that the keywords occur in a preset time period and a time interval between the time information and a current statistical time, display weights corresponding to the keywords respectively in a preset calculating manner;
and the forming module 4 is used for forming bullet screen clouds formed by the keywords in a preset area according to the display weights respectively corresponding to the keywords.
In the embodiment of the application, through analyzing the generation time and the occurrence times of each keyword in the comment text, the comment focus corresponding to the current statistical moment is clustered, namely, the keyword with the occurrence time closest to the current statistical moment and the occurrence times most at the current statistical moment is the focus vocabulary, and the corresponding display weight is high and can be highlighted in the bullet screen cloud in a highlighting mode. The highlighting mode includes but is not limited to large display area of the barrage cloud occupied by the fonts, bright font colors, bold font lines, dynamic font display and the like. The bullet screen cloud of the embodiment of the application can be fixedly displayed in a certain area of the display screen, and can also be dynamically and slowly drawn above the display screen in a mode that each statistics moment corresponds to one bullet screen cloud. According to the embodiment of the application, the keywords of each comment text obtained at certain statistical moment are collected in one barrage cloud, and the focus vocabulary is highlighted to cluster the comment focus of each comment text, so that accurate information interaction is facilitated.
Further, the computing module 3 includes:
A statistics unit, configured to count cumulative times of occurrence of specified keywords occurring in the preset time period, where the specified keywords are any one of all keywords occurring in the preset time period;
the first calculation unit is used for calculating the time interval between the specified keyword and the current statistical moment according to the time information;
a second calculation unit, configured to calculate the cumulative times and time intervals corresponding to the specified keywords respectively, by substituting the cumulative times and time intervals into a specified calculation formula to obtain display weights corresponding to the specified keywords respectively, where the specified calculation formula is that R w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical moment, T represents a preset time period, and m represents the occurrence number;
and a third calculation unit, configured to calculate display weights corresponding to the specified keywords according to a calculation mode of the display weights of the keywords.
The embodiment of the application obtains the appointed calculation formula by taking the accumulated times of occurrence of the keywords and the time interval of the keywords from the current statistical moment as two important reference factors. The above-mentioned preset time period can be set according to actual needs, for example, the preset time period is 600 seconds, and then t is equal to 600. According to the method, the keywords are arranged through the display weight, a keyword list is formed, and then the corresponding barrage cloud is formed according to the keyword list.
Further, the extraction module 2 includes:
the removing unit is used for removing stop words respectively included in the comment texts to form a sequence of ordered words respectively corresponding to the comment texts;
and the analysis unit is used for separating the words of the sequence of ordered words through a word separation model to obtain keywords corresponding to each evaluation paper.
Before extracting keywords, the embodiment of the application carries out cleaning operation on each comment text, including but not limited to removing stop words such as a fluxing word, an exclamation word and the like; nonsensical characters such as punctuation marks are removed. The remaining words are arranged into a sequence of ordered words in their original arrangement order in the comment text. And then inputting the sequence of ordered words into a word segmentation model for word segmentation extraction to obtain keywords in comment texts, and classifying the keywords into the same set to obtain a keyword set, so that the keyword set at a certain statistical moment is conveniently subjected to centralized analysis and calculation to quickly generate barrage cloud, and a history query record can be formed. Such word segmentation models include, but are not limited to, hidden Markov models.
Further, the extraction module 2 includes:
The judging unit is used for judging whether a first keyword and a second keyword which are close-meaning words exist in the keyword sets respectively corresponding to the evaluation papers acquired at the current statistical moment;
an obtaining unit, configured to obtain cumulative occurrence times of a first keyword and a second keyword in the preset time period, if the first keyword and the second keyword are similar to each other;
And the merging unit is used for merging the second keywords with smaller cumulative occurrence frequency into the first keywords and superposing the cumulative occurrence frequency of the second keywords on the cumulative occurrence frequency of the first keywords.
In the embodiment of the application, the extracted keywords are subjected to the paraphrasing operation so as to make focus vocabulary more concentrated and comment focus more definite. For example, the first keyword is denoted as "feature 830s", the second keyword is denoted as "unique 350s", and then the second keyword is merged onto the first keyword, and the merged first keyword is denoted as "feature 1130s". Other embodiments of the application include combinations of words, including not only between close-meaning words, but also between different representation characters of the same meaning. For example, "Chinese" and "China" are the same meaning, and can be used for character combination, for example, by identifying whether the current context is a Chinese context or an English context, if the current context is a Chinese context, the current context is selected to be combined into "Chinese" as the final display vocabulary; if the English context is the English context, the English context is selected and combined into "China" to be used as the final display vocabulary.
Further, an apparatus for generating a barrage cloud, comprising:
the first judging module is used for judging whether a preset updating time is reached or not;
the acquisition module is used for acquiring a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment if the preset updating moment is reached;
The adding module is used for adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list;
The second calculation module is used for updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updated moment according to the appointed calculation formula;
the eliminating module is used for eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical time, wherein the specific keywords are keywords with specified quantity which are arranged at the tail in the sequence from big to small in display weight, the first statistical time is arranged before the updated time, the second statistical time is arranged after or equal to the updated time, and an updating period is corresponding between the first statistical time and the second statistical time.
In the embodiment of the application, the keyword list corresponding to the barrage cloud is formed, and the keyword list is updated at fixed time intervals so as to update the keywords of the newly appeared comment text into the keyword list, and the keywords which do not appear in the keyword list are removed in a gradual weakening mode. And continuously displaying the bullet screen cloud through a plurality of keyword tables at adjacent statistical moments in the display process of the bullet screen cloud, realizing real-time dynamic updating, and highlighting newly-appearing keywords and repeatedly-appearing keywords in the bullet screen cloud. The statistical time of the application is based on the time interval between two adjacent statistical moments, and the time interval between two adjacent statistical moments is used as a statistical period or updating period. In other embodiments of the present application, the statistical period may be from the current statistical time to the starting time of commencing on the topic, and the update period may be a fixed time interval, for example, 10 seconds.
Further, forming a module 4, comprising:
the ordering unit is used for ordering the keywords in a manner of decreasing the display weight to form a display queue;
The matching unit is used for matching the keywords in the display queue in a proportion according to the size of the display weight, and the display areas respectively corresponding to the keywords are matched;
And the display unit is used for displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
In the embodiment of the application, each keyword is in a stacked display state in the bullet screen cloud, and the keywords are displayed on the upper layer of the stacked layer with large display weight, and are highlighted in a mode of largest occupied area and largest word size. In the embodiment of the application, the display area of each keyword in the barrage cloud is proportional to the display weight, a linear equation conforming to the assignment rule of each display weight can be inversely pushed by summarizing the display weights of each keyword, and the display areas corresponding to the display weights respectively are directly matched according to the linear equation and the actual display weights. In other embodiments of the present application, different display colors and/or display coordinate data may be matched according to different display areas. For example, the keyword with the greatest display weight is matched to be displayed in red, and is displayed at the display coordinate corresponding to the center position of the display area, so as to highlight the viewpoint that the keyword is the most focused in the comment text. In the embodiment of the application, the interaction process of the on-line anchor and audience is taken as an application scene, and the anchor can conveniently give accurate interaction information which accords with the current dialogue scene by focusing the most core comment keywords, so that the feedback effect is improved.
Further, an apparatus for generating a barrage cloud, comprising:
the second judging module is used for judging whether feedback information texts for the comment texts are received in a preset time interval or not;
The input module is used for inputting the keywords ranked in the display queue at the front if feedback information text of each comment text is not received, and inputting an automatic dialogue reply model;
the receiving module is used for receiving dialogue replies corresponding to the keywords which are ranked at the front and output by the dialogue reply model;
and the display module is used for displaying the dialogue reply as a feedback information text for each comment text.
In the embodiment of the application, the interactive process of the online anchor and the audience is still taken as an application scene example, when the online anchor can not give out the interactive information in time, the interactive reply can be obtained by participating in the interactive reply by means of a dialogue reply model and by focusing the keywords which are ranked ahead, thereby not only meeting the symmetry degree of the information, but also improving the timely feedback of the information.
Referring to fig. 3, in an embodiment of the present application, there is further provided a computer device, which may be a server, and an internal structure thereof may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store all the data required for the process of generating the barrage cloud. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of generating a barrage cloud.
The processor executes the method for generating the barrage cloud, and the method comprises the following steps: capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text; extracting keywords corresponding to the comment texts respectively; calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment; and forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords.
According to the computer equipment, the keywords of each comment text obtained at certain statistical moments are collected in one barrage cloud, and the focus vocabulary is highlighted so as to cluster the comment focus of each comment text, thereby being beneficial to accurate information interaction.
In one embodiment, the step of calculating, by the processor, a display weight corresponding to each keyword in a preset calculation manner according to the number of occurrences of the keyword in a preset time period and a time interval between the time information and a current statistical time, includes: counting the cumulative times of occurrence of the specified keywords in the preset time period, wherein the specified keywords are any one of all keywords in the preset time period; calculating the time interval of the specified keyword from the current statistical moment according to the time information; substituting the accumulated times and time intervals corresponding to the specified keywords into a specified calculation formula to calculate and obtain display weights corresponding to the specified keywords, wherein the specified calculation formula is thatR w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical moment, T represents a preset time period, and m represents the occurrence number; and calculating the display weight corresponding to each keyword according to the calculation mode of the display weight of the designated keyword.
In one embodiment, the step of extracting, by the processor, keywords corresponding to each comment text includes: removing stop words respectively included in each comment text to form a sequence of ordered words respectively corresponding to each comment text; and carrying out word segmentation on each ordered word sequence through a word segmentation model to obtain keywords corresponding to each evaluation paper.
In one embodiment, after the step of the processor separating the words of the ordered word sequences by the word separation model to obtain the keywords corresponding to the respective evaluation papers, the method includes: judging whether a first keyword and a second keyword which are close meanings of each other exist in keyword sets respectively corresponding to the evaluation papers obtained at the current statistical moment; if yes, acquiring accumulated occurrence times of the first keyword and the second keyword in the preset time period respectively; and merging the second keywords with smaller cumulative occurrence times into the first keywords, and overlapping the cumulative occurrence times of the second keywords to the cumulative occurrence times of the first keywords.
In one embodiment, after the step of forming the barrage cloud composed of the keywords in the preset area according to the display weights corresponding to the keywords, the processor includes: judging whether a preset updating time is reached or not; if yes, a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment are obtained; adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list; according to the appointed calculation formula, updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updating moment; and eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical moment, wherein the specific keywords are the keywords which are arranged at the tail end in the sequence from big to small in display weight, the first statistical moment is arranged before the updated moment, the second statistical moment is arranged after or equal to the updated moment, and an updating period is corresponding between the first statistical moment and the second statistical moment.
In one embodiment, the step of forming, by the processor, a barrage cloud formed by each keyword in a preset area according to the display weights corresponding to the keywords, includes: ordering the keywords in a manner of decreasing the display weight to form a display queue; matching the keywords in the display queue in proportion according to the display weight, wherein the display areas respectively correspond to the keywords; and displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
In one embodiment, after the step of forming the barrage cloud composed of the keywords in the preset area according to the display weights corresponding to the keywords, the processor includes: judging whether feedback information texts for the comment texts are received in a preset time interval or not; if not, the keywords ranked in front in the display queue are input into an automatic dialogue reply model; receiving dialogue replies corresponding to the keywords ranked at the front and output by the dialogue reply model; and displaying the dialogue reply as a feedback information text for each comment text.
It will be appreciated by those skilled in the art that the architecture shown in fig. 3 is merely a block diagram of a portion of the architecture in connection with the present inventive arrangements and is not intended to limit the computer devices to which the present inventive arrangements are applicable.
An embodiment of the present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating a barrage cloud, comprising: capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text; extracting keywords corresponding to the comment texts respectively; calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment; and forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords.
According to the computer readable storage medium, keywords of each comment text obtained at certain statistical moments are collected in one barrage cloud, and focus vocabularies are highlighted to cluster comment focuses of each comment text, so that accurate information interaction is facilitated.
In one embodiment, the step of calculating, by the processor, a display weight corresponding to each keyword in a preset calculation manner according to the number of occurrences of the keyword in a preset time period and a time interval between the time information and a current statistical time, includes: counting the cumulative times of occurrence of the specified keywords in the preset time period, wherein the specified keywords are any one of all keywords in the preset time period; calculating the time interval of the specified keyword from the current statistical moment according to the time information; substituting the accumulated times and time intervals corresponding to the specified keywords into a specified calculation formula to calculate and obtain display weights corresponding to the specified keywords, wherein the specified calculation formula is thatR w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical moment, T represents a preset time period, and m represents the occurrence number; and calculating the display weight corresponding to each keyword according to the calculation mode of the display weight of the designated keyword.
In one embodiment, the step of extracting, by the processor, keywords corresponding to each comment text includes: removing stop words respectively included in each comment text to form a sequence of ordered words respectively corresponding to each comment text; and carrying out word segmentation on each ordered word sequence through a word segmentation model to obtain keywords corresponding to each evaluation paper.
In one embodiment, after the step of the processor separating the words of the ordered word sequences by the word separation model to obtain the keywords corresponding to the respective evaluation papers, the method includes: judging whether a first keyword and a second keyword which are close meanings of each other exist in keyword sets respectively corresponding to the evaluation papers obtained at the current statistical moment; if yes, acquiring accumulated occurrence times of the first keyword and the second keyword in the preset time period respectively; and merging the second keywords with smaller cumulative occurrence times into the first keywords, and overlapping the cumulative occurrence times of the second keywords to the cumulative occurrence times of the first keywords.
In one embodiment, after the step of forming the barrage cloud composed of the keywords in the preset area according to the display weights corresponding to the keywords, the processor includes: judging whether a preset updating time is reached or not; if yes, a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment are obtained; adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list; according to the appointed calculation formula, updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updating moment; and eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical moment, wherein the specific keywords are the keywords which are arranged at the tail end in the sequence from big to small in display weight, the first statistical moment is arranged before the updated moment, the second statistical moment is arranged after or equal to the updated moment, and an updating period is corresponding between the first statistical moment and the second statistical moment.
In one embodiment, the step of forming, by the processor, a barrage cloud formed by each keyword in a preset area according to the display weights corresponding to the keywords, includes: ordering the keywords in a manner of decreasing the display weight to form a display queue; matching the keywords in the display queue in proportion according to the display weight, wherein the display areas respectively correspond to the keywords; and displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
In one embodiment, after the step of forming the barrage cloud composed of the keywords in the preset area according to the display weights corresponding to the keywords, the processor includes: judging whether feedback information texts for the comment texts are received in a preset time interval or not; if not, the keywords ranked in front in the display queue are input into an automatic dialogue reply model; receiving dialogue replies corresponding to the keywords ranked at the front and output by the dialogue reply model; and displaying the dialogue reply as a feedback information text for each comment text.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided by the present application and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the application.

Claims (9)

1. A method of generating a barrage cloud, comprising:
capturing comment texts respectively input by users, wherein each comment text carries time information for generating each comment text;
extracting keywords corresponding to the comment texts respectively;
Calculating display weights respectively corresponding to the keywords in a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment;
forming bullet screen clouds formed by the keywords in a preset area according to the display weights corresponding to the keywords respectively;
the step of calculating the display weight corresponding to each keyword respectively through a preset calculation mode according to the occurrence times of the keywords in a preset time period and the time interval of the time information from the current statistical moment comprises the following steps:
counting the cumulative times of occurrence of the specified keywords in the preset time period, wherein the specified keywords are any one of all keywords in the preset time period;
calculating the time interval of the specified keyword from the current statistical moment according to the time information;
substituting the accumulated times and time intervals corresponding to the specified keywords into a specified calculation formula to calculate and obtain display weights corresponding to the specified keywords, wherein the specified calculation formula is that R w represents the display weight of the keyword w, T i w represents the time interval of the keyword w from the current statistical time i, T represents a preset time period, and m represents the occurrence number of the keyword;
And calculating the display weight corresponding to each keyword according to the calculation mode of the display weight of the designated keyword.
2. The method of generating a barrage cloud as defined in claim 1, wherein the step of extracting keywords corresponding to each comment text respectively includes:
Removing stop words respectively included in each comment text to form a sequence of ordered words respectively corresponding to each comment text;
And carrying out word segmentation on each ordered word sequence through a word segmentation model to obtain keywords corresponding to each evaluation paper.
3. The method for generating barrage cloud according to claim 2, wherein after the step of separating each of the ordered word sequences by a word separation model to obtain keywords corresponding to each of the evaluation papers, the method comprises:
Judging whether a first keyword and a second keyword which are close meanings of each other exist in keyword sets respectively corresponding to the evaluation papers obtained at the current statistical moment;
If yes, acquiring accumulated occurrence times of the first keyword and the second keyword in the preset time period respectively;
And merging the second keywords with less cumulative occurrence into the first keywords, and overlapping the cumulative occurrence times of the second keywords to the cumulative occurrence times of the first keywords.
4. The method for generating a barrage cloud according to claim 1, wherein after the step of forming the barrage cloud composed of each keyword in the preset area according to the display weights respectively corresponding to each keyword, the method comprises:
Judging whether a preset updating time is reached or not;
If yes, a first keyword table corresponding to a first statistical moment and a new comment text added between the first statistical moment and the updating moment are obtained;
Adding keywords corresponding to the new comment texts to the first keyword list to form an updated keyword list;
according to the appointed calculation formula, updating and calculating the display weight of all keywords in the updated keyword list from the first statistical moment to the updating moment;
And eliminating specific keywords in the updated keyword list to form a second keyword list corresponding to a second statistical moment, wherein the specific keywords are the keywords which are arranged at the tail end in the sequence from big to small in display weight, the first statistical moment is arranged before the updated moment, the second statistical moment is arranged after or equal to the updated moment, and an updating period is corresponding between the first statistical moment and the second statistical moment.
5. The method for generating a barrage cloud according to claim 1, wherein the step of forming the barrage cloud composed of each keyword in the preset area according to the display weights respectively corresponding to each keyword comprises:
Ordering the keywords in a manner of decreasing the display weight to form a display queue;
Matching the keywords in the display queue in proportion according to the display weight, wherein the display areas respectively correspond to the keywords;
And displaying the keywords in the preset area according to the display areas respectively corresponding to the keywords.
6. The method for generating a barrage cloud as defined in claim 5, wherein after the step of forming the barrage cloud composed of each of the keywords in the predetermined area according to the display weights corresponding to each of the keywords, the method comprises:
judging whether feedback information texts for the comment texts are received in a preset time interval or not;
If not, the keywords ranked in front in the display queue are input into an automatic dialogue reply model;
receiving dialogue replies corresponding to the keywords ranked at the front and output by the dialogue reply model;
and displaying the dialogue reply as a feedback information text for each comment text.
7. An apparatus for generating a barrage cloud for implementing the method of any of claims 1-6, comprising:
The system comprises a grabbing module, a storage module and a display module, wherein the grabbing module is used for grabbing comment texts respectively input by users, and each comment text carries time information for generating each comment text;
The extraction module is used for respectively extracting keywords corresponding to the comment texts;
the first calculation module is used for calculating the display weight respectively corresponding to each keyword in a preset calculation mode according to the occurrence times of the keyword in a preset time period and the time interval of the time information from the current statistical moment;
The forming module is used for forming bullet screen clouds formed by the keywords in a preset area according to the display weights respectively corresponding to the keywords.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202011224708.7A 2020-11-05 2020-11-05 Method and device for generating barrage cloud and computer equipment Active CN112347764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011224708.7A CN112347764B (en) 2020-11-05 2020-11-05 Method and device for generating barrage cloud and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011224708.7A CN112347764B (en) 2020-11-05 2020-11-05 Method and device for generating barrage cloud and computer equipment

Publications (2)

Publication Number Publication Date
CN112347764A CN112347764A (en) 2021-02-09
CN112347764B true CN112347764B (en) 2024-05-07

Family

ID=74428934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011224708.7A Active CN112347764B (en) 2020-11-05 2020-11-05 Method and device for generating barrage cloud and computer equipment

Country Status (1)

Country Link
CN (1) CN112347764B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501832A (en) * 2022-01-20 2023-07-28 北京有竹居网络技术有限公司 Comment processing method and comment processing equipment
CN114579902A (en) * 2022-02-15 2022-06-03 北京达佳互联信息技术有限公司 Bullet screen information display method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682132A (en) * 2012-05-18 2012-09-19 合一网络技术(北京)有限公司 Method and system for searching information based on word frequency, play amount and creation time
JP2016071631A (en) * 2014-09-30 2016-05-09 京セラドキュメントソリューションズ株式会社 Log display system, log display device, and image processor
CN107909115A (en) * 2017-12-04 2018-04-13 上海师范大学 A kind of image Chinese subtitle generation method
CN109145291A (en) * 2018-07-25 2019-01-04 广州虎牙信息科技有限公司 A kind of method, apparatus, equipment and the storage medium of the screening of barrage keyword
CN110798636A (en) * 2019-10-18 2020-02-14 腾讯数码(天津)有限公司 Subtitle generating method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102682132A (en) * 2012-05-18 2012-09-19 合一网络技术(北京)有限公司 Method and system for searching information based on word frequency, play amount and creation time
JP2016071631A (en) * 2014-09-30 2016-05-09 京セラドキュメントソリューションズ株式会社 Log display system, log display device, and image processor
CN107909115A (en) * 2017-12-04 2018-04-13 上海师范大学 A kind of image Chinese subtitle generation method
CN109145291A (en) * 2018-07-25 2019-01-04 广州虎牙信息科技有限公司 A kind of method, apparatus, equipment and the storage medium of the screening of barrage keyword
CN110798636A (en) * 2019-10-18 2020-02-14 腾讯数码(天津)有限公司 Subtitle generating method and device and electronic equipment

Also Published As

Publication number Publication date
CN112347764A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN110020437B (en) Emotion analysis and visualization method combining video and barrage
CN110708607B (en) Live broadcast interaction method and device, electronic equipment and storage medium
DE202016008241U1 (en) Make suggestions for interacting with an automated wizard in a multi-user messaging thread
CN111324713B (en) Automatic replying method and device for conversation, storage medium and computer equipment
US20230027412A1 (en) Method and apparatus for recognizing subtitle region, device, and storage medium
CN112347764B (en) Method and device for generating barrage cloud and computer equipment
CN111522970A (en) Exercise recommendation method, exercise recommendation device, exercise recommendation equipment and storage medium
CN114095749B (en) Recommendation and live interface display method, computer storage medium and program product
CN112399269B (en) Video segmentation method, device, equipment and storage medium
CN110740389A (en) Video positioning method and device, computer readable medium and electronic equipment
CN112002328B (en) Subtitle generation method and device, computer storage medium and electronic equipment
CN112163079A (en) Intelligent conversation method and system based on reading understanding model
CN116383366A (en) Response information determining method, electronic equipment and storage medium
JP2019003472A (en) Information processing apparatus and information processing method
CN111061838A (en) Text feature keyword determination method and device and storage medium
CN115098729A (en) Video processing method, sample generation method, model training method and device
CN104504104A (en) Picture material processing method and device for search engine, and search engine
DE112019006199T5 (en) Data processing device, data processing system and data processing method and program
CN117421413A (en) Question-answer pair generation method and device and electronic equipment
KR20200143039A (en) Method and apparatus of dialog scenario database constructing for dialog system
CN109902099B (en) Public opinion tracking method and device based on graphic and text big data and computer equipment
CN115860829A (en) Intelligent advertisement image generation method and device
CN112257438B (en) Language knowledge processing method and device with association mechanism
CN114186557A (en) Method, device and storage medium for determining subject term
CN114390306A (en) Live broadcast interactive abstract generation method and device

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