CN117336565A - Video processing method, device, computer equipment and storage medium - Google Patents

Video processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117336565A
CN117336565A CN202311165770.7A CN202311165770A CN117336565A CN 117336565 A CN117336565 A CN 117336565A CN 202311165770 A CN202311165770 A CN 202311165770A CN 117336565 A CN117336565 A CN 117336565A
Authority
CN
China
Prior art keywords
video stream
authorized
request
identification data
user identification
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.)
Pending
Application number
CN202311165770.7A
Other languages
Chinese (zh)
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 Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment 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 Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN202311165770.7A priority Critical patent/CN117336565A/en
Publication of CN117336565A publication Critical patent/CN117336565A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/633Control signals issued by server directed to the network components or client
    • H04N21/6332Control signals issued by server directed to the network components or client directed to client
    • H04N21/6334Control signals issued by server directed to the network components or client directed to client for authorisation, e.g. by transmitting a key
    • H04N21/63345Control signals issued by server directed to the network components or client directed to client for authorisation, e.g. by transmitting a key by transmitting keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4108Peripherals receiving signals from specially adapted client devices characterised by an identification number or address, e.g. local network address
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42684Client identification by a unique number or address, e.g. serial number, MAC address, socket ID
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/60Digital content management, e.g. content distribution
    • H04L2209/603Digital right managament [DRM]

Landscapes

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

Abstract

The application relates to a video processing method, a device, a computer device and a storage medium, wherein the method comprises the following steps: acquiring a play address carried by a first video play request based on the first video play request sent by a terminal, and acquiring an original video stream corresponding to the play address under the condition that request parameters carried by the play address meet preset parameter conditions; transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupation marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal. By adopting the method, the calculated amount for infringing can be reduced, and the cost of infringing tracing can be effectively reduced.

Description

