Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
According to one aspect of the present disclosure, a live room voting method is provided, applied to a hosting client. Referring to fig. 1, a method of voting in a living room according to one embodiment of the present invention is schematically illustrated. As shown in fig. 1, a live room voting method 100 according to some embodiments of the present disclosure includes:
Step S110: controlling the anchor client to display a voting setting interface, wherein the voting setting interface is used for enabling anchor users in a living broadcast room to set configuration information related to a voting project, the configuration information comprises a plurality of voting options, a plurality of gift options and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, each gift option in the plurality of gift options corresponds to one or more gifts, and the one or more gifts are selected by audience users watching the living broadcast room through the audience client so as to vote to the voting option corresponding to the gift option;
step S120: the voting items are initiated to a server such that the server provides the configuration information set by the anchor user in a live stream pushed to the audience client, thereby allowing the audience user to vote on a respective voting option of the plurality of voting options by selecting the respective one or more gifts in a live room interface displayed on the audience client.
The method has the advantages that the host broadcasting client side is controlled to display the voting setting interface, after the host broadcasting user in the living broadcasting room sets configuration information related to the voting items through the voting setting interface, and the configuration information related to the voting items is pushed to the audience client side of the audience user in the living broadcasting room through the server in the process of pushing the living broadcasting stream in the living broadcasting room, so that the audience user in the living broadcasting room can vote on the voting items set by the host broadcasting user in the living broadcasting room through selecting gifts, on one hand, the realization method of the voting items is simple, on the other hand, the interestingness of the living broadcasting process is improved, the interactivity between the host broadcasting user and the audience user can be increased, and the user experience can be effectively improved.
In the related art, voting in a live broadcast process is realized by developing a voting system independent of a live broadcast system. It is necessary to install a voting system at the anchor client of the anchor user and the audience client of the audience user simultaneously, so that the anchor user initiates a vote through the voting system and the audience user performs a vote through the voting system. The development cost of separately developing voting systems is high. And the separate voting system needs additional network resources to transmit the voting information in the voting process, for example, the voting options set by the live broadcast user through the voting system need to occupy the separate network resources to transmit to the voting system of the audience client of the audience user, but cannot directly transmit to the audience client through transmitting the live broadcast stream, thereby increasing the network transmission cost.
In an embodiment according to the present disclosure, after a cast user of a live room sets configuration information related to a voting item through a voting setting interface, the configuration information is pushed to a viewer client of a viewer user of the live room through a server in the course of pushing a live stream of the live room, and a separate network is not required. Meanwhile, the audience users can vote on the voting projects set by the anchor users by selecting the gift, and the voting can be realized without separately developing a voting system which needs to be arranged on the audience client side, so that the voting realization process is simple.
According to some embodiments of the present disclosure, a live room voting method according to the present disclosure is implemented by a voting component. For example, the voting component may employ a web plug-in mode (i.e., exposed in a browser) that is crawled by live software to implement a live room voting method according to the present disclosure. The web plug-in has the advantages that the voting method of the living broadcast room according to the present disclosure can be used on any living broadcast software, and is also suitable for any other broadcasting tool supporting a browser as a broadcasting source, and the application scope is wider.
In some implementations, the hosting client is controlled to display a vote setting interface in response to the client of the hosting user starting a live broadcast.
Referring to fig. 2, a schematic diagram of a vote setup interface according to some embodiments of the present disclosure is shown. As shown in fig. 2, the vote setting interface is used for the anchor user of the living room to set configuration information related to the voting items.
In some embodiments, as shown in fig. 2, the configuration information includes a plurality of voting options, a plurality of gift options, and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, wherein the plurality of voting options are set by a plurality of "option names", the plurality of gift options are set by "gift 1", "gift 2", and "gift 3", the user can set the voting options by inputting corresponding contents in an input box corresponding to the "option name", and can set the gift options by checking one or more of "gift 1", "gift 2", and "gift 3". It will be appreciated that after the user has set up the plurality of voting options and the plurality of gift options, the one-to-one correspondence between the plurality of voting options and the plurality of gift options is also set.
In some embodiments, the user may set individual gift options such that each gift option specifies the type of gift and/or number of gifts needed to vote for the voting option to which that gift option corresponds. For example, as shown in fig. 2, the user may set "gift 1" as a first gift category having a value of 10, set "gift 2" as a second gift category having a value of 5, and the number of the second gift categories is 2, so that the value of "gift 1" and gift 2 "are equal.
In some embodiments, in response to a host user selecting the gift category and quantity of a first gift item corresponding to a first one of the plurality of voting items, the host user is automatically configured with the gift category and quantity of the gift item corresponding to the remaining ones of the plurality of voting items to ensure the gift equivalence in the gift item corresponding to each of the voting items.
In some embodiments, the anchor user may also proceed to select the value of the gift in the gift option desired to be set, such that the anchor client automatically configures the type and number of the gift in the gift option according to the value selected by the anchor user.
In some embodiments, with continued reference to FIG. 2, the configuration information also includes a voting topic, and a voting period. It will be appreciated that the configuration information may also include any other information, and is not limited herein.
In some embodiments, the voting component employs K-V type configuration information that stores the anchor user settings to implement a live room voting method in accordance with the present disclosure. The K-V type storage is convenient to configure, the data structure is simple, and the efficiency of component development and data processing is improved.
Referring to fig. 3, a schematic diagram of a live room interface displayed on an audience client of an audience user after initiating a voting project to a server in some embodiments in accordance with the present disclosure is shown. As shown in fig. 3, a "play area" is displayed in the interface of the live broadcasting room, and a live stream of the live broadcasting room is played in the "play area", and includes configuration information of a voting item, so that a viewer user can understand one-to-one correspondence between a plurality of voting options and a plurality of gift options and between a plurality of voting options and a plurality of gift options in the configuration information of the voting item, and can vote by selecting each of the gift options ("gift 1", "gift 2", and "gift 3") under the "play area". It will be appreciated that the viewer user may also simply select other gifts, without voting.
In some embodiments, initiating the voting item to the server comprises: and sending the configuration information set by the anchor user to the server.
By sending the configuration information to a server, the server may vote each of the plurality of voting options based on the configuration information and the gift options selected by the viewer client. The data processing of the ticket counting process is realized on a server, the ticket counting speed is improved, and the data processing amount of a host client is reduced.
In some embodiments, as shown in fig. 4, the live room voting method according to the present disclosure further includes:
step S410: obtaining real-time voting data from the server, the real-time voting data indicating the number of votes corresponding to each of the plurality of voting options up to the current time; and
step S420: the real-time voting data is included in a live stream sent to the server, such that the server provides the real-time voting data in a live stream pushed to the audience client, thereby allowing a voting result corresponding to the real-time voting data to be presented in the live room interface.
The real-time voting data are obtained from the server and are included in the live stream to be sent to the server, so that the server pushes the real-time voting data to the audience client side while pushing the live stream to the audience client side, the audience client side can know the number of votes of each voting option in real time, interactivity between a main broadcasting user and audience users in the voting process is further improved, and user experience is improved.
Referring to fig. 5, a schematic diagram of voting results presented at a live room interface according to some embodiments of the present disclosure is shown. As shown in fig. 5, the voting result includes the number of persons selecting each of the voting options of the voting item whose voting topic is "AAA voting" and the remaining time for voting for the voting item.
In some embodiments, obtaining real-time voting data from the server comprises: the real-time voting data is obtained from the server through a persistent connection between the anchor client and the server.
In some embodiments, the anchor client transmits the live stream to the viewer client through a transmission method based on the HTTP protocol, and in order to ensure the stability of the streaming process during the transmission, it is necessary to determine a stable connection between the anchor client and the server by continuously transmitting a request and obtaining a corresponding response.
In the embodiment according to the disclosure, the real-time voting data is obtained through the persistent connection, so that the connection failure between the anchor client and the server is further avoided.
In some embodiments, the obtaining real-time voting data from the server comprises: the real-time voting data is obtained from the server at predetermined time intervals.
By obtaining real-time voting data from the server at predetermined time intervals, connection failure between the anchor client and the server is further avoided.
In some embodiments, the predetermined time interval may be 5s.
According to another aspect of the present disclosure, there is also provided a voting method applied to a server. As shown in fig. 6, a live room voting method 600 according to the present disclosure includes:
step S610: receiving configuration information set by an anchor user through an anchor client, wherein the configuration information comprises a plurality of voting options, a plurality of gift options and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, each gift option in the plurality of gift options corresponds to one or more gifts, and the one or more gifts are selected by audience users watching the living broadcast room through the audience client so as to vote for the voting option corresponding to the gift option;
step S620: receiving gift data transmitted by at least one viewer client, the gift data indicating that a viewer user of the at least one viewer client has selected one or more gifts; and
step S630: based on the received gift data and the configuration information, real-time voting data is generated, wherein the real-time voting data indicates the number of votes corresponding to each of the plurality of voting options up to the current time.
The server receives the configuration information set by the anchor user through the anchor client, receives gift data sent by at least one audience client, generates real-time voting data based on the received gift data and the configuration information, and enables audience users in a living broadcast room to vote through selecting the gift in the living broadcast process of the anchor user. Meanwhile, in the live broadcasting room voting method, real-time voting data are generated by the server, so that statistics on the number of votes in the voting process is completed at the server side, the efficiency of the statistics on the number of votes is improved, and the data processing amount of a hosting client of a hosting user is reduced.
In some embodiments, the configuration information, voting options, and settings of the gift options may refer to a live room voting method applied to the hosting client according to the present disclosure.
In some embodiments, in response to the anchor client initiating the voting project, configuration information set by the anchor user via the anchor client is received over a network between the anchor client and the server.
In some embodiments, gift data sent by the spectator client is received by sending a gift sending instruction in response to the spectator client.
In some embodiments, as shown in fig. 7, generating real-time voting data based on the received gift data and the configuration information includes:
step S710: determining gift options corresponding to one or more gifts selected by a first viewer user of the at least one viewer user;
step S720: determining voting options corresponding to the determined gift options based on one-to-one correspondence between the plurality of voting options and the plurality of gift options;
step S730: updating the determined number of votes for the voting choice; and
step S740: and generating the real-time voting data based on the updated vote count.
In the process of obtaining the real-time voting data by the server, aiming at each audience user carrying out voting, the real-time voting data are obtained by determining one or more gift options corresponding to the gift selected by the audience user, determining the voting options corresponding to the gift options selected by the audience user based on one-to-one correspondence between the gift options and the voting options in the configuration information, and updating the number of votes corresponding to the voting options. In the whole process, the voting number is updated every time a voting option of a user is collected, and timeliness and accuracy of real-time voting data are guaranteed.
In some embodiments, the first viewer user may be any of the at least one viewer user.
According to another aspect of the present disclosure, there is also provided a voting method applied to a viewer client. As shown in fig. 8, a live room voting method 800 according to some embodiments of the present disclosure includes:
s810: receiving a live stream of a live broadcasting room pushed by a server, wherein the live stream comprises configuration information related to voting items, which is set on a client side of a host broadcasting user, and comprises a plurality of voting options, a plurality of gift options and one-to-one correspondence between the plurality of voting options and the plurality of gift options, and each gift option in the plurality of gift options corresponds to one or more gifts;
s820: generating gift data based on one or more selected gifts in response to a viewer user of the viewer client selecting one or more gifts from a plurality of gifts corresponding to the plurality of gift options; and
s830: and sending the gift data to the server.
The live broadcast stream of the live broadcast room pushed by the server is received, the live broadcast stream comprises configuration information related to voting items, the configuration information comprises a plurality of voting options, a plurality of gift options and a one-to-one correspondence relationship between the plurality of voting options and the plurality of gift options, each gift option in the plurality of gift options corresponds to one or more gifts, so that a spectator user can vote on the voting items set by a host user of the live broadcast room by selecting the gifts, on one hand, the realization method of the voting items is simple, on the other hand, the interestingness of the live broadcast process is also improved, the interactivity between the host user and the spectator user can be increased, and the user experience can be effectively improved.
Meanwhile, in the embodiment according to the present disclosure, the live stream of the live room pushed through the server includes configuration information, so that a separate network is not required for the process of receiving the configuration information by the viewer client. Meanwhile, the audience users can vote on the voting projects set by the anchor users by selecting the gift, and the voting can be realized without separately developing a voting system which needs to be arranged on the audience client side, so that the voting realization process is simple.
According to another aspect of the present disclosure, there is also provided a voting apparatus in a living room, as shown in fig. 9, an apparatus 900 including:
a control unit 910 configured to control the anchor client to display a voting setting interface for an anchor user of a living room to set configuration information related to a voting item, the configuration information including a plurality of voting options, a plurality of gift options, each of the plurality of gift options corresponding to one or more gifts, and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, the one or more gifts being selected by a viewer user viewing the living room via the viewer client to vote for the voting option corresponding to the gift option; and
A voting initiating unit 920 configured to initiate the voting items to a server so that the server provides the configuration information set by the anchor user in a live stream pushed to the audience client, thereby allowing the audience user to vote on a respective voting option of the plurality of voting options by selecting the respective one or more gifts in a live room interface displayed on the audience client.
According to another aspect of the present disclosure, there is also provided a direct broadcast room voting apparatus, as shown in fig. 10, an apparatus 1000 comprising:
a first receiving unit 1010 configured to receive configuration information set by an anchor user via an anchor client, the configuration information including a plurality of voting options, a plurality of gift options, and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, each of the plurality of gift options corresponding to one or more gifts for an audience user viewing the living room to select via the audience client to vote on the voting option corresponding to the gift option;
a second receiving unit 1020 configured to receive gift data transmitted by at least one viewer client, the gift data indicating that one or more gifts have been selected by a viewer user of the at least one viewer client; and
And a generating unit 1030 configured to generate real-time voting data indicating the number of votes corresponding to each of the plurality of voting options up to the current time, based on the received gift data and the configuration information.
According to another aspect of the present disclosure, there is also provided a direct broadcast room voting apparatus, as shown in fig. 11, an apparatus 1100 including:
a receiving unit 1110 configured to receive a live stream of a live broadcast room pushed by a server, where the live stream includes configuration information related to voting items set by a host user on a host client, the configuration information including a plurality of voting options, a plurality of gift options, and a one-to-one correspondence between the plurality of voting options and the plurality of gift options, and each of the plurality of gift options corresponds to one or more gifts;
a response unit 1120 configured to generate gift data based on one or more selected gifts in response to a viewer user of the viewer client selecting one or more gifts from a plurality of gifts corresponding to the plurality of gift options; and
a transmitting unit 1130 configured to transmit the gift data to the server.
According to another aspect of the present disclosure, there is also provided an electronic apparatus including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program which, when executed by the at least one processor, implements a method according to the above.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a method according to the above.
According to another aspect of the present disclosure, there is also provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements a method according to the above.
Referring to fig. 12, a block diagram of an electronic device 1200 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. The electronic devices may be different types of computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 12, the electronic device 1200 may include at least one processor 1210, a working memory 1220, an input unit 1240, a display unit 1250, a speaker 1260, a storage unit 1270, a communication unit 1280, and other output units 1290 that can communicate with each other through a system bus 1230.
Processor 1210 may be a single processing unit or multiple processing units, all of which may include a single or multiple computing units or multiple cores. Processor 1210 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. The processor 1210 may be configured to obtain and execute computer readable instructions stored in the working memory 1220, the storage unit 1270, or other computer readable medium, such as program code of the operating system 1220a, program code of the application programs 1220b, and the like.
The working memory 1220 and storage unit 1270 are examples of computer-readable storage media for storing instructions that are executed by the processor 1210 to perform the various functions described above. The working memory 1220 may include both volatile memory and nonvolatile memory (e.g., RAM, ROM, etc.). In addition, the storage unit 1270 may include hard disk drives, solid state drives, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CD, DVD), storage arrays, network attached storage, storage area networks, and the like. The working memory 1220 and storage unit 1270 may both be referred to herein collectively as memory or computer-readable storage medium, and may be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that may be executed by the processor 1210 as a particular machine configured to implement the operations and functions described in the examples herein.
The input unit 1240 may be any type of device capable of inputting information to the electronic device 1200, the input unit 1240 may receive input digital or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit may be any type of device capable of presenting information and may include, but is not limited to, a display unit 1250, a speaker 1260, and other output units 1290 may include, but are not limited to, video/audio output terminals, vibrators, and/or printers. Communication unit 1280 allows electronic device 1200 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The application 1220b in the working register 1220 may be loaded to perform the various methods and processes described above, such as step S110-step S120 in fig. 1. For example, in some embodiments, the live room voting method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1270. In some embodiments, some or all of the computer programs may be loaded onto and/or installed onto electronic device 1200 via storage unit 1270 and/or communication unit 1280. One or more of the steps of the live room voting method described above may be performed when the computer program is loaded and executed by the processor 1210. Alternatively, in other embodiments, processor 1210 may be configured to perform the live room voting method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.