CN106230860B - Method and device for transmitting streaming media - Google Patents

Method and device for transmitting streaming media Download PDF

Info

Publication number
CN106230860B
CN106230860B CN201610804854.4A CN201610804854A CN106230860B CN 106230860 B CN106230860 B CN 106230860B CN 201610804854 A CN201610804854 A CN 201610804854A CN 106230860 B CN106230860 B CN 106230860B
Authority
CN
China
Prior art keywords
user
streaming media
identity information
access
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610804854.4A
Other languages
Chinese (zh)
Other versions
CN106230860A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610804854.4A priority Critical patent/CN106230860B/en
Publication of CN106230860A publication Critical patent/CN106230860A/en
Application granted granted Critical
Publication of CN106230860B publication Critical patent/CN106230860B/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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • 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/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2408Monitoring of the upstream path of the transmission network, e.g. 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/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25875Management of end-user data involving end-user authentication

Abstract

The invention discloses a method and a device for sending streaming media, and belongs to the technical field of internet. The method comprises the following steps: receiving a playing request sent by a first user terminal, wherein the playing request carries a playing address and identity information of a first user; analyzing the playing address and determining whether the playing address carries authentication identity information or not; if the playing address carries verification identity information and the identity information of the first user is the same as the verification identity information, acquiring the streaming media corresponding to the playing address; and sending the streaming media to the first user terminal. The device comprises: the device comprises a first receiving module, a first obtaining module and a first sending module. In the invention, even if the malicious user grabs the playing address, the playing address does not carry the verification identity information, or the verification identity information carried by the playing address is different from the identity information of the malicious user, so the streaming media can not be sent to the malicious user terminal, thereby improving the security of the streaming media.

Description

