WO2020135776A1 - 交互数据的传输方法、装置、终端及服务器 - Google Patents

交互数据的传输方法、装置、终端及服务器 Download PDF

Info

Publication number
WO2020135776A1
WO2020135776A1 PCT/CN2019/129401 CN2019129401W WO2020135776A1 WO 2020135776 A1 WO2020135776 A1 WO 2020135776A1 CN 2019129401 W CN2019129401 W CN 2019129401W WO 2020135776 A1 WO2020135776 A1 WO 2020135776A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
client
interaction data
interaction
interactive
Prior art date
Application number
PCT/CN2019/129401
Other languages
English (en)
French (fr)
Inventor
李双洋
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2020135776A1 publication Critical patent/WO2020135776A1/zh

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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS

Definitions

  • Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method, device, terminal, and server for transmitting interactive data.
  • live broadcast has gradually become a favorite method of users.
  • the client of the anchor (referred to as the anchor) can live broadcast to the user through the live broadcast software. Users can interact with the host or other users through the client.
  • the user's client When the user interacts with the anchor through the client, the user's client will generate data at a high frequency due to the user's high-frequency operations, and the server also needs to process the data sent by the client at a high frequency, resulting in excessive consumption. Server resources. And after the server processes the data with high frequency, the processed data is distributed to each client. Due to the limited resources of the client, it is difficult to process the data sent by the server with high frequency.
  • an embodiment of the present disclosure provides a method for transmitting interactive data, including:
  • the client obtains the interaction data generated based on the interaction between the user and the current live display interface of the client;
  • the client caches the interaction data and sends the cached interaction data to the server when the data reporting conditions are satisfied;
  • the client receives linkage interaction data from the server, the linkage interaction data is generated by the server based on the interaction data sent by at least one client and sent to each client, and the linkage interaction data is used for Instructing the client receiving the linked interaction data to generate a matching interaction response;
  • the client displays the matched interactive response in the live display interface of the client.
  • an embodiment of the present disclosure also provides a method for transmitting interactive data between live broadcasts, including:
  • the server receives interaction data sent by at least one client, and generates linked interaction data according to the received interaction data, where the interaction data is data generated based on user interaction with the current live display interface of the at least one client;
  • the server distributes the linkage interaction data to each client, wherein the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate a matching interaction response.
  • an embodiment of the present disclosure also provides an interactive data transmission device, including:
  • the obtaining module is configured to obtain the interaction data generated based on the interaction between the user and the client's current live display interface
  • the buffering and sending module is configured to buffer the interaction data and send the buffered interaction data to the server when the data reporting conditions are satisfied;
  • the receiving module is configured to receive linkage interaction data from the server, the linkage interaction data is generated by the server according to interaction data sent by multiple clients, and the linkage interaction data is used to indicate that the linkage is received
  • the respective clients of the interactive data generate matching interactive responses;
  • the display module is configured to display the matched interactive response in the live display interface of the client.
  • an embodiment of the present disclosure also provides a device for transmitting interactive data between live broadcasts, including:
  • the generation module is configured to receive interaction data sent by multiple clients, and generate linkage interaction data based on the received interaction data, the interaction data being based on user interaction with the current live display interface of the multiple clients Generated data;
  • a sending module configured to send the linkage interaction data to each client, and display the matched interaction response on a live display interface, wherein the linkage interaction data is used to indicate the client who receives the linkage interaction data
  • the client generates a matching interactive response.
  • an embodiment of the present disclosure also provides a terminal, including:
  • One or more processors are One or more processors;
  • Storage device for storing one or more programs
  • the one or more programs are executed by the one or more processors, so that the one or more processors implement a method for transmitting interactive data between live broadcasts provided by embodiments of the present disclosure.
  • a server provided by an embodiment of the present disclosure includes:
  • One or more processors are One or more processors;
  • Storage device for storing one or more programs
  • the one or more programs are executed by the one or more processors, so that the one or more processors implement a method for transmitting interactive data between live broadcasts provided by embodiments of the present disclosure.
  • an embodiment of the present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a method for realizing interactive data between live broadcasts provided by an embodiment of the present disclosure Transmission method.
  • the embodiments of the present disclosure can solve the problem that the client generates interactive data at a high frequency and the server processes the interactive data at a high frequency, resulting in excessive resource consumption, can solve the problem that the client cannot handle the interactive data sent by the server at a high frequency, and can reduce the client The frequency of the interaction between the client and the server, thereby reducing the pressure on the client and server data processing.
  • FIG. 1 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 5 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 6 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 7 is a structural block diagram of a device for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 8 is a structural block diagram of a device for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of a terminal provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a server provided by an embodiment of the present disclosure.
  • FIG. 1 is a flow chart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure.
  • the method is performed by a device for transmitting interactive data, the device is implemented by software and/or hardware, and the device can be configured In devices such as smartphones and tablets.
  • the device may be integrated in a terminal device held by a user who enters the live broadcast room.
  • the method provided by the embodiments of the present disclosure may be applied in a scenario where a user performs high-frequency interaction with a current live display interface during live broadcasting.
  • the method may be applied in a live broadcasting process where the user has a high frequency In the scene of the preset type control on the current live display interface, the frequency of interaction between the user and the current live display interface or the frequency of the user acting on the preset type control is greater than the set frequency value.
  • the method provided by the embodiments of the present disclosure can be applied in the following scenario: when a user interacts with the current live display interface at a high frequency, interaction data is generated at a high frequency, for example, the user plays the high frequency in the current live display interface
  • the default type of control will generate interactive data with high frequency.
  • the preset type control may be an expression control or the like.
  • the client needs to send the interactive data to the server at a high frequency, which causes the server to process the interactive data at a high frequency, thereby consuming excessive resources of the server, or the server is difficult to process the interactive data at a high frequency, and the server needs to process the interactive data at a high frequency It is distributed to each client frequently, and the received client generates an interactive response based on the interactive data.
  • the method provided by the embodiment of the present disclosure can cache the interaction data generated by the client and report it to the server in batches, which can reduce the interaction frequency between the client and the server and reduce the data processing pressure of the client and the server.
  • the technical solutions provided by the embodiments of the present disclosure include:
  • the client obtains interaction data generated based on the interaction between the user and the current live display interface of the client.
  • the interaction data between the user and the current live broadcast display interface may be interaction data generated by the user as a preset type control on the current live broadcast display interface, and the preset type control may be an expression control, a like control, or other controls.
  • the method of the user acting on the preset type control can be clicking, long pressing, sliding, etc., or the user acting on the preset type control can also be acting through voice, for example, obtaining the user's voice, and acting on the corresponding preset type according to the content of the voice Controls, or other methods.
  • the interaction data between the user and the current live display interface may also be the interaction data generated according to the user's voice, for example, to obtain the user's voice, and if the user's voice contains the preset voice, the interaction data corresponding to the preset voice is generated, the preset voice It can be set in advance; or the interaction data between the user and the current live display interface can also be interaction data generated in other forms, and the generation form of the interaction data is not limited.
  • S120 The client caches the interaction data, and sends the cached interaction data to the server when the data reporting conditions are satisfied.
  • the linkage interaction data is used to instruct the client receiving the linkage interaction data to generate a matching interaction response, and display the matching interaction response in the live display interface of the client.
  • the linkage interaction data is a collection of at least one interaction data obtained after the server aggregates the interaction data sent by at least one client; the matching interaction response is that the client responds to other clients in the linkage interaction data
  • the interactive response generated by the sent interactive data, or the matched interactive response is an interactive response generated by the client according to the interactive data sent by each client in the linked interactive data.
  • the client receives the linkage interaction data from the server, the linkage interaction data is generated by the server based on the interaction data respectively sent by at least one client and sent to each client, and the linkage interaction data It is used to instruct the client receiving the linked interaction data to generate a matching interaction response.
  • the server may receive interaction data sent by one client within a preset time period, or may also receive interaction data sent by multiple clients, where multiple refers to two or more than two. After the server receives the interaction data sent by one or more clients, it aggregates and screens the received interaction data.
  • the screening method can be random screening, or it can be screened according to the set mathematical algorithm to obtain Linkage interaction data, then the linkage interaction data includes at least one interaction data.
  • S140 The client displays the matched interactive response in the live display interface of the client.
  • the server distributes the linkage interaction data to each client in the live broadcast room.
  • the client receives the linkage interaction data, generates a matching interaction response based on the linkage interaction data, and displays the interaction response on the live display interface, where the interaction response may be an animation or a picture generated based on the linkage interaction data. Wait.
  • the data reporting condition may be a set time interval, or the length of the buffered interactive data reaches a set length value, and the set length value may be set as needed.
  • the data reporting conditions are not limited to the above conditions, but may also be other conditions.
  • An embodiment of the present disclosure provides an interactive data transmission method. By caching the interactive data between the user and the live display interface, and sending the cached interactive data to the server when the data reporting conditions are met, the client can be generated with high frequency interaction Data, and the server's high frequency processing of interactive data results in the problem of excessive resource consumption. It can also solve the problem of the client's difficulty in processing the interactive data sent by the server at high frequency, which can reduce the pressure on the client and the server.
  • FIG. 2 is a flowchart of an interactive data transmission method provided by an embodiment of the present disclosure. This embodiment can be combined with various optional solutions in one or more embodiments described above.
  • the client acquires a user
  • the interaction data with the current live display interface may include: when the client detects that the user acts on a preset type control in the current live display interface, the identification information of the preset type control is determined to generate an interaction data;
  • the linkage interaction data used to instruct the client receiving the linkage interaction data to generate a matching interaction response includes:
  • the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate an interaction response that matches the type information.
  • the client caches the interaction data and sends the cached interaction data to the server when the data reporting conditions are met, which may include: caching the interaction data in a data queue; interval setting time Polling to detect whether there is interactive data in the data queue; if yes, transmitting the interactive data in the data queue to the server.
  • the technical solutions provided by the embodiments of the present disclosure include:
  • the client determines the identification information of the preset type and generates interaction data, where the interaction data includes the Type information corresponding to the identification information.
  • the preset type control may be a control used when the user interacts with the anchor, specifically, a control that can generate an interactive response when activated, for example, an expression control, a like control, and the like. Click, long press, slide, etc. for the user to use the preset type control, or the user can use the preset type control by voice, for example, to obtain the user's voice, and the preset type control corresponding to the action according to the content of the voice , Or it can be other ways.
  • interaction data is generated according to the identification information of the preset type control, and the interaction data includes type information corresponding to the identification information of the activated control; for example, when the user acts on the control A
  • the interaction data may include type information a corresponding to the identification information of the control A.
  • S220 Cache the interaction data in a data queue.
  • the interactive data is cached in the data queue in an orderly order, wherein the interactive data in the data queue is sorted in first-in first-out order.
  • S230 Polling at set intervals to detect whether there is interactive data in the data queue.
  • S240 Transmit the interactive data in the data queue to the server, so that the server generates linked interactive data according to the interactive data sent by at least one client in the live room, and sends it to each client in the live room ,
  • the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate an interaction response that matches the type information.
  • the client that receives the linkage interaction data can generate a matching interaction response according to the type information of the interaction data in the linkage interaction data.
  • the identification information of the activated control can be determined according to the type information, and the identification information of the control can be displayed according to a preset rule.
  • the identification picture of the control may be moved along a preset path, and the identification picture of the control may be an emoticon picture or the like.
  • each client by including type information in the interaction data, each client generates a matching interaction response according to the type information of the interaction data in the linkage interaction data, which can enable the user to view the interaction response lit by other users, and ensure that the user sees other user points
  • the bright interactive response is consistent with the interactive response viewed by other users themselves, ensuring the consistency of the interactive response locally and other clients.
  • a polling timer may be set to poll the data queue for interactive data at set intervals, and when interactive data exists in the data queue, the interactive data in the data queue is transmitted to the server When there is no interactive data in the data queue, no operation is performed, and the interactive data for the next cycle is waited for.
  • the set time can be 3s, that is, a polling cycle is 3s, that is to say, poll the data queue every 3s.
  • the set time can also be other times, which can be set as required.
  • the data in the data queue is transmitted to the server, that is, the interactive data is collected in segments, and the batch transmission is regularly performed, which can reduce The frequency of interaction between the client and the server reduces the pressure on the client and server for data processing.
  • FIG. 3 is a flowchart of an interactive data transmission method provided by an embodiment of the present disclosure. This embodiment may be combined with various optional solutions in one or more of the above embodiments.
  • the client acquiring interaction data between the user and the current live broadcast display interface may include: when the client detects that the user acts as a preset type in the current live broadcast display interface During the control, the identification information of the preset type control is determined to generate interaction data, wherein the interaction data includes type information corresponding to the identification information of the activated control.
  • the client caching the interaction data may include: the client determining the type of the interaction data based on the type information in the interaction data; if the client determines the cache area Includes target cache data of the same type as the interaction data, then merges and caches the interaction data with the target cache data; if the client determines that the cache area does not include For the target cache data of the same type, the interaction data is cached in the cache area.
  • the technical solutions provided by the embodiments of the present disclosure include:
  • the client determines the identification information of the preset type control to generate interaction data, where the interaction data includes The type information corresponding to the identification information of the control.
  • S320 The client determines the type of interaction data based on the type information in the interaction data.
  • different types of interaction data are generated when it is detected that the user has different controls. For example, if the user interacts with control A, the generated interaction data includes type information corresponding to the identification information of control A. According to the type information of the interaction data, it can be determined that the type of interaction data is A. When the user acts on control B, the generated The interaction data includes type information corresponding to the identification information of the control B. According to the type information of the interaction data, the type of the interaction data can be determined as B. Wherein, when determining the function of the preset type control, the type information of the interaction data can be determined according to the identification information of the preset control.
  • the data storage form of the cached interaction data includes: a combination of type information and quantity; and combining and caching the interaction data with the target cache data includes:
  • the client updates the amount of target cache data according to the type information in the interaction data, and discards the interaction data.
  • the client may discard the interaction data after adding one to the amount of target cache data.
  • the target cache data is cached interaction data
  • the data storage form of the cached interaction data may be a combination of type information and quantity. For example, if the type information of the interaction data is a and the quantity is 2, the data storage form of the interaction data may be 2a.
  • the client detects whether there is cache data of the same type as the interactive data in the cache area. If the cache area includes the target cache data of the same type as the interactive data, the interactive data and the target cache data are processed. Merge cache, that is, add one to the amount of target cache data, and discard the interaction data. For example, the cached cache data in the cache area includes: 3A, 2B, and 4C. If the type of interaction data obtained is A, the client detects whether the cache data in the cache area contains cache data of type A. By detecting that there is cache data of type A in the cache area, it is 3A; Add one to the above to obtain the cache data 4A, then discard the interaction data A, and the cache data in the cache area finally includes 4A, 2B, and 4C.
  • the cache area includes cache data of the same type as the interactive data
  • the cache data is processed by adding one to the number, that is, integrating multiple small data into a data set, which can reduce the transmitted data and improve the transmission. Efficiency, reducing transmission frequency.
  • the interaction data is cached in the cache area in the form of a combination of the amount of interaction data and type information.
  • the cache data of the cache area includes: 3A, 2B and 4C. If the type of the acquired interaction data is D, the client detects that the cache data in the cache area does not include the cache data of type D, and then caches the interaction data in the cache area, and the cache format is 1D.
  • the cache data of the final cache area includes: 3A, 2B, 4C and 1D.
  • the data reporting condition may be the interval setting time, or the length of the buffered interactive data reaches the setting length value, and the setting length value may be set as needed.
  • the data reporting conditions are not limited to the above conditions, but may also be other conditions.
  • FIG. 4 is a flowchart of an interactive data transmission method provided by an embodiment of the present disclosure. As shown in FIG. 4, the technical solution provided by the embodiment of the present disclosure includes:
  • S410 The client obtains the interaction data between the user and the current live display interface.
  • S420 The client generates an interactive response matching the interactive data, and displays the interactive response in the current live display interface.
  • the local client when the client obtains the interactive data between the user and the current live display interface, the local client can generate an interactive response matching the interactive data and display it in the current live display interface, that is, the client
  • the interactive data generated locally generates a matching interactive response and displays it locally on the client.
  • the client acquires the control A currently displayed on the user interface by the user
  • interactive data is generated, and the corresponding animation can be generated locally on the client. Therefore, the interactive response generated by the client generates an interactive response and is displayed locally on the client immediately, which can reduce the reaction time of the interactive response and enable the user to understand the interactive information between him and the live display interface, and avoid misoperation.
  • the client caches the interaction data, and when the data reporting conditions are met, the cached interaction data is sent to the server, so that the server according to the interaction data sent by at least one client in the live room respectively Generate linkage interaction data and send it to each client in the live broadcast room.
  • the linked interaction data is used to instruct the received client to generate a matching interactive response, and display the matching interactive response on the client's live display interface.
  • the linkage interaction data is a collection of at least one interaction data obtained after the server aggregates the interaction data sent by multiple clients; optionally, the matching interaction response is that the client interacts with the other interaction data in the linkage interaction data.
  • the linkage interaction data will contain interaction data that is different from the client identification information and the client's local identification information, or the linkage interaction data will contain the user identification information and Interaction data with different user identification information local to the login client is used as target interaction data.
  • the interaction data may include identification information of the client that generates the interaction data or user identification information of the client that logs in to generate the interaction data during the transmission process.
  • the client receives the linkage interaction data, determine the client identification information or user identification information of the interaction data in the linkage interaction data, if it is determined that the client identification information in the interaction data is different from the local client identification information, or if it is determined If the user identification information in the interaction data is not the same as the local user identification information of the logged-on client, the interactive data whose client identification information is not the same as the local client's identification information, or the user identification information and the local login client's local Interaction data with different user identification information is used as target interaction data. That is, if the client receives the linkage interaction data sent by the server, the interaction data sent by other clients in the linkage interaction data is selected as the target interaction data.
  • S450 The client generates an interaction response that matches the target interaction data, and displays it on the current live display interface.
  • the client generates an interactive response that matches the target interactive data and displays it on the current live display interface, that is, the client generates an interactive response that matches the interactive data sent by other clients, and displays it on the current live broadcast. Displayed in the interface.
  • the client may not process the interaction data sent locally by the client in the linkage data, so as to save the client's resources.
  • the client when the client receives the linkage interaction data sent by the server, the linkage interaction data is cached, and the interaction data sent by other clients generates an interaction response at a set frequency and displays it.
  • the interaction can be The data generates User Interface (UI) animation at a set frequency and makes UI animation feedback.
  • UI User Interface
  • the client can distinguish between local and other client-lit animations through the comparison of user IDs, ensuring that each animation path is independent and random, improving the user's desire for interactive expression, improving the fun of interaction, and promoting the expression of user's emotions .
  • the technical solution of this embodiment is exemplified. For example, if there are 2 users in the live broadcast room, user 1 and user 2, user 1 corresponds to client 1, and user 2 corresponds to client 2. If the interaction data between the user 1 and the current live display interface generated by the client 1 is 10A, the client 1 generates an interaction response that matches the interaction data 10A, displays it on the current live display interface, and the client 1 performs the interaction data 10A Cache and send to the server every 3s. If the interaction data between the user 2 and the current live display interface generated by the client 2 is 10B, the client 2 generates an interactive response matching the interaction data 10B, and displays on the current live display interface of the client 2, and the client 2 will interact Data 10B is cached and sent to the server at 3s intervals.
  • the server will aggregate and filter the received interaction data; if the linkage interaction data obtained by the server screening is 1A and 2B.
  • the server sends the linked interaction data to client 1 and client 2 respectively.
  • the client 1 determines the interaction data sent by other clients (client 2) in the linkage interaction data, the interaction data is 2B, and generates an interaction response that matches the interaction data 2B.
  • the client 1 receives the interactive data 1A sent locally in the linked interactive data, but does not process the interactive data 1A, which can avoid the secondary processing of the interactive data and save the client's resources.
  • client 2 For client 2, for the same reason, client 2 generates an interactive response that matches with interactive data 1A, and displays it on the current live display interface of client 2. Although client 2 also receives the linked interactive data and sends it locally Interactive data 2B, but the interactive data 2B is not processed.
  • the client can avoid the secondary processing of the interaction data sent locally, save the resources of the client, and improve the live broadcast. Interactivity between users and anchors.
  • FIG. 5 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure.
  • the method is performed by a transmission device for interactive data between live broadcasts, and the device is implemented by software and/or hardware. Can be configured in the server.
  • the method provided by the embodiment of the present disclosure may be applied in a live broadcast process for high-frequency interaction with a live broadcast display interface.
  • the method may be applied in a high-frequency user live broadcast process In the scene of the preset type control on the live display interface.
  • the frequency of interaction between the user and the live display interface or the frequency of the user acting on the preset type control is greater than the set frequency value.
  • the technical solutions provided by the embodiments of the present disclosure include:
  • the server receives interaction data sent by at least one client, and generates linked interaction data according to the received interaction data, where the interaction data is data generated based on user interaction with the current live display interface of the at least one client .
  • the linked interaction data is a collection of at least one interaction data obtained after the server aggregates the interaction data respectively sent by at least one client.
  • the server may receive interaction data sent by a client within a preset time period or multiple users may be acting simultaneously as a live display interface, so the server may receive interaction data sent by a client within a preset time period Or, it may receive interaction data sent by multiple clients, of which two or more. In order to prevent multiple users from acting on the live display interface at the same time and generating more interactive data, the client frequently receives too much data.
  • the server performs algorithm filtering on the interactive data sent by multiple clients, that is, when the server receives After the interactive data sent by at least one client, the received interactive data is summarized and screened.
  • the screening method can be random screening or screening based on a set mathematical algorithm, so as to obtain and link interactive data, then
  • the linked interactive data includes at least one interactive data, thereby reducing the amount of interactive data, and thereby avoiding the problem of frequent data reception by the client.
  • S520 The server distributes the linkage interaction data to each client, where the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate a matching interaction response.
  • the matched interactive response is an interactive response generated by the client according to the interactive data sent by other clients in the linked interactive data, or may be generated based on the interactive data sent by each client in the linked interactive data Interactive response.
  • the interaction data includes type information corresponding to the identification information of the activated control.
  • the activated control is a preset type control that is activated in the live display interface of the client; the live display interface includes more than two preset type controls; and the linkage interaction data includes The type information corresponding to the identification information of the control; the linkage interaction data, used to instruct the client receiving the linkage interaction data to generate a matching interaction response, including: the linkage interaction data, used to indicate that the linkage is received The client of the interactive data generates an interactive response that matches the type information.
  • the client when the user acts as a preset type control on the live display interface of the client, interactive data is generated according to the identification information of the preset type control.
  • the interactive data includes type information corresponding to the identification information of the activated control.
  • the client will The interaction data is sent to the server, and the server generates linked interaction data according to the received interaction data and distributes it to each client.
  • the client that receives the linkage interaction data can generate a matching interaction response according to the type information of the interaction data in the linkage interaction data, wherein the identification information of the activated control can be determined according to the type information, and the identification information of the control can be Set rules.
  • the interaction data in the linkage interaction data may include a combination of type information and quantity.
  • the server receives interaction data of the same type as the interaction data in the stored linkage interaction data, the interaction data of the type may be included in the quantity. Plus one processing can save memory.
  • the server In the method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure, the server generates linked interactive data according to the received interactive data and distributes it to each client, so that each client can generate a matched interaction based on the received linked interactive data Response, so that each client can display the interactive response lit by other users, so that users can fully understand the interaction between live broadcasts.
  • the method for transmitting interactive data between live broadcasts may further include: the server receives trigger messages sent by each client to interact with the live broadcast display interface, and responds to the trigger messages. Summarize; the server sends the aggregated trigger message to each client, so that each client displays the user identification information of the user and the live broadcast display interface through the barrage.
  • each client can send a trigger message that the user interacts with the live display interface, the trigger message carries the user's identification information;
  • the server summarizes the received trigger messages sent by each client, and distributes the aggregated trigger messages to each Client:
  • the client receives the aggregated trigger message and determines the identification information of the user who triggered the live broadcast display interface according to the trigger message.
  • the trigger message for the user to interact with the live display interface is the message that the preset type control on the live display interface is triggered; optionally, when the user acts in turn on the feedback control on the live display interface, the customer The terminal sends a trigger message to the server that the feedback control is activated, where the trigger message carries user identification information and identification information of the preset type control.
  • each client can display the user identification information of the trigger live broadcast display interface, so that the user can understand each user Interactive information between them to improve interactivity.
  • FIG. 6 is a flowchart of a method for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure.
  • a client interacts with a server.
  • the technical solutions provided by the embodiments of the present disclosure include:
  • S610 The client obtains the interaction data between the user and the current live display interface.
  • S620 The client caches the interaction data.
  • S640 The server receives the interaction data sent by at least one client, and generates linkage interaction data according to the received interaction data.
  • the linked interaction data is a set of at least one interaction data obtained after the server aggregates the interaction data sent by at least one client, and then filters.
  • S650 The server sends the linkage interaction data to each client.
  • S660 The received client generates a matching interactive response, and displays the matching interactive response on the live display interface.
  • the matching interactive response may be an interactive response generated by the client according to the interactive data sent by other clients in the linked interactive data, or may be generated by the client based on the interactive data sent by each client in the linked interactive data Interactive response.
  • the method provided in this embodiment may be completed by multiple threads to avoid the problem of page breaks caused by excessive non-UI operations in the UI thread.
  • FIG. 7 is an apparatus for transmitting interactive data according to an embodiment of the present disclosure.
  • the apparatus includes: an acquiring module 710 and a cache and sending module 720.
  • the obtaining module 710 is configured to obtain the interaction data generated based on the interaction between the user and the client's current live display interface
  • the caching and sending module 720 is configured to cache the interaction data and send the cached interaction data to the server when the data reporting conditions are satisfied;
  • the receiving module 730 is configured to receive linkage interaction data from the server, the linkage interaction data is generated by the server according to interaction data sent by multiple clients, and the linkage interaction data is used to indicate that the received The respective clients of the linked interactive data generate matching interactive responses;
  • the display module 740 is configured to display the matched interactive response in the live display interface of the client.
  • the linked interaction data is a set of at least one interaction data obtained after the server aggregates the interaction data respectively sent by at least one client and then filters.
  • the interaction data includes identification information of a client that generates the interaction data or user identification information of the client that logs in to generate the interaction data.
  • the device further includes a display module that is used if received from the server.
  • Linkage interaction data including interaction data in which the client identification information is different from the client's local identification information, or linkage interaction data containing interaction data in which the user identification information is different from the local user identification information of the logged-in client, as Target interaction data;
  • the obtaining module 710 is configured to determine the identification information of the preset type control and generate interaction data when it is detected that the user acts on the preset type control in the current live broadcast display interface, wherein the The interaction data includes type information corresponding to the identification information of the activated control; wherein, the current live display interface includes more than two preset type controls;
  • the linkage interaction data includes type information corresponding to the identification information of the activated control
  • the linkage interaction data used to instruct the client receiving the linkage interaction data to generate a matching interaction response includes:
  • the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate an interaction response that matches the type information.
  • the client caching the interaction data includes:
  • the client determines the type of the interaction data based on the type information in the interaction data
  • the client determines that the cache area includes target cache data of the same type as the interaction data, it merges and caches the interaction data with the target cache data;
  • the client determines that the cache area does not include target cache data of the same type as the interaction data, it caches the interaction data in the cache area.
  • the data storage form of the cached interaction data includes: a combination of type information and quantity;
  • the combining and caching of the interaction data and the target cache data includes:
  • the client updates the amount of target cache data according to the type information in the interaction data, and discards the interaction data, so as to realize the combined cache of the interaction data.
  • the buffering and sending module 720 is used to buffer the interaction data in a data queue
  • Interval setting time polling to detect whether there is interactive data in the data queue
  • the above-mentioned device can execute the method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
  • FIG. 8 is a structural block diagram of an apparatus for transmitting interactive data between live broadcasts provided by an embodiment of the present disclosure. As shown in FIG. 8, the apparatus includes a generating module 810 and a sending module 820.
  • the generation module 810 is configured to receive interaction data sent by multiple clients, and generate linked interaction data according to the received interaction data.
  • the interaction data is based on the current live display interface between the user and the multiple clients.
  • the sending module 820 is configured to send the linkage interaction data to each client, and display the matched interaction response on a live display interface, where the linkage interaction data is used to indicate that the linkage interaction data is received
  • the client generates a matching interactive response.
  • the interaction data includes type information corresponding to the identification information of the activated control; wherein, the activated control is a preset type control that is activated in the live display interface of the client; the live display interface Includes more than two of the preset type controls; the linkage interaction data includes type information corresponding to the identification information of the activated control;
  • the linkage interaction data used to instruct the client receiving the linkage interaction data to generate a matching interaction response includes:
  • the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate an interaction response that matches the type information.
  • the interaction data in the linkage interaction data includes a combination of type information and quantity.
  • the above-mentioned device can execute the method provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
  • 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • 9 shows a block diagram of an exemplary terminal 812 suitable for implementing embodiments of the present disclosure.
  • the terminal 812 shown in FIG. 9 is only an example, and should not bring any limitation to the functions and use scope of the embodiments of the present disclosure.
  • the terminal 812 is represented in the form of a general-purpose computing device.
  • the components of the terminal 812 may include, but are not limited to, one or more processors or processing units 816, a system memory 828, and a bus 818 connecting different system components (including the system memory 828 and the processing unit 816).
  • the bus 818 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of a variety of bus structures.
  • these architectures include, but are not limited to, industry standard architecture (ISA) bus, microchannel architecture (MAC) bus, enhanced ISA bus, video electronics standard association (VESA) local bus, and peripheral component interconnection ( PCI) bus.
  • ISA industry standard architecture
  • MAC microchannel architecture
  • VESA video electronics standard association
  • PCI peripheral component interconnection
  • the terminal 812 typically includes a variety of computer system readable media. These media may be any available media that can be accessed by the terminal 812, including volatile and nonvolatile media, removable and non-removable media.
  • System memory 828 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 830 and/or cache memory 832.
  • the terminal 812 may further include other removable/non-removable, volatile/nonvolatile computer system storage media.
  • the storage system 834 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 9 and is commonly referred to as a "hard drive").
  • a disk drive for reading and writing to a removable non-volatile magnetic disk eg, “floppy disk”
  • a removable non-volatile optical disk eg, CD-ROM, DVD-ROM
  • each drive may be connected to the bus 818 through one or more data media interfaces.
  • the memory 828 may include at least one program product having a set of (eg, at least one) program modules configured to perform the functions of various embodiments of the present disclosure.
  • a program/utility tool 840 having a set of (at least one) program modules 842 may be stored in, for example, the memory 828.
  • Such program modules 842 include—but are not limited to—operating system, one or more application programs, and other programs Modules and program data, each of these examples or some combination may include the implementation of the network environment.
  • the program module 842 generally performs the functions and/or methods in the embodiments described in the present disclosure.
  • the terminal 812 may also communicate with one or more external devices 814 (eg, keyboard, pointing device, display 824, etc.), and may also communicate with one or more devices that enable users to interact with the terminal 812, and/or Terminal 812 can communicate with any device (eg, network card, modem, etc.) that can communicate with one or more other computing devices. Such communication may be performed through an input/output (I/O) interface 822.
  • the terminal 812 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 820. As shown, the network adapter 820 communicates with other modules of the terminal 812 through the bus 818.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • the processing unit 816 executes programs stored in the system memory 828 to execute various functional applications and data processing, for example, to implement the interactive data transmission method provided by the embodiments of the present disclosure. That is,
  • Cache the interaction data and when the data reporting conditions are met, send the cached interaction data to the server, so that the server generates linkage interaction data according to the interaction data sent by at least one client in the live room, and Sent to each client in the live broadcast room;
  • the linkage interaction data is used to instruct the client receiving the linkage interaction data to generate a matching interaction response, and display the matching interaction response in the live display interface of the client.
  • FIG. 10 is a schematic structural diagram of a server provided by an embodiment of the present disclosure. As shown in FIG. 10, the server includes:
  • One or more processors 1010, one processor 1010 is taken as an example in FIG. 10;
  • the server may further include: an input device 1030 and an output device 1040.
  • the processor 1010, the memory 1020, the input device 1030, and the output device 1040 in the server may be connected through a bus or in other ways.
  • the connection through a bus is used as an example.
  • the memory 1020 can be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to a method for transmitting interactive data between live broadcasts in the embodiments of the present disclosure (for example, the generating module 810 and the sending module 820 shown in FIG. 8).
  • the processor 1010 executes various functional applications and data processing of the server by running software programs, instructions, and modules stored in the memory 1020, that is, a method for transmitting interactive data between live broadcasts that implements the foregoing method embodiments, namely:
  • the linkage interaction data is distributed to each client, and the linkage interaction data is used to instruct the client that receives the linkage interaction data to generate a matching interaction response, and display the matching interaction response on the live display interface.
  • the memory 1020 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and application programs required by at least one function; the storage data area may store data created according to the use of the server, and the like.
  • the memory 1020 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • the memory 1020 may optionally include memories set remotely relative to the processor 1010, and these remote memories may be connected to the terminal device through a network. Examples of the aforementioned network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • the input device 1030 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the server.
  • the output device 1040 may include an output interface and the like.
  • An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, a method for transmitting interactive data between live broadcasts as provided by an embodiment of the present disclosure is implemented:
  • Cache the interaction data and when the data reporting conditions are met, send the cached interaction data to the server, so that the server generates linkage interaction data according to the interaction data sent by at least one client in the live room, and Sent to each client in the live broadcast room;
  • the linkage interaction data is used to instruct the client receiving the linkage interaction data to generate a matching interaction response, and display the matching interaction response in the live display interface of the client.
  • the linkage interaction data is distributed to each client, and the linkage interaction data is used to instruct the client to which the linkage interaction data is received to generate a matching interaction response, and display the matching interaction response on the live display interface.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
  • the program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • the computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages such as Java, Smalltalk, C++, as well as conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as an independent software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, through an Internet service provider Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider Internet connection for example, AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本公开的实施例公开了一种交互数据的传输方法、装置、终端及服务器,其中,该方法包括:客户端获取基于用户与所述客户端的当前直播显示界面进行的交互而产生的交互数据;所述客户端将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;所述客户端从所述服务器接收联动交互数据,所述联动交互数据是由服务器基于至少一个客户端分别发送的交互数据而生成的并被发送至各个客户端,并且所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应;所述客户端将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。本公开的实施例可以减小客户端和服务器收据处理的压力。

