CN113747207A - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113747207A
CN113747207A CN202110921119.2A CN202110921119A CN113747207A CN 113747207 A CN113747207 A CN 113747207A CN 202110921119 A CN202110921119 A CN 202110921119A CN 113747207 A CN113747207 A CN 113747207A
Authority
CN
China
Prior art keywords
live broadcast
broadcast information
pendant
information
live
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
CN202110921119.2A
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110921119.2A priority Critical patent/CN113747207A/en
Publication of CN113747207A publication Critical patent/CN113747207A/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a data transmission method, a data transmission device, an electronic device and a storage medium, wherein the data transmission method comprises the following steps: and under the condition that the live broadcast numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, sending a pendant signaling comprising the live broadcast information at the current moment to a client for watching a live broadcast room so as to enable the client to display a live broadcast pendant comprising the live broadcast information at the current moment in a live broadcast interface. In the application, when the live broadcast information of the server changes in the live broadcast room, the pendant signaling of the live broadcast information at the current moment is sent to the client, so that the client can display the live broadcast pendant containing the live broadcast information at the current moment, and frequent and repeated acquisition and sending of the live broadcast information are avoided when the numerical value obtained by real-time statistics on preset live broadcast indexes in the live broadcast information does not change, so that the live broadcast information can be updated in real time, the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data transmission method and apparatus, an electronic device, and a storage medium.
Background
The online live broadcast is a relatively common service scene on the internet at present, and has a huge user group, and in the existing live broadcast application program, various live broadcast data of a live broadcast room, such as points and ranks of a current anchor broadcast, are generally displayed to a user by adopting an activity pendant displayed in a live broadcast interface.
Because the live broadcast data can change in real time along with the lapse of time, the server is required to acquire the updated live broadcast data at intervals, and a signaling containing the live broadcast data is sent to the client, so that the live broadcast data can be updated in real time by the movable hanging piece in the live broadcast interface of the client, and the updated live broadcast data can be displayed to the user corresponding to the client. However, in the process, frequent and repeated situations of acquiring live broadcast data and sending a signaling containing the live broadcast data to the client occur, so that the network bandwidth occupied by the server when sending the signaling is increased, and the data processing pressure of the server is increased.
Disclosure of Invention
In order to overcome the problems in the related art, the present application provides a data transmission method, an apparatus, an electronic device, and a storage medium.
According to a first aspect of embodiments of the present application, a method for transmitting data is provided, including:
acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time according to a preset live broadcasting index;
acquiring pre-stored live broadcast information of a historical moment of the live broadcast room, wherein the live broadcast information of the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment;
under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, the pendant signaling including the live broadcast information at the current moment is sent to a client side watching a live broadcast room, so that the client side can construct a live broadcast pendant according to the pendant signaling and display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface, wherein the live broadcast pendant is a display control part for displaying the live broadcast information in the live broadcast interface.
In one possible embodiment, the live information further includes: the live broadcast information type corresponding to the live broadcast information, and the live broadcast information of different live broadcast information types corresponds to different live broadcast pendants;
the method comprises the steps of sending a pendant signaling including live broadcast information at the current moment to a client side watching a live broadcast room, enabling the client side to construct a live broadcast pendant according to the pendant signaling, and displaying the live broadcast pendant including the live broadcast information at the current moment in a live broadcast interface, and comprises the following steps:
acquiring display parameters of a live broadcast pendant corresponding to the live broadcast information type;
constructing the pendant signaling according to the display parameters and the live broadcast information at the current moment;
and sending the pendant signaling to the client side so that the client side can construct and display the live pendant in a live interface according to the pendant signaling.
In a possible implementation manner, the step of obtaining pre-stored live broadcast information of historical time of the live broadcast room includes:
and acquiring the live broadcast information of the historical moment of the live broadcast room from a database corresponding to the server.
In one possible embodiment, after the step of signaling the pendant including the live information of the current time to the client viewing the live broadcast room, the method further includes:
and storing the live broadcast information at the current moment in the database, and updating the live broadcast information at the current moment into the live broadcast information at the historical moment.
In a possible implementation manner, live broadcast information of a historical moment corresponding to at least one live broadcast room is stored in the database, and a corresponding relationship exists between the live broadcast information of the historical moment and identification information of the live broadcast room;
the step of obtaining the live broadcast information of the historical moment of the live broadcast room from the database corresponding to the server side comprises the following steps:
acquiring identification information of the live broadcast room;
and acquiring the live broadcast information of the historical moment from the database according to the identification information of the live broadcast room and the corresponding relation.
In one possible embodiment, the database comprises: a remote dictionary service database or a distributed cache database.
In a possible implementation manner, under the condition that the live broadcast information at the historical moment is not acquired, determining that the state of the live broadcast room is a first broadcast state or a second broadcast state;
and under the condition that the state of the live broadcast room is the first broadcast state or the second broadcast state, sending the live broadcast information at the current moment to the client side so as to enable the client side of the first broadcast or the second broadcast to watch to display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface.
According to a second aspect of the embodiments of the present application, there is provided a data transmission apparatus, including:
the first acquisition module is used for acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time according to a preset live broadcasting index;
the second acquisition module is used for acquiring pre-stored live broadcast information of the historical moment of the live broadcast room, wherein the live broadcast information of the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment;
the first sending module is used for sending a pendant signaling including the live broadcast information at the current moment to a client side watching the live broadcast room under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, so that the client side can construct a live broadcast pendant according to the pendant signaling and display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface, wherein the live broadcast pendant is a display control part used for displaying the live broadcast information in the live broadcast interface.
In one possible embodiment, the live information further includes: the live broadcast information type corresponding to the live broadcast information, and the live broadcast information of different live broadcast information types corresponds to different live broadcast pendants;
the first sending module includes:
the first acquisition submodule is used for acquiring display parameters of a live broadcast pendant corresponding to the type of the live broadcast information;
the construction submodule is used for constructing the pendant signaling according to the display parameters and the live broadcast information at the current moment;
and the sending submodule is used for sending the pendant signaling to the client so that the client can construct and display the live pendant in a live interface according to the pendant signaling.
In one possible implementation, the second obtaining module includes:
and the second acquisition submodule is used for acquiring the live broadcast information of the historical moment of the live broadcast room from a database corresponding to the server side.
In one possible embodiment, the apparatus further comprises:
and the storage submodule is used for storing the live broadcast information at the current moment in the database and updating the live broadcast information at the current moment into the live broadcast information at the historical moment.
In a possible implementation manner, live broadcast information of a historical moment corresponding to at least one live broadcast room is stored in the database, and a corresponding relationship exists between the live broadcast information of the historical moment and identification information of the live broadcast room;
the second obtaining sub-module includes:
the first acquisition unit is used for acquiring the identification information of the live broadcast room;
and the second acquisition unit is used for acquiring the live broadcast information of the historical moment from the database according to the identification information of the live broadcast room and the corresponding relation.
In one possible embodiment, the database comprises: a remote dictionary service database or a distributed cache database.
In one possible embodiment, the apparatus further comprises:
the determining module is used for determining that the state of the live broadcast room is a first broadcast state or a second broadcast state under the condition that the live broadcast information at the historical moment is not acquired;
and the second sending module is used for sending the live broadcast information at the current moment to the client under the condition that the state of the live broadcast room is the first broadcast state or the second broadcast state, so that the client of the live broadcast room for watching the first broadcast or the second broadcast displays a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of transmitting data as provided herein.
According to a fourth aspect of embodiments herein, there is provided a computer storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform a method of transmitting data as provided herein.
According to a fifth aspect of embodiments herein, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method of transmission of data as provided herein.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcast process of the live broadcast room, counting the obtained numerical value in real time according to preset live broadcast indexes; acquiring pre-stored live broadcast information of a live broadcast room at a historical moment, wherein the live broadcast information at the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment; in the embodiment of the application, a server can acquire live broadcast information corresponding to the current moment in the live broadcast room and pre-stored live broadcast information at historical moment, so that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, and the pendant signaling including the live broadcast information at the current moment is sent to the client, the live broadcast pendant is constructed by the client according to the pendant signaling, and the live broadcast pendant containing the live broadcast information at the current moment is displayed in the live broadcast interface, so that the situation that when the numerical value obtained by real-time statistics on preset live broadcast indexes in the live broadcast information is not changed, the live broadcast information is frequently and repeatedly acquired and sent to the client is avoided, the live broadcast information in the client display interface can be updated in real time, the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application and are not to be construed as limiting the application.
Fig. 1 is a schematic diagram illustrating a data transmission system according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of transmission of data in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating steps of another method of data transmission in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating the interaction steps of a method of transmitting data in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating an apparatus for transferring data in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating another electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Fig. 1 is a schematic structural diagram of a data transmission system according to an exemplary embodiment, and as shown in fig. 1, the data transmission method according to the present disclosure is applied to a data transmission system including a server 10 and a plurality of clients 20, where the clients 20 may be anchor clients corresponding to anchors in a live broadcast room, and may also be viewer clients corresponding to viewing users in the live broadcast room.
The server 10 is used for forwarding and caching live broadcast messages between the anchor client and the audience client, between the audience client and the anchor client, or between the audience client and the audience client, and regularly counting live broadcast information generated in a live broadcast process of a live broadcast room, for example, in some ranking activities of the live broadcast room, a watching user in the live broadcast room can add scores to the anchor broadcast through behaviors such as gift sending, approval and the like, so as to increase integral of the live broadcast room, or the number of watching people in the live broadcast room, the server 10 can count the live broadcast information including integral values, integral names or watching people numbers and the like corresponding to the live broadcast room in real time, so as to send the counted live broadcast information to the client 20, and then the client updates the live broadcast information displayed in a live broadcast interface of the live broadcast room, and watching users corresponding to the live broadcast client and the audience client corresponding to the anchor client can know the current integral, the name and the number of the live broadcast room through the live broadcast interface, Ranking or number of viewers, etc.
Fig. 2 is a flow chart illustrating a method of transmitting data according to an exemplary embodiment, as shown in fig. 2, including the steps of:
step 101, acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: and in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time aiming at the preset live broadcasting index.
In this step, the server may first obtain live broadcast information of the live broadcast room at the current time.
Specifically, the server may obtain, in real time, a value obtained by real-time statistics on a preset live broadcast index in a live broadcast process of the live broadcast room through the background, for example, the live broadcast index may be an integral of the live broadcast room generated by actions of watching a user such as gift sending and approval in the live broadcast process of the live broadcast room, and the corresponding value may be an integral value and an integral ranking corresponding to the live broadcast room; the live broadcast index can be the number of people watched in the live broadcast process in a live broadcast room, and the corresponding numerical value is the specific number of people watched.
In the embodiment of the present invention, the server may obtain live broadcast information of all live broadcast rooms at the current time through the background, and further, may determine identification information of the live broadcast room that needs to be transmitted and updated at the current time, such as an Identity (ID) of the live broadcast room, and determine live broadcast information of the live broadcast room at the current time.
And 102, acquiring pre-stored live broadcast information of a historical moment of the live broadcast room, wherein the live broadcast information of the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment.
In this step, the server may further obtain live broadcast information of the history time of the live broadcast room.
Specifically, the live broadcast information at the historical time of the live broadcast room can be pre-stored in the storage device corresponding to the server, so that the server can acquire the live broadcast information at the historical time of the live broadcast room.
In the embodiment of the invention, all live broadcast information generated by the live broadcast room before the current moment in the live broadcast process can be stored in the storage device in advance, and further, the live broadcast information corresponding to the history moment closest to the current moment is screened out in the storage device according to the stored live broadcast moment corresponding to the live broadcast information; or only the live broadcast information corresponding to the history time nearest to the current time in the live broadcast process of the live broadcast room can be stored in the storage device, and the only live broadcast information of the live broadcast room stored in the storage device can be used as the live broadcast information of the history time.
103, under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, sending a pendant signaling including the live broadcast information at the current moment to a client for watching the live broadcast room, so that the client can construct a live broadcast pendant according to the pendant signaling and display the live broadcast pendant including the live broadcast information at the current moment in a live broadcast interface, wherein the live broadcast pendant is a display control for displaying the live broadcast information in the live broadcast interface.
In this step, the live broadcast information includes a numerical value obtained by real-time statistics of a preset live broadcast index in the live broadcast process of the live broadcast room, for example, the live broadcast index may be an integral of the live broadcast room generated by actions of viewing a user such as gift sending and approval in the live broadcast process of the live broadcast room, and the corresponding numerical value may be an integral value and an integral ranking corresponding to the live broadcast room. Therefore, after the server side obtains the live broadcast information at the current moment and the live broadcast information at the historical moment, the numerical value in the live broadcast information at the current moment of the live broadcast room can be compared with the numerical value in the live broadcast information at the historical moment, if the numerical values are not equal, the live broadcast information changes in the time range from the historical moment to the current moment of the live broadcast room, and then the live broadcast information at the current moment can be sent to a client side watching the live broadcast room, and the client side can comprise an anchor client side and an audience client side.
Specifically, the pendant signaling containing the live broadcast information at the current moment can be sent to the client side watching the live broadcast room.
Furthermore, after the client receives the pendant signaling containing the live broadcast information at the current moment, the live broadcast information in the live broadcast room within the time range from the historical moment to the current moment is changed, so that a display control part used for displaying the live broadcast information in the live broadcast interface can be constructed according to the pendant signaling, namely the live broadcast pendant is constructed, the live broadcast pendant containing the live broadcast information at the current moment is displayed in the live broadcast interface, and the live broadcast information displayed in the live broadcast interface is replaced by the live broadcast information at the current moment. The method and the device avoid frequent and repeated acquisition and sending of the live broadcast information to the client when the live broadcast information is not changed, reduce the network bandwidth occupied by the server and reduce the data processing pressure of the server.
For example, live broadcast information corresponding to the live broadcast room in the live broadcast process is displayed in a live broadcast interface of the live broadcast room, the live broadcast information is an integral value of the live broadcast room generated by actions of watching a user such as gift sending and praise in the live broadcast process of the live broadcast room, and when the corresponding numerical value is an integral value corresponding to the live broadcast room, the integral value of the live broadcast room is displayed in the live broadcast interfaces of the anchor client and the audience client in the live broadcast room. The server side can obtain an integral value of a live broadcast room at the current moment and an integral value of a historical moment before the current moment, if the integral value of the live broadcast room is not equal to the integral value of the live broadcast room, it is indicated that the integral value of the live broadcast room changes due to actions such as gift sending and approval of a viewing user within a time range from the historical moment to the current moment, the server side can send pendant signaling containing live broadcast information at the current moment to the anchor client side and the audience client side, the anchor client side and the audience client side can build a live broadcast pendant according to the pendant signaling, the live broadcast pendant containing the integral value at the current moment is displayed in the live broadcast interface, the integral value displayed in the live broadcast interface is replaced by the integral value at the current moment, updating of the integral value in the live broadcast interface is completed, and the anchor and viewing users can obtain the integral value at the current moment of the live broadcast room in real time.
It should be noted that before the client updates the live broadcast information in the live broadcast interface according to the live broadcast information at the current time, the live broadcast information displayed in the live broadcast pendant of the live broadcast interface may be the live broadcast information at the historical time in the above steps, that is, the server counts the live broadcast information in the live broadcast room at the historical time and sends the live broadcast information to the client, and the client displays the live broadcast pendant containing the live broadcast information at the historical time in the live broadcast interface at the historical time in real time.
To sum up, a data transmission method provided in an embodiment of the present application includes: acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcast process of the live broadcast room, counting the obtained numerical value in real time according to preset live broadcast indexes; acquiring pre-stored live broadcast information of a live broadcast room at a historical moment, wherein the live broadcast information at the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment; in the embodiment of the application, a server can acquire live broadcast information corresponding to the current moment in the live broadcast room and pre-stored live broadcast information at historical moment, so that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, and the pendant signaling including the live broadcast information at the current moment is sent to the client, the live broadcast pendant is constructed by the client according to the pendant signaling, and the live broadcast pendant containing the live broadcast information at the current moment is displayed in the live broadcast interface, so that the situation that when the numerical value obtained by real-time statistics on preset live broadcast indexes in the live broadcast information is not changed, the live broadcast information is frequently and repeatedly acquired and sent to the client is avoided, the live broadcast information in the client display interface can be updated in real time, the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.
Fig. 3 is a flow chart illustrating steps of another method for transmitting data according to an exemplary embodiment, as shown in fig. 3, including the steps of:
step 201, obtaining live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: and in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time aiming at the preset live broadcasting index.
In this step, the server may first obtain live broadcast information of the live broadcast room at the current time.
Fig. 4 is a flowchart illustrating interaction steps of a data transmission method according to an exemplary embodiment, as shown in fig. 4, in step S1, the server may obtain live broadcast information of current time of all live broadcast rooms through the background, and further, in step S2, identification information of a live broadcast room that currently needs to be transmitted and updated with live broadcast information, for example, an Identity (ID) of the live broadcast room, may be determined, so as to obtain live broadcast information of current time of the live broadcast room according to the identification information of the live broadcast room.
Step 202, obtaining live broadcast information of the history time of the live broadcast room from a database corresponding to the server.
In this step, the server may further obtain live broadcast information of the history time of the live broadcast room.
Specifically, as shown in fig. 4, the server has a corresponding database, and the live broadcast information at the historical time of the live broadcast room can be stored in the database in advance, so that the server can read the live broadcast information at the historical time of the live broadcast room from the database in step S3, and quickly and accurately obtain the live broadcast information at the historical time of the live broadcast room.
Optionally, the database corresponding to the server may include: a remote dictionary service database, such as a redis database, or a distributed cache database, such as a memcached database.
Since the redis database and the memcached database are both databases with kv storage mechanisms (key-value-store), all live broadcast information at the historical time of the live broadcast room can be stored in the databases in a key-value structure, so that the key is identification information of the live broadcast room, and the value is live broadcast information at the historical time of the live broadcast room, thereby optimizing the storage of big data.
In addition, the memcached database can bear more flow, so that the live broadcast information of the historical moment with more data volume can be stored, and the request of the server side for acquiring the live broadcast information of the historical moment can be rapidly processed.
Optionally, the database may store live broadcast information of at least one live broadcast room at a historical time, and correspondingly, a corresponding relationship exists between the live broadcast information of the historical time and identification information of the live broadcast room, for example, when a redis database or a memcached database is used, the corresponding relationship is key-value structural data stored in the database, the identification information of the live broadcast room is used as a key in the key-value structural data, and the live broadcast information of the historical time corresponding to the live broadcast room is used as a value in the key-value structural data. Correspondingly, step 202 may specifically include:
substep 2021, obtaining identification information of the live broadcast room.
In this step, before the server side obtains the live broadcast information of the history time of the live broadcast room from the database, the server side may first obtain the identification information of the corresponding live broadcast room.
Substep 2022, obtaining the live broadcast information of the historical moment from the database according to the identification information of the live broadcast room and the corresponding relation.
In this step, the server may obtain live broadcast information of the history time of the live broadcast room from the corresponding database according to the identification information of the live broadcast room.
Specifically, the server side can send identification information of the live broadcast room to the database, because the database stores the live broadcast information of the historical moment corresponding to at least one live broadcast room, and a corresponding relation exists between the live broadcast information of the historical moment of the live broadcast room and the identification information of the live broadcast room, therefore, after the database receives the identification information of the live broadcast room, the live broadcast information of the historical moment corresponding to the identification information of the live broadcast room can be accurately screened out from the database according to the corresponding relation, and the live broadcast information of the historical moment screened out is returned to the server side.
And 203, under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, acquiring the display parameter of the live broadcast pendant corresponding to the type of the live broadcast information.
In this step, after the server acquires live broadcast information at the current moment and live broadcast information at the historical moment, a numerical value in the live broadcast information at the current moment of the live broadcast room may be compared with a numerical value in the live broadcast information at the historical moment, and if the numerical values are not equal, it is indicated that the live broadcast information changes within a time range from the historical moment to the current moment in the live broadcast room, and a live broadcast pendant including the live broadcast information displayed in a display interface of the client in the live broadcast room needs to be updated, so that an anchor broadcast corresponding to the client or a watching user acquires the live broadcast information at the current moment through the live broadcast pendant.
Optionally, the live broadcast information may further include a live broadcast information type corresponding to the live broadcast information, the live broadcast information of different live broadcast information types corresponds to different live broadcast hangers, and the live broadcast hangers are display controls for displaying the live broadcast information in the live broadcast interface.
The live broadcast information display method comprises the steps that a live broadcast pendant is a display control for displaying live broadcast information in a live broadcast interface, and therefore the live broadcast information is displayed in the form of the live broadcast pendant in a client side, and the live broadcast information of multiple different types can be generated in the live broadcast process, therefore, the live broadcast information of the multiple types needs to be displayed in the live broadcast interface, the live broadcast information of the different types can be distinguished in the live broadcast interface, display parameters of the live broadcast pendant corresponding to different types of the live broadcast information can be preset, for example, the display background colors of the live broadcast pendant, the shapes of the pendant, texts displayed in the pendant and the like, a user can pass through the displayed live broadcast pendant, and the type of the live broadcast information displayed in the live broadcast pendant can be directly determined.
For example, the types of live information and corresponding live information generated in the live process may include: the corresponding live broadcast information type is the point type due to watching the points of the live broadcast room generated by the actions of gift sending, praise and the like of the user; counting down of a certain activity in the live broadcast room, wherein the corresponding live broadcast information type is a count-down type; the number of the current watching users in the live broadcast room, and the type of the corresponding live broadcast information is the online number type.
Correspondingly, the display parameters of the integral type can be preset as the values of the corresponding live broadcast pendant with red background color, rectangular shape, text "current integral value" displayed on the left side of the pendant and live broadcast information displayed on the right side of the pendant: an integral value at the present time; the display parameters of the countdown type are that the background color of the corresponding live broadcast pendant is white, the shape of the live broadcast pendant is in a table shape, and the middle position of the pendant displays the corresponding remaining time; the display parameters of the online number type are that the background color of the corresponding live broadcast pendant is yellow, the shape is circular, the left side of the pendant displays the text 'the current online number', and the right side of the pendant displays the numerical value in the live broadcast information: the number of online people at the current time.
And 204, constructing the pendant signaling according to the display parameters and the live broadcast information at the current moment.
In this step, after determining live broadcast information of the live broadcast room at the current time and display parameters of live broadcast hangers for displaying the live broadcast information, referring to fig. 4, in step S4, a hanger signaling is constructed according to the display parameters and the live broadcast information of the current time, so that the live broadcast information of the live broadcast room at the current time and the display parameters of the live broadcast hangers for displaying the live broadcast information are sent to the client through the hanger signaling.
Specifically, a data protocol for constructing the pendant signaling may be predetermined, where the data protocol specifies a structure of the pendant signaling and data recorded in different fields in the pendant signaling, for example, the data protocol may specify fields 1 to 2 in the pendant signaling to record a size of the pendant signaling, fields 3 to 10 to record display parameters of a live pendant, field 11 to record a type of live broadcast information at a current time in a live broadcast room, and fields 12 to 15 to record a numerical value in the live broadcast information at the current time in the live broadcast room.
And step 205, sending the pendant signaling to the client, so that the client can construct and display the live pendant in a live interface according to the pendant signaling.
In this step, the server may issue the pendant signaling to the corresponding client through step S5 shown in fig. 4, so as to send the pendant signaling to the client.
After receiving the pendant signaling, the client can construct and display a live pendant in a live interface according to the pendant signaling, so that a corresponding anchor or a watching user of the client can intuitively obtain live information of the live room at the current moment through the displayed live pendant.
Specifically, after the client receives the pendant signaling, the live broadcast information of the live broadcast room at the current moment and the display parameters of the live broadcast pendant for displaying the live broadcast information can be analyzed from the pendant signaling according to a data protocol for constructing the pendant signaling, so that a pendant is drawn in a live broadcast interface of the live broadcast room according to the display parameters, and the live broadcast information of the live broadcast room at the current moment is displayed in the pendant.
For example, if the display parameters of the live pendant obtained by parsing in the pendant signaling include: the background color of the live broadcast pendant is red, the shape of the live broadcast pendant is rectangular, the text 'current integral value' is displayed on the left side of the pendant, and the numerical value in the live broadcast information is displayed on the right side of the pendant: the current time integral value, and the live broadcast information of the current time of the live broadcast room obtained by analysis comprises: the type of the live broadcast information is an integral type, and the numerical value in the live broadcast information is as follows: the integrated value is 1100. Then a pendant with red background color and rectangular shape and displaying text 'current integral value' on the left side of the pendant can be drawn in the live broadcast interface of the client live broadcast interface, and the integral value '1100' is displayed on the right side of the pendant, so that the final live broadcast pendant is obtained.
And step 206, storing the live broadcast information at the current moment in the database, and updating the live broadcast information at the current moment into the live broadcast information at the historical moment.
In this step, after the pendant signaling is sent to the client, the obtained live broadcast information at the current time may be stored in the database, and the live broadcast information at the current time may be updated to the live broadcast information at the historical time.
Referring to fig. 4, the live broadcast information at the current time may be sent to the database through step S6, and the live broadcast information at the current time is used to cover the live broadcast information at the historical time, that is, the live broadcast information at the historical time in the live broadcast room stored in the database is replaced by the live broadcast information at the current time, so as to complete the update of the data in the database.
Correspondingly, after the live broadcast information at the next moment is acquired, the live broadcast information at the current moment stored in the database can be used as the compared live broadcast information to determine whether the live broadcast information at the next moment changes within the time range from the current moment to the next moment, and if the live broadcast information at the next moment changes, the live broadcast information at the next moment is sent to the client side so that the client side can update the live broadcast information displayed in the live broadcast pendant displayed in the live broadcast interface.
And step 207, determining that the state of the live broadcast room is a first broadcast state or a second broadcast state under the condition that the live broadcast information at the historical moment is not acquired.
After step 101, when acquiring the live broadcast information at the historical time of the live broadcast room, if the live broadcast information at the historical time of the live broadcast room is not acquired, it may be determined that the state of the live broadcast room is the first play state or the replay state.
Specifically, when the server side obtains the live broadcast information at the historical time of the live broadcast room from the database, if the live broadcast information at the historical time corresponding to the identification information of the live broadcast room cannot be found in the database according to the identification information of the live broadcast room, it can be stated that the live broadcast room is started for the first time, or the live broadcast room started again after the live broadcast is closed.
And 208, under the condition that the state of the live broadcast room is the first broadcast state or the second broadcast state, sending the live broadcast information at the current moment to the client so as to enable the client watching the first broadcast or the second broadcast to display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface.
In this step, when the state of the live broadcast room is the first broadcast state or the second broadcast state, it is indicated that the live broadcast room is a new live broadcast room, and the server does not send a pendant signaling to the client, so that the live broadcast room does not have a live broadcast pendant for displaying live broadcast information in a live broadcast interface of the client.
Therefore, the live broadcast information of the live broadcast room at the current moment can be directly sent to the client side, so that the client side of the live broadcast room which is started for the first time or restarted for watching can display the live broadcast information of the current moment in the live broadcast interface.
In addition, in the embodiment of the invention, live broadcast information analysis can be carried out on all live broadcast rooms corresponding to the server, namely live broadcast information at the current moment and live broadcast information at the historical moment of all live broadcast rooms are obtained, live broadcast rooms with numerical values in the live broadcast information at the current moment unequal to numerical values in the live broadcast information at the historical moment are screened out from all live broadcast rooms according to the live broadcast information at the current moment and the live broadcast information at the historical moment of the live broadcast rooms, and then the live broadcast information at the current moment corresponding to the live broadcast rooms is sent to corresponding client sides, so that the live broadcast information in display interfaces of the client sides can be updated in real time; and for the live broadcast rooms with the numerical values in the live broadcast information at the current moment equal to the numerical values in the live broadcast information at the historical moment, the live broadcast information at the current moment corresponding to the live broadcast rooms is not sent to the corresponding client, so that the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.
In the embodiment of the invention, the client and the server realize bidirectional data transmission in a long connection mode, so that in the application, the server sends the live broadcast information at the current moment to the client only when the live broadcast information of the live broadcast room changes, so that the client can update the live broadcast information displayed in the live broadcast interface of the client, frequent and repeated acquisition and sending of the live broadcast information when the live broadcast information does not change are avoided, and the pressure of long link between the server and the client is reduced. Through monitoring and observing, compare in prior art and distinguish the live broadcast room according to the online number of watching in the live broadcast room to set up different time interval for the live broadcast room of equidimension not and acquire and send the scheme of live broadcast information, adopt the scheme of this application, can make the flow of the long connection between server and the customer end reduce more than 80%.
To sum up, a data transmission method provided in an embodiment of the present application includes: acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcast process of the live broadcast room, counting the obtained numerical value in real time according to preset live broadcast indexes; acquiring pre-stored live broadcast information of a live broadcast room at a historical moment, wherein the live broadcast information at the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment; in the embodiment of the application, a server can acquire live broadcast information corresponding to the current moment in the live broadcast room and pre-stored live broadcast information at historical moment, so that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, and the pendant signaling including the live broadcast information at the current moment is sent to the client, the live broadcast pendant is constructed by the client according to the pendant signaling, and the live broadcast pendant containing the live broadcast information at the current moment is displayed in the live broadcast interface, so that the situation that when the numerical value obtained by real-time statistics on preset live broadcast indexes in the live broadcast information is not changed, the live broadcast information is frequently and repeatedly acquired and sent to the client is avoided, the live broadcast information in the client display interface can be updated in real time, the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.
Fig. 5 is a block diagram illustrating an apparatus for transmitting data according to an exemplary embodiment, and as shown in fig. 5, the apparatus 300 may include:
a first obtaining module 301, configured to obtain live broadcast information of a live broadcast room at a current time, where the live broadcast information includes: in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time according to a preset live broadcasting index;
a second obtaining module 302, configured to obtain pre-stored live broadcast information at a historical time of the live broadcast room, where the live broadcast information at the historical time is live broadcast information corresponding to the historical time of the live broadcast room before the current time;
the first sending module 303 is configured to send a pendant signaling including the live broadcast information at the current time to a client that watches the live broadcast room when a numerical value in the live broadcast information at the current time is not equal to a numerical value in the live broadcast information at the historical time, so that the client can construct a live broadcast pendant according to the pendant signaling and display a live broadcast pendant that includes the live broadcast information at the current time in a live broadcast interface, where the live broadcast pendant is a display control for displaying the live broadcast information in the live broadcast interface.
The device that this application embodiment provided includes: acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcast process of the live broadcast room, counting the obtained numerical value in real time according to preset live broadcast indexes; acquiring pre-stored live broadcast information of a live broadcast room at a historical moment, wherein the live broadcast information at the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment; in the embodiment of the application, a server can acquire live broadcast information corresponding to the current moment in the live broadcast room and pre-stored live broadcast information at historical moment, so that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, and the pendant signaling including the live broadcast information at the current moment is sent to the client, the live broadcast pendant is constructed by the client according to the pendant signaling, and the live broadcast pendant containing the live broadcast information at the current moment is displayed in the live broadcast interface, so that the situation that when the numerical value obtained by real-time statistics on preset live broadcast indexes in the live broadcast information is not changed, the live broadcast information is frequently and repeatedly acquired and sent to the client is avoided, the live broadcast information in the client display interface can be updated in real time, the network bandwidth occupied by the server is reduced, and the data processing pressure of the server is reduced.
In one possible embodiment, the live information further includes: the live broadcast information type corresponding to the live broadcast information, and the live broadcast information of different live broadcast information types corresponds to different live broadcast pendants;
the first sending module includes:
the first acquisition submodule is used for acquiring display parameters of a live broadcast pendant corresponding to the type of the live broadcast information;
the construction submodule is used for constructing the pendant signaling according to the display parameters and the live broadcast information at the current moment;
and the sending submodule is used for sending the pendant signaling to the client so that the client can construct and display the live pendant in a live interface according to the pendant signaling.
In one possible implementation, the second obtaining module includes:
and the second acquisition submodule is used for acquiring the live broadcast information of the historical moment of the live broadcast room from a database corresponding to the server side.
In one possible embodiment, the apparatus further comprises:
and the storage submodule is used for storing the live broadcast information at the current moment in the database and updating the live broadcast information at the current moment into the live broadcast information at the historical moment.
In a possible implementation manner, live broadcast information of a historical moment corresponding to at least one live broadcast room is stored in the database, and a corresponding relationship exists between the live broadcast information of the historical moment and identification information of the live broadcast room;
the second obtaining sub-module includes:
the first acquisition unit is used for acquiring the identification information of the live broadcast room;
and the second acquisition unit is used for acquiring the live broadcast information of the historical moment from the database according to the identification information of the live broadcast room and the corresponding relation.
In one possible embodiment, the database comprises: a remote dictionary service database or a distributed cache database.
In one possible embodiment, the apparatus further comprises:
the determining module is used for determining that the state of the live broadcast room is a first broadcast state or a second broadcast state under the condition that the live broadcast information at the historical moment is not acquired;
and the second sending module is used for sending the live broadcast information at the current moment to the client under the condition that the state of the live broadcast room is the first broadcast state or the second broadcast state, so that the client of the live broadcast room for watching the first broadcast or the second broadcast displays a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an interface for input/output (I/O) 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls overall operation of the electronic device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the electronic device 400. Examples of such data include instructions for any computer program product or method operating on the electronic device 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 406 provides power to the various components of the electronic device 400. Power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 400.
The multimedia component 408 comprises a screen providing an output interface between the electronic device 400 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 400 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 may detect an open/closed state of the electronic device 400, the relative positioning of components, such as a display and keypad of the electronic device 400, the sensor assembly 414 may also detect a change in the position of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, orientation or acceleration/deceleration of the electronic device 400, and a change in the temperature of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the steps of the above-mentioned information reminding method when the electronic device 400 is provided as the aforementioned first terminal.
In an exemplary embodiment, a computer storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the electronic device 400 to perform the above-described data transfer method is also provided. For example, the computer storage media may be ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, the present application further provides a computer program product, which includes a computer program, when the computer program is executed by a processor of an electronic device, enables the electronic device to implement the data transmission method as provided in the present application.
FIG. 7 is a block diagram illustrating another electronic device in accordance with an example embodiment. Referring to fig. 7, the electronic device 500 comprises a processing component 522 further comprising one or more processors and memory resources, represented by memory 532, for storing instructions, e.g. a computer program product, executable by the processing component 522. The computer program product stored in the memory 932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 522 is configured to execute instructions to perform steps in the above described method of transmission of data.
The electronic device 500 may also include a power component 526 configured to perform power management of the electronic device 500, a wired or wireless network interface 550 configured to connect the electronic device 500 to a network, and an input/output (I/O) interface 558. The electronic device 500 may operate based on an operating system stored in memory 532, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A data transmission method is applied to a server side, and the method comprises the following steps:
acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time according to a preset live broadcasting index;
acquiring pre-stored live broadcast information of a historical moment of the live broadcast room, wherein the live broadcast information of the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment;
under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, the pendant signaling including the live broadcast information at the current moment is sent to a client side watching a live broadcast room, so that the client side can construct a live broadcast pendant according to the pendant signaling and display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface, wherein the live broadcast pendant is a display control part for displaying the live broadcast information in the live broadcast interface.
2. The method of claim 1, wherein the live information further comprises: the live broadcast information type corresponding to the live broadcast information, and the live broadcast information of different live broadcast information types corresponds to different live broadcast pendants;
the method comprises the steps of sending a pendant signaling including live broadcast information at the current moment to a client side watching a live broadcast room, enabling the client side to construct a live broadcast pendant according to the pendant signaling, and displaying the live broadcast pendant including the live broadcast information at the current moment in a live broadcast interface, and comprises the following steps:
acquiring display parameters of a live broadcast pendant corresponding to the live broadcast information type;
constructing the pendant signaling according to the display parameters and the live broadcast information at the current moment;
and sending the pendant signaling to the client side so that the client side can construct and display the live pendant in a live interface according to the pendant signaling.
3. The method of claim 1, wherein the step of obtaining pre-stored live broadcast information of historical time of the live broadcast room comprises:
and acquiring the live broadcast information of the historical moment of the live broadcast room from a database corresponding to the server.
4. The method of claim 3, wherein after the step of signaling the pendant including the live information of the current time to the client viewing the live room, the method further comprises:
and storing the live broadcast information at the current moment in the database, and updating the live broadcast information at the current moment into the live broadcast information at the historical moment.
5. The method according to claim 3, wherein live broadcast information of historical time corresponding to at least one live broadcast room is stored in the database, and a corresponding relation exists between the live broadcast information of the historical time and identification information of the live broadcast room;
the step of obtaining the live broadcast information of the historical moment of the live broadcast room from the database corresponding to the server side comprises the following steps:
acquiring identification information of the live broadcast room;
and acquiring the live broadcast information of the historical moment from the database according to the identification information of the live broadcast room and the corresponding relation.
6. The method of claim 3, wherein the database comprises: a remote dictionary service database or a distributed cache database.
7. A data transmission apparatus, applied to a server, the apparatus comprising:
the first acquisition module is used for acquiring live broadcast information of a live broadcast room at the current moment, wherein the live broadcast information comprises: in the live broadcasting process of the live broadcasting room, counting the obtained numerical value in real time according to a preset live broadcasting index;
the second acquisition module is used for acquiring pre-stored live broadcast information of the historical moment of the live broadcast room, wherein the live broadcast information of the historical moment is live broadcast information corresponding to the historical moment of the live broadcast room before the current moment;
the first sending module is used for sending a pendant signaling including the live broadcast information at the current moment to a client side watching the live broadcast room under the condition that the numerical value in the live broadcast information at the current moment is not equal to the numerical value in the live broadcast information at the historical moment, so that the client side can construct a live broadcast pendant according to the pendant signaling and display a live broadcast pendant containing the live broadcast information at the current moment in a live broadcast interface, wherein the live broadcast pendant is a display control part used for displaying the live broadcast information in the live broadcast interface.
8. An electronic device, comprising: a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 6.
9. A computer storage medium, wherein instructions in the computer storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the method of any of claims 1-6 when executed by a processor.
CN202110921119.2A 2021-08-11 2021-08-11 Data transmission method and device, electronic equipment and storage medium Pending CN113747207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110921119.2A CN113747207A (en) 2021-08-11 2021-08-11 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110921119.2A CN113747207A (en) 2021-08-11 2021-08-11 Data transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113747207A true CN113747207A (en) 2021-12-03