Method and device for transmitting streaming media
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for transmitting streaming media.
Background
With the development of internet technology, social applications are more and more in function; for example, social applications have live functionality; the social application can live the user's performance to other users who watch the user.
Currently, social applications can share live links live by users to friend users; any friend user can watch the live broadcast through the live broadcast link; to protect privacy, the user may set access rights to the live broadcast to allow designated friend users to view the live broadcast. When a friend user watches the live broadcast through the live broadcast link, the social application server determines whether the friend user has the access right to watch the live broadcast; if yes, sending the live broadcast address to the friend terminal, and obtaining the live broadcast streaming media by the friend terminal through the broadcast address.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
if the malicious user does not have the access right of the live broadcast, but catches the play address, the malicious user terminal can acquire the live broadcast streaming media through the play address, so that the security of the streaming media is poor.
Disclosure of Invention
In order to solve the problems of the prior art, the invention provides a method and a device for transmitting streaming media. The technical scheme is as follows:
in a first aspect, the present invention provides a method for transmitting streaming media, the method comprising:
receiving a playing request sent by a first user terminal, wherein the playing request carries a playing address and identity information of a first user;
analyzing the playing address, and determining whether the playing address carries authentication identity information or not;
if the playing address carries verification identity information and the identity information of the first user is the same as the verification identity information, acquiring the streaming media corresponding to the playing address;
and sending the streaming media to the first user terminal.
In a second aspect, the present invention provides an apparatus for transmitting streaming media, the apparatus comprising:
the first receiving module is used for receiving a playing request sent by a first user terminal, wherein the playing request carries a playing address and identity information of a first user;
the analysis module is used for analyzing the playing address and determining whether the playing address carries authentication identity information or not;
a first obtaining module, configured to obtain a streaming media corresponding to the play address if the play address carries authentication identity information, and the identity information of the first user is the same as the authentication identity information;
and the first sending module is used for sending the streaming media to the first user terminal.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a social application server receives a playing request sent by a first user terminal, the playing request carries a playing address and identity information of a first user, analyzes the playing address, determines whether the playing address carries verification identity information, and if the playing address carries the verification identity information, determines that the identity information of the first user is the same as the verification identity information, acquires a streaming media corresponding to the playing address, and sends the streaming media to the first user terminal; only if the verification identity information in the playing address is the same as the identity information of the first user, the streaming media corresponding to the playing address is sent to the first user terminal; therefore, even if a malicious user grabs the play address, the play address does not carry authentication identity information, or the authentication identity information carried by the play address is different from the identity information of the malicious user, so that the streaming media is not sent to a malicious user terminal, and the security of the streaming media is improved.
Drawings
FIG. 1 is a diagram of an application architecture provided by an embodiment of the present invention;
fig. 2 is a flowchart of a method for transmitting streaming media according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a second user terminal displaying a live interface according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a social application server according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a first user terminal displaying a first prompt interface according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a first user terminal displaying a second prompt interface according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for transmitting streaming media according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a social application server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For convenience of description, a user sharing streaming media is referred to as a second user, a user watching the streaming media is referred to as a first user, the first user is a friend user of the second user, the first user terminal is a terminal held by the first user, and the second user terminal is a terminal held by the second user.
Referring to fig. 1, the embodiment of the present invention is applied between a first user terminal 101, a second user terminal 102, and a social application server 103.
When a second user shares streaming media in social application, a second user terminal sends a video link of the streaming media to a first user terminal; the first user terminal requests a play address of the streaming media from the social application server through the video link; in order to prevent a malicious user from capturing the play address, when the social application server sends the play address to the first user terminal, the identity information of the first user is used as verification identity information and added to the play address; when the first user terminal acquires the streaming media from the social application server through the playing address, the social application server analyzes the playing address, determines whether the playing address carries verification identity information, and determines whether the identity information of the first user is the same as the verification identity information if the playing address carries the verification identity information; and if the playing address carries the authentication identity information and the identity information of the first user is the same as the authentication identity information, sending the streaming media corresponding to the playing address to the first user terminal.
In the embodiment of the invention, a social application server receives a playing request sent by a first user terminal, the playing request carries a playing address and identity information of the first user, the playing address is analyzed, whether the playing address carries verification identity information or not is determined, if the playing address carries the verification identity information and the identity information of the first user is the same as the verification identity information, streaming media corresponding to the playing address are obtained, and the streaming media are sent to the first user terminal; only if the verification identity information in the playing address is the same as the identity information of the first user, the streaming media corresponding to the playing address is sent to the first user terminal; therefore, even if a malicious user grabs the play address, the play address does not carry authentication identity information, or the authentication identity information carried by the play address is different from the identity information of the malicious user, so that the streaming media is not sent to a malicious user terminal, and the security of the streaming media is improved.
An embodiment of the present invention provides a method for sending streaming media, where an execution subject of the method may be a social application server, see fig. 2, and the method includes:
step 201: the social application server receives an access request sent by a first user terminal, wherein the access request carries identity information of the first user and a video identifier of streaming media.
Before the step, the second user shares the streaming media in the social application, and when the first user accesses the streaming media shared by the second user, the first user terminal sends an access request to the social application server, wherein the access request carries the identity information of the first user and the video identifier of the streaming media.
The identity information of the first user may be a user identifier of the first user, where the user identifier of the first user is a user account, a nickname, and the like registered by the first user in the social application server; the video identification may be a video name, etc.
The process of sharing streaming media in the social application by the second user can be realized through the following steps (1) to (2), and comprises the following steps:
(1): and the second user terminal sends a sharing request to the first user terminal, wherein the sharing request at least carries the video link of the streaming media.
The sharing request can carry the video link of the streaming media and also can carry the user identification of a second user; the video link includes a video identification of the streaming media.
In order to protect the privacy of the second user, before the second user terminal sends a sharing request to the first user terminal, the second user may set an access right of the streaming media, and at this time, the second user terminal obtains the access right of the streaming media set by the second user and sends the access right to the social application server; the social application server receives the access right sent by the second user terminal, stores the access right so as to verify whether the first user has the access right to access the streaming media subsequently according to the access right,
the access right may be a user identifier or a group identifier of a friend who is allowed to access the streaming media, and the like.
The user identification of the second user may be a user account, a nickname, or the like registered in the social application server by the second user; the user identification of the friend can be a user account, a nickname and the like registered by the friend in the social application server; a group name that can be set for the second user, etc.
In the embodiment of the present invention, the type of the streaming media shared by the second user is not specifically limited; for example, the streaming media shared by the second user may be an HLS (Http Live streaming) Live streaming media type, an RTMP (Real Time Messaging Protocol) Live streaming media type, and an mp4(mpeg audio Video Layer 4, a compressed format of audio and Video) Live streaming media type. The streaming media of the HLS live streaming media type may be UGC (User Generated Content) streaming media.
For example, the second user shares live streaming media, referring to fig. 3, the second user terminal displays a live interface, where the live interface includes a sharing button and a permission setting button; the sharing button is used for triggering the second user terminal to send a sharing request to the first user terminal; and the setting permission button is used for triggering the second user terminal to display a setting interface.
When the second user sets the access right of the live broadcast, the second user clicks the set right button; when the second user terminal detects that the setting permission button is clicked, a setting interface is displayed, and the second user can input or select the access permission of the streaming media on the setting interface; and the second user terminal acquires the access right set by the second user and returns the access right to the live interface.
When the second user shares the live video link, the second user clicks the sharing button; and when detecting that the sharing button is clicked, the second user terminal sends a sharing request to the social application server, wherein the sharing request carries the live video link.
(2): and the first user terminal receives a sharing request sent by the second user terminal and acquires the video link from the sharing request.
The first user terminal displays the video link; when the first user accesses the streaming media, the first user can click on the video link to trigger the first user terminal to send an access request to the social application server; the first user terminal detects whether the video link is clicked; when the first user terminal detects that the video link is clicked, the first user terminal obtains the video identifier of the streaming media and sends an access request to the social application server, wherein the access request carries the identity information of the first user and the video identifier of the streaming media.
The social application server receives an access request sent by the first user terminal, obtains the identity information of the first user and the video identifier of the streaming media from the access request, and executes step 202.
The identity information of the first user at least comprises a user identification of the first user, a user identification of the second user, a random code set by the first user and the like.
Step 202: and the social application server acquires the playing address of the streaming media according to the video identifier.
After the second user shares the video link of the streaming media, the second user terminal acquires the streaming media in real time and sends the streaming media to the social application server; and the social application server receives the streaming media sent by the second user terminal in real time and stores the corresponding relation between the video identifier and the playing address of the streaming media.
Correspondingly, the steps can be as follows:
and the social application server acquires the playing address of the streaming media from the corresponding relation between the video identifier and the playing address according to the video identifier.
Referring to fig. 4, the social application server includes a Node js (server JavaScript interpreter) outbound service module and a background service module, where the Node js outbound service module receives an access request sent by a first user terminal, and obtains identity information of the first user and a video identifier of the streaming media from the access request.
The Node js direct-out service module sends the video identifier to a background service module; the background service module receives the video identifier sent by the Node js direct-out service module, acquires a playing address of the streaming media from the corresponding relation between the video identifier and the playing address according to the video identifier, wherein the playing address is an m3u8 (a video format) address of the streaming media, and sends the m3u8 address of the streaming media to the Node js direct-out service module. The Nodejs direct-out service module receives the playing address of the streaming media sent by the background service module.
Further, if the second user sets an access right to access the streaming media, before step 202, the social application server obtains the access right corresponding to the streaming media set by the second user; determining whether the first user has the access right to access the streaming media according to the access right; if the first user has access rights to the streaming media, step 202 is performed.
The access right corresponding to the streaming media set by the second user may be an access list allowing to access the streaming media or a group identifier allowing to access the streaming media, where the access list includes the user identifier allowing to access the streaming media.
If the access right corresponding to the streaming media set by the second user is an access list allowing access to the streaming media, the step of determining, by the social application server, whether the first user has an access right to access the streaming media according to the access right may be:
the social application server determines whether the access list contains the user identification of the first user; if the access list contains the user identification of the first user; determining that the first user has access rights to the streaming media; and if the access list does not contain the user identification of the first user, determining that the first user does not have the access right for accessing the streaming media.
If the access right of the streaming media set by the second user is a group identifier allowing access to the streaming media, the step of determining, by the social application server, whether the first user has the access right to access the streaming media according to the access right may be:
the social application server acquires a group identifier of a group where the first user is located, and determines whether the group identifier of the group where the first user is located is the same as a group identifier set by the second user; if the two users are the same, determining that the first user has the access right to access the streaming media; if not, determining that the first user does not have the access right to access the streaming media; alternatively, the first and second electrodes may be,
the social application server acquires user identifications under the group identification to form a user list according to the group identification set by the second user, and determines whether the user list contains the user identification of the first user; if the user list contains the user identification of the first user, determining that the first user has the access right to access the streaming media; and if the user list does not contain the user identification of the first user, determining that the first user does not have the access right for accessing the streaming media.
Further, if the social application server determines that the first user does not have access rights to the streaming media; sending first prompt information to a first user terminal, wherein the first prompt information is used for prompting that a second user sets access authority, and the first user does not have the access authority for accessing the streaming media; the first user terminal receives first prompt information sent by the social application server and displays a first prompt interface, wherein the first prompt interface comprises the first prompt information.
For example, the first prompt message is "the first set right, the live broadcast cannot be watched", and the first user terminal displays the first prompt interface as shown in fig. 5.
The social application server comprises a signature verification module, and the Node js direct-out service module sends the user identification of the first user to the front verification module; the signature verification module receives the user identification of the first user sent by the Node js direct-out service module, determines whether the first user has the access authority of accessing the streaming media, and informs the Node js direct-out service module of the determination result.
Step 203: and the social application server adds the identity information of the first user as verification identity information to the playing address of the streaming media and sends the added playing address to the first user terminal.
The social application server signs the identity information of the first user, takes the signed identity information of the first user as the verification identity information, and adds the verification identity information to the playing address.
The process of signing the identity information of the first user by the social application server may be:
the social application server obtains a preset encryption algorithm, and encrypts the identity information of the first user through the preset encryption algorithm to obtain the signed identity information of the first user.
The preset encryption algorithm can be any one of the existing encryption algorithms, and in the embodiment of the invention, the preset encryption algorithm is not particularly limited; for example, the preset encryption Algorithm is SHA1(Secure Hash Algorithm), a public key encryption Algorithm, or the like.
Further, in order to increase the security of the streaming media, the social application server may further add the user identifier of the second user to the authentication identity information, may further add the expiration time of the play address of the streaming media to the authentication identity information, and may further add a random code set by the first user to the authentication identity information.
If the social application server adds the expiration time of the playing address of the streaming media to the authentication identity information, the social application server needs to obtain the expiration time, and the specific process may be as follows:
and the social application server acquires the playing time of the streaming media and calculates the failure time of the playing address according to the playing time and the current time.
If the streaming media is live streaming media, the playing time length can be the playing time length set by the social application server or the playing time length input by the second user in advance; in the embodiment of the present invention, the playing duration of the streaming media is not specifically limited. The playing duration set by the social application server may be 2 hours or 5 hours, etc.
When the social application server adds the authentication identity information to the play address, the social application server may insert the authentication identity information into a preset position of the play address, where the preset position may be any one of a head position, a tail position, or a middle position; the identity verification information can also be added to preset parameters of the playing address, and the preset parameters can be sign (signature) parameters and the like; in the embodiment of the present invention, a specific manner in which the social application server adds the authentication identity information to the play address is not particularly limited.
Further, in order to further improve the security of the streaming media, the social application server may also sign the authentication identity information.
In the step, a signature verification module included in the social application server determines whether the first user has the access right to access the streaming media, and notifies the Node js direct-out service module of the determination result; if the first user has the access right to access the streaming media, then the Node js direct service module executes step 203 and its optional solutions.
It should be noted that, when the first user views the streaming media shared by the second user, the first user terminal only needs to execute steps 201 to 203 once to obtain the playing address of the streaming media; when the streaming media is viewed subsequently, the following steps 204-206 are directly executed, and the streaming media is obtained from the social application server through the play address. And when the first user terminal acquires a segment of streaming media, sending a play request to the social application server, wherein the segment of streaming media comprises N frames of streaming media, and N is an integer greater than or equal to 1.
The play address is used for obtaining the streaming media from the social application server. And when receiving the playing address sent by the social application server, the first user terminal sends a playing request to the social application server, wherein the playing request carries the playing address and the identity information of the first user, and the playing address carries verification identity information.
If the malicious user terminal illegally grabs the playing address, the malicious user terminal also sends a playing request to the social network server, and the playing request carries the playing address and the identity information of the malicious user.
Step 204: and the social application server receives the playing request sent by the first user terminal, analyzes the playing address and determines whether the playing address carries authentication identity information.
The playing request carries a playing address of the streaming media and identity information of the first user, the playing address carries verification identity information of a legal user, and the legal user refers to a user who acquires the playing address from the social application server in advance.
The social application server acquires the playing address and the identity information of the first user from the playing request; analyzing the playing address and determining whether the playing address carries authentication identity information or not; if the playing address carries verification identity information, determining whether the identity information of the first user is the same as the verification identity information; if the two are the same, it is determined that the first user is a legitimate user, step 205 is performed.
Further, if the verified identity information is the signed identity information of the first user, the step of the social application server determining whether the identity information of the first user and the verified identity information are the same may be:
the social application server signs the identity information of the first user to obtain the signed identity information of the first user; determining whether the signed identity information of the first user is the same as the verification identity information; and if the identity information of the first user is the same as the verification identity information, determining that the identity information of the first user is the same as the verification identity information.
If the first user is a malicious user, the playing address does not carry authentication identity information or the authentication identity information is different from the identity information of the malicious user; and at the moment, the social application server determines that the malicious user is not a legal user, and sends second prompt information to the first user terminal, wherein the second prompt information is used for prompting that the malicious user cannot access the streaming media.
And the first user terminal receives second prompt information sent by the social application server and displays a second prompt interface, wherein the second prompt interface comprises the second prompt information.
For example, the second prompt message is "your input cannot be turned on", and the first user terminal displays the second prompt interface as shown in fig. 6.
The social application server further comprises an m3u8 cloud agent module, the m3u8 cloud agent module receives a playing request sent by the first user terminal, calls a signature verification module, and verifies whether the first user is a legal user through the signature verification module; if the first user is a valid user, step 205 is performed.
And if the m3u8 cloud agent module determines that the first user is an illegal user, sending second prompt information to the first user terminal.
Step 205: and if the identity authentication information carried by the playing address is the same as the identity authentication information of the first user, the social application server acquires the streaming media corresponding to the playing address.
And if the identity information of the first user is the same as the verification identity information carried by the playing address, the social application server determines that the first user is a legal user, and acquires the streaming media corresponding to the playing address.
Further, if the play address also carries the expiration time of the play address, before the social application server obtains the streaming media corresponding to the play address, the method further includes:
the social application server determines whether the current time reaches the expiration time; and if the current time does not reach the expiration time, executing the step of acquiring the streaming media corresponding to the playing address.
And if the current time reaches the expiration time, the social application server sends third prompt information to the first user terminal, wherein the third prompt information is used for prompting the first user terminal to obtain the playing address from the social application server again. The first user terminal receives the third prompt message and re-executes the above steps 201-203 to obtain the play address from the social application server.
Further, if the current time reaches the expiration time, the social application server may revise the expiration time such that the current time does not reach the expiration time, thereby enabling the first user to successfully access the streaming media.
The social application server comprises a Content Delivery Network (CDN) module, and the m3u8 cloud agent sends the playing address to the CDN module when determining that the first user is a legal user and the current time does not reach the expiration time; and the CND module receives the play address sent by the m3u8 cloud agent module, and acquires the streaming media corresponding to the play address.
Further, in order to prevent the playing address from being tampered in the process of sending the m3u8 cloud agent module to the CDN, before the CDN module obtains the streaming media corresponding to the playing address, the CDN module may also invoke the signature verification module to determine again whether the first user is a legitimate user, and when it is determined that the first user is a legitimate user, execute the step of obtaining the streaming media corresponding to the playing address.
And when the CDN module determines that the first user is an illegal user, sending fourth prompt information to the first user terminal through the m3u8 cloud agent, wherein the fourth prompt information user prompts that the first user cannot acquire the streaming media.
Step 206: the social application server sends the streaming media to the first user terminal.
And the first user terminal receives the streaming media sent by the social application server and displays the streaming media.
The CDN module sends the streaming media to an m3u8 cloud agent module; and the m3u8 cloud agent module receives the streaming media sent by the CDN module and sends the streaming media to the first user terminal. And the first user terminal receives the streaming media sent by the m3u8 cloud agent module.
It should be noted that, when the first user accesses the streaming media, the first user terminal needs to send a play request to the social application server once when acquiring a segment of the streaming media; the social application server only needs to verify whether the first user has the watching right to access the streaming media once, and then only needs to verify whether the verification identity information carried in the playing address is the same as the identity information of the first user, so that whether the first user has the access right to verify the streaming media is not needed to be verified each time, and the verification process is simplified; moreover, the authentication identity information in the playing address is encrypted, so that the authentication identity information cannot be falsified or forged, and the security of the streaming media is further improved.
In the embodiment of the invention, a social application server receives a playing request sent by a first user terminal, the playing request carries a playing address and identity information of a first user, analyzes the playing address, determines whether the playing address carries verification identity information, and if the playing address carries the verification identity information, determines that the identity information of the first user is the same as the verification identity information, acquires a streaming media corresponding to the playing address, and sends the streaming media to the first user terminal; only if the verification identity information in the playing address is the same as the identity information of the first user, the streaming media corresponding to the playing address is sent to the first user terminal; therefore, even if a malicious user grabs the play address, the play address does not carry authentication identity information, or the authentication identity information carried by the play address is different from the identity information of the malicious user, so that the streaming media is not sent to a malicious user terminal, and the security of the streaming media is improved.
The embodiment of the invention provides a device for sending streaming media, which can be applied to a social application server and is used for executing the method for sending the streaming media provided by the embodiment.
Referring to fig. 7, the apparatus includes: a first receiving module 301, a parsing module 302, a first obtaining module 303 and a first sending module 304.
A first receiving module 301, configured to execute the step of receiving the play request sent by the first user terminal in step 204 in the foregoing embodiment and its optional solutions.
The parsing module 302 is configured to perform the step of parsing the play address in step 204 in the foregoing embodiment, and determine whether the play address carries the authentication information, and optional solutions thereof.
A first obtaining module 303, configured to perform step 205 and its optional solutions in the foregoing embodiments.
A first sending module 304, configured to perform step 206 and its optional solutions in the foregoing embodiments.
Optionally, the apparatus further comprises: the device comprises a second receiving module, a second obtaining module, an adding module and a second sending module.
A second receiving module, configured to perform step 201 and its optional solutions in the foregoing embodiments.
A second obtaining module, configured to perform step 202 and its optional solutions in the foregoing embodiments.
The adding module is configured to execute the step of adding, by the social application server in step 203 in the foregoing embodiment, the identity information of the first user as authentication identity information to the play address of the streaming media;
a second sending module, configured to execute the step of sending the added play address to the first user terminal in step 203 in the foregoing embodiment.
Optionally, the apparatus further comprises:
the adding module is further configured to perform the signing on the identity information of the first user in step 203 in the foregoing embodiment, and add the signed identity information of the first user as verification identity information to the play address;
correspondingly, the device further comprises:
a signature module, configured to perform the signature on the identity information of the first user in step 203 in the foregoing embodiment;
a first determining module, configured to execute the step 204 in the foregoing embodiment to determine whether the signed identity information and the verified identity information of the first user are the same;
if the two pieces of identity information are the same, the second determining module is configured to execute the step 204 in the foregoing embodiment to determine that the identity information of the first user is the same as the verification identity information carried by the play address.
Optionally, the apparatus further comprises:
a third obtaining module, configured to execute the video identifier in step 202 in the foregoing embodiment to obtain an access right corresponding to the streaming media set by the second user;
a third determining module, configured to perform the step 202 in the foregoing embodiment, and determine whether the first user has an access right to access the streaming media according to the access right;
and if the first user has the access right to access the streaming media, executing a second acquisition module to acquire the playing address of the streaming media according to the video identifier.
Optionally, the playing address also carries the expiration time of the playing address; the device also includes:
a fourth determining module, configured to perform the determination of whether the current time reaches the expiration time in step 205 in the foregoing embodiment;
and if the current time does not reach the expiration time, executing a first acquisition module to acquire the streaming media corresponding to the play address.
In the embodiment of the invention, a social application server receives a playing request sent by a first user terminal, the playing request carries a playing address and identity information of a first user, analyzes the playing address, determines whether the playing address carries verification identity information, and if the playing address carries the verification identity information, determines that the identity information of the first user is the same as the verification identity information, acquires a streaming media corresponding to the playing address, and sends the streaming media to the first user terminal; only if the verification identity information in the playing address is the same as the identity information of the first user, the streaming media corresponding to the playing address is sent to the first user terminal; therefore, even if a malicious user grabs the play address, the play address does not carry authentication identity information, or the authentication identity information carried by the play address is different from the identity information of the malicious user, so that the streaming media is not sent to a malicious user terminal, and the security of the streaming media is improved.
It should be noted that: in the device for sending streaming media according to the foregoing embodiment, when sending streaming media, only the division of the functional modules is described as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus for sending streaming media and the method for sending streaming media provided by the foregoing embodiments belong to the same concept, and details of a specific implementation process thereof are referred to in the method embodiments and are not described herein again.
Fig. 8 is a schematic structural diagram of a social application server 400 according to an embodiment of the present invention, where the social application server 400 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 422 (e.g., one or more processors) and a memory 432, one or more storage media 430 (e.g., one or more mass storage devices) storing an application 442 or data 444. Wherein the memory 432 and storage medium 430 may be transient or persistent storage. The program stored on the storage medium 430 may include one or more modules (not shown), each of which may include a series of instructions operating on a social application server. Still further, the central processor 422 may be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the social application server 400.
The social application server 400 may also include one or more power supplies 426, one or more power suppliesA wired or wireless network interface 450, one or more input-output interfaces 458, one or more keyboards 456, and/or one or more operating systems 441, such as a Windows ServerTM,MacOS XTM,UnixTM,LinuxTM,FreeBSDTMAnd so on.
The social application server 400 may be used to perform the steps performed by the social application server in the method for sending streaming media provided in the above embodiment.
In the embodiment of the invention, a social application server receives a playing request sent by a first user terminal, the playing request carries a playing address and identity information of a first user, analyzes the playing address, determines whether the playing address carries verification identity information, and if the playing address carries the verification identity information, determines that the identity information of the first user is the same as the verification identity information, acquires a streaming media corresponding to the playing address, and sends the streaming media to the first user terminal; only if the verification identity information in the playing address is the same as the identity information of the first user, the streaming media corresponding to the playing address is sent to the first user terminal; therefore, even if a malicious user grabs the play address, the play address does not carry authentication identity information, or the authentication identity information carried by the play address is different from the identity information of the malicious user, so that the streaming media is not sent to a malicious user terminal, and the security of the streaming media is improved.
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 only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A method for sending streaming media, which is applied to a social application server, and comprises the following steps:
receiving an access request sent by a first user terminal, wherein the access request carries a video identifier of a streaming media shared by a second user in social application;
acquiring an access right corresponding to the streaming media, which is set by the second user, according to the video identifier, wherein the access right is used for indicating at least one of a user identifier or a group identifier of a friend who is allowed to access the streaming media;
determining whether the first user has the access right to access the streaming media according to the access right;
if the first user has the access right to access the streaming media, acquiring a playing address of the streaming media according to the video identifier, wherein the playing address carries the failure time of the playing address;
returning the playing address to the first user terminal;
receiving a playing request sent by the first user terminal every other target time, wherein the playing request carries the playing address and the identity information of the first user, the target time is the length of N frames of streaming media, and N is an integer greater than or equal to 1;
analyzing the playing address, determining whether the playing address carries authentication identity information, and determining whether the current time reaches the failure time;
if the playing address carries verification identity information, the current time does not reach the failure time, and the identity information of the first user is the same as the verification identity information, and the streaming media corresponding to the playing address is obtained;
and sending the streaming media to the first user terminal.
2. The method of claim 1, wherein the access request further carries identity information of the first user; before returning the play address to the first user terminal, the method further includes:
and adding the identity information of the first user as the verification identity information into the playing address, and sending the added playing address to the first user terminal.
3. The method according to claim 2, wherein the adding the identity information of the first user as the verification identity information to the play address comprises:
signing the identity information of the first user, and adding the signed identity information of the first user as the verification identity information into the playing address;
correspondingly, the method further comprises the following steps:
signing the identity information of the first user, and determining whether the signed identity information of the first user is the same as the verification identity information;
and if the identity information of the first user is the same as the verification identity information carried by the playing address, determining that the identity information of the first user is the same as the verification identity information carried by the playing address.
4. The method according to claim 1, wherein the access right corresponding to the streaming media set by the second user is an access list allowing access to the streaming media, and the access list includes a user identifier allowing access to the streaming media;
the determining whether the first user has the access right to access the streaming media according to the access right includes:
determining whether the access list contains the user identification of the first user;
if the access list contains the user identification of the first user, determining that the first user has the access right to access the streaming media;
and if the access list does not contain the user identification of the first user, determining that the first user does not have the access right for accessing the streaming media.
5. The method according to claim 1, wherein the access right corresponding to the streaming media set by the second user is a group identifier allowing access to the streaming media;
the determining whether the first user has the access right to access the streaming media according to the access right includes:
acquiring a group identifier of the group where the first user is located, and determining whether the group identifier of the group where the first user is located is the same as the group identifier set by the second user;
if the first user and the second user are the same, determining that the first user has the access right to access the streaming media;
and if not, determining that the first user does not have the access right for accessing the streaming media.
6. An apparatus for sending streaming media, applied to a social application server, the apparatus comprising:
the second receiving module is used for receiving an access request sent by a first user terminal, wherein the access request carries a video identifier of a streaming media shared by a second user in a social application;
a third obtaining module, configured to obtain, according to the video identifier, an access right corresponding to the streaming media, where the access right is used to indicate at least one of a user identifier or a group identifier of a friend who allows access to the streaming media, and the access right is set by a second user;
a third determining module, configured to determine whether the first user has an access right to access the streaming media according to the access right;
if the first user has the access right to access the streaming media, a second obtaining module, configured to obtain a playing address of the streaming media according to the video identifier, where the playing address carries the expiration time of the playing address;
the second sending module is used for returning the playing address to the first user terminal;
a first receiving module, configured to receive, every other target time, a play request sent by a first user terminal, where the play request carries a play address and identity information of the first user, the target time is a length of N frames of streaming media, and N is an integer greater than or equal to 1;
the analysis module is used for analyzing the playing address and determining whether the playing address carries authentication identity information or not;
a fourth determining module, configured to determine whether the current time reaches the expiration time;
a first obtaining module, configured to obtain a streaming media corresponding to the play address if the play address carries verification identity information, the current time does not reach the expiration time, and the identity information of the first user is the same as the verification identity information;
and the first sending module is used for sending the streaming media to the first user terminal.
7. The apparatus of claim 6, wherein the access request further carries identity information of the first user; the device further comprises:
the adding module is used for adding the identity information of the first user as the verification identity information into the playing address;
the second sending module is further configured to send the added play address to the first user terminal.
8. The apparatus of claim 7,
the adding module is further configured to sign the identity information of the first user, and add the signed identity information of the first user as the verification identity information to the play address;
correspondingly, the device further comprises:
the signature module is used for signing the identity information of the first user;
the first determining module is used for determining whether the signed identity information of the first user is the same as the verified identity information;
and the second determining module is used for determining that the identity information of the first user is the same as the verification identity information carried by the playing address if the identity information of the first user is the same as the verification identity information carried by the playing address.
9. The apparatus according to claim 6, wherein the access right corresponding to the streaming media set by the second user is an access list allowing access to the streaming media, and the access list includes a user identifier allowing access to the streaming media;
the third determining module is configured to determine whether the access list includes the user identifier of the first user; if the access list contains the user identification of the first user, determining that the first user has the access right to access the streaming media; and if the access list does not contain the user identification of the first user, determining that the first user does not have the access right for accessing the streaming media.
10. The apparatus according to claim 6, wherein the access right corresponding to the streaming media set by the second user is a group identifier allowing access to the streaming media;
the third determining module is configured to obtain a group identifier of the group where the first user is located, and determine whether the group identifier of the group where the first user is located is the same as the group identifier set by the second user; if the first user and the second user are the same, determining that the first user has the access right to access the streaming media; and if not, determining that the first user does not have the access right for accessing the streaming media.
11. A storage medium for storing a program code for performing the method of transmitting streaming media according to any of claims 1 to 5.
12. A social application server, comprising a processor and a memory, wherein the memory is configured to store at least one program code, and wherein the at least one program code is loaded by the processor and is configured to perform the method of sending streaming media according to any of claims 1 to 5.
CN201610804854.4A 2016-09-06 2016-09-06 Method and device for transmitting streaming media Active CN106230860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610804854.4A CN106230860B (en) 2016-09-06 2016-09-06 Method and device for transmitting streaming media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610804854.4A CN106230860B (en) 2016-09-06 2016-09-06 Method and device for transmitting streaming media

