CN111107389A - Method, device and system for determining live broadcast watching time length - Google Patents

Method, device and system for determining live broadcast watching time length Download PDF

Info

Publication number
CN111107389A
CN111107389A CN201911416038.6A CN201911416038A CN111107389A CN 111107389 A CN111107389 A CN 111107389A CN 201911416038 A CN201911416038 A CN 201911416038A CN 111107389 A CN111107389 A CN 111107389A
Authority
CN
China
Prior art keywords
notification
live broadcast
time length
watching
determining
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.)
Granted
Application number
CN201911416038.6A
Other languages
Chinese (zh)
Other versions
CN111107389B (en
Inventor
周林军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201911416038.6A priority Critical patent/CN111107389B/en
Publication of CN111107389A publication Critical patent/CN111107389A/en
Application granted granted Critical
Publication of CN111107389B publication Critical patent/CN111107389B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26233Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving content or additional data duration or size, e.g. length of a movie, size of an executable file

Landscapes

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

Abstract

The application discloses a method, a device and a system for determining live broadcast watching time length, and belongs to the technical field of internet. The method comprises the following steps: receiving a joining request corresponding to the target live broadcast room sent by a terminal, joining a login account of the terminal into the target live broadcast room, and sending a live broadcast video stream of the target live broadcast room to the terminal; receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room; when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification; and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last. By the method and the device, the accuracy of the live broadcast watching time length of the user recorded by the server can be improved.

Description

Method, device and system for determining live broadcast watching time length
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, and a system for determining a viewing duration of a user.
Background
With the development of internet technology, live broadcast watching is a very common entertainment mode for people at present. The live broadcast platform can record the time length of the user watching the live broadcast video of the anchor broadcast, and display the account corresponding to the user with longer watching time length on the live broadcast page of the anchor broadcast. Therefore, interaction between the anchor and the user is increased, and live broadcast watching experience of the user is improved.
In the prior art, the mode of recording the watching duration of the user by the live broadcast platform can be reported through the terminal of the user. That is, the user can send the entry time to the server when entering the anchor live broadcast room, and can send the exit time to the server when exiting the anchor live broadcast room, and the server can calculate the live broadcast watching duration of the user according to the entry time and the exit time reported by the user terminal.
In the process of implementing the present application, the inventor finds that the prior art has at least the following problems:
when the terminal of the user reports the entry time and the exit time to the server, the reported time can be modified through a third-party application program, so that the time recorded by the server is not accurate enough.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for determining the watching duration of a user, and can solve the problem that the live broadcasting watching duration recorded by a server is not accurate enough due to the fact that a third-party program maliciously modifies the time of a terminal. The technical scheme is as follows:
in one aspect, a method for determining a live viewing time duration is provided, where the method includes:
when the trigger operation of joining the target live broadcast room is detected, a joining request corresponding to the target live broadcast room is sent to a server;
receiving and playing the live broadcast video stream of the target live broadcast room sent by the server, and sending a watching notification to the server according to a preset period;
and when the triggering operation of exiting the target live broadcast room is detected, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
Optionally, in the process of receiving and playing the live video stream of the target live broadcast room, sending a viewing notification to the server according to a preset period includes:
in the process of receiving and playing the live broadcast video stream of the target live broadcast room, determining a first time length for playing the live broadcast video stream of the target live broadcast room when a preset period is reached, determining a notification sequence identifier corresponding to the current period, and sending a watching notification carrying the first time length and the notification sequence identifier to the server;
when the trigger operation of quitting the target live broadcast room is detected, the step of sending a quit notification corresponding to the target live broadcast room to the server comprises the following steps:
when the trigger operation of exiting the target live broadcast room is detected, determining a second time length for playing the live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in a watching notification sent last time, and sending an exiting notification carrying the second time length and the current notification sequence identifier to the server.
In another aspect, a method for determining a user viewing duration is provided, the method comprising:
receiving a joining request corresponding to the target live broadcast room sent by a terminal, joining a login account of the terminal into the target live broadcast room, and sending a live broadcast video stream of the target live broadcast room to the terminal;
receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room;
when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification;
and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
Optionally, the watching notification carries a first duration and a notification sequence identifier, and the quitting notification carries a second duration and a notification sequence identifier;
determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quitting notification, wherein the determining comprises the following steps:
determining live broadcast watching time length based on the second time length, the notification sequence identification in the quit notification, the period and a third time length between the receiving time of the joining request and the receiving time of the quit notification;
determining a live broadcast watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last comprises the following steps:
and determining the live broadcast watching time length based on the first time length, the notification sequence identifier in the watching notification, the period and a fourth time length between the receiving time of the joining request and the receiving time of the watching notification received last.
Optionally, the determining a live broadcast watching duration based on the second duration, the notification sequence identifier in the exit notification, the period, and a third duration between the receiving time of the join request and the receiving time of the exit notification includes:
determining a first product of a notification order identification in the exit notification and the period;
if the absolute value of the difference between the first product and the second time length is smaller than the period, and the absolute value of the difference between the second time length and the third time length is smaller than a preset threshold, determining the second time length as a live broadcast watching time length;
and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
Optionally, the determining, based on the first duration, the notification sequence identifier in the viewing notification, the period, and a fourth duration between the receiving time of the join request and the receiving time of the last received viewing notification, a live viewing duration includes:
determining a second product of a notification order identification in the viewing notification and the period;
if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than the preset threshold, determining the first time length as the live broadcast watching time length;
and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than the preset threshold, determining that the third time length is the live broadcast watching time length.
In another aspect, an apparatus for determining a live viewing duration is provided, the apparatus including:
the device comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is configured to send a joining request corresponding to a target live broadcast room to a server when a triggering operation of joining the target live broadcast room is detected;
the second sending module is configured to receive and play the live video stream of the target live broadcast room sent by the server, and send a watching notification to the server according to a preset period;
and the third sending module is configured to send a quit notification corresponding to the target live broadcast room to the server and quit the target live broadcast room when the triggering operation of quitting the target live broadcast room is detected.
Optionally, the second sending module is configured to:
in the process of receiving and playing the live broadcast video stream of the target live broadcast room, determining a first time length for playing the live broadcast video stream of the target live broadcast room when a preset period is reached, determining a notification sequence identifier corresponding to the current period, and sending a watching notification carrying the first time length and the notification sequence identifier to the server;
the third sending module configured to:
when the trigger operation of exiting the target live broadcast room is detected, determining a second time length for playing the live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in a watching notification sent last time, and sending an exiting notification carrying the second time length and the current notification sequence identifier to the server.
In another aspect, an apparatus for determining a viewing duration of a user is provided, the apparatus comprising:
the first receiving module is configured to receive a joining request which is sent by a terminal and corresponds to the target live broadcast room, join a login account of the terminal into the target live broadcast room, and send a live broadcast video stream of the target live broadcast room to the terminal;
the second receiving module is configured to receive a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room;
the first determination module is configured to determine live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quitting notification when the quitting notification sent by the terminal is received;
a second determination module configured to determine a viewing live time period based on a reception time of the join request and a reception time of a last received viewing notification when no other viewing notification or exit notification is received within a preset time period after the viewing notification is received.
Optionally, the watching notification carries a first duration and a notification sequence identifier, and the quitting notification carries a second duration and a notification sequence identifier;
the first determination module configured to:
determining live broadcast watching time length based on the second time length, the notification sequence identification in the quit notification, the period and a third time length between the receiving time of the joining request and the receiving time of the quit notification;
the second determination module configured to:
and determining the live broadcast watching time length based on the first time length, the notification sequence identifier in the watching notification, the period and a fourth time length between the receiving time of the joining request and the receiving time of the watching notification received last.
Optionally, the first determining module is configured to:
determining a first product of a notification order identification in the exit notification and the period;
if the absolute value of the difference between the first product and the second time length is smaller than the period, and the absolute value of the difference between the second time length and the third time length is smaller than a preset threshold, determining the second time length as a live broadcast watching time length;
and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
Optionally, the second determining module is configured to:
determining a second product of a notification order identification in the viewing notification and the period;
if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than the preset threshold, determining the first time length as the live broadcast watching time length;
and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than the preset threshold, determining that the third time length is the live broadcast watching time length.
In another aspect, a system for determining a viewing duration of a user is provided, where the system includes a terminal and a server, and where:
the terminal sends a joining request corresponding to the target live broadcast room to the server when detecting a triggering operation of joining the target live broadcast room; receiving and playing the live broadcast video stream of the target live broadcast room sent by the server, and sending a watching notification to the server according to a preset period; and when the triggering operation of exiting the target live broadcast room is detected, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
The server receives a joining request corresponding to the target live broadcast room sent by the terminal, joins a login account of the terminal to the target live broadcast room, and sends a live broadcast video stream of the target live broadcast room to the terminal; receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room; when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification; and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
In yet another aspect, a computer device is provided and includes a processor and a memory, where at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the method for determining a viewing live time length as described above.
In yet another aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the operations performed by the method for determining the viewing live time length as described above.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
the method comprises the steps that a watching notice is sent to a server according to a preset period all the time in the process of playing a live video of an anchor broadcast through a terminal, an exit notice is sent to the server when the live video exits from a live broadcast room of the anchor broadcast, the server can record the time of receiving the watching notice and the exit notice each time, then the time for watching the live broadcast by a user is determined through the receiving time of receiving the watching notice or the exit notice, the time provided by the terminal is not needed, therefore, the time for a third-party program to modify the terminal maliciously can be prevented, and the accuracy of the time for the server to record the time for the.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for determining a live broadcast watching time length according to an embodiment of the present application;
fig. 2 is a flowchart of a method for determining a live broadcast watching time length according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a method for determining a live broadcast watching time length according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus for determining a live broadcast watching time length according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for determining a live broadcast watching time according to an embodiment of the present application;
fig. 6 is a schematic diagram of a terminal structural framework provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method for acquiring the live broadcast watching time length of the user can be realized by the terminal and the server together. The terminal can operate the application that has the live function, and the terminal can possess parts such as microphone, earphone, speaker, camera, and the terminal has communication function, can insert the internet, and the terminal can be cell-phone, panel computer, intelligent wearing equipment, desktop computer, notebook computer etc.. The server can be a background server of the application program, and the server can be communicated with the terminal. The server may be a single server or a server group, and if the server is a single server, the server may be responsible for all processing in the following scheme, and if the server is a server group, different servers in the server group may be respectively responsible for different processing in the following scheme, and the specific processing allocation condition may be arbitrarily set by a technician according to actual needs, and is not described herein again.
Watching live is now a very common way of entertainment. The anchor and the user can apply for accounts in the network live broadcast platform, and log the accounts in corresponding live broadcast application programs at the terminal. The anchor can gather own live broadcast video through equipment such as the camera of terminal, microphone to upload the live broadcast video to the server. The user can log in own account in the live broadcast application program, and can click a live broadcast room corresponding to a live broadcast in the live broadcast application program, and then the server sends the live broadcast video of the live broadcast to a terminal logged in by the live broadcast account according to the account of the current live broadcast room for watching the live broadcast. The user can then watch the live video of the anchor through the terminal. In addition, the live broadcast platform can also calculate the live time of each account for watching the anchor live broadcast, and the intimacy between the anchor and the user can be increased by calculating the time, so that the interaction between the anchor and the user is increased. The method and the device for determining the watching duration of the user can judge the watching duration preventing the user from modifying the report through the third-party malicious program, and can calculate the watching duration of the user watching the live broadcast of the anchor broadcast more accurately. The method for acquiring the live broadcast watching time length of the user can accurately acquire the live broadcast watching time length of the user each time,
fig. 1 is a flowchart of a method for determining a live viewing time length according to an embodiment of the present application. This embodiment can be used for watching a terminal of a main broadcast, and referring to fig. 1, the embodiment includes:
step 101, when detecting a trigger operation of joining a target live broadcast room, sending a joining request corresponding to the target live broadcast room to a server.
And 102, receiving and playing a live video stream of a target live broadcast room sent by a server, and sending a watching notification to the server according to a preset period.
And 103, when detecting the triggering operation of exiting the target live broadcast room, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
Fig. 2 is a flowchart of a method for determining a live viewing time length according to an embodiment of the present application. This embodiment may be used for the server corresponding to the terminal, and referring to fig. 2, the embodiment includes:
step 201, receiving a join request of a corresponding target live broadcast room sent by a terminal, joining a login account of the terminal into the target live broadcast room, and sending a live broadcast video stream of the target live broadcast room to the terminal.
Step 202, receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room.
And step 203, when receiving the quit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quit notification.
And step 204, when no other watching notification or quit notification is received within the preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
Fig. 3 is a flowchart of a method for determining a live viewing time duration according to an embodiment of the present application. In this embodiment, referring to fig. 1, the interaction between a terminal for watching a main broadcast and a corresponding server includes:
step 301, when the terminal detects the trigger operation of joining the target live broadcast room, sending a joining request corresponding to the target live broadcast room to the server.
In implementation, a user can operate the terminal to open a live application program and log in an account of the user, and a live room cover of a plurality of live anchor programs can be displayed in the live application program. The trigger operation of joining the target live broadcast room can be that a user selects and clicks one of the anchor live broadcast room covers, or clicks a corresponding live broadcast room entering control in a live broadcast application program. When detecting a trigger operation of a user for joining the target live broadcast room, the terminal may send a joining request corresponding to the target live broadcast room to the server, where the joining request carries an account identifier of the user. In addition, when the terminal sends the join request to the server, a random identifier can be randomly generated and carried in the join request to be sent to the server. And then the server sends the data information of the target live broadcast room to a terminal of the user, and the user can watch the anchor live broadcast in the corresponding live broadcast room.
Step 302, the server adds the login account of the terminal into the target live broadcast room.
In implementation, when the server receives a join request sent by the terminal, the server may join the corresponding account in the anchor live broadcast room according to the account identifier carried in the join request and the account identifier corresponding to the anchor, and may correspondingly record the account identifier, the random identifier and the time when the join request is received according to the account identifier and the random identifier carried in the join request. The account is different in random identification when entering the live broadcast room every time, and the random identification can be used for distinguishing that a user enters the same live broadcast room for multiple times.
And step 303, the server sends the live video stream of the target live broadcast room to the terminal.
After the server adds the login account of the terminal into the target live broadcast room, the live broadcast video stream of the anchor live broadcast room can be sent to the terminal logged in by the corresponding account.
And step 304, the terminal sends a watching notice to the server according to a preset period.
In implementation, the terminal may receive a live video stream of a target live broadcast room sent by the server, and play the live video stream. When the terminal plays the live broadcast video stream of the target live broadcast room, a watching notification can be sent to the server according to a preset period so as to remind the server that the account currently logged in by the terminal is still watching the main broadcast live broadcast in the current live broadcast room.
Optionally, in the process of receiving and playing the live video stream of the target live broadcast room, when a preset period is reached, a first time length for playing the live video stream of the target live broadcast room is determined, a notification sequence identifier corresponding to the current period is determined, and a viewing notification carrying the first time length and the notification sequence identifier is sent to the server.
In implementation, in the process of receiving and playing the live video stream of the target live broadcast room, when a preset period is reached, the terminal watching the anchor live broadcast can calculate a first time length of the live video stream of the target live broadcast room, and the first time length can be determined by a difference value between the time when the terminal sends the join request and the time when the terminal sends the watching notification currently. In addition, a notification sequence identifier corresponding to the current period can be determined, and the sequence identifier can be a number, namely the number of times that the terminal sends the watching notification to the server in the process of playing the live video stream of the target live broadcast room. And then, carrying the determined first time length and the notification sequence identifier in the viewing notification, and sending the viewing notification to the server. Correspondingly, the server may receive a viewing notification sent by the terminal of the user according to a preset period. In addition, the time of receiving the viewing notification sent by the user terminal, the account identifier and the random identifier can be correspondingly recorded.
And 305, when detecting the triggering operation of exiting the target live broadcast room, the terminal sends an exiting notification corresponding to the target live broadcast room to the server, and exits the target live broadcast room.
In implementation, when the user does not watch the live broadcast of the anchor, the user can click a corresponding control for exiting the live broadcast room, or trigger a return control of the terminal to exit the target live broadcast room. When the terminal detects that the user exits the triggering operation of the target live broadcast room, an exit notification corresponding to the target live broadcast room can be sent to the server, the exit notification can carry an account identifier of the current login terminal of the user and a random identifier generated by the terminal and used for the user to watch live broadcast, and the exit notification can be used for notifying the server that the corresponding account exits the target live broadcast room.
Optionally, when detecting a trigger operation of exiting the target live broadcast room, determining a second time length for playing a live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in the viewing notification sent last time, and sending an exit notification carrying the second time length and the current notification sequence identifier to the server.
In implementation, when the terminal detects that the user exits the trigger operation of the target live broadcast room, a total second duration for watching the target live broadcast by the current account may be determined. The second duration may be determined by a difference between a time when the terminal starts to transmit the join request and a time when the terminal transmits the exit notification. In addition, a notification sequence identifier corresponding to the quit notification may also be determined, where the notification sequence identifier corresponding to the quit notification may be obtained by accumulating the notification sequence identifiers carried in the viewing notification that is sent by the terminal to the server last time. For example, before the terminal sends the quit notification to the server, the notification sequence identifier carried in the last watching notification sent is 100, and then the notification sequence identifier carried in the quit notification sent by the terminal to the server may be 101. And then the terminal carries the determined second time length and the notification sequence identifier corresponding to the quit notification in the quit notification and sends the quit notification to the server.
Step 306, the server determines the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quitting notification.
In implementation, when the server receives a quit notification sent by the user terminal, it can be determined that the user quits from the corresponding live broadcast room according to the account identifier of the user and the account identifier of the anchor broadcast carried in the quit notification of the user, and the time when the quit notification is received is recorded. And then calculating the live broadcast watching duration of the user according to the moment of receiving the quit notification and the moment of receiving the joining time.
Optionally, the duration of the user watching the live broadcast may be determined according to the second duration and the notification sequence identifier carried in the exit notification. The corresponding processing may be as follows: the exit notification carries a second duration and a notification sequence identifier; and determining the live broadcast watching time length based on the second time length, the notification sequence identification and the period in the quit notification and a third time length between the receiving time of the joining request and the receiving time of the quit notification.
In implementation, the quit notification may carry a second time length and a notification sequence identifier, where the second time length is a time for the terminal to calculate and watch the anchor live broadcast, and the notification sequence identifier carried in the quit notification is obtained by accumulating the notification sequence identifiers carried in the last time the terminal sends the watching notification. The rough watching duration of the user watching the live broadcast can be obtained by multiplying the notification sequence identifier carried in the exit notification by the preset sending period. And the third time length is the time length of the user watching the live broadcast of the anchor broadcast, which is calculated by the server through the receiving time of the joining request and the receiving time of the quitting notification.
Optionally, whether the viewing duration uploaded by the terminal is abnormal or not may be verified through the viewing duration obtained by the server, the calculated rough viewing duration and the third duration, and the corresponding processing is as follows: determining a first product of the notification order identification and the period in the exit notification; if the absolute value of the difference between the first product and the second time length is less than the period, and the absolute value of the difference between the second time length and the third time length is less than a preset threshold, determining the second time length as the live broadcast watching time length; and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
In implementation, a general third-party malicious program can modify the time of the terminal so as to modify the live broadcast watching time uploaded by the terminal, but cannot directly modify the watching notification sent each time by the terminal or the notification sequence identifier carried in the quit notification, so that a first product can be obtained by multiplying the notification sequence identifier in the quit notification by a preset sending period, and the first product is the rough watching time of the user. If the absolute value of the difference between the rough watching time length of the user and the watching time length uploaded by the terminal, namely the second time length, is less than the preset period, the time length uploaded by the terminal is not abnormal, and the second time length uploaded by the terminal can be used as the time length of the live broadcast watched by the user. And if the absolute value of the difference between the rough watching time length of the user and the watching time length uploaded by the terminal is greater than a preset period, or the absolute value of the difference between the watching time length uploaded by the terminal and the third time length calculated by the server is greater than a preset threshold, determining the third time length calculated by the server as the live watching time length of the user.
And 307, when the server does not receive other watching notifications or quit notifications within the preset time after receiving the watching notifications, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
In implementation, the terminal of the user may not be able to view the live broadcast due to sudden network disconnection, power failure, termination of the live broadcast application, and the like, and the terminal may not be able to send a corresponding viewing notification or quit notification to the server. Therefore, within the preset time length after receiving the watching notification each time, if no other watching notification or quit notification is received again, the server can think that the user does not watch the anchor live broadcast any more or cannot watch the anchor live broadcast continuously, and the time length for watching the anchor live broadcast by the user can be calculated according to the receiving time of the joining request and the receiving time of the watching notification received at last.
Optionally, the viewing notification carries a first duration and a notification sequence identifier, and the live viewing duration may be determined based on the first duration, the notification sequence identifier and the period in the viewing notification, and a fourth duration between the receiving time of the join request and the receiving time of the last received viewing notification.
In implementation, the first duration and the notification sequence identifier may be carried in the last viewing notification of the server. The first duration is duration for the terminal to calculate and watch the anchor live broadcast. The server can obtain a rough watching duration by watching the notification sequence identifier in the notification and the preset sending period. The fourth time length is the live broadcast watching time length calculated by the server according to the receiving time of the joining request and the receiving time of the watching notification received at last.
Optionally, when the quit notification sent by the terminal is not received, whether the first duration is abnormal may be verified according to the fourth duration and the rough trial production, and the corresponding processing may be as follows: determining a second product of the notification order identification and the period in the viewing notification; if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than a preset threshold, determining the first time length as the live broadcast watching time length; and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
In implementation, if the absolute value of the difference between the rough watching duration of the user and the watching duration uploaded by the terminal, that is, the first duration, is less than the preset period, the duration uploaded by the terminal is not an abnormal duration, and the first duration uploaded by the terminal can be used as the duration for the user to watch live broadcast. And if the absolute value of the difference between the rough watching time length of the user and the watching time length uploaded by the terminal is greater than a preset period, or the absolute value of the difference between the watching time length uploaded by the terminal and the fourth time length calculated by the server is greater than a preset threshold, determining the fourth time length calculated by the server as the live watching time length of the user.
According to the method and the device, the watching notice is sent to the server according to the preset period all the time in the process of playing the live video of the anchor broadcast through the terminal, the quitting notice is sent to the server when the live broadcast room of the anchor broadcast quits, the server can record the time of receiving the watching notice and the quitting notice each time, then the time of watching the live broadcast by the user is determined through the receiving time of receiving the watching notice or the quitting notice, the time provided by the terminal is not needed, therefore, the time of maliciously modifying the terminal by a third-party program can be prevented, and the accuracy of the time of watching the live broadcast by the user is improved through.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 4 is a schematic structural diagram of an apparatus for determining a live broadcast viewing time according to an embodiment of the present application, where the apparatus may be a terminal in the foregoing embodiment. As shown in fig. 4, the apparatus includes:
a first sending module 410, configured to send, to a server, a join request corresponding to a target live broadcast room when a trigger operation of joining the target live broadcast room is detected;
a second sending module 420, configured to receive and play a live video stream of the target live broadcast room sent by the server, and send a viewing notification to the server according to a preset period;
a third sending module 430, configured to send, when detecting a trigger operation of exiting a target live broadcast room, an exit notification corresponding to the target live broadcast room to the server, and exit the target live broadcast room.
Optionally, the second sending module 420 is configured to:
in the process of receiving and playing the live broadcast video stream of the target live broadcast room, determining a first time length for playing the live broadcast video stream of the target live broadcast room when a preset period is reached, determining a notification sequence identifier corresponding to the current period, and sending a watching notification carrying the first time length and the notification sequence identifier to the server;
the third sending module 430 is configured to:
when the trigger operation of exiting the target live broadcast room is detected, determining a second time length for playing the live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in a watching notification sent last time, and sending an exiting notification carrying the second time length and the current notification sequence identifier to the server.
Fig. 5 is a schematic structural diagram of an apparatus for determining a live viewing time according to an embodiment of the present application, where the apparatus may be a server according to the foregoing embodiment. As shown in fig. 5, the apparatus includes:
a first receiving module 510, configured to receive a join request sent by a terminal and corresponding to the target live broadcast room, join a login account of the terminal into the target live broadcast room, and send a live broadcast video stream of the target live broadcast room to the terminal;
a second receiving module 520, configured to receive a viewing notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room;
a first determining module 530, configured to determine a live broadcast watching time length based on a receiving time of the join request and a receiving time of the quit notification when the quit notification sent by the terminal is received;
a second determining module 540 configured to determine a viewing live time period based on a reception time of the join request and a reception time of a last received viewing notification when no other viewing notification or no exit notification is received within a preset time period after the viewing notification is received.
Optionally, the watching notification carries a first duration and a notification sequence identifier, and the quitting notification carries a second duration and a notification sequence identifier;
the first determining module 530 configured to:
determining live broadcast watching time length based on the second time length, the notification sequence identification in the quit notification, the period and a third time length between the receiving time of the joining request and the receiving time of the quit notification;
the second determining module 540, configured to:
and determining the live broadcast watching time length based on the first time length, the notification sequence identifier in the watching notification, the period and a fourth time length between the receiving time of the joining request and the receiving time of the watching notification received last.
Optionally, the first determining module 530 is configured to:
determining a first product of a notification order identification in the exit notification and the period;
if the absolute value of the difference between the first product and the second time length is smaller than the period, and the absolute value of the difference between the second time length and the third time length is smaller than a preset threshold, determining the second time length as a live broadcast watching time length;
and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
Optionally, the second determining module 540 is configured to:
determining a second product of a notification order identification in the viewing notification and the period;
if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than the preset threshold, determining the first time length as the live broadcast watching time length;
and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than the preset threshold, determining that the third time length is the live broadcast watching time length.
It should be noted that: in the apparatus for determining a live broadcast watching time length provided in the foregoing embodiment, when determining the live broadcast watching time length, only the division of the functional modules is used as an example, in practical applications, the function distribution may be completed by different functional modules according to needs, that is, an internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for determining live broadcast watching time duration and the method for determining live broadcast watching time duration provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The embodiment of the present application further provides a system for determining a viewing duration of a user, where the system includes a terminal and a server, where:
the terminal sends a joining request corresponding to the target live broadcast room to the server when detecting a triggering operation of joining the target live broadcast room; receiving and playing the live broadcast video stream of the target live broadcast room sent by the server, and sending a watching notification to the server according to a preset period; and when the triggering operation of exiting the target live broadcast room is detected, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
The server receives a joining request corresponding to the target live broadcast room sent by the terminal, joins a login account of the terminal to the target live broadcast room, and sends a live broadcast video stream of the target live broadcast room to the terminal; receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room; when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification; and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
Fig. 6 shows a block diagram of a terminal 600 according to an exemplary embodiment of the present application. The terminal 600 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer iv, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 600 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 600 includes: a processor 601 and a memory 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the method of determining a viewing live time provided by the method embodiments herein.
In some embodiments, the terminal 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch screen display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or over the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, providing the front panel of the terminal 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the terminal 600 or in a folded design; in still other embodiments, the display 605 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The positioning component 608 is used to locate the current geographic location of the terminal 600 to implement navigation or LBS (location based Service). The positioning component 608 can be a positioning component based on the GPS (global positioning System) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
Power supply 609 is used to provide power to the various components in terminal 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch screen display 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the terminal 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the terminal 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 613 may be disposed on a side frame of the terminal 600 and/or on a lower layer of the touch display screen 605. When the pressure sensor 613 is disposed on the side frame of the terminal 600, a user's holding signal of the terminal 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 614 may be disposed on the front, back, or side of the terminal 600. When a physical button or vendor Logo is provided on the terminal 600, the fingerprint sensor 614 may be integrated with the physical button or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
A proximity sensor 616, also known as a distance sensor, is typically disposed on the front panel of the terminal 600. The proximity sensor 616 is used to collect the distance between the user and the front surface of the terminal 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually decreases, the processor 601 controls the touch display 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually becomes larger, the processor 601 controls the touch display 605 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is not intended to be limiting of terminal 600 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 7 is a schematic structural diagram of a server 700 according to an embodiment of the present application, where the server 700 may generate a relatively large difference due to a difference in configuration or performance, and may include one or more processors (CPUs) 701 and one or more memories 702, where at least one instruction is stored in the memory 702, and the at least one instruction is loaded and executed by the processor 1001 to implement the methods provided by the foregoing method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal to perform the method of determining a viewing live time duration in the above embodiments is also provided. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (Read-only Memory), a RAM (Random Access Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only, and not to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included therein.

Claims (13)

1. A method for determining a time duration for viewing a live broadcast, the method comprising:
when the trigger operation of joining the target live broadcast room is detected, a joining request corresponding to the target live broadcast room is sent to a server;
receiving and playing the live broadcast video stream of the target live broadcast room sent by the server, and sending a watching notification to the server according to a preset period;
and when the triggering operation of exiting the target live broadcast room is detected, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
2. The method as claimed in claim 1, wherein the sending a viewing notification to the server according to a preset period during the receiving and playing of the live video stream of the target live broadcast room comprises:
in the process of receiving and playing the live broadcast video stream of the target live broadcast room, determining a first time length for playing the live broadcast video stream of the target live broadcast room when a preset period is reached, determining a notification sequence identifier corresponding to the current period, and sending a watching notification carrying the first time length and the notification sequence identifier to the server;
when the trigger operation of quitting the target live broadcast room is detected, the step of sending a quit notification corresponding to the target live broadcast room to the server comprises the following steps:
when the trigger operation of exiting the target live broadcast room is detected, determining a second time length for playing the live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in a watching notification sent last time, and sending an exiting notification carrying the second time length and the current notification sequence identifier to the server.
3. A method for determining a user viewing duration, the method comprising:
receiving a joining request corresponding to the target live broadcast room sent by a terminal, joining a login account of the terminal into the target live broadcast room, and sending a live broadcast video stream of the target live broadcast room to the terminal;
receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room;
when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification;
and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
4. The method according to claim 3, wherein the viewing notification carries a first duration and a notification sequence identifier, and the exit notification carries a second duration and a notification sequence identifier;
determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quitting notification, wherein the determining comprises the following steps:
determining live broadcast watching time length based on the second time length, the notification sequence identification in the quit notification, the period and a third time length between the receiving time of the joining request and the receiving time of the quit notification;
determining a live broadcast watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last comprises the following steps:
and determining the live broadcast watching time length based on the first time length, the notification sequence identifier in the watching notification, the period and a fourth time length between the receiving time of the joining request and the receiving time of the watching notification received last.
5. The method of claim 4, wherein determining a live viewing duration based on the second duration, the notification order identifier in the exit notification, the period, and a third duration between the time of receipt of the join request and the time of receipt of the exit notification comprises:
determining a first product of a notification order identification in the exit notification and the period;
if the absolute value of the difference between the first product and the second time length is smaller than the period, and the absolute value of the difference between the second time length and the third time length is smaller than a preset threshold, determining the second time length as a live broadcast watching time length;
and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
6. The method of claim 4, wherein determining the live viewing duration based on the first duration, the notification order identifier in the viewing notification, the period, and a fourth duration between the time of receipt of the join request and the time of receipt of the last received viewing notification comprises:
determining a second product of a notification order identification in the viewing notification and the period;
if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than the preset threshold, determining the first time length as the live broadcast watching time length;
and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than the preset threshold, determining that the third time length is the live broadcast watching time length.
7. An apparatus for determining a time duration for viewing a live broadcast, the apparatus comprising:
the device comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is configured to send a joining request corresponding to a target live broadcast room to a server when a triggering operation of joining the target live broadcast room is detected;
the second sending module is configured to receive and play the live video stream of the target live broadcast room sent by the server, and send a watching notification to the server according to a preset period;
and the third sending module is configured to send a quit notification corresponding to the target live broadcast room to the server and quit the target live broadcast room when the triggering operation of quitting the target live broadcast room is detected.
8. The apparatus of claim 7, wherein the second sending module is configured to:
in the process of receiving and playing the live broadcast video stream of the target live broadcast room, determining a first time length for playing the live broadcast video stream of the target live broadcast room when a preset period is reached, determining a notification sequence identifier corresponding to the current period, and sending a watching notification carrying the first time length and the notification sequence identifier to the server;
the third sending module configured to:
when the trigger operation of exiting the target live broadcast room is detected, determining a second time length for playing the live broadcast video stream of the target live broadcast room, determining a current notification sequence identifier based on a notification sequence identifier in a watching notification sent last time, and sending an exiting notification carrying the second time length and the current notification sequence identifier to the server.
9. An apparatus for determining a user viewing duration, the apparatus comprising:
the first receiving module is configured to receive a joining request which is sent by a terminal and corresponds to the target live broadcast room, join a login account of the terminal into the target live broadcast room, and send a live broadcast video stream of the target live broadcast room to the terminal;
the second receiving module is configured to receive a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room;
the first determination module is configured to determine live broadcast watching time length based on the receiving time of the joining request and the receiving time of the quitting notification when the quitting notification sent by the terminal is received;
a second determination module configured to determine a viewing live time period based on a reception time of the join request and a reception time of a last received viewing notification when no other viewing notification or exit notification is received within a preset time period after the viewing notification is received.
10. The apparatus according to claim 9, wherein the viewing notification carries a first duration and a notification sequence identifier, and the exit notification carries a second duration and a notification sequence identifier;
the first determination module configured to:
determining live broadcast watching time length based on the second time length, the notification sequence identification in the quit notification, the period and a third time length between the receiving time of the joining request and the receiving time of the quit notification;
the second determination module configured to:
and determining the live broadcast watching time length based on the first time length, the notification sequence identifier in the watching notification, the period and a fourth time length between the receiving time of the joining request and the receiving time of the watching notification received last.
11. The apparatus of claim 10, wherein the first determining module is configured to:
determining a first product of a notification order identification in the exit notification and the period;
if the absolute value of the difference between the first product and the second time length is smaller than the period, and the absolute value of the difference between the second time length and the third time length is smaller than a preset threshold, determining the second time length as a live broadcast watching time length;
and if the absolute value of the difference between the first product and the second time length is greater than the period, or the absolute value of the difference between the second time length and the third time length is greater than a preset threshold, determining the third time length as the live broadcast watching time length.
12. The apparatus of claim 10, wherein the second determining module is configured to:
determining a second product of a notification order identification in the viewing notification and the period;
if the absolute value of the difference between the second product and the fourth time length is smaller than the period, and the absolute value of the difference between the first time length and the fourth time length is smaller than the preset threshold, determining the first time length as the live broadcast watching time length;
and if the absolute value of the difference between the second product and the fourth time length is greater than the period, or the absolute value of the difference between the first time length and the fourth time length is greater than the preset threshold, determining that the third time length is the live broadcast watching time length.
13. A system for determining a live viewing duration, the system comprising a terminal and a server, wherein:
the terminal sends a joining request corresponding to the target live broadcast room to the server when detecting a triggering operation of joining the target live broadcast room; receiving and playing the live broadcast video stream of the target live broadcast room sent by the server, and sending a watching notification to the server according to a preset period; and when the triggering operation of exiting the target live broadcast room is detected, sending an exiting notification corresponding to the target live broadcast room to the server, and exiting the target live broadcast room.
The server receives a joining request corresponding to the target live broadcast room sent by the terminal, joins a login account of the terminal to the target live broadcast room, and sends a live broadcast video stream of the target live broadcast room to the terminal; receiving a watching notification sent by the terminal according to a preset period in the process of playing the live video stream of the target live broadcast room; when receiving an exit notification sent by the terminal, determining the live broadcast watching time length based on the receiving time of the joining request and the receiving time of the exit notification; and when no other watching notification or quit notification is received within a preset time after the watching notification is received, determining the live watching time length based on the receiving time of the joining request and the receiving time of the watching notification received last.
CN201911416038.6A 2019-12-31 2019-12-31 Method, device and system for determining live broadcast watching time length Active CN111107389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911416038.6A CN111107389B (en) 2019-12-31 2019-12-31 Method, device and system for determining live broadcast watching time length

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911416038.6A CN111107389B (en) 2019-12-31 2019-12-31 Method, device and system for determining live broadcast watching time length

Publications (2)

Publication Number Publication Date
CN111107389A true CN111107389A (en) 2020-05-05
CN111107389B CN111107389B (en) 2021-10-22

Family

ID=70425377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911416038.6A Active CN111107389B (en) 2019-12-31 2019-12-31 Method, device and system for determining live broadcast watching time length

Country Status (1)

Country Link
CN (1) CN111107389B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741334A (en) * 2020-06-16 2020-10-02 广州酷狗计算机科技有限公司 Live broadcast data generation method, live broadcast data display method, device and equipment
CN111901617A (en) * 2020-07-17 2020-11-06 北京达佳互联信息技术有限公司 Method and device for calculating live broadcast watching time length
CN113068061A (en) * 2021-04-01 2021-07-02 天九共享网络科技集团有限公司 Live broadcast time length determining method and device, storage medium and electronic equipment
CN113965774A (en) * 2021-11-26 2022-01-21 小象(广州)商务有限公司 Live broadcasting method and live broadcasting system for video
CN114845142A (en) * 2022-04-27 2022-08-02 北京达佳互联信息技术有限公司 Data recording method, device, electronic equipment and storage medium
WO2023000890A1 (en) * 2021-07-19 2023-01-26 北京字节跳动网络技术有限公司 Webcast page display method and apparatus, and client

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103841218A (en) * 2012-11-20 2014-06-04 中国移动通信集团上海有限公司 Method for determining duration of public network access by user terminal and net access server
CN104333775A (en) * 2014-11-25 2015-02-04 广州华多网络科技有限公司 Virtual goods interaction method, device and system in live channel
CN105721227A (en) * 2016-04-14 2016-06-29 武汉斗鱼网络科技有限公司 Method and system for carrying out statistics to online durations of user and state server
CN105979297A (en) * 2016-06-14 2016-09-28 天脉聚源(北京)传媒科技有限公司 Watching duration statistic method and system
CN106454392A (en) * 2016-11-24 2017-02-22 北京小米移动软件有限公司 Live broadcast processing method, device and terminal
CN106899457A (en) * 2017-03-17 2017-06-27 腾讯科技(深圳)有限公司 A kind of method and server for monitoring application online hours
WO2017110524A1 (en) * 2015-12-24 2017-06-29 株式会社コロプラ Video content distribution system and content management server
CN106993221A (en) * 2017-03-06 2017-07-28 武汉斗鱼网络科技有限公司 A kind of antitheft stream method and device of net cast
CN107634868A (en) * 2017-10-29 2018-01-26 网宿科技股份有限公司 A kind of method and system for managing network service
CN108401194A (en) * 2018-04-27 2018-08-14 广州酷狗计算机科技有限公司 Timestamp determines method, apparatus and computer readable storage medium
CN109002387A (en) * 2018-07-13 2018-12-14 北京微播视界科技有限公司 User reminding method, apparatus, terminal device and the storage medium of application program
US10277929B1 (en) * 2016-06-22 2019-04-30 Amazon Technologies, Inc. Live streaming media content using on-demand manifests
CN110446079A (en) * 2019-07-03 2019-11-12 北京达佳互联信息技术有限公司 Obtain method, apparatus, electronic equipment and the storage medium of viewing duration
CN110493075A (en) * 2019-08-01 2019-11-22 京信通信系统(中国)有限公司 The method, apparatus and system of equipment on-line duration monitoring

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103841218A (en) * 2012-11-20 2014-06-04 中国移动通信集团上海有限公司 Method for determining duration of public network access by user terminal and net access server
CN104333775A (en) * 2014-11-25 2015-02-04 广州华多网络科技有限公司 Virtual goods interaction method, device and system in live channel
WO2017110524A1 (en) * 2015-12-24 2017-06-29 株式会社コロプラ Video content distribution system and content management server
CN105721227A (en) * 2016-04-14 2016-06-29 武汉斗鱼网络科技有限公司 Method and system for carrying out statistics to online durations of user and state server
CN105979297A (en) * 2016-06-14 2016-09-28 天脉聚源(北京)传媒科技有限公司 Watching duration statistic method and system
US10277929B1 (en) * 2016-06-22 2019-04-30 Amazon Technologies, Inc. Live streaming media content using on-demand manifests
CN106454392A (en) * 2016-11-24 2017-02-22 北京小米移动软件有限公司 Live broadcast processing method, device and terminal
CN106993221A (en) * 2017-03-06 2017-07-28 武汉斗鱼网络科技有限公司 A kind of antitheft stream method and device of net cast
CN106899457A (en) * 2017-03-17 2017-06-27 腾讯科技(深圳)有限公司 A kind of method and server for monitoring application online hours
CN107634868A (en) * 2017-10-29 2018-01-26 网宿科技股份有限公司 A kind of method and system for managing network service
CN108401194A (en) * 2018-04-27 2018-08-14 广州酷狗计算机科技有限公司 Timestamp determines method, apparatus and computer readable storage medium
CN109002387A (en) * 2018-07-13 2018-12-14 北京微播视界科技有限公司 User reminding method, apparatus, terminal device and the storage medium of application program
CN110446079A (en) * 2019-07-03 2019-11-12 北京达佳互联信息技术有限公司 Obtain method, apparatus, electronic equipment and the storage medium of viewing duration
CN110493075A (en) * 2019-08-01 2019-11-22 京信通信系统(中国)有限公司 The method, apparatus and system of equipment on-line duration monitoring

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周晨曦: "移动设备上用户的视频观看行为和观看质量分析", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741334A (en) * 2020-06-16 2020-10-02 广州酷狗计算机科技有限公司 Live broadcast data generation method, live broadcast data display method, device and equipment
CN111741334B (en) * 2020-06-16 2022-08-26 广州酷狗计算机科技有限公司 Live broadcast data generation method, live broadcast data display method, device and equipment
CN111901617A (en) * 2020-07-17 2020-11-06 北京达佳互联信息技术有限公司 Method and device for calculating live broadcast watching time length
CN111901617B (en) * 2020-07-17 2022-07-08 北京达佳互联信息技术有限公司 Method and device for calculating live broadcast watching time length
CN113068061A (en) * 2021-04-01 2021-07-02 天九共享网络科技集团有限公司 Live broadcast time length determining method and device, storage medium and electronic equipment
CN113068061B (en) * 2021-04-01 2022-12-30 天九共享网络科技集团有限公司 Live broadcast time length determination method and device, storage medium and electronic equipment
WO2023000890A1 (en) * 2021-07-19 2023-01-26 北京字节跳动网络技术有限公司 Webcast page display method and apparatus, and client
CN113965774A (en) * 2021-11-26 2022-01-21 小象(广州)商务有限公司 Live broadcasting method and live broadcasting system for video
CN114845142A (en) * 2022-04-27 2022-08-02 北京达佳互联信息技术有限公司 Data recording method, device, electronic equipment and storage medium
CN114845142B (en) * 2022-04-27 2024-02-06 北京达佳互联信息技术有限公司 Data recording method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111107389B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN110971930B (en) Live virtual image broadcasting method, device, terminal and storage medium
CN111107389B (en) Method, device and system for determining live broadcast watching time length
CN108401124B (en) Video recording method and device
CN111147878B (en) Stream pushing method and device in live broadcast and computer storage medium
CN108966008B (en) Live video playback method and device
CN108093268B (en) Live broadcast method and device
CN110278464B (en) Method and device for displaying list
CN109348247B (en) Method and device for determining audio and video playing time stamp and storage medium
CN111083516B (en) Live broadcast processing method and device
CN111355974A (en) Method, apparatus, system, device and storage medium for virtual gift giving processing
CN111479120A (en) Method, device, equipment and storage medium for issuing virtual red packet in live broadcast room
CN110740340B (en) Video live broadcast method and device and storage medium
CN110418152B (en) Method and device for carrying out live broadcast prompt
CN111586431B (en) Method, device and equipment for live broadcast processing and storage medium
CN113271470B (en) Live broadcast wheat connecting method, device, terminal, server and storage medium
CN111669640B (en) Virtual article transfer special effect display method, device, terminal and storage medium
CN111787347A (en) Live broadcast time length calculation method, live broadcast display method, device and equipment
CN111083513B (en) Live broadcast picture processing method and device, terminal and computer readable storage medium
CN111045945B (en) Method, device, terminal, storage medium and program product for simulating live broadcast
CN109089137B (en) Stuck detection method and device
CN108401194B (en) Time stamp determination method, apparatus and computer-readable storage medium
CN110912830A (en) Method and device for transmitting data
CN110933454B (en) Method, device, equipment and storage medium for processing live broadcast budding gift
CN111064657B (en) Method, device and system for grouping concerned accounts
CN108260023B (en) Live broadcast method and device

Legal Events

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