Video processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a video processing method, apparatus, computer device, storage medium, and computer program product.
Background
With the rapid development of new media industry, the infringement of video content is more and more, and common infringement modes include transfer pushing, piracy and the like, wherein transfer pushing refers to transfer pushing of video content to an infringement website/APP (Application program) and then providing the video content for users to play; piracy refers to the uploading of video content to an infringement website/APP or other video website/APP after recording.
For the infringement mode, digital rights management technology (DRM technology, digital Rights Management) is generally used at present. Although digital rights management technology provides a relatively high security level, there is a problem in that the requirements for terminal devices are relatively high, and in addition, once data is decrypted, a protection mechanism is disabled, so that digital watermarking technology is generally used as a supplement at present. However, the conventional digital watermarking technology generally embeds information in a spatial domain or a transform domain, and these involve processes such as decoding and re-encoding the source video, which requires a huge amount of computation.
Therefore, the current processing method for the video infringement has the problem of large calculation amount.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a video processing method, apparatus, computer device, computer readable storage medium, and computer program product for the above-mentioned technical problem of large calculation amount of a processing method for video infringement.
In a first aspect, the present application provides a video processing method. The method comprises the following steps:
based on a first video playing request sent by a terminal, acquiring a playing address carried by the first video playing request, wherein the playing address carries a request parameter, and the request parameter comprises user identification data;
under the condition that the request parameters meet the preset parameter conditions, acquiring an original video stream corresponding to the playing address;
transmitting a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream;
And returning the replaced video stream to the terminal.
In one embodiment, the request parameters further include an authorized terminal number, an authorized expiration time, and first signature information; the method further comprises the steps of:
when the request parameters carried by the play address are complete, and the number of authorized terminals, the authorized expiration time and the first signature information all meet the respective corresponding parameter requirements, determining that the request parameters meet preset parameter conditions.
In one embodiment, the number of authorized terminals and the corresponding number of authorized terminals are required to be matched by the following method:
inquiring a user online network address list according to the user identification data to obtain the online network address number corresponding to the user identification data;
and when the number of the online network addresses is smaller than or equal to the number of the authorized terminals, determining that the number of the authorized terminals meets the corresponding requirement of the number of the authorized terminals.
In one embodiment, the grant expiration time is matched with the corresponding grant expiration time requirement by:
determining the sending time of the first video playing request sent by the terminal;
and when the sending time is not later than the authorized expiration time, determining that the authorized expiration time meets the corresponding authorized expiration time requirement.
In one embodiment, the first signature information and the corresponding signature information requirement are matched by:
signing the request parameter carried by the playing address and the initial playing address corresponding to the playing address according to a preset secret key to obtain second signature information; the preset key is the same as the key for generating the first signature information;
and when the first signature information is the same as the second signature information, determining that the first signature information meets the corresponding signature information requirement.
In one embodiment, the performing information replacement processing on the marked video stream according to the placeholder mark in the marked video stream and the user identification data in the request parameter returned by the transcoding service program to obtain a replaced video stream includes:
determining a position to be replaced according to the occupation mark in the marked video stream;
and replacing the occupation information of the position to be replaced with the user identification data to obtain the replaced video stream.
In one embodiment, the transcoding service is further configured to obtain occupancy information; packaging the occupation information according to a supplementary enhancement information format to obtain packaged occupation information; and inserting the encapsulated occupation information into the original video stream to obtain the marked video stream.
In a second aspect, the present application also provides another video processing method. The method comprises the following steps:
based on a second video playing request sent by a terminal, acquiring video information carried by the second video playing request, and acquiring user identification data of the terminal, authorization expiration time corresponding to the user identification data and the number of authorized terminals;
acquiring an initial play address corresponding to the video information, and generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number;
adding the user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain a play address;
sending the play address to the terminal, so that the terminal sends a first video play request carrying the play address to a content distribution network server;
the content distribution network server is used for acquiring the playing address based on the first video playing request, and acquiring an original video stream corresponding to the playing address under the condition that the request parameter carried by the playing address meets the preset parameter condition; transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupation marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal.
In one embodiment, the generating the first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number includes:
determining the access right of the terminal for the initial play address according to the user identification data;
and when the terminal is identified to have the access right, generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number.
In one embodiment, the adding the user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain a play address includes:
encrypting the user identification data through a preset encryption algorithm to obtain encrypted user identification data;
and adding the encrypted user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain the play address.
In a third aspect, the present application further provides a video processing apparatus. The device comprises:
The first acquisition module is used for acquiring a play address carried by a first video play request based on the first video play request sent by the terminal, wherein the play address carries request parameters, and the request parameters comprise user identification data;
the second acquisition module is used for acquiring the original video stream corresponding to the playing address under the condition that the request parameter accords with the preset parameter condition;
the request sending module is used for sending a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
the video processing module is used for carrying out information replacement processing on the marked video stream according to the occupation mark in the marked video stream and the user identification data in the request parameter returned by the transcoding service program to obtain a replaced video stream;
and the video return module is used for returning the replaced video stream to the terminal.
In a fourth aspect, the present application also provides another video processing apparatus. The device comprises:
the information acquisition module is used for acquiring video information carried by a second video playing request based on the second video playing request sent by the terminal, and acquiring user identification data of the terminal, authorized expiration time corresponding to the user identification data and the number of authorized terminals;
The signature generation module is used for acquiring an initial play address corresponding to the video information and generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number;
the parameter adding module is used for adding the user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain a play address;
the address sending module is used for sending the playing address to the terminal, so that the terminal sends a first video playing request carrying the playing address to a content distribution network server; the content distribution network server is used for acquiring the playing address based on the first video playing request, and acquiring an original video stream corresponding to the playing address under the condition that the request parameter carried by the playing address meets the preset parameter condition; transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupation marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal.
In a fifth aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
based on a first video playing request sent by a terminal, acquiring a playing address carried by the first video playing request, wherein the playing address carries a request parameter, and the request parameter comprises user identification data;
under the condition that the request parameters meet the preset parameter conditions, acquiring an original video stream corresponding to the playing address;
transmitting a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream;
and returning the replaced video stream to the terminal.
In a sixth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Based on a first video playing request sent by a terminal, acquiring a playing address carried by the first video playing request, wherein the playing address carries a request parameter, and the request parameter comprises user identification data;
under the condition that the request parameters meet the preset parameter conditions, acquiring an original video stream corresponding to the playing address;
transmitting a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream;
and returning the replaced video stream to the terminal.
In a seventh aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
based on a first video playing request sent by a terminal, acquiring a playing address carried by the first video playing request, wherein the playing address carries a request parameter, and the request parameter comprises user identification data;
Under the condition that the request parameters meet the preset parameter conditions, acquiring an original video stream corresponding to the playing address;
transmitting a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream;
and returning the replaced video stream to the terminal.
According to the video processing method, the video processing device, the computer equipment, the storage medium and the computer program product, after the playing address carried by the first video playing request is acquired based on the first video playing request sent by the terminal, the request parameter carried by the playing address is matched with the preset parameter condition, and the original video stream corresponding to the playing address is acquired only when the request parameter meets the preset parameter condition, so that whether the terminal can play the video or not is judged, and the interception of the infringement of the hotlinking playing is realized. Further transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupying marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal. The binding of the video stream data and the user information is realized by embedding the user identification data in the video stream, so that when infringement such as transfer pushing and piracy occurs, infringement agents can be positioned by extracting the user identification data in the video stream, the infringement agents can be positioned rapidly, decoding and encoding are not involved in the whole process, the calculated amount can be reduced, and the infringement tracing cost is effectively reduced.
Drawings
FIG. 1 is an application environment diagram of a video processing method in one embodiment;
FIG. 2 is a flow chart of a video processing method in one embodiment;
FIG. 3 is a schematic diagram of an H.264/byte stream in one embodiment;
FIG. 4 is a schematic diagram of the structure of an original byte sequence payload (RBSP) in one embodiment;
FIG. 5 is a diagram of the final format of a network abstraction layer unit in a video stream in one embodiment;
FIG. 6 is a diagram of an application environment of a video processing method in another embodiment;
FIG. 7 is a flow chart of a video processing method according to another embodiment;
FIG. 8 is a schematic diagram of an interactive flow of a video processing method in one embodiment;
FIG. 9 is a diagram of a data structure of a user online network address list in one embodiment;
FIG. 10 is a block diagram showing the structure of a video processing apparatus in one embodiment;
FIG. 11 is a block diagram showing a configuration of a video processing apparatus in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein.
At present, the infringement mode aiming at the video content has hotlinking playing besides push-forward and hotrecording, namely, the video link is directly provided for infringement websites/APP users to play.
For the hotlinking playing, not only can the content be leaked, but also the normal user bandwidth is occupied, the bandwidth cost is greatly increased, and even the watching of the normal user is influenced. The prior anti-theft method generally signs the request parameters in the play address, and the content distribution network server verifies whether the signature is legal or not to realize the anti-theft. Specifically, the service server sends the signature information to the play address of the user, the signature rule and the signature key are agreed with the content distribution network server in advance, the user uses the play address with the signature information to request the video stream data from the content distribution network server, the content distribution network server verifies the request parameters, and the request parameters are directly refused for the non-signed or inconsistent signature and the request content, so that the protection of the video stream is realized.
For transfer and piracy, digital rights management technology (DRM technology) and digital watermarking technology are mainly used at present. The existing watermarking technology generally comprises a spatial domain watermarking technology and a transform domain watermarking technology, wherein the spatial domain watermarking technology directly modifies pixels of an image by using various methods, watermark information is loaded on data, compared with the spatial domain watermarking technology, the transform domain watermarking technology does not directly modify pixel values, but converts spatial domain data of the image into a transform domain, then writes the watermark data according to a certain method, and finally converts the transform domain data back into the spatial domain, and the transform domain-based technology can embed a large amount of data without causing visual detectability and has higher concealment and attack resistance.
However, the existing anti-theft chain technology only verifies whether the parameters and signature of the request are legal, but cannot verify whether the source of the request is real, cannot block the request exceeding the limit, and cannot prevent infringement of the sharing link type. If the user acquires the legal playing link issued by the service server through sniffing and shares the legal playing link to other users, the signature can be checked through the content distribution network server because the link is legal, so that other users can directly play the legal playing link.
The existing watermarking technology, whether the watermarking technology is a spatial domain technology or a transform domain technology, needs to re-decode and re-encode video, needs huge computing resources, can cause huge cost waste, can increase live broadcast delay, and is not suitable for scenes with high real-time requirements such as live broadcast.
Aiming at the problems, the application provides a comprehensive protection scheme for video, which is firstly used for preventing piracy, and the security check of the number of authorized terminals and the authorized expiration time is increased except signature check on a content distribution network server side by adding user authentication on a service server side so as to judge whether the piracy play behavior occurs or not and timely block the infringement behavior. Secondly, binding of live broadcast stream data and user information is achieved through embedding user identification data in the video stream in real time, and infringement agents can be located through extracting the user identification data in the video stream when infringement actions such as push-transfer and piracy occur.
The video processing method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the content distribution network server 104 via a network. The content distribution network server 104 communicates with the transcoding service 106 over a network. Transcoding service 106 may be deployed on content distribution network server 104 or on other servers. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The content distribution network server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In the application scenario of the present application, a terminal 102 sends a first video playing request carrying a playing address to a content distribution network server 104, after the content distribution network server 104 receives the first video playing request, obtains the playing address carried by the first video playing request and a request parameter carried by the playing address, matches the request parameter with a preset parameter condition, obtains an original video stream corresponding to the playing address under the condition that the request parameter accords with the preset parameter condition, generates a video transcoding request carrying an original video source, and sends the video transcoding request to a transcoding service program 106; after receiving the video transcoding request, the transcoding service program 106 performs space occupation marking on an original video stream carried by the video transcoding request to obtain a marked video stream, and returns the marked video stream to the content distribution network server 104, so that the content distribution network server 104 can perform information replacement processing on the marked video stream according to the space occupation marking in the marked video stream returned by the transcoding service program 106 and user identification data in a request parameter to obtain a replaced video stream; and finally returning the replaced video stream to the terminal 102. Therefore, the binding of live broadcast stream data and user information is realized by embedding the user identification data in the video stream, and when infringement such as push-transfer and piracy occurs, infringement agents can be positioned by extracting the user identification data in the video stream, so that the infringement agents can be quickly positioned, decoding and encoding are not involved in the whole process, the calculated amount can be reduced, and the infringement tracing cost is effectively reduced.
It should be noted that, the video stream related in the present application may be a live video stream or an on-demand video stream.
In one embodiment, as shown in fig. 2, a video processing method is provided, which is illustrated by taking the application of the method to the content distribution network server 104 in fig. 1 as an example, and includes the following steps:
step S210, based on a first video playing request sent by a terminal, a playing address carried by the first video playing request is obtained, wherein the playing address carries a request parameter, and the request parameter comprises user identification data.
Wherein the play address represents a link address of the play video stream.
Wherein the request parameters include user identification data, the number of authorized terminals, an authorized expiration time, and first signature information.
The user identification data (User Identification Number, UIN) may be a user ID, a device ID, or other ID data that may uniquely correspond to a user identity.
The authorized terminal number represents the maximum different terminal number allowed to be played by the same user at the same time. The service server generally limits the number of terminals (such as mobile phones, computers, TVs or other IoT devices) played simultaneously by the same user at the same time, in addition, when the user plays, there may be a situation that network outlets are switched, or the network of the user includes a plurality of outlets, so for the same user, the source IP received by the content distribution network server may have a plurality of sources, but if the source IP exceeds the service limit during the same time, the number of simultaneous playing terminals indicates that a hotlinking play behavior may occur.
Wherein the authorization expiration time indicates a time limit of the next authorization for the play address, beyond which the terminal needs to re-request the play address from the service server.
The first signature information may be generated according to user identification data, an authorized expiration time, an authorized terminal number, and an initial play address that does not carry a request parameter.
In a specific implementation, when the terminal 102 needs to watch the video stream corresponding to the play address, a first video play request carrying the play address may be generated and sent to the content distribution network server 104, so that the content distribution network server 104 processes the first video play request to determine whether to provide the video stream for the terminal for video play.
Step S220, under the condition that the request parameter accords with the preset parameter condition, the original video stream corresponding to the playing address is obtained.
The preset parameter conditions may include complete request parameters such as user identification data, authorized terminal number, authorized expiration time, first signature information, etc., and the authorized terminal number, authorized expiration time, and first signature information all conform to respective corresponding parameter requirements.
In a specific implementation, in order to realize protection of a live video stream, after obtaining a request parameter carried by a play address, the content distribution network server 104 may match the request parameter with a preset parameter condition, if the matching result is that the request parameter does not meet the preset parameter condition, the content distribution network server 104 will reject the play request of the terminal 102 for the video stream corresponding to the play address, and may return an error prompt message to the terminal 102, so as to inform the terminal 102 that the request parameter does not meet the preset parameter condition. Otherwise, if the matching result is that the request parameter meets the preset parameter condition, the content distribution network server 104 will allow the terminal 102 to play the video stream corresponding to the play address, so that the original video stream corresponding to the play address can be obtained, further processed and returned to the terminal 102.
Step S230, a video transcoding request carrying an original video stream is sent to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream.
In a specific implementation, after the original video stream is sent to the terminal 102, the protection mechanism based on the request parameter adopted by the content distribution network server 104 may be disabled, the original video stream may be forwarded to the infringement website/APP by the user of the terminal 102, and provided for other users to play, or the original video stream is re-recorded and then uploaded to the infringement website/APP. Therefore, in order to facilitate the quick traceability of infringement, the present application also provides a method for binding the original video stream with the user identification data after obtaining the original video stream. Specifically, a video transcoding request carrying an original video stream is generated first, and the video transcoding request is sent to the transcoding service program 106, the transcoding service program 106 performs a space occupying mark on the original video stream, and the position of inserting user identification data in the original video stream is identified by the space occupying mark.
More specifically, the specific operation of the transcoding service 106 includes inserting placeholder information into the original video stream to implement a placeholder for the original video stream, and after the marking is completed, the transcoding service 106 may return the marked video stream to the content distribution network server 104, so that the content distribution network server 104 further processes the marked video stream according to the placeholder.
Step S240, according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream.
In a specific implementation, in order to facilitate infringement tracing, after receiving the marked video stream returned by the transcoding service program 106, the content distribution network server 104 may determine a position to be replaced according to the occupation mark in the marked video stream, replace data at the position to be replaced with user identification data of the terminal, and obtain a replaced video stream.
In the step, the marked video stream is replaced by the user identification data, so that the binding of the user identification data and the video stream can be realized, and when infringement such as push-transfer and piracy occurs, the infringement agent can be positioned by extracting the user identification data in the video stream.
And step S250, returning the replaced video stream to the terminal.
Specifically, after completing the replacement of the video stream, the content distribution network server 104 may further return the replaced video stream to the terminal 102, so that the terminal 102 plays the replaced video stream.
In the video processing method, based on the first video playing request sent by the terminal, after the playing address carried by the first video playing request is obtained, the request parameter carried by the playing address is matched with the preset parameter condition, and the original video stream corresponding to the playing address is obtained only when the request parameter meets the preset parameter condition, so that whether the terminal can play the video or not is judged, and the interception of the infringement of the hotlinking playing is realized. Further transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupying marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal. The binding of the video stream data and the user information is realized by embedding the user identification data in the video stream, so that when infringement such as transfer pushing and piracy occurs, infringement agents can be positioned by extracting the user identification data in the video stream, the infringement agents can be positioned rapidly, decoding and encoding are not involved in the whole process, the calculated amount can be reduced, and the infringement tracing cost is effectively reduced.
In an exemplary embodiment, the request parameters further include an authorized terminal number, an authorized expiration time, and first signature information; the video processing method further includes: when the request parameters carried by the play address are complete, and the number of authorized terminals, the authorized expiration time and the first signature information all meet the respective corresponding parameter requirements, the request parameters are determined to meet the preset parameter conditions.
In a specific implementation, after the content distribution network server 104 obtains the play address carried by the first video play request, the request parameter may be extracted from the play address, and when the extracted request parameter is complete, that is, all request parameters including user identification data, the number of authorized terminals, the authorized expiration time, the first signature information and the like are included, and the number of authorized terminals, the authorized expiration time and the first signature information all conform to respective corresponding parameter requirements, the request parameter carried by the play address may be determined to conform to a preset parameter condition. Otherwise, if the request parameter extracted from the play address is missing, or any request parameter in the number of authorized terminals, the authorized expiration time and the first signature information does not meet the corresponding parameter requirement, it is determined that the request parameter carried by the play address does not meet the preset parameter condition.
In this embodiment, by setting the number of authorized terminals, the authorized expiration time and the first signature information as request parameters, it is determined whether the video playing request sent by the terminal can be allowed, so that common hotlinking playing behavior can be prevented, and risk of video content leakage and cost loss of the content distribution network are reduced.
In an exemplary embodiment, the number of authorized terminals is matched with the corresponding number of authorized terminals requirement by: inquiring a user online network address list according to the user identification data to obtain the online network address number corresponding to the user identification data; when the number of the online network addresses is smaller than or equal to the number of the authorized terminals, determining that the number of the authorized terminals meets the corresponding requirement of the number of the authorized terminals.
Wherein, the online network address list of the user can maintain the online network addresses of a plurality of users.
In a specific implementation, a user online network address list can be preset and updated at regular time, and then when legal judgment of the number of authorized terminals is performed, the user online network address list can be directly queried according to user identification data in request parameters extracted from a play address, so as to obtain the online network address number corresponding to the user identification data.
More specifically, when querying the user online network address list, a query is first made to determine whether the user identification data exists in the user online network address list. If so, further determining which online network addresses exist in the user identification data, counting the number of online network addresses in the online network address list of the user, and adding one operation to the number of online network addresses in the online network address list of the user, namely adding the network address of the current terminal, so as to obtain the number of online network addresses corresponding to the user identification data. If not, the user identification data is added to the user online network address list, and the network address of the terminal is correspondingly added to the user online network address list, and in this case, the number of online network addresses corresponding to the user identification data is 1.
Further, comparing the obtained online network address number with the authorized terminal number, judging whether the online network address number exceeds the authorized terminal number requirement, and if the online network address number is smaller than or equal to the authorized terminal number, determining that the authorized terminal number meets the authorized terminal number requirement. Otherwise, if the number of the online network addresses is larger than the number of the authorized terminals, determining that the number of the authorized terminals does not meet the requirement of the number of the authorized terminals.
In this embodiment, by increasing the number of authorized terminals as a criterion for determining whether a video play request sent by a terminal can be allowed, infringement implemented by using a plurality of terminals can be prevented.
In an exemplary embodiment, the grant expiration time is matched with the corresponding grant expiration time requirement by: determining the sending time of a first video playing request sent by a terminal; and when the sending time is not later than the authorized expiration time, determining that the authorized expiration time meets the corresponding authorized expiration time requirement.
In a specific implementation, the play address has a corresponding authorization time, that is, after the terminal receives the play address, the terminal needs to send a first video play request carrying the play address to the content distribution network server within the authorization time range. When the content distribution network server determines the authorized expiration time, the content distribution network server compares the transmission time of the first video playing request sent by the terminal with the authorized expiration time based on the transmission time of the first video playing request, and if the transmission time is not later than the authorized expiration time, the content distribution network server indicates that the transmission time is within the authorized time range, the authorized expiration time can be determined to meet the corresponding authorized expiration time requirement. Otherwise, if the transmission time is later than the authorized expiration time, which indicates that the transmission time exceeds the authorized time range, it may be determined that the authorized expiration time does not meet the corresponding authorized expiration time requirement.
In this embodiment, by adding the authorized expiration time as a criterion for determining whether the video play request sent by the terminal can be allowed, infringement implemented by using the stolen play address can be prevented.
In an exemplary embodiment, the first signature information and the corresponding signature information requirement are matched by: signing the request parameter carried by the playing address and the initial playing address corresponding to the playing address according to a preset secret key to obtain second signature information; the preset secret key is the same as the secret key for generating the first signature information; when the first signature information is the same as the second signature information, determining that the first signature information meets the corresponding signature information requirement.
In a specific implementation, the first signature information is generated by a service server, the service server and the content distribution network server can agree with a signature rule and a key in advance, and further after the content distribution network server extracts the request parameters, the service server can splice each request parameter carried by the playing address and the initial playing address into a character string according to the agreed signature rule and key, and then calculate a hash value by using the key to serve as the second signature information. And comparing the first signature information with the second signature information, and if the first signature information and the second signature information are the same, indicating that the request parameters carried by the playing address are not modified, judging that the first signature information meets the corresponding signature information requirements. Otherwise, if the two parameters are different, the request parameters carried by the playing address are indicated to be missing or modified, and the first signature information can be judged to be not in accordance with the corresponding signature information requirement.
In this embodiment, the signature information is used as a criterion for determining whether the video playing request sent by the terminal can be allowed, and when the second signature information regenerated by the content distribution network server side is different from the first signature information generated by the service server side, the video playing request of the terminal is refused, so that infringement of hotlinking playing can be prevented.
In an exemplary embodiment, in the step S240, according to the placeholder in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, the information replacement process is performed on the marked video stream, so as to obtain a replaced video stream, which includes: determining a position to be replaced according to the occupation mark in the marked video stream; and replacing the occupation information at the position to be replaced with the user identification data to obtain a replaced video stream.
In a specific implementation, after receiving the marked video stream returned by the transcoding service program, the content distribution network server can determine the position to be replaced according to the occupation mark in the marked video stream, and specifically can be the position where the occupation information in the marked video stream is located as the position to be replaced. And replacing the occupation information at the position to be replaced with the user identification data to obtain a replaced video stream, and returning the replaced video stream to the terminal.
In this embodiment, the occupation information at the position to be replaced corresponding to the occupation mark in the video stream with the mark is replaced by the user identification data, so that the binding of the user identification data and the video stream is realized, and when infringement such as push-transfer and piracy occurs, the infringement can be located by extracting the user identification data in the video stream, so that the infringement can be quickly located.
In an exemplary embodiment, the transcoding service is further configured to obtain the occupancy information; packaging the occupation information according to the supplemental enhancement information format to obtain packaged occupation information; and inserting the packaged occupation information into the original video stream to obtain the video stream with the mark.
The supplemental enhancement information (Supplemental Enhancement Information, SEI) provides a method for adding additional information to the video bitstream, which is one of the characteristics of the video compression standards h.264/h.265, and can be used to add some video-independent information, such as lyrics, to achieve synchronous display. The SEI may be added at the time of encoding or at the time of transmission.
In a specific implementation, the transcoding service may generate random data with a fixed length as the occupancy information, then encapsulate the occupancy information into an SEI information format, and add the SEI information to the header of a network abstraction layer unit (Network Abstract Layer Unit, NALU) of each frame of the original video stream, to obtain a marked video stream. Wherein the network abstraction layer unit is a basic unit of the network abstraction layer.
Referring to fig. 3, which is a schematic diagram of h.264/byte stream in one embodiment, as shown in fig. 3, the h.264/h.265 original code stream is composed of Network Abstraction Layer Units (NALU) each containing a Header (NALU Header) and an original byte sequence payload (Raw Byte Sequence Payload, RBSP).
Wherein, NALU Header is composed of 8 bits, the last 5 bits indicates NALU Type (NAL Unit Type), the common NALU Type is shown in table 1 below, the first column in table 1 indicates the Type of Network Abstraction Layer Unit (NALU), and the second column indicates the content of the network abstraction layer Unit.
Table 1 common types table for network abstraction layer units
NALU type NALU content
1 Fragments that do not immediately refresh an image and do not employ data partitioning
5 Immediate refresh image (IDR image)
6 Supplemental Enhancement Information (SEI)
7 Sequence Parameter Set (SPS).
8 Image parameter set (PPS)
11 Stream terminator
The structure of the original byte sequence payload (RBSP) of Supplemental Enhancement Information (SEI) is shown in fig. 4, and includes a payload type (i.e., a type of carrying information), a payload size (i.e., a size of carrying information), and a payload content (i.e., a specific content of carrying information), where the payload content has the same length as the payload size. In standard definitions of ITU-T h.264 and h.265, the type of Supplemental Enhancement Information (SEI) carrying information, i.e., SEI Payload type=5, is user-defined content (user_data_unregistered), can be used to add service definition data.
In the standard definition of ITU-T H.264/H.265, the user_data_unregistered data consists of two parts:
(1) 16 bytes of uuid_iso_ IEC _11578, uuid_iso_iec_11578 is ISO/IEC 11578: the type of universally unique identifier (Universally Unique Identifier, UUID) defined in 1996 appendix a, UUID in this application is set to 37d06f44-bbe4-4ef1-88ca-8c64bb0dc611 (alternatively other values).
(2) The service custom data with indefinite length is used for replacing data of a content distribution network server in the application, the application is filled with 32-bit fixed-length random data, and the final format is shown in fig. 5.
In this embodiment, the encapsulated occupancy information is obtained by encapsulating the occupancy information in the supplemental enhancement information format, and the encapsulated occupancy information is inserted into the original video stream, so as to implement an occupancy marker for the original video stream, so that the subsequent content distribution network server can locate the location where the user identification data is inserted based on the occupancy information, and bind the user identification data with the video stream.
Referring to fig. 6, an application scenario diagram of a video processing method according to another embodiment is provided. As shown in fig. 6, the service server 108 communicates with the terminal 102 via a network, and the terminal 102 communicates with the content distribution network server 104 via a network. The content distribution network server 104 communicates with the transcoding service 106 over a network. Transcoding service 106 may be deployed on content distribution network server 104 or on other servers.
In one embodiment, as shown in fig. 7, a video processing method is provided, and the method is applied to the service server 108 in fig. 6 for illustration, and includes the following steps:
step S710, based on the second video playing request sent by the terminal, obtaining video information carried by the second video playing request, and obtaining user identification data of the terminal, an authorized expiration time corresponding to the user identification data, and an authorized terminal number.
The video information may be a video identification (e.g., video ID), or other data that may uniquely match the video stream.
Specifically, when the terminal needs to play a certain video stream, a second video playing request carrying video information of the video stream may be sent to the service server 108, and after the service server 108 receives the second video playing request, the service server may acquire the carried video information, acquire user identification data of the terminal 102, and acquire an authorized expiration time and an authorized terminal number preset for the user identification data. Specifically, a preset user permission table can be searched according to the user identification data, so that the authorized expiration time and the authorized terminal number corresponding to the user identification data are obtained.
In one embodiment, it may also be preset that all the user identification data have the same authorized expiration time and number of authorized terminals, and after receiving the second video playing request sent by the terminal 102, the default authorized expiration time and number of authorized terminals are used as the authorized expiration time and number of authorized terminals corresponding to the user identification data.
Step S720, an initial play address corresponding to the video information is obtained, and first signature information is generated according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number.
In a specific implementation, after receiving the second video playing request, the service server 108 may query and obtain an initial playing address of a video stream to be played by the terminal 102 according to video information carried by the second video playing request, splice the initial playing address, user identification data, authorized expiration time and authorized terminal number into a character string, and then use a signature algorithm to utilize a Key pre-agreed with the content distribution network 2 The hash value is calculated as first signature information, and the first signature information is calculated as follows:
Sign=HMAC_SHA256(Key 2 ,uin+url+ExpireTime+maxClient)
wherein Sign represents signature information, uin represents user representation data, url represents an initial play address, expireTime represents an authorized expiration time, and maxcient represents an authorized terminal number.
Wherein HMAC-SHA256 may represent a signature algorithm or a signature scheme, which is an HMAC algorithm that uses SHA-256 to generate a hash value. Where HMAC is an algorithm that constructs a message authentication code using a one-way hash function, SHA256 (Secure Hash Algorithm, secure hash algorithm 256) is a hash function (or hash function).
It should be noted that the signature algorithm used in this embodiment is only used as an example, and in practical application, other signature algorithms may be used, such as RSA (an asymmetric encryption algorithm), ECDSA (Elliptic Curve Digital Signature Algorithm, a digital signature algorithm based on elliptic curve), and the like.
Step S730, adding the user identification data, the authorized expiration time, the number of authorized terminals and the first signature information to the initial play address to obtain a play address.
In a specific implementation, after obtaining user identification data, authorized expiration time, authorized terminal number and first signature information, in order to enable the content distribution network server to perform second verification on a video access request of the terminal through the authorized expiration time, authorized terminal number and first signature information, the user identification data, authorized expiration time, authorized terminal number and first signature information and the like can be used as request parameters and added to an initial play address, and the play address obtained after the addition processing is returned to the terminal.
Step S740, sending the playing address to the terminal, and enabling the terminal to send a first video playing request carrying the playing address to the content distribution network server.
The content distribution network server is used for acquiring a playing address based on the first video playing request, and acquiring an original video stream corresponding to the playing address under the condition that request parameters carried by the playing address meet the preset parameter conditions; transmitting a video transcoding request carrying an original video stream to a transcoding service program, so that the transcoding service program performs space occupying marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal.
In a specific implementation, after obtaining the play address based on the second video play request sent by the terminal 102, the service server 108 may return the play address carrying the request parameter to the terminal 102, where the terminal 102 may further send the first video play request carrying the play address to the content distribution network server 104, and the content distribution network server 104 further processes the first video play request.
In this embodiment, based on a second video playing request sent by a terminal, video information carried by the second video playing request is obtained, and user identification data of the terminal, authorized expiration time corresponding to the user identification data and the number of authorized terminals are obtained; generating first signature information according to an initial play address, user identification data, authorization expiration time and authorization terminal number corresponding to video information; adding the user identification data, the authorized expiration time, the authorized terminal number and the first signature information to an initial play address to obtain a play address; and sending the play address to the terminal, so that the terminal sends a first video play request carrying the play address to the content distribution network server. According to the method, first signature information is generated according to an initial play address, user identification data, authorized expiration time and the number of authorized terminals, and the user identification data, the authorized expiration time, the number of authorized terminals and the first signature information are added to the initial play address, so that a content distribution network server can recognize pirate playing behaviors from multiple angles such as the authorized expiration time, the number of authorized terminals and the signature information, and the recognition probability of infringement behaviors is greatly improved.
In an exemplary embodiment, in step S720, generating the first signature information according to the initial play address, the user identification data, the authorized expiration time, and the number of authorized terminals includes: determining the access right of the terminal for the initial play address according to the user identification data; when the identification terminal has the access right, generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number.
In the specific implementation, after receiving a second video playing request of a terminal, a service server needs to perform authentication processing on the terminal, namely, whether the terminal has access right for an initial playing address is determined according to user identification data, if so, first signature information can be generated according to request parameters such as the initial playing address, the user identification data, the authorized expiration time, the number of authorized terminals and the like, and a playing address for adding the request parameters is further issued to the terminal; otherwise, if the terminal does not have the access right for the initial play address, the terminal is refused to access the initial play address.
In this embodiment, the service server authenticates the first video playing request of the terminal, and determines whether the pirate playing behavior occurs, so that the infringement behavior can be prevented in time.
In an exemplary embodiment, step S730, adding the user identification data, the authorized expiration time, the number of authorized terminals, and the first signature information to the initial play address to obtain a play address includes: encrypting the user identification data through a preset encryption algorithm to obtain encrypted user identification data; and adding the encrypted user identification data, the authorized expiration time, the authorized terminal number and the first signature information to an initial play address to obtain a play address.
In a specific implementation, in order to prevent the user identification data from being revealed, the user identification data may be encrypted and then added to the initial play address. Specifically, the user identification data may be encrypted by an encryption algorithm, such as AES algorithm (Advanced Encryption Standard ), in the following manner:
EncryptUIN=AES_GCM_128(Key 1 ,Uin+Salt)
where encrypteuin denotes encrypting user identification data, AES is a symmetric encryption algorithm, GCM (Galois/Counter Mode) means that the symmetric encryption adopts Counter Mode, and 128 denotes a packet length for plaintext (i.e., user identification data) to be encrypted. Key (Key) 1 The key for encrypting the user identification data is represented by Uin, the Salt value is represented by salified value, and the character string is generated randomly.
The encryption private Key Key1 can be randomly generated according to each path of live video stream.
Further, in the case where the play address is stored as encrypted user identification data, the service server also needs to pre-agree on a Key for the user identification data with the content distribution network server 1 To facilitate content distribution network serviceAfter extracting the user identification data from the play address, the server can use the Key Key 1 Decrypting the encrypted user identification data to obtain the user identification data.
It should be noted that the encryption algorithm used in this embodiment is only used as an example, and in practical application, other encryption algorithms may be used to encrypt the user identification data, such as Chacha20 (a stream symmetric encryption algorithm), 3DES (Triple Data Encryption Algorithm ), DES (Data Encryption Standard, data encryption standard, which is a block algorithm using key encryption), and the like.
In this embodiment, after the user identification data is encrypted, the encrypted user identification data, the authorized expiration time, the number of authorized terminals and the first signature information are added to the initial play address, so that the risk of leakage of the user identification data can be prevented.
In one embodiment, to facilitate understanding of embodiments of the present application by those skilled in the art, the following description will be made with reference to specific examples of the drawings. Referring to fig. 8, an interactive flow chart of the video processing method provided in the present application is shown, and the related interactive objects include a service server, a terminal, a content distribution network server, a transcoding service program and an online service program, where main functions of each part are as follows:
and the service server is used for receiving a second video playing request carrying video information sent by the terminal, judging whether the terminal user has the authority to access the initial playing address, if so, adding encrypted user identification data, authorized expiration time, authorized terminal number and first signature information into the initial playing address corresponding to the video information, and returning the playing address after the information is added to the terminal. The first signature information is obtained through calculation of user identification data, authorized expiration time, authorized terminal number and initial play address.
And the terminal is used for sending a second video playing request carrying video information to the service server, and sending a first video playing request carrying the playing address to the content distribution network server after receiving the playing address carrying the request parameter returned by the service server.
After extracting a request parameter from a play address carried by a first video play request, the content distribution network server compares the request parameter with a preset parameter condition to judge whether a pirate play action exists, if the request parameter accords with the preset parameter condition, namely, the pirate play action does not exist, an original video stream corresponding to the play address is obtained, and a video transcoding request carrying the original video stream is sent to a transcoding service program. After receiving the marked video stream returned by the transcoding service program, determining a position to be replaced according to the occupation mark in the marked video stream; and replacing the occupation information of the position to be replaced with the user identification data to obtain the replaced video stream, and returning the replaced video stream to the terminal.
The transcoding service program is used for acquiring the occupation information according to the video transcoding request sent by the content distribution network server; packaging the occupation information according to a supplementary enhancement information format to obtain packaged occupation information; and inserting the encapsulated occupation information into the original video stream to obtain the marked video stream.
The online service program is used for maintaining a user online network address list, in particular maintaining the corresponding relation between the user requesting the video stream and the network address thereof, so that the content distribution network server can identify whether the number of authorized terminals in the request parameters meets the requirement by inquiring the online service.
As shown in fig. 9, the list of online network addresses of the user maintained in the memory by the online service program may specifically include the following data structures:
(1) The online user list is in a hash table structure. The key (key) of the hash table is user identification data, the value (value) is an IP list (network address list) of the user, the user identification data is obtained by the content distribution network server analyzing request parameters, and the network address of the user is obtained by the content distribution network server according to the TCP protocol.
(2) The online IP list of the user is also in a hash table structure. The key (key) of the hash table is a user IP, the value (value) is an expiration time, and the expiration time is determined according to the authorization time of each IP, or may be set after 1 minute by default, and may be increased (security level is increased) or decreased (security level is decreased) according to the requirement of the security level.
When the content distribution network server inquires the user online network address list through online service, if the user identification data is not found, a user-IP corresponding relation can be created, the IP and the expiration time of the current terminal are inserted into the user online IP list, and then the user identification data and the user online IP list are inserted into the online user list.
If the user identification data is found, judging whether the number of online network addresses corresponding to the user identification data exceeds the number of authorized terminals, if not, inserting the IP and expiration time of the current terminal into the online IP list of the user; if the request parameters exceed the preset parameter conditions, the verification fails, and the request parameters do not meet the preset parameter conditions.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a video processing device for implementing the video processing method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the video processing apparatus provided below may refer to the limitation of the video processing method described above, and will not be repeated here.
In one embodiment, as shown in fig. 10, there is provided a video processing apparatus including: a first acquisition module 1001, a second acquisition module 1002, a request transmission module 1003, a video processing module 1004, and a video return module 1005, wherein:
the first obtaining module 1001 is configured to obtain, based on a first video playing request sent by the terminal, a playing address carried by the first video playing request, where the playing address carries a request parameter, and the request parameter includes user identification data;
a second obtaining module 1002, configured to obtain an original video stream corresponding to the play address when the request parameter meets a preset parameter condition;
a request sending module 1003, configured to send a video transcoding request carrying an original video stream to a transcoding service; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
The video processing module 1004 is configured to perform information replacement processing on the marked video stream according to the occupation mark in the marked video stream and the user identification data in the request parameter returned by the transcoding service program, so as to obtain a replaced video stream;
the video return module 1005 is configured to return the replaced video stream to the terminal.
In one embodiment, the request parameters further include the number of authorized terminals, an authorized expiration time, and first signature information; the device also comprises a parameter identification module which is used for determining that the request parameters meet the preset parameter conditions when the request parameters carried by the playing address are complete and the number of authorized terminals, the authorized expiration time and the first signature information all meet the respective corresponding parameter requirements.
In one embodiment, the parameter identification module is further configured to query a user online network address list according to the user identification data, to obtain the number of online network addresses corresponding to the user identification data; when the number of the online network addresses is smaller than or equal to the number of the authorized terminals, determining that the number of the authorized terminals meets the corresponding requirement of the number of the authorized terminals.
In one embodiment, the parameter identification module is further configured to determine a sending time of the terminal to send the first video playing request; and when the sending time is not later than the authorized expiration time, determining that the authorized expiration time meets the corresponding authorized expiration time requirement.
In one embodiment, the parameter identification module is further configured to sign, according to a preset key, a request parameter carried by the play address and an initial play address corresponding to the play address, to obtain second signature information; the preset secret key is the same as the secret key for generating the first signature information; when the first signature information is the same as the second signature information, determining that the first signature information meets the corresponding signature information requirement.
In one embodiment, the video processing module 1004 is further configured to determine a position to be replaced according to the placeholder marks in the marked video stream; and replacing the occupation information at the position to be replaced with the user identification data to obtain a replaced video stream.
In one embodiment, the transcoding service is further configured to obtain the occupancy information; packaging the occupation information according to the supplemental enhancement information format to obtain packaged occupation information; and inserting the packaged occupation information into the original video stream to obtain the video stream with the mark.
In one embodiment, as shown in fig. 11, there is also provided a video processing apparatus, including: an information acquisition module 1101, a signature generation module 1102, a parameter addition module 1103, and an address transmission module 1104, wherein:
The information obtaining module 1101 is configured to obtain, based on a second video playing request sent by the terminal, video information carried by the second video playing request, and obtain user identification data of the terminal, an authorized expiration time corresponding to the user identification data, and an authorized terminal number;
the signature generation module 1102 is configured to obtain an initial play address corresponding to the video information, and generate first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number;
a parameter adding module 1103, configured to add the user identification data, the authorized expiration time, the number of authorized terminals, and the first signature information to an initial play address, to obtain a play address;
an address sending module 1104, configured to send a play address to the terminal, so that the terminal sends a first video play request carrying the play address to the content distribution network server; the content distribution network server is used for acquiring a playing address based on the first video playing request, and acquiring an original video stream corresponding to the playing address under the condition that request parameters carried by the playing address meet the preset parameter conditions; transmitting a video transcoding request carrying an original video stream to a transcoding service program, so that the transcoding service program performs space occupying marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal.
In one embodiment, the signature generation module 1102 is further configured to determine, according to the user identification data, an access right of the terminal for the initial play address; when the identification terminal has the access right, generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number.
In one embodiment, the parameter adding module 1103 is further configured to encrypt the user identification data through a preset encryption algorithm to obtain encrypted user identification data; and adding the encrypted user identification data, the authorized expiration time, the authorized terminal number and the first signature information to an initial play address to obtain a play address.
The respective modules in the video processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 12. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store data during video processing. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a video processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (12)