Description

交互数据的传输方法、装置、终端及服务器
相关申请的交叉引用
本申请要求2018年12月29日在中国知识产权局提交的中国专利申请No.201811648172.4的优先权,通过引用将其全文并入本文。
技术领域
本公开实施例涉及计算机技术领域,尤其涉及一种交互数据的传输方法、装置、终端及服务器。
背景技术
随着直播软件的日益发展,直播渐渐成为一种深受用户喜好的方式。在直播中,主播的客户端(简称主播端)可以通过直播软件向用户进行直播。用户通过客户端可以与主播或者其他用户进行互动。
当用户通过客户端与主播进行互动时,由于用户高频率的操作,所以在用户的客户端会高频率的产生数据,则服务器也需要高频率的处理客户端发送的数据,从而导致过多消耗服务器的资源。并且当服务器高频率地处理数据后,将处理的数据分发至各客户端,客户端由于资源有限,难以高频率地处理服务器发送的数据。
发明内容
交互数据第一方面,本公开实施例提供了一种交互数据的传输方法,包括:
客户端获取基于用户与所述客户端的当前直播显示界面进行的交互而产生的交互数据;
所述客户端将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;
所述客户端从所述服务器接收联动交互数据,所述联动交互数据是由服务器基于至少一个客户端分别发送的交互数据而生成的并被发送至各个客户端,并且所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应;
所述客户端将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
第二方面,本公开实施例还提供了一种直播间互动数据的传输方法,包括:
服务器接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述至少一个客户端的当前直播显示界面进行的交互而产生的数据;
所述服务器将所述联动交互数据分发至各客户端,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
第三方面,本公开实施例还提供了一种交互数据的传输装置,包括:
获取模块,被配置为获取基于用户与客户端的当前直播显示界面进行的交互而产生的交互数据;
缓存和发送模块,被配置为将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;
接收模块,被配置为从所述服务器接收联动交互数据,所述联动交互数据是由服务器根据多个客户端分别发送的交互数据生成的,并且所述联动交互数据用于指示接收到所述联动交互数据的所述各个客户端生成匹配的交互响应;以及
展示模块,被配置为将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
第四方面,本公开实施例还提供了一种直播间互动数据的传输装置,包括:
生成模块,被配置为接收多个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述多个客户端的当前直播显示界面进行的交互而产生的数据;以及
发送模块,用于将所述联动交互数据发送至各个客户端,并将所述匹配的交互响应显示在直播显示界面中,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
第五方面,本公开实施例还提供了一种终端,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
所述一个或多个程序被所述一个或多个处理器执行,以使得所述一个或多个处理器实现本公开实施例提供的一种直播间互动数据的传输方法。
第六方面,本公开实施例还提供的一种服务器,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
所述一个或多个程序被所述一个或多个处理器执行,以使得所述一个或多个处理器实现本公开实施例提供的一种直播间互动数据的传输方法。
第七方面,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序被处理器执行时实现本公开实施例提供的一种直播间互动数据的传输方法。
本公开实施例可以解决客户端高频率地产生交互数据而服务器高频率地处理交互数据导致消耗资源过多的问题,可以解决客户端难以高频率地处理服务器发送的交互数据的问题,可以降低客户端与服务器的交互频率,从而减小客户端和服务端数据处理的压力。
附图说明
图1是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图2是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图3是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图4是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图5是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图6是本公开实施例提供的一种直播间互动数据的传输方法流程图;
图7是本公开实施例提供的一种直播间互动数据的传输装置结构框图;
图8是本公开实施例提供的一种直播间互动数据的传输装置结构框图
图9是本公开实施例提供的一种终端结构示意图;
图10是本公开实施例提供的一种服务器的结构示意图。
具体实施方式
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。
图1是本公开实施例提供的一种直播间互动数据的传输方法流程图,所述方法由交互数据的传输装置来执行,所述装置由软件和/或硬件来实现,所述装置可以配置在智能手机、平板电脑等设备中。可选的,所述装置可以集成在进入到直播间的用户所持有的终端设备中。
可选的,本公开实施例提供的方法可以应用在直播过程中,用户与当前直播显示界面进行高频率的交互的场景中,可选的,所述方法可以应用在直播过程中,用户高频率的作用当前直播显示界面上的预设类型控件的场景中,其中,用户与当前直播显示界面的交互频率或者用户作用预设类型控件的频率大于设定频率值。
具体的,本公开实施例提供的方法可以应用在如下场景下:当用户与当前直播显示界面高频率的进行交互时,会高频率的产生交互数据,例如,用户高频率作用当前直播显示界面中的预设类型控件时,会高频率的产生交互数据。预设类型控件可以是表情控件等。而客户端需要将交互数据高频率的发送至服务器,导致服务器高频率的处理交互数据,从而过多消耗服务器的资源,或者服务器难以高频率的处理交互数据,而服务器需要将处理的交互数据高频率地分发至各个客户端,由接收到的客户端根据交互数据产生交互响应,但是客户端也难以高频率的处理服务器分发的交互数据。本公开实施例提供的方法可以将客户端产生的交互数据进行缓存,批量上报给服务器,可以降低客户端与服务器之间的交互频率,减小客户端和服务器的数据处理压力。
如图1所示,本公开实施例提供的技术方案包括:
S110:客户端获取基于用户与所述客户端的当前直播显示界面进行的交互而产生的交互数据。
其中,用户与当前直播显示界面的交互数据可以是用户作用当前直播显示界面上的预设类型控件产生的交互数据,预设类型控件可以是表情控件、点赞控件或者其他控件。用户作用预设类型控件的方式可以是点击、长按、滑动等,或者用户作用预设类型控件还可以是通过语音进行作用,例如,获取用户的语音,根据语音的内容作用对应的预设类型控件,或者也可以是其他方式。或者用户与当前直播显示界面的交互数据也可以是根据用户语音产生的交互数据,例如,获取用户语音,若用户语音中包含预设语音,则产生与预设语音对应的交互数据,预设语音可以预先进行设置;或者用户与当前直播显示界面的交互数据也可以是其他形式产生的交互数据,对交互数据的产生形式并不作限定。
S120:所述客户端将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器。
所述联动交互数据,用于指示接收到联动交互数据的客户端生成匹配的交互响应,并将匹配的交互响应在所述客户端的直播显示界面中进行展示。可选的,所述联动交互数据为服务器将至少一个客户端分别发送的交互数据汇总后,筛选得到的包含至少一个交互数据的集 合;匹配的交互响应为客户端根据联动交互数据中其他客户端发送的交互数据所生成的交互响应,或者匹配的交互响应为客户端根据联动交互数据中各个客户端发送的交互数据生成的交互响应。
S130:所述客户端从所述服务器接收联动交互数据,所述联动交互数据是由服务器基于至少一个客户端分别发送的交互数据而生成的并被发送至各个客户端,并且所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
具体的,服务器在预设时间段内可能接收到一个客户端发送的交互数据,或者也可能接收到多个客户端发送的交互数据,其中,多个是指两个或者两个以上。当服务器接收到一个或者多个客户端发送的交互数据后,对接收到的交互数据进行汇总,并进行筛选,筛选的方式可以是随机筛选,也可以根据设定的数学算法进行筛选,从而得到联动交互数据,则联动交互数据包含至少一个交互数据。
S140:所述客户端将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
服务器将联动交互数据分发至直播间的各个客户端。针对一个客户端而言,客户端接收到联动交互数据,根据联动交互数据生成匹配的交互响应,并在直播显示界面中显示交互响应,其中,交互响应可以是根据联动交互数据生成的动画或者图片等。
可选的,数据上报条件可以是间隔设定时间,或者可以是缓存的交互数据的长度达到设定长度值,设定长度值可以根据需要进行设定。其中,数据上报条件并不局限于上述的条件,也可以是其他条件。
本公开实施例提供的一种交互数据的传输方法,通过将用户与直播显示界面的交互数据进行缓存,并满足数据上报条件时将缓存的交互数据发送至服务器,可以解决客户端高频率产生交互数据,而服务器高频率处理交互数据导致消耗资源过多的问题,也可以解决客户端难以高频率处理服务器发送的交互数据的问题,可以减小客户端和服务端数据处理的压力。
图2是本公开实施例提供的一种交互数据的传输方法流程图,本实施例可以与上述一个或者多个实施例中各个可选方案结合,在本实施例中,所述客户端获取用户与当前直播显示界面的交互数据,可以包括:所述客户端当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型控件的标识信息,生成交互数据;
所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应包括:
所述联动交互数据用于指示接收到所述联动交互数据的客户端生成与所述类型信息相匹配的交互响应。
以及,所述客户端将所述交互数据进行缓存,并在满足数据上报条件时,将已缓存的交互数据发送至服务器,可以包括:将所述交互数据缓存于数据队列中;间隔设定时间轮询检测所述数据队列是否存在交互数据;若是,将所述数据队列中的交互数据传输给服务器。
如图2所示,本公开实施例提供的技术方案包括:
S210:客户端当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型的标识信息,生成交互数据,所述交互数据包括与被作用的控件的标识信息对应的类型信息。
在本实施例中,预设类型控件可以是用户与主播进行互动时采用的控件,具体的,可以是被作用时,可以产生交互响应的控件,例如,可以是表情控制、点赞控件等。用户作用预设类型控件的方式点击、长按、滑动等,或者用户作用预设类型控件还可以是通过语音进行作用,例如,获取用户的语音,根据语音的内容对作用对应的预设类型控件,或者也可以是其他方式。
在本实施例中,当用户作用预设类型控件时,根据预设类型控件的标识信息生成交互数据,交互数据包括与被作用的控件的标识信息对应的类型信息;例如,当用户作用控件A时,其中,A为控件的标识信息,与A对应的交互数据的类型信息是a,则交互数据中可以包括与控件A的标识信息对应的类型信息a。
S220:将所述交互数据缓存于数据队列中。
在本实施例中,将交互数据按照有序的顺序缓存于数据队列中,其中,数据队列中交互数据按照先进先出的顺序进行排序。
S230:间隔设定时间轮询检测所述数据队列是否存在交互数据。
若是,执行S240,若否,执行S250。
S240:将所述数据队列中的交互数据传输给服务器,以使所述服务器根据直播间中至少一个客户端分别发送的交互数据生成联动交互数据,并发送至所述直播间中的各客户端,其中,联动交互数据用于指示接收到所述联动交互数据的客户端生成与类型信息相匹配的交互响应。
在本实施例中,接收到联动交互数据的客户端可以根据联动交互数据中交互数据的类型信息生成匹配的交互响应。其中,根据类型信息可以确定被作用控件的标识信息,可以将该 控件的标识信息按照预设的规则进行展示。例如,可以将该控件的标识图片沿预设路径进行运动,该控件的标识图片可以是表情图片等。由此,通过交互数据中包括类型信息,各客户端根据联动交互数据中交互数据的类型信息生成匹配的交互响应,可以使用户观看到其他用户点亮的交互响应,保证用户观看到其他用户点亮的交互响应与其他用户自己观看的交互响应是一致的,保证交互响应在本地和其他客户端的一致性。
在本实施例中,可选的,可以设置一个轮询定时器,间隔设定时间轮询数据队列是否存在交互数据,当数据队列中存在交互数据时,将数据队列中的交互数据传输给服务器,当数据队列中不存在交互数据时,不进行操作,等待下一个周期的交互数据。其中,设定时间可以是3s,即一个轮询周期是3s,也就是说每间隔3s轮询一次数据队列。设定时间也可以其他时间,可根据需要进行设置。
其中,在一个轮询周期内,若没有产生交互数据,则数据队列中不存在交互数据,若产生交互数据,则数据队列中存在交互数据。当将数据队列中的交互数据传输给服务器时,数据队列不再存在交互数据,数据队列等待缓存下一个轮询周内的交互数据。
S250:不进行操作。
由此,通过将交互数据进行缓存到数据队列,并通过间隔设定时间轮询数据队列,将数据队列中的数据传输至服务器,即将交互数据进行分段收集,并定时进行批量传输,可以降低客户端与服务器交互频率,减小客户端和服务器数据处理的压力。
图3是本公开实施例提供的一种交互数据的传输方法流程图,本实施例可以与上述一个或者多个实施例中各个可选方案结合。
在本实施例中,可选的,所述客户端获取用户与当前直播显示界面的交互数据,可以包括:所述客户端当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型控件的标识信息,生成交互数据,其中,所述交互数据包括与被作用的控件的标识信息对应的类型信息。
以及,可选的,所述客户端将所述交互数据进行缓存,可以包括:所述客户端基于所述交互数据中的类型信息确定所述交互数据的类型;所述客户端如果确定缓存区中包括与所述交互数据的类型相同的目标缓存数据,则将所述交互数据与所述目标缓存数据进行合并缓存;所述客户端如果确定所述缓存区中不包括与所述交互数据的类型相同的目标缓存数据,则在所述缓存区缓存所述交互数据。
如图3所示,本公开实施例提供的技术方案包括:
S310:客户端当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型控件的标识信息,生成交互数据,其中,所述交互数据包括与被作用的控件的标识信息对应的类型信息。
S320:所述客户端基于所述交互数据中的类型信息确定交互数据的类型。
在本实施例中,当检测到用户作用不同的控件时,产生不同类型的交互数据。例如,若当用户作用控件A时,产生的交互数据中包括与控件A标识信息对应的类型信息,根据交互数据的类型信息可以确定交互数据的类型是A,当用户作用控件B时,产生的交互数据中包括与控件B的标识信息对应的类型信息,根据交互数据的类型信息,可以确定交互数据的类型为B。其中,当确定作用的预设类型控件时,根据预设控件的标识信息即可确定交互数据的类型信息。
S330:所述客户端如果确定缓存区中包括与所述交互数据的类型相同的目标缓存数据,则将所述交互数据与所述目标缓存数据进行合并缓存。
在一个具体实施方式中,可选的,已缓存的交互数据的数据存储形式包括:类型信息与数量的组合;所述将所述交互数据与所述目标缓存数据进行合并缓存,包括:所述客户端根据交互数据中的类型信息对目标缓存数据的数量进行更新,并丢弃所述交互数据。在本公开的一个或多个实施例中,客户端可以将目标缓存数据的数量进行加一处理后,丢弃所述交互数据。
其中,目标缓存数据为已缓存的交互数据,已缓存的交互数据的数据存储形式可以是类型信息与数量的组合。例如,若交互数据的类型信息是a,数量是2,则交互数据的数据存储形式可以是2a。
其中,当客户端获取到交互数据时,客户端检测缓存区是否存在与交互数据类型相同的缓存数据,如果缓存区包括与交互数据类型相同的目标缓存数据,则将交互数据与目标缓存数据进行合并缓存,即将目标缓存数据的数量进行加一处理,丢弃该交互数据。例如,缓存区的已缓存的缓存数据包括:3A,2B和4C。若获取到的交互数据的类型是A,则客户端检测缓存区的缓存数据是否包含类型为A的缓存数据,通过检测缓存区存在类型为A的缓存数据,即为3A;则在3A的数量上进行加一处理,得到缓存数据4A,则将该交互数据A丢弃,缓存区的缓存数据最终包括4A,2B和4C。
由此,当缓存区包括与交互数据类型相同的缓存数据时,将该缓存数据进行在数量上进 行加一处理,即将多个小数据整合成一个数据集合,可以减小传输的数据,提高传输的效率,减小传输频次。
S340:所述客户端如果确定所述缓存区中不包括与所述交互数据的类型相同的目标缓存数据,则在所述缓存区缓存所述交互数据。
在本实施例中,客户端如果确定缓存区不包括与交互数据的类型相同的目标缓存数据,在缓存区缓存交互数据,缓存的形式是交互数据数量与类型信息的组合。
对于本步骤进行举例说明,若缓存区的缓存数据包括:3A,2B和4C。若获取到的交互数据的类型是D,则客户端检测到缓存区的缓存数据不包括类型为D的缓存数据,则将该交互数据缓存到缓存区,缓存的形式是1D。最终缓存区的缓存数据包括:3A,2B、4C和1D。
S350:在满足数据上报条件时,将已缓存的交互数据发送至服务器,以使所述服务器根据直播间中至少一个客户端分别发送的交互数据生成联动交互数据,并发送至所述直播间中的各客户端。
在本实施例中,数据上报条件可以是间隔设定时间,或者是缓存的交互数据的长度达到设定长度值,设定长度值可以根据需要进行设定。其中,数据上报条件并不局限于上述的条件,也可以是其他条件。
图4是本公开实施例提供的一种交互数据的传输方法流程图,如图4所示,本公开实施例提供的技术方案包括:
S410:客户端获取用户与当前直播显示界面的交互数据。
S420:所述客户端生成与所述交互数据匹配的交互响应,并将所述交互响应在当前直播显示界面中进行展示。
本实施例中,当客户端获取到用户与当前直播显示界面的交互数据时,可以在本地客户端生成与交互数据匹配的交互响应,并在当前直播显示界面中进行显示,也就是说客户端本地产生的交互数据,生成匹配的交互响应,并在客户端本地进行展示。例如,当客户端获取到用户作用当前显示界面中的控件A时,产生交互数据,并可以在客户端本地产生对应的动画。由此,通过客户端产生的交互数据,生成交互响应,并在客户端本地立即进行展示,可以减少交互响应的反应时间,可以使用户了解自己与直播显示界面的交互信息,避免误操作。
S430:所述客户端将所述交互数据进行缓存,并在满足数据上报条件时,将已缓存的交互数据发送至服务器,以使所述服务器根据直播间中至少一个客户端分别发送的交互数据生 成联动交互数据,并发送至所述直播间中的各客户端。
其中,联动交互数据,用于指示接收到的客户端生成匹配的交互响应,并将匹配的交互响应在客户端的直播显示界面中进行展示。可选的,联动交互数据为服务器将多个客户端分别发送的交互数据汇总后,筛选得到的包含至少一个交互数据的集合;可选的,匹配的交互响应为客户端根据联动交互数据中其他客户端发送的交互数据所生成的交互响应,或者为客户端根据联动交互数据中各个客户端发送的交互数据所生成的交互响应。
S440:所述客户端如果接收到所述服务器发送的联动交互数据,将联动交互数据中包含客户端标识信息与客户端本地的标识信息不同的交互数据,或者联动交互数据中包含用户标识信息与登录客户端本地的用户标识信息不同的交互数据,作为目标交互数据。
其中,交互数据在传输过程中可以包括产生交互数据的客户端的标识信息或者登陆产生交互数据的客户端的用户标识信息。
如果客户端接收到联动交互数据,确定联动交互数据中的交互数据的客户端标识信息或者用户标识信息,若判断交互数据中的客户端标识信息与本地的客户端的标识信息不相同,或者若判断交互数据中的用户标识信息与登录客户端本地的用户标识信息不相同,则将其客户端标识信息与本地的客户端的标识信息不相同的交互数据,或者其用户标识信息与登录客户端本地的用户标识信息不相同的交互数据作为目标交互数据。即若客户端接收到服务器发送的联动交互数据,选取联动交互数据中其他客户端发送的交互数据作为目标交互数据。
S450:所述客户端生成与所述目标交互数据匹配的交互响应,并在当前直播显示界面中进行展示。
在本实施例中,客户端生成与目标交互数据匹配的交互响应,并在当前直播显示界面中进行展示,即客户端生成与其他客户端发送的交互数据匹配的交互响应,并在当前直播显示界面中展示。可选的,客户端对于联动数据中客户端本地发送的交互数据可以不进行处理,以节省客户端的资源。
可选的,当客户端接收到服务器发送的联动交互数据时,对联动交互数据进行缓存,并将其他客户端发送的交互数据以设定频率生成交互响应,并进行显示,例如,可以将交互数据以设定频率生成用户界面(User Interface,UI)动画,做出UI动画反馈。客户端通过用户标识的比对可以区分本地和其他客户端点亮的动画,保证每个动画路径都是独立、随机的,提高用户的交互表达欲望,改善交互的有趣性,促进用户感情的表达。
对本实施例的技术方案进行举例说明,例如,在直播间中若有2个用户,用户1和用户 2,用户1对应客户端1,用户2对应客户端2。若客户端1产生的用户1与当前直播显示界面的交互数据是10A,客户端1生成与交互数据10A匹配的交互响应,在当前直播显示界面上进行展示,并且客户端1将交互数据10A进行缓存,并间隔3s发送给服务器。若客户端2产生的用户2与当前直播显示界面的交互数据是10B,客户端2生成与交互数据10B匹配的交互响应,在客户端2的当前直播显示界面进行展示,并且客户端2将交互数据10B进行缓存,并间隔3s发送给服务器。若在3s时间内,服务器接收到的交互数据是10A和10B,服务器将接收到的交互数据进行汇总,并筛选;若服务器筛选得到的联动交互数据是1A和2B。服务器将联动交互数据分别发送至客户端1和客户端2。针对客户端1而言,客户端1确定联动交互数据中其他客户端(客户端2)发送的交互数据,交互数据为2B,生成与交互数据2B匹配的交互响应,并在客户端1的当前直播显示界面中进行展示,客户端1虽然也接收了联动交互数据中本地发送的交互数据1A,但对该交互数据1A不进行处理,可以避免交互数据的二次处理,节省客户端的资源。针对客户端2而言,同理,客户端2生成与交互数据1A匹配的交互响应,并在客户端2的当前直播显示界面中进行展示,客户端2虽然也接收了联动交互数据中本地发送的交互数据2B,但对该交互数据2B不进行处理。
由此,客户端通过确定联动交互数据中其他客户端发送的交互数据,并显示与该交互数据匹配的交互响应,可以避免本地发送的交互数据的二次处理,节省客户端的资源,可以提高直播间用户与主播之间的互动性。
图5是本公开实施例提供的一种直播间互动数据的传输方法流程图,所述方法由直播间互动数据的传输装置来执行,所述装置由软件和/或硬件来实现,所述装置可以配置在服务器中。
可选的,本公开实施例提供的方法可以应用在直播过程中,用于与直播显示界面进行高频率的交互的场景中,可选的,所述方法可以应用在直播过程中用户高频率的作用直播显示界面上预设类型控件的场景中。其中,用户与直播显示界面的交互频率或者用户作用预设类型控件的频率大于设定频率值。
如图5所示,本公开实施例提供的技术方案包括:
S510:服务器接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述至少一个客户端的当前直播显示界面进行的交互而产生的数据。
其中,联动交互数据为服务器将至少一个客户端分别发送的交互数据汇总后,筛选得到的包含至少一个交互数据的集合。
可选的,在预设时间段内,可能有一个用户作用直播显示界面,也有可能多个用户同时作用直播显示界面,所以,服务器在预设时间段内可能接收到一个客户端发送的交互数据,或者也可能接收到多个客户端发送的交互数据,其中,多个为两个或两个以上。服务器为避免多个用户同时作用直播显示界面,生成较多的交互数据,从而导致客户端频率接收过多的数据,服务器对多个客户端发送的交互数据进行了算法过滤,即当服务器接收到至少一个客户端发送的交互数据后,对接收到的交互数据进行汇总,并进行筛选,筛选的方式可以是随机筛选,也可以根据设定的数学算法进行筛选,从而得到、联动交互数据,则联动交互数据包含至少一个交互数据,从而减少交互数据的数量,从而也避免了客户端频繁接收数据的问题。
S520:所述服务器将所述联动交互数据分发至各客户端,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
在本实施例中,匹配的交互响应为客户端根据联动交互数据中其他客户端发送的交互数据所生成的交互响应,或者也可以是根据联动交互数据中各个客户端发送的交互数据所生成的交互响应。
其中,可选的,交互数据包括与被作用的控件的标识信息对应的类型信息。其中,所述被作用的控件为客户端的直播显示界面中被作用的预设类型控件;所述直播显示界面中包括两个以上的所述预设类型控件;所述联动交互数据包括与被作用的控件的标识信息对应的类型信息;所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成匹配的交互响应包括:所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成与所述类型信息相匹配的交互响应。
具体的,当用户作用客户端的直播显示界面上的预设类型控件时,根据预设类型控件的标识信息生成交互数据,交互数据包括与被作用的控件的标识信息对应的类型信息,客户端将该交互数据发送至服务器,服务器根据接收到的交互数据生成联动交互数据,并分发至各个客户端。其中,接收到联动交互数据的客户端可以根据联动交互数据中交互数据的类型信息生成匹配的交互响应,其中,根据类型信息可以确定被作用控件的标识信息,可以将该控件的标识信息按照预设的规则进行展示。其中,所述联动交互数据中的交互数据可以包括类型信息与数量的组合,当服务器接收到与存储的联动交互数据中的交互数据类型相同的交互 数据时,可以将该类型的交互数据在数量上进行加一处理,可以节省内存。
本公开实施例提供的直播间互动数据的传输方法,服务器通过根据接收到的交互数据生成联动交互数据,并分发给各个客户端,可以使各个客户端基于接收到的联动交互数据生成匹配的交互响应,从而可以使各个客户端可以展示其他用户点亮的交互响应,使用户充分了解直播间的互动情况。
在上述实施例的基础上,本公开提供的直播间互动数据的传输方法还可以包括:所述服务器接收各所述客户端发送的用户与直播显示界面交互的触发消息,并对所述触发消息进行汇总;所述服务器将汇总的触发消息发送至各所述客户端,以使各所述客户端通过弹幕显示所述用户与直播显示界面所述用户的标识信息。
其中,各个客户端可以发送用户与直播显示界面交互的触发消息,该触发消息携带用户的标识信息;服务器对接收到的各个客户端发送的触发消息进行汇总,并将汇总的触发消息分发给各个客户端;客户端接收到汇总的触发消息,根据触发消息确定触发直播显示界面用户的标识信息。
其中,可选的,用户与直播显示界面交互的触发消息为所述直播显示界面上的预设类型控件被触发的消息;可选的,当用户作用依次直播显示界面上的反馈控件时,客户端向服务器发送一条反馈控件被作用的触发消息,其中,该触发消息携带用户标识信息以及预设类型控件的标识信息。
由此,通过接收用户与直播显示界面交互的触发消息,并对触发消息进行汇总,并分发至各个客户端,可以使各个客户端显示触发直播显示界面的用户标识信息,可以使用户了解各用户之间的互动信息,提高互动性。
图6是本公开实施例提供的一种直播间互动数据的传输方法流程图,在本实施例中,客户端与服务器进行交互。如图6所示,本公开实施例提供的技术方案包括:
S610:客户端获取用户与当前直播显示界面的交互数据。
S620:所述客户端将所述交互数据进行缓存。
S630:在满足数据上报条件时,客户端发送将已缓存的交互数据至服务器。
S640:服务器接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据。
其中,联动交互数据为所述服务器将至少一个客户端分别发送的交互数据汇总后,筛选 得到的包含至少一个交互数据的集合。
S650:所述服务器发送所述联动交互数据至各客户端。
S660:接收到的客户端生成匹配的交互响应,并将匹配的交互响应显示在直播显示界面中。
可选的,匹配的交互响应可以为客户端根据联动交互数据中其他客户端发送的交互数据所生成的交互响应,或者也可以为客户端根据联动交互数据中各个客户端发送的交互数据所生成的交互响应。
需要说明的是,本实施例提供的方法可以通过多个线程来完成,避免UI线程中过多的非UI操作导致的页面卡断的问题。
需要说明的是,本实施例中各个步骤的优化可以参考上述实施例中对应步骤的优化,本实施例的执行步骤仅仅是本公开提供方法的一种示例,在本公开其他实施例中,也可以与上述一个或者多个实施例中步骤进行结合。
图7是本公开实施例提供的一种交互数据的传输装置,所述装置包括:获取模块710和、缓存和发送模块720。
其中,获取模块710,被配置为获取基于用户与客户端的当前直播显示界面进行的交互而产生的交互数据;
缓存和发送模块720,被配置为将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;
接收模块730,被配置为从所述服务器接收联动交互数据,所述联动交互数据是由服务器根据多个客户端分别发送的交互数据生成的,并且所述联动交互数据用于指示接收到所述联动交互数据的所述各个客户端生成匹配的交互响应;以及
展示模块740,被配置为将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
可选的,所述联动交互数据为所述服务器将至少一个客户端分别发送的交互数据汇总后,筛选得到的包含至少一个交互数据的集合。
可选的,所述交互数据包括产生所述交互数据的客户端的标识信息或者登陆产生交互数据的所述客户端的用户标识信息,所述装置还包括展示模块,用如果接收到所述服务器发送的联动交互数据,将联动交互数据中包含客户端标识信息与客户端本地的标识信息不同的交 互数据,或者联动交互数据中包含用户标识信息与登录客户端本地的用户标识信息不同的交互数据,作为目标交互数据;
生成与所述目标交互数据匹配的交互响应,并在所述当前直播显示界面中进行展示。
可选的,获取模块710,用于当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型控件的标识信息,生成交互数据,其中,所述交互数据包括与被作用的控件的标识信息对应的类型信息;其中,所述当前直播显示界面中包括两个以上的所述预设类型控件;
所述联动交互数据包括与被作用的控件的标识信息对应的类型信息;
所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成匹配的交互响应包括:
所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成与所述类型信息相匹配的交互响应。
可选的,所述客户端将所述交互数据进行缓存,包括:
所述客户端基于所述交互数据中的类型信息确定所述交互数据的类型;
所述客户端如果确定缓存区中包括与所述交互数据的类型相同的目标缓存数据,则将所述交互数据与所述目标缓存数据进行合并缓存;
所述客户端如果确定所述缓存区中不包括与所述交互数据的类型相同的目标缓存数据,则在所述缓存区缓存所述交互数据。
可选的,已缓存的交互数据的数据存储形式包括:类型信息与数量的组合;
所述将所述交互数据与所述目标缓存数据进行合并缓存,包括:
所述客户端根据交互数据中的类型信息对目标缓存数据的数量更新,并丢弃所述交互数据,以实现对所述交互数据的合并缓存。
可选的,缓存和发送模块720,用于将所述交互数据缓存于数据队列中;
间隔设定时间轮询检测所述数据队列是否存在交互数据;
若是,将所述数据队列中的交互数据传输给服务器。
上述装置可执行本公开任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。
图8是本公开实施例提供的一种直播间互动数据的传输装置的结构框图,如图8所示, 所述装置包括生成模块810和发送模块820。
其中,生成模块810,被配置为接收多个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述多个客户端的当前直播显示界面进行的交互而产生的数据;
发送模块820,用于将所述联动交互数据发送至各个客户端,并将所述匹配的交互响应显示在直播显示界面中,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
可选的,所述交互数据包括与被作用的控件的标识信息对应的类型信息;其中,所述被作用的控件为客户端的直播显示界面中被作用的预设类型控件;所述直播显示界面中包括两个以上的所述预设类型控件;所述联动交互数据包括与被作用的控件的标识信息对应的类型信息;
所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成匹配的交互响应包括:
所述联动交互数据,用于指示接收到所述联动交互数据的客户端生成与所述类型信息相匹配的交互响应。
可选的,所述联动交互数据中的交互数据包括类型信息与数量的组合。
上述装置可执行本公开任意实施例所提供的方法,具备执行方法相应的功能模块和有益效果。
图9为本公开实施例提供的一种终端的结构示意图。图9示出了适于用来实现本公开实施方式的示例性终端812的框图。图9显示的终端812仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,终端812以通用计算设备的形式表现。终端812的组件可以包括但不限于:一个或者多个处理器或者处理单元816,***存储器828,连接不同***组件(包括***存储器828和处理单元816)的总线818。
总线818表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,***总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及***组件互连(PCI)总 线。
终端812典型地包括多种计算机***可读介质。这些介质可以是任何能够被终端812访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
***存储器828可以包括易失性存储器形式的计算机***可读介质,例如随机存取存储器(RAM)830和/或高速缓存存储器832。终端812可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机***存储介质。仅作为举例,存储***834可以用于读写不可移动的、非易失性磁介质(图9未显示,通常称为“硬盘驱动器”)。尽管图9中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线818相连。存储器828可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本公开各实施例的功能。
具有一组(至少一个)程序模块842的程序/实用工具840,可以存储在例如存储器828中,这样的程序模块842包括——但不限于——操作***、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块842通常执行本公开所描述的实施例中的功能和/或方法。
终端812也可以与一个或多个外部设备814(例如键盘、指向设备、显示器824等)通信,还可与一个或者多个使得用户能与该终端812交互的设备通信,和/或与使得该终端812能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口822进行。并且,终端812还可以通过网络适配器820与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器820通过总线818与终端812的其它模块通信。应当明白,尽管图9中未示出,可以结合终端812使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID***、磁带驱动器以及数据备份存储***等。
处理单元816通过运行存储在***存储器828中的程序,从而执行各种功能应用以及数据处理,例如实现本公开实施例所提供的交互数据的传输方法。也即,
获取用户与当前直播显示界面的交互数据;
将所述交互数据进行缓存,并在满足数据上报条件时,将已缓存的交互数据发送至服务 器,以使所述服务器根据直播间中至少一个客户端分别发送的交互数据生成联动交互数据,并发送至所述直播间中的各客户端;
所述联动交互数据,用于指示接收到联动交互数据的客户端生成匹配的交互响应,并将匹配的交互响应在所述客户端的直播显示界面中进行展示。
图10是本公开实施例提供的一种服务器结构示意图,如图10所示,该服务器包括:
一个或多个处理器1010,图10中以一个处理器1010为例;
存储器1020;
所述服务器还可以包括:输入装置1030和输出装置1040。
所述服务器中的处理器1010、存储器1020、输入装置1030和输出装置1040可以通过总线或者其他方式连接,图10中以通过总线连接为例。
存储器1020作为一种非暂态计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本公开实施例中的一种直播间互动数据的传输方法对应的程序指令/模块(例如,附图8所示的生成模块810和发送模块820)。处理器1010通过运行存储在存储器1020中的软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的一种直播间互动数据的传输方法,即:
接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为用户与所述客户端的直播显示界面交互的数据;
将所述联动交互数据分发至各客户端,联动交互数据,用于指示接收到联动交互数据的客户端生成匹配的交互响应,并将匹配的交互响应显示在直播显示界面中。
存储器1020可以包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需要的应用程序;存储数据区可存储根据服务器的使用所创建的数据等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非暂态性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态性固态存储器件。在一些实施例中,存储器1020可选包括相对于处理器1010远程设置的存储器,这些远程存储器可以通过网络连接至终端设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置1030可用于接收输入的数字或字符信息,以及产生与服务器的用户设置以及功能控制有关的键信号输入。输出装置1040可包括输出接口等。
本公开实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开实施例提供的一种直播间互动数据的传输方法:
获取用户与当前直播显示界面的交互数据;
将所述交互数据进行缓存,并在满足数据上报条件时,将已缓存的交互数据发送至服务器,以使所述服务器根据直播间中至少一个客户端分别发送的交互数据生成联动交互数据,并发送至所述直播间中的各客户端;
所述联动交互数据,用于指示接收到联动交互数据的客户端生成匹配的交互响应,并将匹配的交互响应在所述客户端的直播显示界面中进行展示。
或者;
接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为用户与所述客户端的直播显示界面交互的数据;
将所述联动交互数据分发至各客户端,联动交互数据,用于指示接收联动交互数据到的客户端生成匹配的交互响应,并将匹配的交互响应显示在直播显示界面中。
可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开操作的计算机程序代 码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
注意,上述仅为本公开的较佳实施例及所运用技术原理。本领域技术人员会理解,本公开不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本公开的保护范围。因此,虽然通过以上实施例对本公开进行了较为详细的说明,但是本公开不仅仅限于以上实施例,在不脱离本公开构思的情况下,还可以包括更多其他等效实施例,而本公开的范围由所附的权利要求范围决定。