Publications (2)

Publication Number Publication Date
CN106230860A CN106230860A (en) 2016-12-14
CN106230860B true CN106230860B (en) 2020-09-25

Family

ID=58075005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610804854.4A Active CN106230860B (en) 2016-09-06 2016-09-06 Method and device for transmitting streaming media

Country Status (1)

Country Link
CN (1) CN106230860B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426589B (en) * 2017-03-31 2018-08-10 武汉斗鱼网络科技有限公司 A kind of video request, video broadcasting method and device
CN108809800B (en) * 2017-05-04 2021-09-28 腾讯科技(深圳)有限公司 Multimedia data processing method, equipment and system thereof
CN108718346B (en) * 2018-04-08 2020-12-29 北京达佳互联信息技术有限公司 Resource processing method and device
CN113938715A (en) * 2021-09-26 2022-01-14 山东浪潮通软信息科技有限公司 Video data acquisition system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980771A (en) * 2014-04-09 2015-10-14 中国电信股份有限公司 Method and system for stream media-on-demand through internet protocol television (IPTV)
CN105847988A (en) * 2016-03-25 2016-08-10 合网络技术(北京)有限公司 Video sharing method and apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523495A (en) * 2011-12-15 2012-06-27 四川长虹电器股份有限公司 IPTV system and method for realizing playing hotlinking prevention
CN103379098B (en) * 2012-04-19 2017-02-22 华为技术有限公司 Content sharing method, device and network system thereof
CN104735484B (en) * 2015-03-05 2017-12-15 天脉聚源(北京)科技有限公司 A kind of method and device for playing video

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980771A (en) * 2014-04-09 2015-10-14 中国电信股份有限公司 Method and system for stream media-on-demand through internet protocol television (IPTV)
CN105847988A (en) * 2016-03-25 2016-08-10 合网络技术(北京)有限公司 Video sharing method and apparatus