1. A method of video processing, the method comprising:
based on a first video playing request sent by a terminal, acquiring a playing address carried by the first video playing request, wherein the playing address carries a request parameter, and the request parameter comprises user identification data;
under the condition that the request parameters meet the preset parameter conditions, acquiring an original video stream corresponding to the playing address;
Transmitting a video transcoding request carrying the original video stream to a transcoding service program; the transcoding service program is used for carrying out space occupation marking on the original video stream to obtain a marked video stream;
according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream;
and returning the replaced video stream to the terminal.
2. The method of claim 1, wherein the request parameters further comprise a number of authorized terminals, an authorized expiration time, and first signature information; the method further comprises the steps of:
when the request parameters carried by the play address are complete, and the number of authorized terminals, the authorized expiration time and the first signature information all meet the respective corresponding parameter requirements, determining that the request parameters meet preset parameter conditions.
3. The method of claim 2, wherein the number of authorized terminals and the corresponding number of authorized terminals are matched by:
inquiring a user online network address list according to the user identification data to obtain the online network address number corresponding to the user identification data;
And when the number of the online network addresses is smaller than or equal to the number of the authorized terminals, determining that the number of the authorized terminals meets the corresponding requirement of the number of the authorized terminals.
4. The method of claim 2, wherein the grant expiration time is matched to the corresponding grant expiration time requirement by:
determining the sending time of the first video playing request sent by the terminal;
and when the sending time is not later than the authorized expiration time, determining that the authorized expiration time meets the corresponding authorized expiration time requirement.
5. The method of claim 2, wherein the first signature information is matched with the corresponding signature information requirement by:
signing the request parameter carried by the playing address and the initial playing address corresponding to the playing address according to a preset secret key to obtain second signature information; the preset key is the same as the key for generating the first signature information;
and when the first signature information is the same as the second signature information, determining that the first signature information meets the corresponding signature information requirement.
6. The method according to claim 1, wherein the performing information replacement processing on the marked video stream according to the placeholder in the marked video stream returned by the transcoding service program and the user identification data in the request parameter to obtain a replaced video stream includes:
Determining a position to be replaced according to the occupation mark in the marked video stream;
and replacing the occupation information of the position to be replaced with the user identification data to obtain the replaced video stream.
7. The method of claim 1, wherein the transcoding service is further operable to obtain occupancy information; packaging the occupation information according to a supplementary enhancement information format to obtain packaged occupation information; and inserting the encapsulated occupation information into the original video stream to obtain the marked video stream.
8. A method of video processing, the method comprising:
based on a second video playing request sent by a terminal, acquiring video information carried by the second video playing request, and acquiring user identification data of the terminal, authorization expiration time corresponding to the user identification data and the number of authorized terminals;
acquiring an initial play address corresponding to the video information, and generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number;
adding the user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain a play address;
Sending the play address to the terminal, so that the terminal sends a first video play request carrying the play address to a content distribution network server;
the content distribution network server is used for acquiring the playing address based on the first video playing request, and acquiring an original video stream corresponding to the playing address under the condition that the request parameter carried by the playing address meets the preset parameter condition; transmitting a video transcoding request carrying the original video stream to a transcoding service program, so that the transcoding service program performs space occupation marking on the original video stream to obtain a marked video stream; according to the occupation mark in the marked video stream returned by the transcoding service program and the user identification data in the request parameter, carrying out information replacement processing on the marked video stream to obtain a replaced video stream; and returning the replaced video stream to the terminal.
9. The method of claim 8, wherein the generating the first signature information based on the initial play address, the user identification data, the authorized expiration time, and the number of authorized terminals comprises:
Determining the access right of the terminal for the initial play address according to the user identification data;
and when the terminal is identified to have the access right, generating first signature information according to the initial play address, the user identification data, the authorized expiration time and the authorized terminal number.
10. The method of claim 8, wherein adding the user identification data, the authorized expiration time, the authorized number of terminals, and the first signature information to the initial play address results in a play address, comprising:
encrypting the user identification data through a preset encryption algorithm to obtain encrypted user identification data;
and adding the encrypted user identification data, the authorized expiration time, the authorized terminal number and the first signature information to the initial play address to obtain the play address.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the video processing method of any of claims 1 to 10 when the computer program is executed.
12. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the video processing method of any of claims 1 to 10.
CN202311165770.7A 2023-09-11 2023-09-11 Video processing method, device, computer equipment and storage medium Pending CN117336565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311165770.7A CN117336565A (en) 2023-09-11 2023-09-11 Video processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311165770.7A CN117336565A (en) 2023-09-11 2023-09-11 Video processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117336565A true CN117336565A (en) 2024-01-02