Claims (14)

  1. 一种交互数据的传输方法,包括:
    客户端获取基于用户与所述客户端的当前直播显示界面进行的交互而产生的交互数据;
    所述客户端将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;
    所述客户端从所述服务器接收联动交互数据,所述联动交互数据是由服务器基于至少一个客户端分别发送的交互数据而生成的并被发送至各个客户端,并且所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应;
    所述客户端将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
  2. 根据权利要求1所述的交互数据的传输方法,其中,所述交互数据包括产生所述交互数据的所述客户端的标识信息或者登陆产生交互数据的客户端的用户标识信息,并且,所述方法还包括:
    所述客户端如果接收到所述服务器发送的联动交互数据,则在联动交互数据中包含客户端标识信息与客户端本地的标识信息不同的的情况下,或者在联动交互数据中包含用户标识信息与登录客户端本地的用户标识信息不同的的情况下,将客户端标识信息与客户端本地的标识信息不同的联动交互数据,或者用户标识信息与登录客户端本地的用户标识信息不同的联动交互数据,作为目标交互数据;
    所述客户端生成与所述目标交互数据匹配的交互响应,并在当前的直播显示界面中进行展示。
  3. 根据权利要求1所述的交互数据的传输方法,其中,所述客户端获取基于用户与所述客户端的当前直播显示界面进行的交互而产生的交互数据包括:
    所述客户端当检测到所述用户作用所述当前直播显示界面中的预设类型控件时,确定所述预设类型控件的标识信息,生成交互数据,其中,所述交互数据包括与被作用的控件的标识信息对应的类型信息,并且其中,所述当前直播显示界面中包括两个以上的所述预设类型控件;
    所述联动交互数据包括与被作用的控件的标识信息对应的类型信息;并且
    所述联动交互数据用于指示接收到所述联动交互数据的所述各个客户端生成与所述类型信息相匹配的交互响应。
  4. 根据权利要求3所述的交互数据的传输方法,其中,所述客户端将所述交互数据进行缓存包括:
    所述客户端基于所述交互数据中的类型信息确定所述交互数据的类型;
    所述客户端如果确定缓存区中包括与所述交互数据的类型相同的目标缓存数据,则将所述交互数据与所述目标缓存数据进行合并缓存;
    所述客户端如果确定所述缓存区中不包括与所述交互数据的类型相同的目标缓存数据,则在所述缓存区缓存所述交互数据。
  5. 根据权利要求4所述的交互数据的传输方法,其中,已缓存的所述交互数据的数据存储形式包括:类型信息与数量的组合;
    所述将所述交互数据与所述目标缓存数据进行合并缓存,包括:
    所述客户端根据所述交互数据中的类型信息对目标缓存数据的数量进行更新,并丢弃所述交互数据。
  6. 根据权利要求1所述的交互数据的传输方法,其中,所述客户端将所述交互数据进行缓存,并在满足数据上报条件时,将已缓存的交互数据发送至服务器包括:
    将所述交互数据缓存于数据队列中;
    间隔设定时间轮询检测所述数据队列是否存在交互数据;以及
    若是,将所述数据队列中的交互数据传输给所述服务器。
  7. 一种交互数据的传输方法,包括:
    服务器接收至少一个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述至少一个客户端的当前直播显示界面进行的交互而产生的数据;以及
    所述服务器将所述联动交互数据分发至各客户端,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
  8. 根据权利要求7所述的交互数据的传输方法,其中,
    所述交互数据包括与被作用的控件的标识信息对应的类型信息;其中,所述被作用的控件为所述至少一个客户端的直播显示界面中被作用的预设类型控件;所述直播显示界面中包括两个以上的所述预设类型控件;所述联动交互数据包括与被作用的控件的标识信息对应的类型信息;并且
    所述联动交互数据用于指示接收到所述联动交互数据的所述各个客户端生成与所述类型信息相匹配的交互响应。
  9. 根据权利要求7所述的交互数据的传输方法,其中,所述联动交互数据中的交互数 据包括类型信息与数量的组合。
  10. 一种交互数据的传输装置,包括:
    获取模块,被配置为获取基于用户与客户端的当前直播显示界面进行的交互而产生的交互数据;
    缓存和发送模块,被配置为将所述交互数据进行缓存,并在数据上报条件被满足时,将已缓存的交互数据发送至服务器;
    接收模块,被配置为从所述服务器接收联动交互数据,所述联动交互数据是由服务器根据多个客户端分别发送的交互数据生成的,并且所述联动交互数据用于指示接收到所述联动交互数据的所述各个客户端生成匹配的交互响应;以及
    展示模块,被配置为将所述匹配的交互响应在所述客户端的直播显示界面中进行展示。
  11. 一种交互数据的传输装置,包括:
    生成模块,被配置为接收多个客户端发送的交互数据,并根据接收到的交互数据生成联动交互数据,所述交互数据为基于用户与所述多个客户端的当前直播显示界面进行的交互而产生的数据;以及
    发送模块,用于将所述联动交互数据发送至各个客户端,并将所述匹配的交互响应显示在直播显示界面中,其中所述联动交互数据用于指示接收到所述联动交互数据的客户端生成匹配的交互响应。
  12. 一种终端,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    所述一个或多个程序被所述一个或多个处理器执行,以使得所述一个或多个处理器实现如权利要求1-6任一所述的一种互动数据的传输方法。
  13. 一种服务器,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    所述一个或多个程序被所述一个或多个处理器执行,以使得所述一个或多个处理器实现如权利要求7-9任一所述的一种互动数据的传输方法。
  14. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序被处理器执行时实现如权利要求1-6任一所述的交互数据的传输方法,或者实现如7-9任一所述的交互 数据的传输方法。
