CN113259704B - Live broadcast room initialization method, device, equipment and storage medium - Google Patents

Live broadcast room initialization method, device, equipment and storage medium Download PDF

Info

Publication number
CN113259704B
CN113259704B CN202110548667.5A CN202110548667A CN113259704B CN 113259704 B CN113259704 B CN 113259704B CN 202110548667 A CN202110548667 A CN 202110548667A CN 113259704 B CN113259704 B CN 113259704B
Authority
CN
China
Prior art keywords
terminal
room
information
user
target
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
CN202110548667.5A
Other languages
Chinese (zh)
Other versions
CN113259704A (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.)
Hangzhou Miluoxing Technology Group Co ltd
Original Assignee
Hangzhou Miluoxing Technology Group 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 Hangzhou Miluoxing Technology Group Co ltd filed Critical Hangzhou Miluoxing Technology Group Co ltd
Priority to CN202110548667.5A priority Critical patent/CN113259704B/en
Publication of CN113259704A publication Critical patent/CN113259704A/en
Application granted granted Critical
Publication of CN113259704B publication Critical patent/CN113259704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44213Monitoring of end-user related data
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • H04N21/6405Multicasting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Social Psychology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a live broadcasting room initialization method, device, equipment and storage medium, and relates to the technical field of network live broadcasting. The method is applied to the server and comprises the following steps: monitoring whether a user enters a target live broadcast room through a terminal; if yes, acquiring first information of a user, and caching the first information to a server; searching target information data matched with the terminal from the first information; and returning the target information data to the terminal so as to display the target information data at the terminal. According to the scheme, the first information is cached to the server, the server searches target information matched with the target interface call request from the cached first information according to the target interface call request sent by the terminal, and returns the target information to the terminal, so that initialization of inter-room information and user information in a living broadcast room is realized, the first information of the user does not need to be returned in a whole amount in each request, network consumption is reduced, and viewing experience of the user is improved.

Description