Family

ID=89274605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311165770.7A Pending CN117336565A (en) 2023-09-11 2023-09-11 Video processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117336565A (en)

Similar Documents

Publication Publication Date Title
US11366878B2 (en) Method and apparatus for delivering encoded content
KR101594230B1 (en) Secure and efficient content screening in a networked environment
EP3055805B1 (en) System and method for signaling and verifying url signatures for both url authentication and url-based content access authorization in adaptive streaming
US20180249190A1 (en) Method and apparatus for cloud storage and cloud download of multimedia data
US20170353745A1 (en) Secure media player
KR20170007427A (en) Token-based authentication and authorization information signaling and exchange for adaptive streaming
JP2015519814A (en) System and method for segment integrity and reliability for adaptive streaming
CN110140335B (en) Resource segmentation for improved delivery performance
US20240137624A1 (en) Watermarking multimedia fragments into two or more variants
CN115955310B (en) Information source encryption multimedia data export security protection method, device and equipment
US20210035018A1 (en) Apparatus for verifying integrity of AI learning data and method therefor
US20200364317A1 (en) Method and system for identifying a user terminal in order to receive streaming protected multimedia content
CN110912941A (en) Transmission processing method and device for multicast data
CN117336565A (en) Video processing method, device, computer equipment and storage medium
US8842823B2 (en) Technique for determining usage of encrypted media content
CN104378325B (en) Network electronic data acquisition solidification, verification and reduction method and system
CN110691267B (en) TLS-based video stream address authentication method, storage medium, equipment and system
CN108933950A (en) Terminal iidentification determines method and device, computer equipment and storage medium
CN117459763B (en) Audio and video safety protection method, equipment and system based on dynamic arrangement
CN117528149A (en) Key updating method, code stream encryption method, code stream decryption method and related devices
CN118042144A (en) Security processing method, related device, equipment and medium
CN118018743A (en) Transcodeable signed video data

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