PCT/CN2019/129401 2018-12-29 2019-12-27 交互数据的传输方法、装置、终端及服务器 WO2020135776A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811648172.4A CN109660858A (zh) 2018-12-29 2018-12-29 直播间交互数据的传输方法、装置、终端及服务器
CN201811648172.4 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020135776A1 true WO2020135776A1 (zh) 2020-07-02

Family

ID=66118582

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/129401 WO2020135776A1 (zh) 2018-12-29 2019-12-27 交互数据的传输方法、装置、终端及服务器

Country Status (2)

Country Link
CN (1) CN109660858A (zh)
WO (1) WO2020135776A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660858A (zh) * 2018-12-29 2019-04-19 北京字节跳动网络技术有限公司 直播间交互数据的传输方法、装置、终端及服务器
CN110248253B (zh) * 2019-06-18 2021-11-23 北京字节跳动网络技术有限公司 直播间交互界面的切换方法、装置、设备及存储介质
CN110351572B (zh) * 2019-07-10 2022-05-20 广州虎牙科技有限公司 直播间信息的更新方法、装置、设备及存储介质
CN111866537B (zh) * 2020-07-27 2022-05-31 网易(杭州)网络有限公司 直播间中的信息展示方法及装置、存储介质及电子设备
CN115037988B (zh) * 2021-03-05 2024-05-14 北京字节跳动网络技术有限公司 页面的显示方法、装置及设备
CN113641874A (zh) * 2021-07-21 2021-11-12 中国第一汽车股份有限公司 一种数据采集处理***及数据采集处理方法
CN114827641B (zh) * 2021-12-29 2024-03-12 广州方硅信息技术有限公司 直播间封面交互方法、装置、计算机设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015014773A1 (en) * 2013-07-29 2015-02-05 Koninklijke Kpn N.V. Providing tile video streams to a client
CN107231294A (zh) * 2017-05-24 2017-10-03 北京潘达互娱科技有限公司 消息处理方法及装置
CN107734394A (zh) * 2017-10-16 2018-02-23 北京京东尚科信息技术有限公司 显示动画信息的方法和装置
CN108900850A (zh) * 2018-05-31 2018-11-27 北京达佳互联信息技术有限公司 一种直播方法、装置和智能眼镜
CN108924661A (zh) * 2018-07-12 2018-11-30 北京微播视界科技有限公司 基于直播间的数据交互方法、装置、终端和存储介质
CN109660858A (zh) * 2018-12-29 2019-04-19 北京字节跳动网络技术有限公司 直播间交互数据的传输方法、装置、终端及服务器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162365B (zh) * 2016-06-24 2019-09-20 武汉斗鱼网络科技有限公司 基于时间轮盘和弹幕行为的活跃用户集维护方法及***
CN106131030B (zh) * 2016-07-19 2019-07-12 中国人民解放军63920部队 一种高速数据的分发方法和装置
CN107371056A (zh) * 2017-07-18 2017-11-21 北京蜜莱坞网络科技有限公司 一种加载弹幕的方法和装置
CN108174267B (zh) * 2017-12-21 2020-09-01 平安科技(深圳)有限公司 直播中互动信息的发送装置、方法及计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015014773A1 (en) * 2013-07-29 2015-02-05 Koninklijke Kpn N.V. Providing tile video streams to a client
CN107231294A (zh) * 2017-05-24 2017-10-03 北京潘达互娱科技有限公司 消息处理方法及装置
CN107734394A (zh) * 2017-10-16 2018-02-23 北京京东尚科信息技术有限公司 显示动画信息的方法和装置
CN108900850A (zh) * 2018-05-31 2018-11-27 北京达佳互联信息技术有限公司 一种直播方法、装置和智能眼镜
CN108924661A (zh) * 2018-07-12 2018-11-30 北京微播视界科技有限公司 基于直播间的数据交互方法、装置、终端和存储介质
CN109660858A (zh) * 2018-12-29 2019-04-19 北京字节跳动网络技术有限公司 直播间交互数据的传输方法、装置、终端及服务器