Live broadcast room initialization method, device, equipment and storage medium
Technical Field
The present invention relates to the field of network live broadcasting technologies, and in particular, to a method, an apparatus, a device, and a storage medium for initializing a live broadcasting room.
Background
With the improvement of network technology, the live broadcast industry is rapidly developed, and the types of live broadcast include: live broadcast of various living things such as electronic commerce, education, games and the like.
At present, when a user enters a live broadcast room, a nodejs channel is needed, and user information processing is performed at the nodejs channel end, so that the initialization operation of the live broadcast room is realized.
However, in all access requests processed by using the nodejs channel, the return information of each access request is repeatedly returned to the terminal, so that unnecessary useless information is returned in each request, most of data is redundant, the flow of requests in the live broadcasting room is greatly increased, and the viewing experience of users is influenced.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for initializing a live broadcasting room, aiming at the defects in the prior art, so as to reduce the flow of requests of the live broadcasting room and improve the viewing experience of users.
In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
in a first aspect, an embodiment of the present application provides a method for initializing a living room, which is applied to a server, and includes:
monitoring whether a user enters a target live broadcast room through a terminal;
if yes, acquiring first information of the user, and caching the first information to a server; wherein the first information includes: basic information of the user and room information of the target living room;
searching target information data matched with the terminal from the first information;
and returning the target information data to the terminal so as to display the target information data at the terminal.
Optionally, the searching the target information data matched with the terminal from the first information includes:
receiving a target interface calling request sent by the terminal;
and searching target information data matched with the terminal from the first information according to the target interface calling request.
Optionally, the method further comprises:
acquiring a room user message of the target live broadcasting room, and generating an identifier of the room user message;
and sending the identification of the room user message to the terminal so that the terminal obtains the room user message from the server according to the identification of the room user message.
Optionally, after the target information data is returned to the terminal, the method further includes:
and returning the first information to the terminal so that the terminal caches the first information.
Optionally, the monitoring whether the user enters the target live broadcast room includes:
receiving an entry request which is sent by the terminal and enters the target live broadcasting room;
establishing connection with the terminal according to the entry request;
acquiring a room entering message of a user entering the target live broadcasting room, which is broadcasted by the terminal through calling a room entering interface;
and determining that the user enters the target live broadcasting room according to the room entering message.
Optionally, the establishing a connection with the terminal according to the access request includes:
and establishing long connection with the terminal according to the entry request.
Optionally, the method further comprises:
receiving an exit request which is sent by the terminal and exits the target live broadcasting room;
disconnecting the connection with the terminal according to the exit request;
acquiring a room exit message of the target live broadcasting room, which is broadcasted by the terminal through calling a room exit interface, wherein the user exits the target live broadcasting room;
and determining that the user exits the target live broadcast room according to the room exit message.
In a second aspect, an embodiment of the present application further provides a live room initializing device, which is applied to a server, and includes: the device comprises a monitoring module, a cache module, a searching module and a returning module;
the monitoring module is used for monitoring whether a user enters a target live broadcasting room through a terminal;
the caching module is used for acquiring the first information of the user if yes, and caching the first information to a server; wherein the first information includes: basic information of the user and room information of the target living room;
the searching module is used for searching target information data matched with the terminal from the first information;
and the return module is used for returning the target information data to the terminal so as to display the target information data at the terminal.
Optionally, the search module is further configured to:
receiving a target interface calling request sent by the terminal;
and searching target information data matched with the terminal from the first information according to the target interface calling request.
Optionally, the apparatus further comprises: the device comprises an acquisition module and a sending module;
the acquisition module is used for acquiring the room user message of the target live broadcasting room and generating an identifier of the room user message;
the sending module is used for sending the identification of the room user message to the terminal so that the terminal obtains the room user message from the server according to the identification of the room user message.
Optionally, the cache module is further configured to:
and returning the first information to the terminal so that the terminal caches the first information.
Optionally, the monitoring module is further configured to:
receiving an entry request which is sent by the terminal and enters the target live broadcasting room;
establishing connection with the terminal according to the entry request;
acquiring a room entering message of a user entering the target live broadcasting room, which is broadcasted by the terminal through calling a room entering interface;
and determining that the user enters the target live broadcasting room according to the room entering message.
Optionally, the monitoring module is further configured to:
and establishing long connection with the terminal according to the entry request.
Optionally, the monitoring module is further configured to:
receiving an exit request which is sent by the terminal and exits the target live broadcasting room;
disconnecting the connection with the terminal according to the exit request;
acquiring a room exit message of the target live broadcasting room, which is broadcasted by the terminal through calling a room exit interface, wherein the user exits the target live broadcasting room;
and determining that the user exits the target live broadcast room according to the room exit message.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over a bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method as provided in the first aspect, and a bus.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as provided in the first aspect.
The beneficial effects of this application are:
the embodiment of the application provides a live broadcasting room initialization method, device, equipment and storage medium, which are applied to a server and comprise the following steps: monitoring whether a user enters a target live broadcast room through a terminal; if yes, acquiring first information of a user, and caching the first information to a server; wherein the first information includes: basic information of a user and room information of a target living room; searching target information data matched with the terminal from the first information; and returning the target information data to the terminal so as to display the target information data at the terminal. According to the scheme, the first information is cached to the server, the server searches target information data matched with the target interface call request from the cached first information according to the target interface call request sent by the terminal, and returns the target information data to the terminal so as to display the target information data at the terminal, so that initialization of inter-room information and user information in a living room is realized, the first information of the user does not need to be returned in a full quantity in each request, network consumption is reduced, and viewing experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a live room initialization system according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 3 is a flow chart of a method for initializing a living room according to an embodiment of the present application;
fig. 4 is a flow chart of another method for initializing a living room according to an embodiment of the present application;
fig. 5 is a flow chart of another method for initializing a living room according to an embodiment of the present application;
fig. 6 is a flow chart of another method for initializing a living room according to an embodiment of the present application;
fig. 7 is a flow chart of another method for initializing a living room according to an embodiment of the present application;
fig. 8 is an overall flow diagram of a live room initialization method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a live room initializing device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this application, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to the flow diagrams and one or more operations may be removed from the flow diagrams as directed by those skilled in the art.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but not to exclude the addition of other features.
The live room initialization method provided by the application is explained through a plurality of embodiments as follows.
Fig. 1 is a schematic structural diagram of a live room initialization system according to an embodiment of the present application; as shown in fig. 1, the live room initialization system 100 includes: one or more of the terminal 101, the server 102, and the network 103, the terminal 101 and the server 102 may include a processor for executing instruction operations.
In one implementation manner, for example, as shown in fig. 1, the terminal 101 and the server 102 are deployed and run independently in different electronic devices, for example, the terminal 101 may be a computer, a mobile internet device, a tablet, a mobile phone terminal, or the like, which has an operation function and a display function, and the server 102 is a processing device deployed in a server, and has a data processing function.
In another implementation manner, the terminal 101 and the server 102 may be disposed in the same electronic device, such as a processing device like a computer or a server, and have a data processing function and a visual interface, which are not specifically described in this embodiment.
In some embodiments, the live broadcast room initializing system 100 may include one or more terminals 101, where the terminals 101 may be electronic devices with operation functions and display functions, such as computers, mobile internet access devices, tablet terminals, mobile phone terminals, and the like, and the terminals 101 are installed with live broadcast applications, so that a user may enter a target live broadcast room with live broadcast applications pre-installed on the terminals 101 to watch various live broadcast videos.
The server 102 may be a terminal device or a computing device such as a server that has data processing functions.
For example, when the user a wants to enter the target live broadcasting room K through a live broadcasting application program pre-installed on the terminal 101, the terminal 101 and the server 102 establish long connection through nodejs, at this time, the terminal 101 invokes an in-room interface provided by itself, and broadcasts an in-room Message of the user a entering the target live broadcasting room K through an in-room interface using a Message Queue (MQ for short), and the server 102 determines that the user a has entered the target live broadcasting room K according to the monitored in-room Message; then, the server 102 invokes a related service module provided by itself to obtain first information of the user, and caches the first information to the server, where the first information includes: basic information of a user A and room information of a target living broadcasting room K, and searching target information data matched with a terminal from the first information; finally, the target information data is returned to the terminal, so that the target information data is conveniently displayed in the terminal 101, the service end 102 realizes the initialization of the first information of the user A by monitoring the action of the user A entering the live broadcasting room, the first information of the user A does not need to be returned in a full quantity in each request, the consumption of a network is reduced, and the viewing experience of the user is improved.
The network 103 may be used for the exchange of information and/or data, for example, the network 103 may be any type of wired or wireless network, or any combination thereof.
It is to be understood that the architecture shown in fig. 1 is illustrative only, and that the live room initialization system 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application; the electronic device may be, for example, a computer, a mobile internet device, a tablet, a mobile phone terminal, a computer, a server, or other processing devices with display functions and operation functions, where the electronic device is configured to operate the terminal 101 and the server 102 in fig. 1, so as to implement the live broadcasting room initialization method of the present application.
As shown in fig. 2, the server 102 includes a memory 201, a processor 202, and a communication unit 203. The memory 201, the processor 202 and the communication unit 203 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 201 stores therein a software function module stored in the memory 201 in the form of software or firmware (firmware), and the processor 202 executes various functional applications and data processing by running the software program and the module stored in the memory 201, that is, implements the information distribution processing method in the embodiment of the present invention.
The Memory 201 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), etc. The memory 201 is used for storing a program, and the processor 202 executes the program after receiving an execution instruction.
The processor 202 may be an integrated circuit chip with signal processing capabilities. The processor 202 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.
The communication unit 203 is configured to establish a communication connection between the terminal 101 and the server 102 through the network 103, so as to implement a transceiving operation of network signals and data information.
The implementation principle of the live room initialization method applied to the server step and the corresponding beneficial effects will be described below through a plurality of specific embodiments.
Fig. 3 is a flow chart of a method for initializing a living room according to an embodiment of the present application; the execution subject of the method is the server in fig. 1, and optionally, as shown in fig. 3, the method may include:
s301, monitoring whether a user enters a target live broadcast room through a terminal.
The terminal is provided with a live broadcast application program in advance, and a user A can click the live broadcast application program installed on the terminal to enter a target live broadcast room so as to watch live broadcast contents in the target live broadcast room.
When the user a clicks to enter the target live broadcast room, for example, the server may monitor whether the user a enters the target live broadcast room through the terminal through a monitoring module provided by the server, or acquire a room entering message broadcasted by the client a through calling a room entering interface, so as to determine whether the user a enters the target live broadcast room through the terminal.
S302, if yes, acquiring first information of a user, and caching the first information to a server.
Wherein the first information includes: basic information of the user and room information of the target living room.
In this example, the basic information of the user a may include: basic information such as user ID, nickname, head portrait, level, etc., and room information of the target living room may include: the state, identity, gift list in the target living room, the number of online people in the target living room, etc. of the user A in the target living room.
For example, after the server monitors that the user enters the target live broadcast room, the related service module is called to acquire the first information of the user. For example, the server may call the user basic information module to obtain basic information such as ID, nickname, avatar, etc. of the user; for another example, the server side invokes the room status information module to obtain room status information such as an administrator of the target living broadcast room, intimacy between the user and the target living broadcast room, whether the user is stealth in the target living broadcast room, and a gift list in the target living broadcast room.
In order to avoid the problem of redundancy of most data caused by repeatedly returning the first information to the terminal in the returned information of each request, the first information may be optionally cached in a redis cache provided by the server, where the redis cache refers to a non-relational database.
S303, searching target information data matched with the terminal from the first information.
In this embodiment, target information data matched with the terminal is searched from the first information, and there are two cases, specifically as follows:
in the first case, after the first information is cached in the redis cache provided by the server, the server can search the cached first information for target information data matched with the target interface call request according to the target interface call request sent by the terminal, so that the first information is prevented from being repeatedly returned to the terminal by the return information of each access request, and network consumption is saved.
In the second case, after the first information is cached in the redis cache provided by the server, the server may choose to return the first information to the terminal, so as to cache the first information to the local terminal, so that the terminal may search, according to the actual operation requirement of the user, the target information data that matches the operation requirement of the user at the terminal from the first information that has been cached to the local terminal, for example, the first information of the user includes: and the user nickname, the head portrait, the grade, the medal and the like are cached to the local of the terminal, and the actual operation requirement of the user of the terminal only displays the user nickname and the head portrait, so that the user nickname and the head portrait are selected from the user nickname, the head portrait, the grade and the medal which are only needed, and then the user nickname and the head portrait are displayed on the terminal.
S304, returning the target information data to the terminal so as to display the target information data at the terminal.
Aiming at the first condition, after target information data matched with the terminal is searched, the target information data is required to be returned to the terminal so as to be displayed at the terminal, the initialization of the inter-room information and the user information in the living broadcast room is realized, the consistency of the initialization of the first information of the user A can be ensured, the first information of the user is not required to be returned in a full quantity in each request, the consumption of a network is reduced, and the viewing experience of the user is improved.
In summary, the embodiment of the present application provides a live room initialization method, which is applied to a server, and includes: monitoring whether a user enters a target live broadcast room through a terminal; if yes, acquiring first information of a user, and caching the first information to a server; wherein the first information includes: basic information of a user and room information of a target living room; searching target information data matched with the terminal from the first information; and returning the target information data to the terminal so as to display the target information data at the terminal. According to the scheme, the first information is cached to the server, the server searches target information data matched with the target interface call request from the cached first information according to the target interface call request sent by the terminal, and returns the target information data to the terminal so as to display the target information data at the terminal, so that initialization of inter-room information and user information in a living room is realized, the first information of the user does not need to be returned in a full quantity in each request, network consumption is reduced, and viewing experience of the user is improved.
How to search for target information data matching a terminal from the first information will be specifically explained by the following embodiment.
Fig. 4 is a flow chart of another method for initializing a living room according to an embodiment of the present application; optionally, step S303 is described above: searching target information data matched with the terminal from the first information, wherein the target information data comprises:
s401, receiving a target interface call request sent by a terminal.
For example, when the terminal needs to acquire the user basic information, the terminal may directly call the user information interface provided by the terminal itself, and send a call "user information interface request" to the server.
S402, searching target information data matched with the terminal from the first information according to the target interface call request.
On the basis of the above embodiment, after receiving the "user information interface request" sent by the terminal, the server searches the first information for the user basic information data matched with the "user information interface request" sent by the terminal according to the "user information interface request", and returns the user basic information data to the terminal, so that the terminal can buffer or display the acquired user basic information.
Fig. 5 is a flow chart of another method for initializing a living room according to an embodiment of the present application; optionally, step S303 is described above: searching target information data matched with the terminal from the first information, wherein the target information data comprises:
s501, acquiring a room user message of the target living room, and generating an identification of the room user message.
Illustratively, during the same time period, user a enters the target live room K through the first terminal, and user B also enters the target live room K through the second terminal.
The room user message refers to a message that the user B in the target living room gives a gift to the host through the second terminal. At this time, the server needs to actively notify the user a passing through the first terminal of the gift sending message of the target live broadcasting room K.
In this embodiment, after acquiring the room user message of the target live broadcasting room K, the server may generate the unique identifier of the room user message according to the ID of the second terminal user B.
S502, the identification of the room user message is sent to the terminal, so that the terminal obtains the room user message from the server according to the identification of the room user message.
On the basis of the embodiment, the server side can send the generated identification of the room user message to the first terminal, so that the first terminal directly calls the gift recording interface provided by the first terminal according to the identification of the room user message, sends a request for calling the gift recording interface to the server side, and after receiving the request of the gift recording interface sent by the terminal, the server side acquires the room user message and returns the room user message to the terminal, so that the terminal can acquire the room user message from the server side in time according to the identification of the room user message.
Optionally, after returning the target information data to the terminal, the method further includes:
and returning the first information to the terminal so that the terminal caches the first information.
In this embodiment, in order to facilitate that the terminal may locally obtain, according to the actual operation requirement of the user, target information matching with the actual operation requirement of the user from the terminal may be considered. Therefore, after receiving the first information, the terminal can buffer the first information to the terminal, and acquire the first information again from the server after the first information is out of date in a timing way, so that the first information can be updated in time.
How to monitor whether a user enters a target live room will be explained in detail by the following embodiments.
Fig. 6 is a flow chart of another method for initializing a living room according to an embodiment of the present application; optionally, step S301 is described above: monitoring whether a user enters a target live broadcast room comprises the following steps:
s601, receiving an entry request for entering a target live broadcast room sent by a terminal.
The terminal is provided with a live broadcast application program in advance, and a user A can click the live broadcast application program installed on the terminal to enter a target live broadcast room so as to watch live broadcast contents in the target live broadcast room.
S602, establishing connection with the terminal according to the entry request.
Optionally, a long connection with the terminal is established according to the incoming request.
For example, when the user a clicks the operation of entering the target live broadcast room K, the terminal sends an entering request for entering the target live broadcast room K to the server, and after receiving the entering request sent by the terminal, the server establishes a long connection with the terminal through a nodejs channel.
S603, acquiring a room entering message of a target live broadcasting room entering by a user broadcasted by the terminal through calling a room entering interface.
S604, determining that the user has entered the target living room according to the room entering message.
Optionally, after the server establishes long connection with the terminal through the nodejs channel, the terminal invokes the "enter room interface" provided by the terminal, and broadcasts the enter room message of the user A entering the target live broadcasting room K through the "enter room interface" MQ, if the server monitors the enter room message of the user A entering the target live broadcasting room K through the "monitoring module" provided by the terminal, the user A can be determined to have entered the target live broadcasting room K.
Fig. 7 is a flow chart of another method for initializing a living room according to an embodiment of the present application; optionally, step S301 is described above: monitoring whether the user enters the target live broadcasting room or not, and further comprising:
s701, receiving an exit request of exiting a target live broadcast room sent by a terminal.
S702, disconnecting the connection with the terminal according to the exit request.
For example, when the user a clicks the operation of exiting the target live broadcast room, the terminal sends an exit request of exiting the target live broadcast room to the server, and the server immediately disconnects the terminal after receiving the exit request sent by the terminal.
S703, acquiring a room exit message of the user exit target live broadcasting room broadcasted by the terminal through calling the room exit interface.
S704, determining that the user exits the target live broadcasting room according to the room exit message.
Optionally, after the server side disconnects with the terminal, the terminal invokes the 'exit room interface' provided by the terminal, broadcasts an exit room message of the user A exiting the target live broadcasting room K through the 'exit room interface' MQ, if the server side monitors the exit room message of the user, the server side can determine that the user has exited the target live broadcasting room, and directly removes the redis cache of the server side.
In addition, if the user reenters the target live broadcasting room K, the first information of the user needs to be re-acquired and initialized, and the first information of the user is cached in the server redis.
The overall step procedure of the live room initialization method provided in the present application will be specifically explained by the following embodiments.
Fig. 8 is an overall flow diagram of a live room initialization method according to an embodiment of the present application; applied to the server, optionally, as shown in fig. 8, the method includes:
s801, receiving an entry request for entering a target live broadcast room sent by a terminal.
S802, establishing long connection with the terminal according to the access request.
S803, acquiring a room entering message of a target live broadcast room entering by the user broadcasted by the terminal through calling the room entering interface.
S804, determining that the user has entered the target living room according to the room entering message.
S805, obtaining first information of the user, and caching the first information to the server.
S806, receiving a target interface call request sent by the terminal, and searching target information data matched with the terminal from the first information according to the target interface call request.
And S807, returning the target information data to the terminal so as to display the target information data at the terminal.
Optionally, the first information may also be returned to the terminal, so that the terminal caches the first information, and according to the requirement of the terminal, the corresponding data is selected from the cache and displayed.
S808, acquiring the room user message of the target living room, and generating the identification of the room user message.
S809, the identification of the room user information is sent to the terminal, so that the terminal obtains the room user information from the server according to the identification of the room user information, and the room user information is returned to the terminal, so that the terminal caches and displays the room user information.
Optionally, the overall implementation steps and the generated beneficial effects of the live broadcast room initialization method provided in the embodiment of the present application have been described in detail in the foregoing specific embodiments, which are not described in detail herein.
The following describes the live broadcast room initializing device, the storage medium and the like for executing the live broadcast room initializing device, the storage medium and the like provided by the application, and specific implementation processes and technical effects of the live broadcast room initializing device are referred to above and are not repeated.
Fig. 9 is a schematic structural diagram of a live room initializing device according to an embodiment of the present application; as shown in fig. 9, the embodiment of the present application further provides a live room initializing device, which is applied to a server, and the device includes: a listening module 901, a caching module 902, a searching module 903, and a returning module 904.
The monitoring module 901 is used for monitoring whether a user enters a target live broadcast room through a terminal;
the caching module 902 is configured to obtain first information of a user if the first information is yes, and cache the first information to a server; wherein the first information includes: basic information of a user and room information of a target living room;
a searching module 903, configured to search target information data matched with the terminal from the first information;
and the return module 904 is configured to return the target information data to the terminal, so as to display the target information data at the terminal.
Optionally, the search module 903 is further configured to:
receiving a target interface calling request sent by a terminal;
and searching target information data matched with the terminal from the first information according to the target interface calling request.
Optionally, the apparatus further comprises: the device comprises an acquisition module and a sending module;
the acquisition module is used for acquiring the room user information of the target live broadcasting room and generating an identifier of the room user information;
and the sending module is used for sending the identification of the room user message to the terminal so that the terminal can acquire the room user message from the server according to the identification of the room user message.
Optionally, the return module 904 is further configured to:
and returning the first information to the terminal so that the terminal caches the first information.
Optionally, the listening module 901 is further configured to:
receiving an entry request for entering a target live broadcast room sent by a terminal;
establishing connection with a terminal according to the access request;
acquiring a room entering message of a target living broadcast room entering user broadcasted by a terminal through calling a room entering interface;
and determining that the user enters the target living broadcast room according to the room entering message.
Optionally, the listening module 901 is further configured to:
and establishing a long connection with the terminal according to the access request.
Optionally, the listening module 901 is further configured to:
receiving an exit request for exiting a target live broadcast room sent by a terminal;
disconnecting the connection with the terminal according to the exit request;
acquiring a room exit message of a user exit target living broadcast room broadcasted by a terminal through calling an exit room interface;
and determining that the user exits the target live room according to the room exit message.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more microprocessors (digital singnal processor, abbreviated as DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Optionally, the present invention also provides a program product, such as a computer readable storage medium, comprising a program for performing the above-described method embodiments when being executed by a processor.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

Claims (8)

1. The live broadcasting room initialization method is characterized by being applied to a server and comprising the following steps:
monitoring whether a user enters a target live broadcast room through a terminal;
if yes, acquiring first information of the user, and caching the first information to a non-relational database of a server; wherein the first information includes: basic information of the user and room information of the target living room; the basic information includes: the unique code, nickname, head portrait, and level of the user; the room information includes: the state and the identity of the user in the target living broadcast room, a gift list in the target living broadcast room and the number of online people in the target living broadcast room;
searching target information data matched with the terminal from the first information cached in the non-relational database;
returning the target information data to the terminal so as to display the target information data at the terminal;
after the target information data is returned to the terminal, the method further comprises the following steps:
returning the first information to the terminal so that the terminal caches the first information;
the searching the target information data matched with the terminal from the first information comprises the following steps:
receiving a user information interface request sent by the terminal, and searching user basic information data matched with the user information interface request sent by the terminal from the first information according to the user information interface request;
and receiving a gift certificate interface request sent by the terminal, and searching room information matched with the gift certificate interface request sent by the terminal from the first information according to the gift certificate interface request.
2. The method as recited in claim 1, further comprising:
acquiring a room user message of the target live broadcasting room, and generating an identifier of the room user message;
and sending the identification of the room user message to the terminal so that the terminal obtains the room user message from the server according to the identification of the room user message.
3. The method according to any of claims 1-2, wherein the monitoring whether the user enters a target live room comprises:
receiving an entry request which is sent by the terminal and enters the target live broadcasting room;
establishing connection with the terminal according to the entry request;
acquiring a room entering message of a user entering the target live broadcasting room, which is broadcasted by the terminal through calling a room entering interface;
and determining that the user enters the target live broadcasting room according to the room entering message.
4. A method according to claim 3, wherein said establishing a connection with said terminal in accordance with said incoming request comprises:
and establishing long connection with the terminal according to the entry request.
5. A method as claimed in claim 3, further comprising:
receiving an exit request which is sent by the terminal and exits the target live broadcasting room;
disconnecting the connection with the terminal according to the exit request;
acquiring a room exit message of the target live broadcasting room, which is broadcasted by the terminal through calling a room exit interface, wherein the user exits the target live broadcasting room;
and determining that the user exits the target live broadcast room according to the room exit message.
6. A live room initializing device, which is applied to a server, and comprises: the device comprises a monitoring module, a cache module, a searching module and a returning module;
the monitoring module is used for monitoring whether a user enters a target live broadcasting room through a terminal;
the caching module is used for acquiring the first information of the user if yes, and caching the first information to a non-relational database of a server; wherein the first information includes: basic information of the user and room information of the target living room; the basic information includes: the unique code, nickname, head portrait, and level of the user; the room information includes: the state and the identity of the user in the target living broadcast room, a gift list in the target living broadcast room and the number of online people in the target living broadcast room;
the searching module is used for searching target information data matched with the terminal from the first information cached in the non-relational database;
the return module is used for returning the target information data to the terminal so as to display the target information data at the terminal;
the buffer module is further configured to return the first information to the terminal after the target information data is returned to the terminal, so that the terminal buffers the first information;
the searching module is further used for receiving a user information interface request sent by the terminal, searching user basic information data matched with the user information interface request sent by the terminal from the first information according to the user information interface request; and receiving a gift certificate interface request sent by the terminal, and searching room information matched with the gift certificate interface request sent by the terminal from the first information according to the gift certificate interface request.
7. An electronic device, comprising: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium in communication over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the method of any one of claims 1-5.
8. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1-5.
CN202110548667.5A 2021-05-19 2021-05-19 Live broadcast room initialization method, device, equipment and storage medium Active CN113259704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110548667.5A CN113259704B (en) 2021-05-19 2021-05-19 Live broadcast room initialization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110548667.5A CN113259704B (en) 2021-05-19 2021-05-19 Live broadcast room initialization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113259704A CN113259704A (en) 2021-08-13
CN113259704B true CN113259704B (en) 2023-06-09

Family

ID=77183029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110548667.5A Active CN113259704B (en) 2021-05-19 2021-05-19 Live broadcast room initialization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113259704B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003496A (en) * 2021-10-29 2022-02-01 北京达佳互联信息技术有限公司 Data processing method, device, system, storage medium and program product
CN114302244B (en) * 2021-12-30 2023-12-12 杭州米络星科技(集团)有限公司 Information interaction method, device, server and storage medium
CN114466216B (en) * 2022-02-15 2023-11-03 上海哔哩哔哩科技有限公司 Live broadcast room display method, server side and live broadcast client side

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038116B1 (en) * 2009-12-28 2015-05-19 Akamai Technologies, Inc. Method and system for recording streams
CN108495195A (en) * 2018-03-13 2018-09-04 武汉斗鱼网络科技有限公司 A kind of network direct broadcasting ranking list generation method, device, equipment and storage medium
CN110213628A (en) * 2018-05-14 2019-09-06 腾讯科技(深圳)有限公司 Direct broadcasting room distribution method and server
CN110324692A (en) * 2018-03-30 2019-10-11 武汉斗鱼网络科技有限公司 The direct broadcasting room processing method and processing device of video is played for realizing small window
CN110798696A (en) * 2019-11-18 2020-02-14 广州虎牙科技有限公司 Live broadcast interaction method and device, electronic equipment and readable storage medium
CN110971596A (en) * 2019-11-25 2020-04-07 广州虎牙科技有限公司 Message monitoring method and device, electronic equipment and machine-readable storage medium
CN111277847A (en) * 2020-01-21 2020-06-12 香港乐蜜有限公司 Method, device, server and system for displaying chat messages in live broadcast
CN112165625A (en) * 2020-09-23 2021-01-01 百果园技术(新加坡)有限公司 Live broadcast room display method, system, equipment and medium
CN112752114A (en) * 2020-12-28 2021-05-04 北京达佳互联信息技术有限公司 Method and device for generating live broadcast playback interactive message, server and storage medium
WO2021082584A1 (en) * 2019-10-30 2021-05-06 北京字节跳动网络技术有限公司 Message exchange method and apparatus, readable medium, and electronic device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9729833B1 (en) * 2014-01-17 2017-08-08 Cerner Innovation, Inc. Method and system for determining whether an individual takes appropriate measures to prevent the spread of healthcare-associated infections along with centralized monitoring
CN106487781B (en) * 2016-09-13 2020-12-22 腾讯科技(深圳)有限公司 Resource data processing method, device and system based on live broadcast
CN106651497A (en) * 2016-09-29 2017-05-10 广州华多网络科技有限公司 Method and device for sending gift identification list
JP6817060B2 (en) * 2016-12-28 2021-01-20 アース製薬株式会社 Disinfectant
CN106878761B (en) * 2017-04-14 2019-08-02 武汉斗鱼网络科技有限公司 Living broadcast interactive method, apparatus and server
CN108063981B (en) * 2017-12-26 2020-06-30 广州酷狗计算机科技有限公司 Method and device for setting attributes of live broadcast room
US20200099962A1 (en) * 2018-09-20 2020-03-26 Facebook, Inc. Shared Live Audio
CN110753270B (en) * 2019-10-16 2022-06-10 北京达佳互联信息技术有限公司 Information display method, device, terminal, server, system and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038116B1 (en) * 2009-12-28 2015-05-19 Akamai Technologies, Inc. Method and system for recording streams
CN108495195A (en) * 2018-03-13 2018-09-04 武汉斗鱼网络科技有限公司 A kind of network direct broadcasting ranking list generation method, device, equipment and storage medium
CN110324692A (en) * 2018-03-30 2019-10-11 武汉斗鱼网络科技有限公司 The direct broadcasting room processing method and processing device of video is played for realizing small window
CN110213628A (en) * 2018-05-14 2019-09-06 腾讯科技(深圳)有限公司 Direct broadcasting room distribution method and server
WO2021082584A1 (en) * 2019-10-30 2021-05-06 北京字节跳动网络技术有限公司 Message exchange method and apparatus, readable medium, and electronic device
CN110798696A (en) * 2019-11-18 2020-02-14 广州虎牙科技有限公司 Live broadcast interaction method and device, electronic equipment and readable storage medium
CN110971596A (en) * 2019-11-25 2020-04-07 广州虎牙科技有限公司 Message monitoring method and device, electronic equipment and machine-readable storage medium
CN111277847A (en) * 2020-01-21 2020-06-12 香港乐蜜有限公司 Method, device, server and system for displaying chat messages in live broadcast
CN112165625A (en) * 2020-09-23 2021-01-01 百果园技术(新加坡)有限公司 Live broadcast room display method, system, equipment and medium
CN112752114A (en) * 2020-12-28 2021-05-04 北京达佳互联信息技术有限公司 Method and device for generating live broadcast playback interactive message, server and storage medium

Also Published As

Publication number Publication date
CN113259704A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN113259704B (en) Live broadcast room initialization method, device, equipment and storage medium
CN113727406B (en) Communication control method, device, equipment and computer readable storage medium
CN111870936B (en) Cross-service game realization method and device, server and storage medium
CN110535961B (en) Resource acquisition method and device, electronic equipment and storage medium
CN109275042B (en) Bullet screen message distribution method, bullet screen message distribution device, terminal and storage medium
CN112492372B (en) Comment message display method and device, electronic equipment, system and storage medium
CN111246238A (en) Live broadcast method, device, storage medium and live broadcast system
CN113660168B (en) Multi-center research data processing method and device and server
CN113765774B (en) Method, device, electronic equipment and medium for synchronizing messages in real time
CN113312566A (en) Live broadcast room list display method, device, equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN112838980A (en) Message processing method, system, device, electronic equipment and storage medium
KR101226991B1 (en) Advertising system using push notification, advertising method performed on advertising system and computing device for advertisement using push notification
CN110545296A (en) Log data acquisition method, device and equipment
CN113891441A (en) Network connection method and device and electronic equipment
US10530821B2 (en) Distribution and reception method, and system
CN109726026B (en) Interactive data processing method, device, equipment and storage medium
CN112163237A (en) Data processing method and device and electronic equipment
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN106778353B (en) Method and apparatus for saving messages
CN107181772B (en) Method and device for updating client state on line in real time
CN112073747A (en) Streaming media data preview method, user end equipment and relay server
CN112291216A (en) Communication method and device and electronic equipment
CN112822225A (en) Method and device for tracking content delivery effect
CN103607338A (en) Target object broadcasting method, device and system based on virtualization technology

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