Family

ID=78730709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110921119.2A Pending CN113747207A (en) 2021-08-11 2021-08-11 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113747207A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401413A (en) * 2021-12-10 2022-04-26 北京达佳互联信息技术有限公司 Interactive prompting method and device for virtual space, electronic equipment and storage medium
CN114466236A (en) * 2022-01-19 2022-05-10 北京百度网讯科技有限公司 Interaction method and device for live broadcast room, electronic equipment and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007108A1 (en) * 2011-06-30 2013-01-03 Giles Goodwin Live Updates of Embeddable Units
WO2018177404A1 (en) * 2017-03-31 2018-10-04 武汉斗鱼网络科技有限公司 Method and system for updating user count in live broadcast
CN110351572A (en) * 2019-07-10 2019-10-18 广州虎牙科技有限公司 Update method, device, equipment and the storage medium of direct broadcasting room information
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
CN111836067A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Method, device and equipment for processing live component information and storage medium
CN112312151A (en) * 2020-10-26 2021-02-02 北京达佳互联信息技术有限公司 Data updating method, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130007108A1 (en) * 2011-06-30 2013-01-03 Giles Goodwin Live Updates of Embeddable Units
WO2018177404A1 (en) * 2017-03-31 2018-10-04 武汉斗鱼网络科技有限公司 Method and system for updating user count in live broadcast
CN110830839A (en) * 2018-08-08 2020-02-21 腾讯科技(深圳)有限公司 Multi-pendant display method and device and storage medium
CN110351572A (en) * 2019-07-10 2019-10-18 广州虎牙科技有限公司 Update method, device, equipment and the storage medium of direct broadcasting room information
CN111836067A (en) * 2020-07-21 2020-10-27 腾讯科技(深圳)有限公司 Method, device and equipment for processing live component information and storage medium
CN112312151A (en) * 2020-10-26 2021-02-02 北京达佳互联信息技术有限公司 Data updating method, device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114401413A (en) * 2021-12-10 2022-04-26 北京达佳互联信息技术有限公司 Interactive prompting method and device for virtual space, electronic equipment and storage medium
CN114401413B (en) * 2021-12-10 2023-09-05 北京达佳互联信息技术有限公司 Interactive prompt method and device for virtual space, electronic equipment and storage medium
CN114466236A (en) * 2022-01-19 2022-05-10 北京百度网讯科技有限公司 Interaction method and device for live broadcast room, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
WO2021129000A1 (en) Live streaming room switching method and apparatus, electronic device and storage medium
CN112367553B (en) Message interaction method and device, electronic equipment and storage medium
CN111294623B (en) Video playing method and device, electronic equipment and storage medium
US20220301005A1 (en) Method and server for live streaming
CN112004110B (en) Prompt message processing method and device
CN104010222A (en) Method, device and system for displaying comment information
CN103997676A (en) Information display method, information display device and information display system
CN109525966B (en) Intelligent device query method and device and storage medium
US20220150598A1 (en) Method for message interaction, and electronic device
CN113365087B (en) Video data processing method and device, electronic equipment and storage medium
CN113365153B (en) Data sharing method and device, storage medium and electronic equipment
CN113938451B (en) Service reminding method, device, system, electronic equipment and storage medium
CN111405302A (en) Live broadcast room attention reminding method and device, electronic equipment and storage medium
CN113747207A (en) Data transmission method and device, electronic equipment and storage medium
US20180007420A1 (en) Method, device and system for recording television program
CN104933071A (en) Information retrieval method and corresponding device
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN112261453A (en) Method, device and storage medium for transmitting subtitle splicing map
CN107316207B (en) Method and device for acquiring display effect information
US9420440B2 (en) Calling methods and devices
CN116301484A (en) Data sharing method and device, electronic equipment and storage medium
CN110045893A (en) Querying method and device is broadcast live
CN113992923A (en) Live broadcast list issuing method and device
CN110121056B (en) Cross-regional video networking monitoring video acquisition method and device
CN107846481B (en) Account management 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211203