Also Published As

Publication number Publication date
CN109660858A (zh) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020135776A1 (zh) 交互数据的传输方法、装置、终端及服务器
WO2021135160A1 (zh) 游戏直播控制方法及装置、计算机存储介质、电子设备
US8606952B2 (en) Method and system for optimizing bandwidth usage in remote visualization
CN107454416B (zh) 视频流发送方法和装置
WO2020010819A1 (zh) 基于直播间的数据交互方法、装置、终端和存储介质
KR102611151B1 (ko) 라이브 방송 메시지 전송 방법, 장치, 전자 기기 및 매체
WO2020181913A1 (zh) 消息分发处理方法、装置、设备及存储介质
WO2017045190A1 (zh) 指导终端设备操作的方法、装置和设备
JP7465370B2 (ja) 情報共有方法、装置、電子機器及び記憶媒体
US20120166585A1 (en) Apparatus and method for accelerating virtual desktop
WO2019105391A1 (zh) 无线局域网络的连接方法、设备及计算机可读存储介质
CN112632160A (zh) 智能设备、以及智能设备登录方法
WO2020134865A1 (zh) 一种交互数据分发控制方法、装置、电子设备及存储介质
CN109831673B (zh) 一种直播间数据处理方法、装置、设备及存储介质
US20080036695A1 (en) Image display device, image display method and computer readable medium
WO2018176765A1 (zh) 数据传输方法、***和装置
CN110798700B (zh) 视频处理方法、视频处理装置、存储介质与电子设备
CN109729410B (zh) 一种直播间交互事件处理方法、装置、设备及存储介质
CN112039961B (zh) 流媒体***、数据流收集方法以及存储介质
CN115278332A (zh) 一种显示设备、播放设备和数据传输方法
CN114339364A (zh) 多媒体数据处理方法、装置、电子设备及存储介质
WO2019015089A1 (zh) 一种全局菜单的控制方法、装置、设备和存储介质
CN110807106A (zh) 一种多媒体数据的处理方法、装置、计算机设备和存储介质
CN113852848B (zh) 一种虚拟遥控器控制方法、显示设备及终端设备
CN113873253B (zh) 基于rdp的云应用打开优化方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19903951

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 05/10/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19903951

Country of ref document: EP

Kind code of ref document: A1