Also Published As

Publication number Publication date
CN106230860A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN107743133B (en) Mobile terminal and access control method and system based on trusted security environment
US8621630B2 (en) System, method and device for cloud-based content inspection for mobile devices
CN106230860B (en) Method and device for transmitting streaming media
WO2019047513A1 (en) Internet defense method and authentication server
CN110011958B (en) Information encryption method and device, computer equipment and storage medium
CN111708991A (en) Service authorization method, service authorization device, computer equipment and storage medium
CN108537046A (en) A kind of online contract signature system and method based on block chain technology
US11470060B2 (en) Private exchange of encrypted data over a computer network
CN112765684B (en) Block chain node terminal management method, device, equipment and storage medium
CN112559993B (en) Identity authentication method, device and system and electronic equipment
CN105491073B (en) Data downloading method, device and system
CN111130798B (en) Request authentication method and related equipment
CN109040079A (en) The establishment of live streaming chained address and verification method and related device
WO2019061598A1 (en) Data verification method and client
CN112738117A (en) Data transmission method, device and system, storage medium and electronic device
CN105577619B (en) Client login method, client and system
CN107888623B (en) Method and device for preventing hijacking of audio and video data streams of live broadcast software
CN108259183B (en) Attention method, attention device, attention electronic equipment and attention medium
CN110351364B (en) Data storage method, device and computer readable storage medium
CN110138558B (en) Transmission method and device of session key and computer-readable storage medium
US20210349967A1 (en) Media content control
CN110290097B (en) Data processing method and device, storage medium and electronic device
CN109120576B (en) Data sharing method and device, computer equipment and storage medium
CN109886011B (en) Safety protection method and device
CN109218009B (en) Method, client and server for improving equipment ID security

Legal Events

Date Code Title Description
C06 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