CN114257876A - Bullet screen display processing method and device, electronic equipment and storage medium - Google Patents

Bullet screen display processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114257876A
CN114257876A CN202011025675.3A CN202011025675A CN114257876A CN 114257876 A CN114257876 A CN 114257876A CN 202011025675 A CN202011025675 A CN 202011025675A CN 114257876 A CN114257876 A CN 114257876A
Authority
CN
China
Prior art keywords
bullet screen
message
screen message
data
type
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
Application number
CN202011025675.3A
Other languages
Chinese (zh)
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN202011025675.3A priority Critical patent/CN114257876A/en
Publication of CN114257876A publication Critical patent/CN114257876A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/466Learning process for intelligent management, e.g. learning user preferences for recommending movies
    • H04N21/4667Processing of monitored end-user data, e.g. trend analysis based on the log file of viewer selections

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a bullet screen display processing method, a bullet screen display processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a bullet screen message through a bullet screen message receiver; analyzing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message; acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter; and displaying the bullet screen data. By the technical scheme of the embodiment of the invention, the full decoupling of the bullet screen display processing process is realized, so that the processing pressure of receiver class of bullet screen information receivers is reduced, and the display performance of the bullet screen is improved.

Description

Bullet screen display processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of barrage, in particular to a barrage display processing method and device, electronic equipment and a storage medium.
Background
At present, in the process of watching a video, a user can send some ideas and views of the user on the current video in a pop-up screen sending mode, for example, it is better to show a certain character in a video in a praise manner, or the level of a certain game player in a game video is better. In the live video broadcast, a user can also communicate with the main broadcast in real time through the barrage.
The user sends the bullet screen, and the bullet screen is displayed on the client of other users, which needs a very complicated processing flow. Firstly, the server receives the bullet screen sent by the user, and then the bullet screen is analyzed and format-converted, and finally the bullet screen data capable of being displayed is obtained.
For the above treatment process, the conventional method at present is: designing a receiver type receiving bullet screen forwarded by a server (the bullet screen is sent to the server by a user through a client of the user), converting the bullet screen into a data dictionary (the data dictionary is data in a specific format) in the receiver type, converting the data dictionary into a corresponding bullet screen model based on the type of the bullet screen, and further obtaining bullet screen data capable of being displayed according to the bullet screen model. The technical problems of the conventional methods are as follows: when the types of the barrage are more, the receiver class is expanded infinitely, and conflicts easily occur in the merging process aiming at the processing codes of different types of barrages, so that the display performance of the barrage is unstable.
Disclosure of Invention
The invention provides a bullet screen display processing method and device, electronic equipment and a storage medium, which are used for realizing the complete decoupling of the bullet screen display processing process, reducing the processing pressure of receivers of bullet screen message receivers and improving the stability of the display performance of bullet screens.
In a first aspect, an embodiment of the present invention provides a bullet screen display processing method, including:
receiving a bullet screen message through a bullet screen message receiver;
analyzing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message;
acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter;
and displaying the bullet screen data.
In a second aspect, an embodiment of the present invention further provides a bullet screen display processing apparatus, where the apparatus includes:
the receiving module is used for receiving the bullet screen message through the bullet screen message receiver;
the processing module is used for analyzing and converting the bullet screen message in the bullet screen message receiver so as to obtain a bullet screen model corresponding to the bullet screen message;
the acquisition module is used for acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter;
and the display module is used for displaying the bullet screen data.
In a third aspect, the embodiments of the present invention also provide
An electronic device, the electronic device comprising:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the bullet screen display processing method provided by the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the bullet screen display processing method provided in the embodiment of the present invention.
The method receives the bullet screen message through the bullet screen message receiver, analyzes and converts the bullet screen message in the bullet screen message receiver to obtain the bullet screen model corresponding to the bullet screen message, obtains the bullet screen data corresponding to the bullet screen message through the bullet screen data obtaining function in the bullet screen message receiver by taking the bullet screen model as a parameter, and displays the bullet screen data, so that the complete decoupling of the bullet screen display processing process is realized, the processing pressure of receivers of the bullet screen message receiver is reduced, and the stability of the display performance of the bullet screen is improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a bullet screen display processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a bullet screen display processing method according to a second embodiment of the present invention
Fig. 3 is a schematic structural diagram of a bullet screen display processing device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a bullet screen display processing method according to an embodiment of the present invention, which is applicable to processing bullet screen messages sent by a user to display the bullet screen messages on other clients. The method may be performed by a bullet screen display processing device, which may be implemented by hardware and/or software. As shown in fig. 1, the method specifically includes the following steps:
and S110, receiving the bullet screen message through the bullet screen message receiver.
The bullet screen message receiver is used for receiving bullet screen messages sent by users. The bullet screen message sent by the user through the client firstly arrives at the server, is received by the bullet screen message receiver integrated in the server, is processed in the bullet screen message receiver to be converted into data in a specific format which can be directly displayed, and is finally delivered to each client for display. The bullet screen message receiver may specifically be an implementation class, for example, the bullet screen message receiver is defined as a receiver class, and the client may be an application installed on an intelligent device such as a smart phone or a tablet computer, or a web page running on the intelligent device such as the smart phone or the tablet computer. The bullet screen message in this embodiment may be any bullet screen message, for example, input by the user in the input box of the client. Illustratively, the barrage message may be a commenting message sent by a user during video playing, or may be an interactive message received during a live broadcast.
And S120, analyzing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message.
The bullet screen model is used for representing types corresponding to the bullet screen messages and classifying the types of the bullet screen messages so as to divide all the bullet screen messages received by the receiver class into different types of bullet screens, wherein the types specifically refer to the types of components of the bullet screen messages, and for example, for a plain text bullet screen message, the type of the bullet screen message can be defined as a plain text type; for the bullet screen message with the mixed text and the mixed expression, the bullet screen message can be defined as a specific type based on the position relation of the text and the expression in the whole bullet screen message. For example, a barrage message consists of: defining the text + the expression as a first bullet screen message type; the bullet screen message comprises the following components: and the expression + text is defined as a second bullet screen message type. After receiving the bullet screen message, the bullet screen message receiver analyzes and converts the format of the bullet screen message to obtain each component of the bullet screen message, and then determines a bullet screen model corresponding to the bullet screen message based on the type of each component and the position relation of each component in the whole bullet screen message.
Optionally, the parsing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message includes: analyzing the bullet screen message in the bullet screen message receiver to obtain a data dictionary corresponding to the bullet screen message; and converting the data dictionary based on the type of the bullet screen message to obtain a bullet screen model corresponding to the bullet screen message.
The data dictionary is defined and described for data items, data structures, data streams, data storage, processing logic and the like of data, and aims to make detailed description on each element in the data flow chart, and the data dictionary is used as a simple modeling item. In short, a data dictionary is a collection of information describing data, a collection of definitions for all data elements used in a system, another variable container model, and can store any type of object, and values can take any data type, and can also be nested in multiple layers. Each key-value pair of the data dictionary is divided by colons, each key-value pair is divided by commas, and the whole data dictionary is included in curly brackets.
The type of the bullet screen message specifically refers to the data type of the bullet screen message, such as text data, picture data and the like, and different types of bullet screen messages correspond to different bullet screen models. The bullet screen message receiver can analyze the bullet screen message to obtain a corresponding data dictionary when receiving the bullet screen message, and the data dictionary is converted into a corresponding bullet screen model according to the type of the bullet screen message.
Optionally, the type of the bullet screen message includes at least one of the following: text type, picture type, expression type, combination type of text and expression, combination type of text and picture, and the like. The bullet screen message of the text type only contains text; the bullet screen message of the picture type only contains pictures; the bullet screen message of the expression type only contains expressions; the combination type of the text and the expression can be further divided into more detailed types according to the relative positions of the text and the expression in the barrage message, for example, a barrage message is composed of: defining the text + the expression as a first bullet screen message type; the bullet screen message comprises the following components: the expression + text is defined as the second type of barrage message
And S130, acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter.
The bullet screen data refers to data which can be directly displayed and has a specific format. And the bullet screen data acquisition function is used for acquiring corresponding bullet screen data according to the bullet screen model of the bullet screen message.
In the technical scheme of this embodiment, receive the bullet screen message when bullet screen message receiver to parse and convert bullet screen message, after obtaining the bullet screen model that bullet screen message corresponds, use bullet screen model as the parameter, obtain the bullet screen data that bullet screen message corresponds through bullet screen data acquisition function is indirect, and it is right in bullet screen receiver not the bullet screen model carries out further processing with the corresponding bullet screen data of direct acquisition. Such setting can greatly reduce the expanded problem of code in the bullet screen message receiver, because the acquisition process of the bullet screen data that the bullet screen model of difference corresponds is different, if the bullet screen model that directly corresponds bullet screen message in bullet screen message receiver continues to handle and obtains the bullet screen data that finally can directly carry out the demonstration, along with the continuous increase of bullet screen message type (the bullet screen model that the bullet screen message of different grade type corresponds is different, the process that obtains corresponding bullet screen data according to the bullet screen model of difference is also different), bullet screen message receiver can infinitely expand, and conflict very easily appears when the code merges, be unfavorable for code maintenance and development.
The method comprises the following steps of obtaining bullet screen data corresponding to bullet screen information through a bullet screen data obtaining function, and specifically realizing the following steps:
box _ callerWithCheckSelector (DYPBDAnmu InterfaceProtocol, @ selector (pars DanMuModel: config:), pars DanMuModel: model config: self. The box _ controller WithCheckSelector refers to a cross-component calling instruction, and the parseDanMuModel: model config: self. The meaning of dybdanmutiface protocol means that the barrage data can be acquired to a component complying with the protocol.
After the bullet screen model corresponding to the bullet screen message is obtained, the bullet screen data corresponding to the bullet screen message can be acquired only through the following codes in the bullet screen message receiver:
box_callerWithCheckSelector(DYPBDanmuInterfaceProtocol,@selector(parse DanMuModel:config:),parseDanMuModel:model config:self.currentParserConfig)
the first-stage forwarding of the bullet screen information by the bullet screen information receiver is realized through the steps, the processing task of obtaining bullet screen data according to the bullet screen model is forwarded to other modules independent from the bullet screen information receiver, and the module realizes the specific operation of obtaining bullet screen data. It can be understood that different bullet screen models correspond to different modules for acquiring bullet screen data, so that each task module in the bullet screen message receiver is fully decoupled, later-stage code maintenance is facilitated, the code development efficiency can be improved, and the problem of conflict in the code merging process is avoided.
And S140, displaying the bullet screen data.
The bullet screen data is data which can be displayed on a display interface of the client. The display area of the bullet screen data may be an area preset by a user, such as the top of the display interface, the bottom of the display interface, or the middle of the display interface. Optionally, the display mode of the bullet screen data may be rolling display, fixed display or flashing display, the rolling display speed of the bullet screen data may also be set according to user requirements, the display time of the bullet screen data may be a display duration preset according to preferences of a user, for example, 2s, and the display size of the bullet screen data may be adjusted according to the number of bullet screens on the current display interface. Specifically, different types of bullet screen data can possess different display effects, and this application does not limit this. For example, if the type of the bullet screen data is a text type, the display effect may be top scrolling, and the display duration is 2s, so as to remind the user to view the bullet screen data; if the bullet screen data type is an expression type, the display effect can be that the middle part is fixedly displayed, the display duration is 0.5s so as to express the playing atmosphere of the playing content of the display interface, and too much expression type bullet screen data can be prevented from blocking the playing content of the display interface; the bullet screen data type is picture data, and the display effect can be bottom flicker display, and the display duration is 3s, so that the comedy effect of the display interface is created, and meanwhile, the blocking of the playing content is also prevented.
In the embodiment of the invention, the bullet screen message is received by the bullet screen message receiver, the bullet screen message is analyzed and converted in the bullet screen message receiver to obtain the bullet screen model corresponding to the bullet screen message, the bullet screen model is taken as a parameter, the bullet screen data corresponding to the bullet screen message is obtained by the bullet screen data obtaining function in the bullet screen message receiver, and the bullet screen data is displayed, so that the complete decoupling of the bullet screen display processing process is realized, the reciiver type processing pressure of the bullet screen message receiver is reduced, and the bullet screen display stability is improved.
Example two
Fig. 2 is a schematic flow chart of a bullet screen display processing method according to a second embodiment of the present invention, and in this embodiment, based on the above embodiment, the operation of obtaining bullet screen data corresponding to a bullet screen message through a bullet screen data obtaining function is refined, so as to accurately obtain bullet screen data. Wherein explanations of the same or corresponding terms as those of the above-described embodiments are omitted.
Referring to fig. 2, the bullet screen display processing method provided in this embodiment specifically includes the following steps:
s210, receiving the bullet screen message through the bullet screen message receiver.
S220, the bullet screen message is analyzed and converted in the bullet screen message receiver, so that a bullet screen model corresponding to the bullet screen message is obtained.
S230, acquiring a type conversion component corresponding to the bullet screen message from a bullet screen analyzer complying with a bullet screen interface protocol based on a bullet screen model through a bullet screen data acquisition function; and if the type conversion component complies with the set protocol, acquiring bullet screen data corresponding to the bullet screen message through the type conversion component.
The bullet screen interface protocol refers to a communication mode and a requirement which need to be complied with when information exchange is carried out between all functional components, and data communication can be carried out between different task components by following the same protocol. Optionally, the format of the bullet screen interface protocol includes byte, length, header and data portion, and each message sent or received through the bullet screen interface protocol is composed of message length, message type, actual message content and end identifier. And the bullet screen parser is used for acquiring the type conversion components corresponding to the bullet screen models. The type conversion component is used for converting the bullet screen data into bullet screen data which can be displayed on a display interface according to the received bullet screen model. Specifically, the process of acquiring the bullet screen data by the type conversion component may be: the method comprises the steps of firstly analyzing a received bullet screen model into useful information, wherein the useful information is composed of sections, loading each section to a bullet screen array, and finally returning the bullet screen array, namely, the bullet screen data can be obtained by calling a type conversion component.
Specifically, a type conversion component parser corresponding to the bullet screen message is acquired from a bullet screen parser complying with the bullet screen interface protocol through a bullet screen data acquisition function box _ callerWithCheckSelector in the bullet screen message receiver, and the type conversion component parser is used for acquiring bullet screen data corresponding to the bullet screen message. Each type of barrage message corresponds to a type conversion component parser. For example, the instruction for obtaining the type conversion component corresponding to the bullet screen message from the bullet screen parser complying with the bullet screen interface protocol based on the bullet screen model may be: __ string Class < DYBDanmum ParserProtocol > parser ═ box _ CALLErWithCheckSelector (DYBDanmum InterfaceProtocol @ selector (getParser:), getParser: model.type); wherein, parser refers to a type conversion component corresponding to the barrage message, dypbarmamum interface protocol refers to the barrage interface protocol, and the callerWithCheckSelector refers to a function for acquiring the type conversion component from the barrage parser. After the type conversion component is obtained, the specific instruction for obtaining the bullet screen data corresponding to the bullet screen message through the type conversion component may be: if (parser & [ parser respondsToSelector: @ selector (parseDanmuMessage: config:)) ]{ NSArray [ parseDanmuMessage: model config: config ]; return [ self parseAttributedFromDataArray: dataArray config: config ]; firstly, judging whether a type conversion component parser corresponding to the current barrage model exists, then judging whether a set protocol respondToSector @ selector (parsedanmumeage: config:) is observed, and if the set protocol is observed, acquiring the corresponding barrage data through the type conversion component parser. The method of parseAttributedFromDataArray, dataArray config, in-side analyzes the barrage message, and finally encapsulates the barrage message into an array, wherein the array is barrage data DYCTData which can be displayed on a display interface.
In the embodiment, the type conversion component corresponding to the bullet screen message is acquired from the bullet screen resolver complying with the bullet screen interface protocol in the bullet screen message receiver, so that the bullet screen message in the bullet screen message receiver class is forwarded to the corresponding type conversion component for processing, bullet screen data are obtained based on the corresponding type conversion component, complete decoupling of the bullet screen display processing process is realized, and performance of bullet screen display processing is improved.
The following explains the design process of the bullet screen parser:
the method comprises the steps that a corresponding bullet screen resolver is designed for each type of bullet screen message, when the bullet screen resolver is designed, a set protocol to be observed is firstly obtained, the set protocol is a protocol to be observed by both a type conversion component and the bullet screen resolver, only if the type conversion component and the bullet screen resolver both observe the set protocol, the bullet screen resolver can call the type conversion component, and bullet screen data are further obtained through the type conversion component.
The specific design process is as follows:
firstly, creating a type conversion component complying with the set protocol;
registering the type conversion component to the bullet screen parser.
And after the type conversion component takes the bullet screen model corresponding to the current bullet screen message, the bullet screen model is analyzed into useful information, then the useful information is loaded into a bullet screen array, and the bullet screen array is returned as bullet screen data which needs to be finally obtained.
After the type conversion component is created, the type conversion component needs to be registered to a bullet screen parser, otherwise the type conversion component cannot be indirectly acquired by the bullet screen message receiver through the bullet screen parser. The registration process specifically comprises the following steps:
firstly, calling a register Parser method, wherein the method needs 2 parameters, the first parameter is the name of a bullet screen resolver corresponding to each type of bullet screen message, and the second parameter is the type corresponding to a type conversion component.
Illustratively, registering the type conversion component with the bullet screen parser comprises:
calling a registration function by taking the name of the bullet screen resolver and the type of the bullet screen message as parameters;
and determining the type conversion component as a data body, determining the type of the bullet screen message as a key value, and storing the key value to a component data dictionary.
Illustratively, the instructions to register the type conversion component with the bullet screen parser are as follows: [ self register Parser: NSClassFromString (@ "DYPSBystemMessageParser") type: DYMESSAGETypeSystemThe ] wherein MessageParser refers to a type conversion component, the type conversion component is taken as a data body inside the register Parser, and the bullet screen message type is taken as a key value and is stored in a data dictionary. After registering the type conversion component with the bullet screen parser, the type conversion component can be retrieved by: after the type conversion component is obtained, whether the type conversion component complies with a set protocol parsemumessage is judged, if so, the bullet screen data corresponding to the bullet screen message can be obtained through an instruction [ self parsertributedfromdatarray: dataArray configuration: configuration ], so that the bullet screen data can be obtained because the set protocol is complied with when the type conversion component is created, and a process of converting the bullet screen message into the bullet screen data is realized inside the set protocol, so that the bullet screen data directly used for display can be obtained.
And S240, displaying the bullet screen data.
In the embodiment of the invention, the bullet screen message is received through the bullet screen message receiver, the bullet screen message is analyzed and converted in the bullet screen message receiver to obtain the bullet screen model corresponding to the bullet screen message, the type conversion component corresponding to the bullet screen message is obtained from the bullet screen analyzer complying with the bullet screen interface protocol based on the bullet screen model through the bullet screen data obtaining function, if the type conversion component complies with the set protocol, the bullet screen data corresponding to the bullet screen message is obtained through the type conversion component to forward the bullet screen message in the receiver class of the bullet screen receiver to the corresponding type conversion component for processing, so that the complete decoupling of the bullet screen display processing process is realized, and the performance of bullet screen display processing is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a bullet screen display processing device according to a third embodiment of the present invention, where the bullet screen display processing device is applicable to a situation that bullet screen information needs to be displayed, the device specifically includes: a receiving module 310, a processing module 320, an obtaining module 330, and a display module 340.
A receiving module 310, configured to receive the barrage message through the barrage message receiver;
the processing module 320 is configured to analyze and convert the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message;
an obtaining module 330, configured to obtain, in a bullet screen message receiver, bullet screen data corresponding to a bullet screen message through a bullet screen data obtaining function with a bullet screen model as a parameter;
and the display module 340 is configured to display the bullet screen data.
Further, the obtaining module 330 is further configured to obtain, through a bullet screen data obtaining function, a type conversion component corresponding to the bullet screen message from a bullet screen parser complying with the bullet screen interface protocol based on the bullet screen model; and if the type conversion component complies with the set protocol, acquiring bullet screen data corresponding to the bullet screen message through the type conversion component.
Further, the obtaining module 330 is further configured to create a type conversion component complying with the set protocol before obtaining the bullet screen data corresponding to the bullet screen message through the bullet screen data obtaining function; the type conversion component is registered with the bullet screen parser.
Further, the obtaining module 330 is further configured to call a registration function with the name of the bullet screen parser and the type of the bullet screen message as parameters; and determining the type conversion component as a data body, determining the type of the bullet screen message as a key value, and storing the key value into a component data dictionary.
Further, the processing module 320 further includes: an analysis unit and a conversion unit.
The analysis unit is used for analyzing the bullet screen message in the bullet screen message receiver to obtain a data dictionary corresponding to the bullet screen message;
and the conversion unit is used for converting the data dictionary based on the type of the bullet screen message to obtain a bullet screen model corresponding to the bullet screen message.
Optionally, the type of the bullet screen message includes at least one of the following: text type, picture type, expression type, and combination type of text and expression.
In this embodiment, receive the bullet screen message based on receiving module bullet screen message receiver, parse and convert the bullet screen message in bullet screen message receiver based on processing module, so as to obtain the bullet screen model that the bullet screen message corresponds, and use the bullet screen model as the parameter based on obtaining the module, obtain the bullet screen data that the bullet screen message corresponds through bullet screen data acquisition function in bullet screen message receiver, show bullet screen data based on display module, in order to realize the complete decoupling to bullet screen display process, thereby alleviate the processing pressure of bullet screen receiver receiever class, also improve the display performance of bullet screen simultaneously.
The bullet screen display processing device provided by the embodiment of the invention can execute the bullet screen display processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running a program stored in the system memory 402, for example, to implement a bullet screen display processing method provided by an embodiment of the present invention.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which are used to execute a bullet screen display processing method when executed by a computer processor.
The method comprises the following steps:
receiving a bullet screen message through a bullet screen message receiver;
analyzing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message;
acquiring bullet screen data corresponding to bullet screen information in a bullet screen information receiver through a bullet screen data acquisition function by taking a bullet screen model as a parameter;
and displaying the bullet screen data.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 the context of this document, 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.
A computer readable signal medium may include 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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A bullet screen display processing method is characterized by comprising the following steps:
receiving a bullet screen message through a bullet screen message receiver;
analyzing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message;
acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter;
and displaying the bullet screen data.
2. The method of claim 1, wherein the parsing and converting the bullet screen message in the bullet screen message receiver to obtain a bullet screen model corresponding to the bullet screen message comprises:
analyzing the bullet screen message in the bullet screen message receiver to obtain a data dictionary corresponding to the bullet screen message;
and converting the data dictionary based on the type of the bullet screen message to obtain a bullet screen model corresponding to the bullet screen message.
3. The method of claim 2, wherein the type of the barrage message comprises at least one of:
text type, picture type, expression type, and combination type of text and expression.
4. The method of claim 1, wherein the obtaining of the bullet screen data corresponding to the bullet screen message through the bullet screen data obtaining function comprises:
acquiring a type conversion component corresponding to the bullet screen message from a bullet screen analyzer complying with a bullet screen interface protocol based on the bullet screen model through the bullet screen data acquisition function;
and if the type conversion component complies with a set protocol, acquiring bullet screen data corresponding to the bullet screen message through the type conversion component.
5. The method of claim 4, wherein before the acquiring the bullet screen data corresponding to the bullet screen message by the bullet screen data acquiring function, the method further comprises:
creating the type conversion component that complies with the set protocol;
registering the type conversion component to the bullet screen parser.
6. The method of claim 5, wherein registering the type conversion component with the bullet screen parser comprises:
calling a registration function by taking the name of the bullet screen resolver and the type of the bullet screen message as parameters;
and determining the type conversion component as a data body, determining the type of the bullet screen message as a key value, and storing the key value to a component data dictionary.
7. A bullet screen display processing device, comprising:
the receiving module is used for receiving the bullet screen message through the bullet screen message receiver;
the processing module is used for analyzing and converting the bullet screen message in the bullet screen message receiver so as to obtain a bullet screen model corresponding to the bullet screen message;
the acquisition module is used for acquiring bullet screen data corresponding to the bullet screen message in the bullet screen message receiver through a bullet screen data acquisition function by taking the bullet screen model as a parameter;
and the display module is used for displaying the bullet screen data.
8. The apparatus of claim 7, wherein the processing module comprises:
the analysis unit is used for analyzing the bullet screen message in the bullet screen message receiver to obtain a data dictionary corresponding to the bullet screen message;
and the conversion unit is used for converting the data dictionary based on the type of the bullet screen message to obtain a bullet screen model corresponding to the bullet screen message.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the bullet screen display processing method steps of any of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the bullet screen display processing method according to any one of claims 1 to 6.
CN202011025675.3A 2020-09-25 2020-09-25 Bullet screen display processing method and device, electronic equipment and storage medium Pending CN114257876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011025675.3A CN114257876A (en) 2020-09-25 2020-09-25 Bullet screen display processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011025675.3A CN114257876A (en) 2020-09-25 2020-09-25 Bullet screen display processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114257876A true CN114257876A (en) 2022-03-29

Family

ID=80789245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011025675.3A Pending CN114257876A (en) 2020-09-25 2020-09-25 Bullet screen display processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114257876A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979790A (en) * 2022-05-11 2022-08-30 深圳创维-Rgb电子有限公司 Digital television bullet screen interaction method, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872653A (en) * 2016-03-21 2016-08-17 乐视网信息技术(北京)股份有限公司 Transmission method and device of barrage
CN106954094A (en) * 2017-03-21 2017-07-14 武汉斗鱼网络科技有限公司 Processing method, device and the service terminal of barrage information
WO2018000636A1 (en) * 2016-06-27 2018-01-04 乐视控股(北京)有限公司 Bullet-screen information processing method and apparatus
CN107645686A (en) * 2017-09-22 2018-01-30 广东欧珀移动通信有限公司 Information processing method, device, terminal device and storage medium
CN109413502A (en) * 2018-09-29 2019-03-01 武汉斗鱼网络科技有限公司 Multithreading barrage message distributing method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872653A (en) * 2016-03-21 2016-08-17 乐视网信息技术(北京)股份有限公司 Transmission method and device of barrage
WO2018000636A1 (en) * 2016-06-27 2018-01-04 乐视控股(北京)有限公司 Bullet-screen information processing method and apparatus
CN106954094A (en) * 2017-03-21 2017-07-14 武汉斗鱼网络科技有限公司 Processing method, device and the service terminal of barrage information
CN107645686A (en) * 2017-09-22 2018-01-30 广东欧珀移动通信有限公司 Information processing method, device, terminal device and storage medium
CN109413502A (en) * 2018-09-29 2019-03-01 武汉斗鱼网络科技有限公司 Multithreading barrage message distributing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979790A (en) * 2022-05-11 2022-08-30 深圳创维-Rgb电子有限公司 Digital television bullet screen interaction method, electronic equipment and readable storage medium
CN114979790B (en) * 2022-05-11 2024-06-04 深圳创维-Rgb电子有限公司 Digital television barrage interaction method, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US8028079B2 (en) Efficient transform from XML to javascript objects
CN110309005B (en) Function calling method and device, terminal equipment and storage medium
US11029905B2 (en) Integrated learning using multiple devices
CN110149265B (en) Message display method and device and computer equipment
US9298601B2 (en) Conditional processing method and apparatus
CN108322807A (en) A kind of barrage methods of exhibiting and device
CN113204555B (en) Data table processing method, device, electronic equipment and storage medium
CN114528044B (en) Interface calling method, device, equipment and medium
US20220391058A1 (en) Interaction information processing method and apparatus, electronic device and storage medium
CN111026931A (en) Data query method, device, equipment and medium
CN112911320A (en) Live broadcast method and device, computer equipment and storage medium
CN111913922B (en) Binary structured log generation method, device, equipment and storage medium
CN114257876A (en) Bullet screen display processing method and device, electronic equipment and storage medium
CN112417016B (en) Data exchange method, system, equipment and storage medium
CN108259958B (en) Remote control key response method, device, equipment and storage medium
US11265594B2 (en) Data processing method and device, storage medium, electronic device
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN111147894A (en) Sign language video generation method, device and system
CN108132767B (en) Application window preview method and system
CN112492399A (en) Information display method and device and electronic equipment
CN109933735A (en) Dispatching method, webpage rendering method, Webpage display process and its equipment
CN115686229A (en) Expression input method, expression input device and computer program storage medium
CN110189388B (en) Animation detection method, readable storage medium, and computer device
CN109068170B (en) Storage method, device, terminal and storage medium for barrage message
CN115705465A (en) Data analysis result presentation method, device, equipment and storage medium

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