CN114760514B - Live broadcasting room data transmission method, device, equipment and storage medium - Google Patents

Live broadcasting room data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN114760514B
CN114760514B CN202210338356.0A CN202210338356A CN114760514B CN 114760514 B CN114760514 B CN 114760514B CN 202210338356 A CN202210338356 A CN 202210338356A CN 114760514 B CN114760514 B CN 114760514B
Authority
CN
China
Prior art keywords
game
data
live
operation instruction
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210338356.0A
Other languages
Chinese (zh)
Other versions
CN114760514A (en
Inventor
曾衍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili 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 Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN202210338356.0A priority Critical patent/CN114760514B/en
Publication of CN114760514A publication Critical patent/CN114760514A/en
Application granted granted Critical
Publication of CN114760514B publication Critical patent/CN114760514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43076Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/14Multichannel or multilink protocols
    • 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/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4781Games
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/61Network physical structure; Signal processing
    • H04N21/6156Network physical structure; Signal processing specially adapted to the upstream path of the transmission network

Landscapes

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

Abstract

The application relates to a method, a device, equipment and a storage medium for transmitting data in a live broadcast room, and belongs to the technical field of network live broadcast. In the application, the client receives the operation instruction of the user, if the operation instruction is a game operation instruction, the client acquires the game operation rule of the game corresponding to the live broadcasting room, acquires the game synchronous data according to the game operation rule and the game operation instruction, compresses the game synchronous data, sends the compressed data to the first server through the first data transmission channel, and if the operation instruction is an interactive operation instruction, the client acquires the interactive operation data, sends the interactive operation data to the second server through the second data transmission channel, separates the interactive operation and the game operation of the live broadcasting room, and independently carries out data transmission through different data transmission channels, thereby avoiding the mutual influence of the two and effectively improving the data transmission efficiency between the live broadcasting room.

Description

Live broadcasting room data transmission method, device, equipment and storage medium
Technical Field
The present application relates to the field of network live broadcasting technologies, and in particular, to a method, an apparatus, a device, and a storage medium for transmitting data in a live broadcasting room.
Background
The network live broadcast refers to a technology that a host broadcast shares live audio and video streams with audiences on a network through a network live broadcast platform. By means of an open and shared network live broadcast platform, people can more conveniently display the talents of the people, and in the process of talent display, audiences can express favorites for a host through participation in live broadcast interaction, and the host which is favored by the audiences can obtain the division of the network live broadcast platform, so that certain benefits are obtained; as the live broadcast work is not influenced by the main broadcast academy and the live broadcast field, common people can realize employment in a live broadcast mode, and the social employment can be effectively driven.
In the live broadcast watching process, the audience can interact with the audience or the host in the live broadcast room through participating in the game of the live broadcast interface, but for the online game of multiple people, a large amount of data are often required to be transmitted at a client side and a server side in the game process, if the data are not transmitted timely, the synchronous effect of the game is affected, and the live broadcast interaction experience of the audience is affected.
Disclosure of Invention
Based on the above, the application aims to provide a method, a device, equipment and a storage medium for transmitting data in a live broadcasting room, and provides the method for transmitting data in the live broadcasting room, which can improve the transmission efficiency of synchronous data in the game interaction process, thereby improving the synchronous effect of the game interaction in the live broadcasting room.
According to a first aspect of an embodiment of the present application, there is provided a method for transmitting data between live rooms, the method including:
the method comprises the steps that a client receives an operation instruction of a user;
if the operation instruction is a game operation instruction, the client acquires a game operation rule of a game corresponding to the live broadcasting room, and acquires game synchronous data according to the game operation rule and the game operation instruction;
The client compresses the game synchronous data and sends the compressed data to the first server through the first data transmission channel;
And if the operation instruction is an interactive operation instruction, the client acquires interactive operation data and sends the interactive operation data to the second server through the second data transmission channel.
According to a second aspect of an embodiment of the present application, there is provided a live room data transmission apparatus, the apparatus including;
The instruction receiving module is used for receiving an operation instruction of a user;
The game synchronous data acquisition module is used for acquiring a game operation rule of a corresponding game in the live broadcasting room if the operation instruction is a game operation instruction, and acquiring game synchronous data according to the game operation rule and the game operation instruction;
The first sending module is used for compressing the game synchronous data and sending the compressed data to a first server through a first data transmission channel;
And the second sending module is used for obtaining interactive operation data if the operation instruction is an interactive operation instruction, and sending the interactive operation data to a second server through a second data transmission channel.
According to a third aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform any one of the live room data transmission methods.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any one of the live room data transmission methods.
In the application, the client receives the operation instruction of the user, if the operation instruction is a game operation instruction, the client acquires the game operation rule of the game corresponding to the live broadcasting room, acquires the game synchronous data according to the game operation rule and the game operation instruction, compresses the game synchronous data, sends the compressed data to the first server through the first data transmission channel, and if the operation instruction is an interactive operation instruction, the client acquires the interactive operation data, sends the interactive operation data to the second server through the second data transmission channel, separates the interactive operation and the game operation of the live broadcasting room, and independently carries out data transmission through different data transmission channels, thereby avoiding the mutual influence of the two and effectively improving the data transmission efficiency between the live broadcasting room.
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 as claimed.
For a better understanding and implementation, the present application is described in detail below with reference to the drawings.
Drawings
Fig. 1 is a schematic diagram of an application environment of a data transmission method in a live broadcasting room according to an embodiment of the present application;
Fig. 2 is a flowchart of a method for transmitting data in a live broadcast room according to an embodiment of the present application;
FIG. 3 is an exemplary diagram of a live room display interface provided in accordance with one embodiment of the present application;
fig. 4 is an exemplary diagram of a live room display interface according to another embodiment of the present application;
fig. 5 is a flowchart of a method for transmitting data in a live broadcast room according to another embodiment of the present application;
Fig. 6 is a schematic structural diagram of a data transmission device in a live broadcasting room according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The word "if"/"if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination". Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario of a live-broadcast praise interaction method according to an embodiment of the present application, where the application scenario includes a server 101, a hosting end 102 and a viewer end 103 according to an embodiment of the present application. The anchor side 102 interacts with the viewer side 103 through the server 100.
The anchor 102 refers to an end that transmits a live video, and is generally a client used by an anchor in live webcasting.
The viewer terminal 103 refers to a terminal that receives and views a live video, and is typically a client used by a viewer viewing a video in a live video.
The hardware pointed at by the anchor end 102 and the viewer end 103 essentially refers to computer devices, and in particular, as shown in fig. 1, may be smart phones, smart interactive tablets, personal computers, and other types of computer devices. The anchor end 102 and the audience end 103 can access the internet through a well-known network access mode, and establish a data communication link with the server 101.
The server 101 acts as a service server and may be responsible for further connecting to related audio data servers, video streaming servers, and other servers providing related support, etc., to form a logically related service cluster for serving related terminal devices, such as the anchor end 102 and the viewer end 103 shown in fig. 1.
In the embodiment of the present application, the anchor 102 and the viewer client 103 may join the same live broadcast room (i.e., live broadcast channel), where the live broadcast room is a chat room implemented by means of internet technology, and generally has an audio/video playing control function. The anchor user plays live in the live broadcast room through the anchor terminal 102, and the audience of the audience terminal 103 can log in the server 10 to enter the live broadcast room to watch live broadcast.
In a live broadcasting room, interaction between a host and a spectator can be realized through a well-known online interaction mode such as voice, video, characters and the like, generally, the host plays a program for spectator users in an audio-video stream mode, and economic transaction behaviors can be generated in the interaction process. Of course, the application form of the live broadcasting room is not limited to online entertainment, and can be popularized to other related scenes, such as video conference scenes, product recommendation sales scenes and any other scenes needing similar interaction.
Specifically, the process of viewing a live broadcast by a viewer is as follows: the viewer can click to access a live broadcast application program (for example YY) installed on the viewer terminal 103, and select to enter any live broadcast room, and trigger the viewer terminal 103 to load a live broadcast room interface for the viewer, wherein the live broadcast room interface comprises a plurality of interaction components, and the viewer can watch live broadcast in the live broadcast room and perform various online interactions by loading the interaction components.
In the prior art, to enhance the interactive interest of a living room, the main broadcasting terminal 102 may create a living room (i.e. a game channel) in the living room, pull the audience terminal corresponding to the user identifier into the living room, and the audience terminal 103 may select to participate in the living room to interact with the game to become a game player, and the audience terminal 103 may also select to watch the game interaction in the living room to become a game audience.
However, for the online game of many people, in order to realize the game synchronization, often need to carry out many times of synchronous data transmission of game between a plurality of clients and server side, the synchronous data volume of game is big, and the requirement to the network bandwidth is higher, if the network quality is relatively poor then can lead to data transmission untimely, influences the synchronous effect of game, influences spectator's live broadcast interactive experience.
Therefore, in order to solve the problems, the application provides a data transmission method of a live broadcasting room. Referring to fig. 2, an embodiment of the present application provides a method for transmitting data in a live broadcast room, which is applied to the live broadcast room, and includes the following steps:
S101: the method comprises the steps that a client receives an operation instruction of a user;
the client may be a client where a game player who interacts with the game in the living room is located.
The live broadcasting room can be a virtual room created by the game server, and is internally provided with a game area for users to play and interact and a non-game area for users to play and interact.
The live broadcast room can be open, and all users in the live broadcast room can join the live broadcast room; the live room may also be closed, in that only invited users may join the live room, wherein the inviting users of the live room may be determined by the creator of the live room, e.g. the host or moderator.
In an alternative embodiment, all users within the living room may become gamers, in an alternative embodiment, gamers may be defined as users on the order of the living room.
It is understood that the in-order user refers to a user having a right to speak within the living room, and the moderator and selected game player belong to the in-order user.
S102: if the operation instruction is a game operation instruction, the client acquires a game operation rule of a game corresponding to the live broadcasting room, and acquires game synchronous data according to the game operation rule and the game operation instruction;
the game operation instruction may be a game operation instruction to implement a corresponding game operation.
The game synchronization data is game effect data generated after the client executes the game operation instruction, and the game synchronization data can be calculated according to a game operation rule and the game operation instruction, wherein the game operation rule can be obtained from a game server in advance for a user.
The game synchronization data may be used to enable other clients to synchronize the game process.
S103: the client compresses the game synchronous data and sends the compressed data to the first server through the first data transmission channel;
When the game synchronous data is compressed, a compression mode with the minimum memory occupation can be selected to compress the game synchronous data according to the specific data content or data type of the game synchronous data.
In one embodiment, compressing the game synchronization data specifically includes:
And according to the data type and the byte length of the game synchronous data, acquiring a compression mode corresponding to the data type and the byte length from a plurality of preset compression modes, and compressing the game synchronous data.
The game synchronization data can comprise single-precision floating point numbers, double-precision floating point numbers, integer data and other data types.
The data with different data types and byte lengths are respectively corresponding to a compression mode, and the compression refers to reducing the data volume to reduce the storage space and improve the transmission, storage and processing efficiency of the data under the premise of not losing useful information, or reorganizing the data according to a certain algorithm to reduce the redundancy and storage space of the data.
The compression mode includes, but is not limited to json code compression, protobuf code compression, data rounding, data merging and the like. Specifically, in the embodiment of the present application, the preset multiple compression modes include:
if the data type of the game synchronous data is floating point number, amplifying and rounding the data type of the game synchronous data to convert the data type into integer data;
and if the byte length of the game synchronous data is smaller than a preset threshold value, combining and storing a plurality of game synchronous data with the byte length smaller than the preset threshold value in a preset binary number value.
And amplifying and rounding single-precision floating point number (4 bytes) or double-precision floating point number (8 bytes) data, converting the single-precision floating point number or double-precision floating point number (8 bytes) data into integer data of 2 bytes or 4 bytes, and reducing the memory occupation of game synchronous data.
For data with smaller byte length, the data can be combined and stored in a binary value, so that the transmitted data quantity is reduced, and the transmission efficiency is improved.
Wherein the number of bits of the binary value may be determined according to the size of the game synchronization data, for example, may be set to an 8-bit binary value.
Preferably, if the game synchronization data is data which is not positive or negative, the game synchronization data can be further converted into an unsigned integer of 1 byte so as to further compress the data.
In the prior art, when the game synchronous data is transmitted, the game synchronous data is often converted into a protobuf format which is more convenient to transmit, and the protobuf protocol itself is additionally provided with a plurality of fields to influence the size of the generated data packet. Thus, in view of the above problems, the present application further includes, after converting into integer data:
storing the integer data in corresponding positions in a binary number group according to a preset mapping rule; wherein the mapping rule is used to determine the location of the integer data in the binary array.
The size of the binary array may be set according to the specific content of the game synchronization data. For example, the start position coordinates, end position, velocity, and acceleration are placed sequentially at the 16 th, 32 th, 48 th, etc. positions of the binary set. When the game is decompressed, the game synchronous data can be obtained only by reading the data of the corresponding position of the binary data.
The first data transmission channel may be used to enable the reception and transmission of game synchronization data between the client and the first server.
The first data transmission channel may be a long connection channel based on WebSocket protocol, and is used for providing services for users in the game interaction process.
The first server side can be a game server side, and the game server side can provide corresponding game interaction services for game interaction of the live broadcasting room.
S104: if the operation instruction is an interactive operation instruction, the client acquires interactive operation data and sends the interactive operation data to a second server through a second data transmission channel
The interactive operation instruction is used for the interactive operation performed by the user on the live broadcasting room, wherein the interactive operation comprises, but is not limited to, uploading, downloading, ordering, speaking, presenting a virtual gift and the like.
The interactive operation data are interactive data generated after the user executes the interactive operation instruction in the live broadcast room.
Preferably, the step of obtaining the interactive operation data by the client specifically includes:
and acquiring an interaction operation rule corresponding to the live broadcasting room, and acquiring interaction operation data.
In this embodiment, the interaction operation rule corresponding to the live broadcasting room and the game operation rule of the game are separated, the corresponding operation rule is called according to the operation instruction to perform data processing, and the game synchronization data and the interaction operation data are mutually independent, so that the data acquisition efficiency can be improved.
The second data transmission channel is a different data transmission channel from the first data transmission channel, and the interactive operation data does not need to be transmitted in the game synchronization process, so that the independent transmission of the interactive operation data and the game synchronization data is realized by using the different data transmission channels in the embodiment of the application, and the influence of the occupation of one data by the data transmission channel on the normal transmission of the other data is avoided.
The second server side can be a room server side, and the room server side can provide corresponding live interaction service for live interaction service of the live broadcasting room.
In the embodiment of the application, the client receives the operation instruction of the user, if the operation instruction is the game operation instruction, the client acquires the game operation rule of the game corresponding to the live broadcasting room, acquires the game synchronous data according to the game operation rule and the game operation instruction, compresses the game synchronous data, sends the compressed data to the first server through the first data transmission channel, and if the operation instruction is the interactive operation instruction, the client acquires the interactive operation data, sends the interactive operation data to the second server through the second data transmission channel, separates the interactive operation and the game operation between the live broadcasting room, and independently carries out data transmission through different data transmission channels, so that the mutual influence of the two is avoided, and the data transmission efficiency between the live broadcasting room can be effectively improved.
Please refer to fig. 3, which is a schematic diagram of a live room interface in one embodiment. As shown in fig. 3, the live room interface may include a play area 20 and an interaction area 30.
Wherein the game area 20 may include a plurality of game elements 201, and a user may trigger or move the game elements 201 in the game area 20 to generate game operation instructions to perform corresponding game operations.
The interactive region 30 may include a plurality of interactive controls 301, and a user may generate interactive operation instructions by triggering the corresponding interactive controls 301 to perform corresponding interactive operations including, but not limited to, praying, speaking, giving a virtual gift, etc.
The game operation rule is used for indicating how each element in the game area moves according to the game instruction of the user in the game process, and specifically, the game operation rule can include information such as motion parameters and a motion calculation formula of each element in the game area.
The game synchronization data is used for determining the motion trail of game elements in the game area.
In one embodiment, the step of obtaining game synchronization data includes:
The client determines the motion parameters to be acquired according to the game operation rule; wherein the motion parameters comprise position change parameters and speed change parameters of the game elements;
and the client acquires the motion parameters of the game elements according to the operation instruction and the game operation rule to obtain game synchronization data.
The motion parameters are used for determining the motion trail of the game elements in the game area.
Specifically, the motion parameter may be used to determine position change information, collision information or speed change information of the game element during the motion, where the position change information may include start position information of the game element and end position information of the game element, where the end position may be position information when the game element ends the motion, the collision information may include the number of the colliding game elements and an identification of the colliding game element, and the speed change information may include a motion speed and a motion acceleration during the motion of the game element.
FIG. 4 is a schematic diagram of a display interface according to one embodiment; the display interface depicted in fig. 4 is a billiard game interface that includes a plurality of billiard related game elements, such as a cue 301 and a plurality of balls 302.
The user may control the club 301 to perform a ball striking operation with a certain degree of force and angle. At this time, the game manipulation instruction may include ball identification of the ball striking angle information, the ball striking force information, and the ball action of the club 301.
The cue 301 acts on a ball to transition the ball from a rest state to a motion state, and during movement of the ball, the ball collides with other balls in the playing area, causing a plurality of balls in the playing area to transition from a rest state to a motion state.
When the game operation instruction of the user only acts on one or a plurality of game elements in the game area, the motion parameters of other game elements which do not move do not need to be transmitted as game synchronous data, so that the data quantity of the game synchronous data is reduced. Thus, in an alternative embodiment, the position change parameter includes start position information of the game element and end position information after the game element stops moving;
the step of obtaining the game synchronization data specifically comprises the following steps:
The client determines a game element identifier of the movement according to the starting position information and the ending position information of the game element;
and acquiring the motion parameters of the elements corresponding to the game element identifiers which generate motion, and obtaining the game synchronization data.
In this embodiment, only the motion parameters of the element that moves are acquired, for example, for a billiard ball that is not hit, the motion parameters of the element that does not move need not to be acquired, and when the game synchronization data is acquired, the motion parameters of the game element that does not move can be selected to be discarded, so that the efficiency of acquiring the game synchronization data by the client side is improved, and the data amount of the game synchronization data is reduced.
As illustrated in fig. 5, in one embodiment, the method further comprises the steps of:
s105: the first server forwards the compressed data to other clients in a live broadcast room;
S106: and decompressing the compressed data by the other clients to obtain game synchronous data, and displaying the motion trail of the game elements in the game area on the live broadcasting room interface according to the game synchronous data.
Other clients may refer to clients that are in the same live room as the client that issued the game operation instruction; the other clients may be a main broadcasting end in the live broadcasting room, a client where a game player of the client sending the game operation instruction in the live broadcasting room is located, and a client where a game audience watching game interaction in the live broadcasting room is located.
Other clients can see the game progress of the game player in their corresponding live room interfaces according to the game synchronization data. Taking a billiard as an example, other clients render the motion track of the sphere in a live broadcast room according to the motion data of the sphere and update the position information of each sphere in a game area.
As shown in fig. 4, the motion track of the multiple spheres in the game area is complex, and if all the motion parameters in the motion process of the multiple spheres are directly used as the game synchronization data, a large amount of game synchronization data is brought in each game operation, so that the transmission efficiency of the game synchronization data is affected.
Therefore, in the embodiment of the present application, the motion parameters to be acquired are determined according to the game operation rule, where the motion parameters to be acquired may be key motion parameters for determining the position change and the speed change of the game element, and the key motion parameters may include information such as the motion start position, the motion end position, the motion speed, and the acceleration of the game element.
Specifically, the game synchronization data includes initial position information, movement acceleration information, movement speed information of a game element, and end position information after the game element ends movement;
the step of displaying the motion trail of the game element in the game area on the live room interface according to the game synchronous data comprises the following steps:
and rendering and displaying the motion trail of the game element in the live broadcasting room interface according to the initial position information, the motion acceleration information, the motion speed information and the end position information of the game element.
In an alternative embodiment, after executing the game operation instruction, the client may further calculate a game score obtained by the game operation instruction, and report the game score to the first server to implement the update of the game score of the client.
Specifically, after the game operation rule of the corresponding game in the live broadcasting room is obtained, the method further comprises the following steps:
The client obtains game score information according to the game operation instruction and the game operation rule;
the client compresses the game score information and transmits the game score information to the first server through a third data transmission channel; wherein the game score information comprises a game score and a client identifier;
the first server side decompresses the compressed game score information and updates the game score corresponding to the client side identifier according to the game score information.
For example: in the billiard game, whether the ball body collided by the ball rod is a target ball body (usually a white ball) is judged, if yes, whether the final position of the ball body is in a ball pocket is judged, if no, whether one ball body collided by the ball body firstly is the corresponding scoring ball body is judged, if yes, whether the final position of the ball body after the game operation is in the ball pocket is continuously judged, the final positions of a plurality of ball bodies after the game operation are in the ball pocket and the corresponding game scores are continuously judged, finally, the game scores of the game player during the game operation are obtained, and the game scores corresponding to the game player are updated according to the game scores of the game player during the game operation.
In this embodiment, after each game player participates in a game interaction, the game score under the game can be updated, so that when the game score meets the rewarding condition, the rewarding data is issued to the corresponding client, thereby improving the enthusiasm of the user to participate in the game interaction, further improving the live broadcast participation degree and improving the live broadcast interaction experience.
In an alternative embodiment, the first server side counts the game result information of the game interaction and the game result information of the multiple game interactions to form a game list, and issues the game list to the corresponding client side, so that all users can view the game list and know the game result. Meanwhile, the users can share the list to the third-party platform, so that more users can be attracted to participate in game interaction.
In an alternative embodiment, the game score information may be encoded and compressed based on a protobuf protocol. Compared with the existing json code compression, the space occupied by the code compression based on the protobuf protocol is smaller, the transmission efficiency and the encoding and decoding speed are faster, and the updating efficiency of game score data can be effectively improved.
The embodiment provides a live broadcasting room data transmission device which can be used for executing the live broadcasting room data transmission method. For details not disclosed in this embodiment, please refer to the method embodiment of the present application.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data transmission device in a live broadcasting room according to an embodiment of the application. The live broadcasting room data transmission device comprises:
an instruction receiving module 401, configured to receive an operation instruction of a user;
The game synchronous data acquisition module 402 is configured to acquire a game operation rule of a corresponding game in the living broadcast room if the operation instruction is a game operation instruction, and acquire game synchronous data according to the game operation rule and the game operation instruction;
A first sending module 403, configured to compress the game synchronization data, and send the compressed data to a first server through a first data transmission channel;
And the second sending module 404 is configured to obtain the interactive operation data if the operation instruction is an interactive operation instruction, and send the interactive operation data to the second server through the second data transmission channel.
In the embodiment of the application, the live broadcasting room data transmission device is applied to computer equipment. It should be noted that, when the live broadcast data transmission apparatus provided in the foregoing embodiment performs the live broadcast data transmission method, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the live broadcast room data transmission device and the live broadcast room data transmission method provided in the foregoing embodiments belong to the same concept, which embody the implementation process in detail and are not described herein again.
The embodiment provides an electronic device, which can be used for executing all or part of steps of a live broadcast room data transmission method in the embodiment of the application. For details not disclosed in this embodiment, please refer to the method embodiment of the present application.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the application. The electronic device 500 may be, but is not limited to being, a combination of one or more of a variety of servers, personal computers, notebook computers, smart phones, tablet computers, and the like.
In a preferred embodiment of the present application, the electronic device 500 includes a memory 501, at least one processor 502, at least one communication bus 503, and a transceiver 504.
It will be appreciated by those skilled in the art that the configuration of the electronic device shown in fig. 7 is not limiting of the embodiments of the present application, and that either a bus-type configuration or a star-type configuration may be used, and that the electronic device 500 may include more or less other hardware or software than that shown, or a different arrangement of components.
In some embodiments, the electronic device 500 is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit, a programmable gate array, a digital processor, an embedded device, and the like. The electronic device 500 may also include a client device, including but not limited to any electronic product that can interact with a client by way of a keyboard, mouse, remote control, touch pad, or voice-controlled device, such as a personal computer, tablet, smart phone, digital camera, etc.
It should be noted that the electronic device 500 is only an example, and other electronic products that may be present in the present application or may be present in the future are also included in the scope of the present application by way of reference.
In some embodiments, the memory 501 stores a computer program that, when executed by the at least one processor 502, implements all or part of the steps of the live room data transmission method as in the first embodiment. The Memory 501 includes Read-Only Memory (ROM), programmable Read-Only Memory (PROM), erasable programmable Read-Only Memory (EPROM), one-time programmable Read-Only Memory (One-timeProgrammable Read-Only Memory, OTPROM), electrically erasable rewritable Read-Only Memory (EEPROM), compact disc Read-Only Memory (CD-ROM) or other optical disk Memory, magnetic disk Memory, tape Memory, or any other medium that can be used to carry or store data.
In some embodiments, the at least one processor 502 is a Control Unit (Control Unit) of the electronic device 500, connects the various components of the entire electronic device 500 using various interfaces and lines, and performs various functions of the electronic device 500 and processes data by running or executing programs or modules stored in the memory 501, and invoking data stored in the memory 501. For example, the at least one processor 502, when executing the computer program stored in the memory, implements all or part of the steps of the live room data transmission method described in the embodiments of the present application; or to implement all or part of the functionality of the live room data transmission device. The at least one processor 502 may be comprised of integrated circuits, such as a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functionality, including one or more central processing units (CentralProcessing unit, CPU), microprocessors, digital processing chips, graphics processors, various control chips, and the like.
In some embodiments, the at least one communication bus 503 is configured to enable connected communication between the memory 501 and the at least one processor 502, etc.
The electronic device 500 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
The embodiment provides a computer readable storage medium, on which a computer program is stored, where the instructions are adapted to be loaded by a processor and execute the live broadcast data transmission method according to the first embodiment of the present application, and the specific execution process may refer to the specific description of the first embodiment, and will not be described herein.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above-described apparatus embodiments are merely illustrative, wherein the components illustrated as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (12)

1. A method for transmitting data between living broadcast rooms, the method comprising:
the method comprises the steps that a client receives an operation instruction of a user;
If the operation instruction is a game operation instruction, the client acquires a game operation rule of a game corresponding to the live broadcasting room, and acquires game synchronous data according to the game operation rule and the game operation instruction; the live broadcasting room comprises a game area provided with a plurality of game elements; the game synchronization data comprises initial position information of a game element which moves and end position information of the game element after the game element ends the movement;
The client compresses the game synchronous data and sends the compressed data to the first server through the first data transmission channel;
The first server forwards the compressed data to other clients in a live broadcast room;
decompressing the compressed data by the other clients to obtain game synchronous data, and displaying the motion trail of game elements in a game area on the live broadcasting room interface according to the game synchronous data;
And if the operation instruction is an interactive operation instruction, the client acquires interactive operation data and sends the interactive operation data to the second server through the second data transmission channel.
2. The method of claim 1, wherein the game synchronization data is used to determine a motion trajectory of a game element in the game area;
the step of obtaining the game synchronization data comprises the following steps:
The client determines the motion parameters to be acquired according to the game operation rule; wherein the motion parameters comprise position change parameters and speed change parameters of the game elements;
and the client acquires the motion parameters of the game elements according to the operation instruction and the game operation rule to obtain game synchronization data.
3. The direct broadcasting room data transmission method as claimed in claim 2, wherein the position change parameter includes start position information of the game element and end position information after the game element stops moving;
the step of obtaining the game synchronization data specifically comprises the following steps:
The client determines a game element identifier of the movement according to the starting position information and the ending position information of the game element;
and acquiring the motion parameters of the elements corresponding to the game element identifiers which generate motion, and obtaining the game synchronization data.
4. The method for transmitting data between live rooms according to claim 1, wherein compressing the game synchronization data specifically includes:
And according to the data type and the byte length of the game synchronous data, acquiring a compression mode corresponding to the data type and the byte length from a plurality of preset compression modes, and compressing the game synchronous data.
5. The method for transmitting data between live rooms according to claim 4, wherein the preset compression modes include:
if the data type of the game synchronous data is floating point number, amplifying and rounding the data type of the game synchronous data to convert the data type into integer data;
and if the byte length of the game synchronous data is smaller than a preset threshold value, combining and storing a plurality of game synchronous data with the byte length smaller than the preset threshold value in a preset binary number value.
6. The method of claim 5, further comprising, after converting to integer data:
storing the integer data in corresponding positions in a binary number group according to a preset mapping rule; wherein the mapping rule is used to determine the location of the integer data in the binary array.
7. The direct broadcasting room data transmission method as claimed in claim 2, wherein the game synchronization data includes initial position information of a game element, motion acceleration information, motion velocity information, and end position information after the game element ends a motion;
the step of displaying the motion trail of the game element in the game area on the live room interface according to the game synchronous data comprises the following steps:
and rendering and displaying the motion trail of the game element in the live broadcasting room interface according to the initial position information, the motion acceleration information, the motion speed information and the end position information of the game element.
8. The method for transmitting data between live broadcasting stations according to claim 1, wherein said step of obtaining interactive operation data by the client specifically comprises:
The client acquires the interaction operation rule corresponding to the live broadcasting room and acquires the interaction operation data.
9. The method for transmitting data between live rooms according to claim 6, further comprising the steps of, after acquiring the rules of operation of the corresponding game in the live room:
The client obtains game score information according to the game operation instruction and the game operation rule;
the client compresses the game score information and transmits the game score information to the first server through a third data transmission channel; wherein the game score information comprises a game score and a client identifier;
the first server side decompresses the compressed game score information and updates the game score corresponding to the client side identifier according to the game score information.
10. A live room data transmission apparatus, the apparatus comprising:
The instruction receiving module is used for receiving an operation instruction of a user;
The game synchronous data acquisition module is used for acquiring a game operation rule of a corresponding game in the live broadcasting room if the operation instruction is a game operation instruction, and acquiring game synchronous data according to the game operation rule and the game operation instruction; the live broadcasting room comprises a game area provided with a plurality of game elements; the game synchronization data comprises initial position information of a game element which moves and end position information of the game element after the game element ends the movement;
The first sending module is used for compressing the game synchronous data, sending the compressed data to a first server through a first data transmission channel, enabling the first server to forward the compressed data to other clients in a live broadcasting room, decompressing the compressed data by the other clients, obtaining the game synchronous data, and displaying the motion trail of game elements in a game area on the interface of the live broadcasting room according to the game synchronous data;
And the second sending module is used for obtaining interactive operation data if the operation instruction is an interactive operation instruction, and sending the interactive operation data to a second server through a second data transmission channel.
11. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the live room data transmission method of any one of claims 1 to 9.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a live room data transmission method as claimed in any one of claims 1 to 9.
CN202210338356.0A 2022-04-01 2022-04-01 Live broadcasting room data transmission method, device, equipment and storage medium Active CN114760514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210338356.0A CN114760514B (en) 2022-04-01 2022-04-01 Live broadcasting room data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210338356.0A CN114760514B (en) 2022-04-01 2022-04-01 Live broadcasting room data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114760514A CN114760514A (en) 2022-07-15
CN114760514B true CN114760514B (en) 2024-05-28

Family

ID=82329540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210338356.0A Active CN114760514B (en) 2022-04-01 2022-04-01 Live broadcasting room data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114760514B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115414664A (en) * 2022-08-31 2022-12-02 深圳十米网络科技有限公司 Data transmission method of motion sensing device
CN115282596A (en) * 2022-09-01 2022-11-04 深圳十米网络科技有限公司 Control method, device and equipment of motion sensing equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752667A (en) * 2012-07-17 2012-10-24 王加俊 Multi-stream media live broadcast interaction system and live broadcast interaction method
CN109395376A (en) * 2018-11-06 2019-03-01 网易(杭州)网络有限公司 Exchange method, device and system based on game live streaming
CN110149526A (en) * 2019-05-29 2019-08-20 北京达佳互联信息技术有限公司 A kind of living broadcast interactive system and its control method, device and storage medium
CN110519611A (en) * 2019-08-23 2019-11-29 腾讯科技(深圳)有限公司 Living broadcast interactive method, apparatus, electronic equipment and storage medium
CN110532466A (en) * 2019-08-21 2019-12-03 广州华多网络科技有限公司 Processing method, device, storage medium and the equipment of platform training data is broadcast live
CN112422998A (en) * 2020-10-26 2021-02-26 网易(杭州)网络有限公司 Live broadcast interaction method and device based on cloud game and electronic equipment
WO2021114795A1 (en) * 2019-12-11 2021-06-17 厦门雅基软件有限公司 Cloud game live broadcast method, cloud game anchor end, viewer end and computer-readable storage medium
CN114257830A (en) * 2021-12-21 2022-03-29 广州方硅信息技术有限公司 Live game interaction method, system and device and computer equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752667A (en) * 2012-07-17 2012-10-24 王加俊 Multi-stream media live broadcast interaction system and live broadcast interaction method
CN109395376A (en) * 2018-11-06 2019-03-01 网易(杭州)网络有限公司 Exchange method, device and system based on game live streaming
CN110149526A (en) * 2019-05-29 2019-08-20 北京达佳互联信息技术有限公司 A kind of living broadcast interactive system and its control method, device and storage medium
CN110532466A (en) * 2019-08-21 2019-12-03 广州华多网络科技有限公司 Processing method, device, storage medium and the equipment of platform training data is broadcast live
CN110519611A (en) * 2019-08-23 2019-11-29 腾讯科技(深圳)有限公司 Living broadcast interactive method, apparatus, electronic equipment and storage medium
WO2021114795A1 (en) * 2019-12-11 2021-06-17 厦门雅基软件有限公司 Cloud game live broadcast method, cloud game anchor end, viewer end and computer-readable storage medium
CN112422998A (en) * 2020-10-26 2021-02-26 网易(杭州)网络有限公司 Live broadcast interaction method and device based on cloud game and electronic equipment
CN114257830A (en) * 2021-12-21 2022-03-29 广州方硅信息技术有限公司 Live game interaction method, system and device and computer equipment

Also Published As

Publication number Publication date
CN114760514A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
CN110213601B (en) Live broadcast system and live broadcast method based on cloud game and live broadcast interaction method
US11027198B2 (en) Systems and methods of serving game video for remote play
US20220193542A1 (en) Compositing multiple video streams into a single media stream
CN110519611B (en) Live broadcast interaction method and device, electronic equipment and storage medium
CN114760514B (en) Live broadcasting room data transmission method, device, equipment and storage medium
CN112788358B (en) Video live broadcast method, video sending method, device and equipment for game match
US10076711B2 (en) Remote rendering server with broadcaster
US11537264B2 (en) Methods and systems for providing shortcuts for fast load when moving between scenes in virtual reality
JP6310073B2 (en) Drawing system, control method, and storage medium
CN111526927A (en) Temporary game control via user simulation after loss of active control
WO2023029823A1 (en) Game picture display method and apparatus, device and storage medium
CN112616061B (en) Live interaction method and device, live server and storage medium
JP2015515284A (en) GAME SYSTEM, GAME DEVICE, CONTROL METHOD, PROGRAM, AND RECORDING MEDIUM
CN113766340B (en) Dance music interaction method, system and device under live connected wheat broadcast and computer equipment
CN109195003B (en) Interaction method, system, terminal and device for playing game based on live broadcast
JP6379107B2 (en) Information processing apparatus, control method therefor, and program
CN112423013B (en) Online interaction method, client, server, computing device and storage medium
CN114257830A (en) Live game interaction method, system and device and computer equipment
CN114666672B (en) Live fight interaction method and system initiated by audience and computer equipment
CN109040851B (en) Delay processing method, system, server and computer readable storage medium for playing game based on live broadcast
CN114007095A (en) Voice microphone-connecting interaction method, system, medium and computer equipment for live broadcast room
CN114786024B (en) Live room game synchronization method, system, device, equipment and storage medium
CN113438491B (en) Live broadcast interaction method and device, server and storage medium
US20160271495A1 (en) Method and system of creating and encoding video game screen images for transmission over a network
JP6533022B1 (en) Terminal, server and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant