CN110677693A - Android system-based encrypted video offline playing method and device and electronic equipment - Google Patents

Android system-based encrypted video offline playing method and device and electronic equipment Download PDF

Info

Publication number
CN110677693A
CN110677693A CN201910838154.0A CN201910838154A CN110677693A CN 110677693 A CN110677693 A CN 110677693A CN 201910838154 A CN201910838154 A CN 201910838154A CN 110677693 A CN110677693 A CN 110677693A
Authority
CN
China
Prior art keywords
encrypted video
local server
playing
video file
encrypted
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
CN201910838154.0A
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.)
Guangzhou Snail Interactive Technology Co Ltd
Original Assignee
Guangzhou Snail Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Snail Interactive Technology Co Ltd filed Critical Guangzhou Snail Interactive Technology Co Ltd
Priority to CN201910838154.0A priority Critical patent/CN110677693A/en
Publication of CN110677693A publication Critical patent/CN110677693A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26606Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing entitlement messages, e.g. Entitlement Control Message [ECM] or Entitlement Management Message [EMM]
    • 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, manipulating MPEG-4 scene graphs
    • H04N21/2347Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving video stream encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video stream decryption

Abstract

The invention relates to an encrypted video offline playing method and device based on an android system and electronic equipment. The android system-based online encrypted video playing method comprises the following steps: a local server is established in terminal equipment where a client is located; acquiring an encrypted video data request sent by a local server, wherein the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located; and decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing. The android system-based online encrypted video playing method can solve the problem that videos are easy to be stolen and recorded in the video playing process of the android system.

Description

Android system-based encrypted video offline playing method and device and electronic equipment
Technical Field
The invention relates to the technical field of video playing, in particular to an encrypted video offline playing method and device based on an android system and electronic equipment.
Background
Along with the rapid development of mobile internet technology and the large-scale popularization of smart phones, mobile phones are changing our lives more and more deeply and carrying multiple functions such as financing, shopping, diet, entertainment, study and life and the like.
The VideoView is a multimedia player which is carried by an intelligent terminal such as a smart phone, a smart television and the like which adopts an Android (Android) system platform, and is used for playing encrypted video in practical application in order to prevent the encrypted video from leaking, and the VideoView does not support the video in an encrypted packaging format, so that the video is decrypted in a playing mode to generate a packaging format supported by the VideoView, but the decrypted video has the risk of being copied and stolen.
Disclosure of Invention
The embodiment of the application provides an encrypted video offline playing method and device based on an android system and electronic equipment, and can solve the problem that videos are easily stolen and recorded in the video playing process of the android system.
In a first aspect, an embodiment of the present application provides an online encrypted video playing method based on an android system, including:
a local server is established in terminal equipment where a client is located;
acquiring an encrypted video data request sent by a local server, wherein the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located;
and decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
Optionally, the play request includes a storage address of the indicated encrypted video file in the terminal device, and the method further includes:
and mapping the storage address to a port where the local server is located so that the local server can obtain the playing request.
Optionally, the encryption process of the encrypted video file includes:
and encrypting a plurality of header bytes of the video file to generate the encrypted video file.
Optionally, encrypting a plurality of header bytes of the video file includes:
several header bytes of a video file are encrypted using a symmetric encryption method.
In a second aspect, an embodiment of the present application provides an online encrypted video playing device based on an android system, including:
the local server creating module is used for creating a local server at the terminal equipment where the client is located;
the local server creating module is used for creating a local server at the terminal equipment where the client is located;
the device comprises an encrypted video data request acquisition module, a video data acquisition module and a video data acquisition module, wherein the encrypted video data request acquisition module is used for acquiring an encrypted video data request sent by a local server, the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located;
and the decryption sending module is used for decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
Optionally, the play request includes a storage address of the indicated encrypted video file in the terminal device, and the apparatus further includes:
and the address mapping unit is used for mapping the storage address to a port where the local server is located so as to enable the local server to obtain the playing request.
Optionally, the apparatus further comprises:
and the head byte encryption module is used for encrypting a plurality of head bytes of the video file to generate the encrypted video file.
Optionally, the header byte encryption module includes:
and the symmetric encryption unit encrypts a plurality of header bytes of the video file by using a symmetric encryption method.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory and a processor;
the memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for playing the encrypted video offline based on the android system according to any one of the first aspect of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of the first aspect.
In the embodiment of the application, a local server is pre-created in an android system, the local server sends an encrypted video data request to a client according to a playing request acquired from a player control based on a VideoView, the client decrypts and converts a local video file into a plurality of TS video slice files, sending the TS video slice files to a local server, sending the TS video slice files to the player control based on the VideoView to be played, because the client, the local server and the player control based on the VideoView realize the simultaneous decryption and playing of the local encrypted video file, the local video file does not need to be integrally decrypted and converted into a file format supported by the player control based on the VideoView, the encrypted video file stored in the local server has no risk of being copied and stolen after being decrypted, meanwhile, the playing process is safer and simpler by using the player control based on the VideoView.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Drawings
Fig. 1 is a schematic view of an application scenario of an encrypted video offline playing method based on an android system according to the present invention in an exemplary embodiment;
FIG. 2 is a flowchart illustrating an offline playing method for an encrypted video based on the android system according to the present invention in an exemplary embodiment;
fig. 3 is a block diagram illustrating a structure of an encrypted video offline playing apparatus based on the android system according to the present invention in an exemplary embodiment;
fig. 4 is a block diagram of the structure of the electronic device of the present invention shown in an exemplary embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 is a schematic view of an application scenario of the android system-based encrypted video offline playing method in an exemplary embodiment of the present application, a hardware carrier of the android system-based encrypted video offline playing method in the embodiment of the present application is an electronic device 100, and the electronic device 100 may be any intelligent terminal, for example, a computer, a mobile phone, a tablet computer, an interactive smart tablet, a PDA (Personal Digital Assistant), an e-book reader, a multimedia player, and the like. An Android (Android) operating system runs on the electronic device 100, and in the embodiment of the application, offline playing of an encrypted video is realized through a native player VideoView based on the Android system.
The VideoView in the embodiment of the present application is implemented based on the software client 110 in fig. 1 as a control, where the client 110 may be a software program APP installed in the electronic device 100, and in some implementation manners based on a B/S architecture, the software client 110 may also be a web application, and the present application takes the client 110 as an example for description.
The bottom layer implementation of native player VideoView120 based on android system is MediaPlayer, the MediaPlayer class is an important component in android multimedia framework, and through this class, we can acquire, decode and play audio and video with minimum steps. It supports three different media sources: local resources, internal URIs and external URLs (streams).
When playing a video stream on a network, MediaPlayer supports two protocols, HTTP and RTSP, the biggest difference between these two protocols is that the RTSP protocol supports the playing of real-time streaming media, but the HTTP protocol does not support. Since the underlying implementation of VideoView is MediaPlayer, the VideoView player also supports both protocols.
However, protocols (which do not support RTMP, MMS, etc.) and encapsulation formats supported by the Android native mediapalette are limited, and encrypted video cannot be played.
Based on the above technical problem, as shown in fig. 2, an embodiment of the present application discloses a flowchart of an encrypted video offline playing method based on an android system, where the method is executed by a client, and includes the following steps:
s201, a local server is established in the terminal equipment where the client is located.
In the embodiment of the application, the local Server is an HTTP Server, and the android system creates a local Server for monitoring the designated port in real time in advance, and preferably, the local Server calls a Java Server Socket to create after the client starts up or detects a play request.
And the encrypted video is stored in the electronic equipment where the client is located.
S202, acquiring an encrypted video data request sent by a local server, wherein the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located.
The client may be that a player control based on VideoView is set in some pages of the client, and when a user opens a page in the client in which the player control is set, the player control automatically loads, and sends a play request according to a play source of an encrypted video preset in the player control, and the local server obtains the play request.
And the local server communicates and transmits data with the client and the player control based on the VideoView according to the HTTP protocol. In some examples, the play request includes a local storage address of the encrypted video at the terminal device where the client is located.
In some examples, the local server may directly obtain the play request of the player control based on the VideoView by listening, or may obtain the play request of the player control based on the VideoView received and forwarded by the client.
In some examples, after receiving the play request, the local server sends an encrypted video data request to the client according to the local storage address of the encrypted video in the play request, so as to obtain the encrypted video file stored in the terminal device where the client is located.
S203, decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server, so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
In this embodiment, the client firstly verifies the application signature, then decrypts through an encryption algorithm of the jni (java native interface) end to obtain a decryption key, and decrypts the encrypted video file through the decryption key. After the client decrypts the encrypted video file through the decryption key, the encrypted video file is converted into a plurality of HTTP files, one thread is created, or a plurality of sub-threads are started to send the HTTP files to the local server.
The method comprises the steps that a client side divides an encrypted video file into small files based on HTTP, decrypts the HTTP files and sends the files to a local server, specifically, the HTTP files are TS video slice files, and the client side decrypts the TS slice files.
According to the method and the device, the HTTP protocol is adopted to complete sending and processing of the requests, therefore, the player control based on the VideoView needs to send a plurality of playing requests to the local server, an object pointed by each playing request is a TS video slice file of the encrypted video file, and the client divides a corresponding TS video slice file according to each playing request, decrypts the TS video slice file and sends the TS video slice file to the local server.
The client may send the video data packets from the client to the local Server through a preset Socket (Server Socket). In this step, the client creates a local Server Socket, connects to a localcocket of the local Server, converts the encrypted video file into a Socket (Server Socket) video data packet, and sends the video data packet to the Server through one or more threads. Because the socket directly uses the memory mapping mode to transmit data, when the client sends the video data packet to the local server, the transmission is stable and the transmission efficiency is high.
The local Server may also send the video data packet from the local Server to the VideoView-based player control through a preset Socket (Server Socket) for playing.
In the embodiment of the application, the local server creates one thread or a plurality of sub-threads to receive the TS video slice file to be played, and sends the TS video slice file to the player control based on the VideoView through the HTTP protocol for playing.
In some examples, the android system logs off the local server after the playback of the entire video file is completed.
In the embodiment of the application, a local server is pre-created in an android system, the local server sends an encrypted video data request to a client according to a playing request acquired from a player control based on a VideoView, the client decrypts and converts a local video file into a plurality of TS video slice files, sending the TS video slice files to a local server, sending the TS video slice files to the player control based on the VideoView to be played, because the client, the local server and the player control based on the VideoView realize the simultaneous decryption and playing of the local encrypted video file, the local video file does not need to be integrally decrypted and converted into a file format supported by the player control based on the VideoView, the encrypted video file stored in the local server has no risk of being copied and stolen after being decrypted, meanwhile, the playing process is safer and simpler by using the player control based on the VideoView.
In an exemplary embodiment, the playing request includes a storage address of the indicated video data, and the obtaining, by the local server, the playing request of the player control based on the VideoView includes: the client maps the storage address to the port of the local server so that the local server obtains the playing request. And the player control based on the VideoView sends the playing request to the local server, and the local server sends an encrypted video data request to the client according to the playing request and the storage address of the video data indicated in the request. For example, the client translates the encrypted video local file address file path to the local server address http:// localhost: port// file path.
In order to improve the decryption and playing efficiency, in an exemplary embodiment, before the client acquires the playing request of the player control based on the VideoView, only a few header bytes of the video file are encrypted, and an encrypted video file is generated. The number of header bytes may be one, or more, and in other embodiments may be other numbers, such as 99. In some other examples, portions of the content of the video file may be encrypted in other ways, such as the header and trailer portions, or the middle portion of the content.
In an exemplary embodiment, the encrypted video file of the embodiment of the present application uses a symmetric encryption algorithm to encrypt several header bytes of the video file, and the same key can be used for both encryption and decryption of information by using an encryption method of a single-key cryptosystem. Specifically, the data Encryption standard can be des (data Encryption standard): the data encryption is standard, the speed is high, and the method is suitable for occasions where a large amount of data is encrypted; 3DES (triple DES): based on DES, three different keys are used for encrypting one block of data for three times, so that the intensity is higher; or aes (advanced Encryption standard): the advanced encryption standard is the next generation encryption algorithm standard, has high speed and high security level, and supports encryption of 128, 192, 256 and 512 bit keys.
Corresponding to the foregoing encrypted video offline playing method based on the android system, the present invention further provides an encrypted video offline playing apparatus based on the android system, where the apparatus may be installed in any intelligent terminal, and for example, the apparatus may be a computer, a server, a mobile phone, a tablet computer, an interactive intelligent tablet, a PDA (Personal Digital Assistant), an e-book reader, a multimedia player, and the like. The encrypted video offline playing device of the android system of the embodiment of the invention is characterized in that a local server is pre-established in the android system, a player control based on VideoView sends an encrypted video playing request to the local server, the local server requests a client for a decrypted TS video slice file, the client decrypts and converts the local video file into a plurality of TS video slice files and then sends the TS video slice files to the local server, the local server sends the TS video slice files to the player control based on VideoView for playing, and because the client, the local server and the player control based on VideoView realize the playing of the local encrypted video file while decrypting, the local video file does not need to be integrally decrypted and converted into a file format supported by the player control based on VideoView, so that the encrypted video file stored in the local system has no risk of being copied and stolen after being decrypted, meanwhile, the playing process is safer and simpler by using the player control based on the VideoView
In an exemplary embodiment, as shown in fig. 3, the android system-based encrypted video offline playing apparatus 300 includes:
a local server creating module 301, configured to create a local server in a terminal device where a client is located;
an encrypted video data request obtaining module 302, configured to obtain an encrypted video data request sent by a local server, where the encrypted video data request is sent by the local server according to a play request of a player control based on VideoView, and the play request indicates an encrypted video file stored in a terminal device where a client is located;
a decryption sending module 303, configured to decrypt and convert the encrypted video file into multiple HTTP files according to a preset key, and send the multiple HTTP files to the local server, so that the local server sends the multiple HTTP files to the player control based on VideoView for playing.
In an exemplary embodiment, the play request includes a storage address of the indicated encrypted video file in the terminal device, and the apparatus 300 further includes:
and the address mapping unit is used for mapping the storage address to a port where the local server is located so as to enable the local server to obtain the playing request.
In an exemplary embodiment, the apparatus 300 further comprises:
and the head byte encryption module is used for encrypting a plurality of head bytes of the video file to generate the encrypted video file.
In an exemplary embodiment, the header byte encryption module includes:
and the symmetric encryption unit encrypts a plurality of header bytes of the video file by using a symmetric encryption method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Corresponding to the foregoing encrypted video offline playing method based on the android system, an embodiment of the present application further provides an electronic device applied to the encrypted video offline playing apparatus based on the android system, where the electronic device may be any intelligent terminal, and for example, may be a computer, a mobile phone, a tablet computer, an interactive intelligent tablet, a PDA (Personal digital assistant), an electronic book reader, a multimedia player, and the like. The electronic equipment creates a local server in the android system in advance, the local server sends an encrypted video data request to a client according to a playing request acquired from a player control based on the VideoView, the client decrypts and converts a local video file into a plurality of TS video slice files, sending the TS video slice files to a local server, sending the TS video slice files to the player control based on the VideoView to be played, because the client, the local server and the player control based on the VideoView realize the simultaneous decryption and playing of the local encrypted video file, the local video file does not need to be integrally decrypted and converted into a file format supported by the player control based on the VideoView, the encrypted video file stored in the local server has no risk of being copied and stolen after being decrypted, meanwhile, the playing process is safer and simpler by using the player control based on the VideoView.
The electronic device includes:
a processor;
a memory for storing a computer program executable by the processor;
when the processor executes the program, the method for playing the encrypted video offline based on the android system described in any one of the embodiments is implemented.
As shown in fig. 4, fig. 4 is a block diagram of an electronic device according to an exemplary embodiment of the present application.
The electronic device includes: a processor 1200, a memory 1201, a display screen 1202 with touch functionality, an input device 1203, an output device 1204, and a communication device 1205. The number of the processors 1200 in the electronic device may be one or more, and one processor 1200 is taken as an example in fig. 4. The number of the memories 1201 in the electronic device may be one or more, and one memory 1201 is taken as an example in fig. 4. The processor 1200, the memory 1201, the display 1202, the input device 1203, the output device 1204, and the communication device 1205 of the electronic device may be connected by a bus or other means, and fig. 4 illustrates the connection by the bus as an example. In an embodiment, the electronic device may be a computer, a mobile phone, a tablet computer, an interactive smart tablet, a PDA (Personal Digital Assistant), an e-book reader, a multimedia player, and the like. In the embodiment, an electronic device is taken as an example of an interactive smart tablet to describe.
The memory 1201 is used as a computer-readable storage medium, and can be used to store a software program, a computer-executable program, and a module, such as a program of an offline playing method of an encrypted video based on an android system in any embodiment of the present application, and a program instruction/module corresponding to the offline playing method of the encrypted video based on the android system in any embodiment of the present application (for example, the request obtaining module 301, the local server loading module 302, the request sending module 303, the decryption sending module 304, the forwarding module 305, and the like in the offline playing device of the encrypted video based on the android system). The memory 1201 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 1201 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 1201 may further include memory located remotely from the processor 1200, which may be connected to the devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The display screen 1202 may be a touch-enabled display screen, which may be a capacitive screen, an electromagnetic screen, or an infrared screen. Generally, the display screen 1202 is used for displaying data according to instructions of the processor 1200, and is also used for receiving touch operations applied to the display screen 1202 and sending corresponding signals to the processor 1200 or other devices. Optionally, when the display screen 1202 is an infrared screen, the display screen 1202 further includes an infrared touch frame, and the infrared touch frame is disposed around the display screen 1202, and may also be configured to receive an infrared signal and send the infrared signal to the processor 1200 or other devices. In other examples, the display screen 1202 may also be a display screen without touch functionality.
The communication means 1205 for establishing a communication connection with other devices may be a wired communication means and/or a wireless communication means.
The input device 1203 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function controls of the electronic apparatus, and may also be a camera for acquiring images and a sound pickup apparatus for acquiring audio data. The output device 1204 may include an audio device such as a speaker. It should be noted that the specific composition of the input device 1203 and the output device 1204 can be set according to actual situations.
The processor 1200 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 1201, that is, the above-described online encrypted video playing method based on the android system is implemented.
Specifically, in an exemplary embodiment, when the processor 1200 executes one or more programs stored in the memory 1201, the following operations are implemented:
a local server is established in terminal equipment where a client is located;
acquiring an encrypted video data request sent by a local server, wherein the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located;
and decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
On the basis of the foregoing embodiment, the play request includes a storage address of the indicated encrypted video file in the terminal device, and the method further includes:
and mapping the storage address to a port where the local server is located so that the local server can obtain the playing request.
On the basis of the above embodiment, the encryption process of the encrypted video file includes:
and encrypting a plurality of header bytes of the video file to generate the encrypted video file.
On the basis of the above embodiment, encrypting a plurality of header bytes of a video file includes:
several header bytes of a video file are encrypted using a symmetric encryption method.
The implementation process of the functions and actions of each component in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the apparatus embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described device embodiments are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort. The electronic device provided by the above can be used to execute the encrypted video offline playing method based on the android system provided by any of the above embodiments, and has corresponding functions and beneficial effects. The implementation processes of the functions and actions of each component in the above device are specifically described in the implementation processes of corresponding steps in the above encrypted video offline playing method based on the android system, and are not described herein again.
Corresponding to the foregoing embodiments of the android system-based encrypted video offline playing method, the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by the processor 1200 of the electronic device, implements the steps of the android system-based encrypted video offline playing method described in any of the foregoing embodiments.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. An encrypted video offline playing method based on an android system is characterized by comprising the following steps:
a local server is established in terminal equipment where a client is located;
acquiring an encrypted video data request sent by a local server, wherein the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located;
and decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
2. The android-system-based encrypted video offline playing method according to claim 1, wherein the playing request includes a storage address of the indicated encrypted video file in the terminal device, and the method further includes:
and mapping the storage address to a port where the local server is located so that the local server can obtain the playing request.
3. The android-system-based encrypted video offline playing method of claim 1, wherein the encryption process of the encrypted video file comprises:
and encrypting a plurality of header bytes of the video file to generate the encrypted video file.
4. The android-system-based encrypted video offline playing method of claim 3, wherein encrypting a number of header bytes of a video file comprises:
several header bytes of a video file are encrypted using a symmetric encryption method.
5. The utility model provides an encryption video off-line play device based on tall and erect system of ann, its characterized in that includes:
the local server creating module is used for creating a local server at the terminal equipment where the client is located;
the device comprises an encrypted video data request acquisition module, a video data acquisition module and a video data acquisition module, wherein the encrypted video data request acquisition module is used for acquiring an encrypted video data request sent by a local server, the encrypted video data request is sent by the local server according to a playing request of a player control based on VideoView, and the playing request indicates an encrypted video file stored in a terminal device where a client is located;
and the decryption sending module is used for decrypting the encrypted video file according to a preset secret key, converting the encrypted video file into a plurality of HTTP files, and sending the plurality of HTTP files to the local server so that the local server sends the plurality of HTTP files to the player control based on the VideoView for playing.
6. The android-system-based encrypted video offline playing device of claim 5, wherein the playing request includes a storage address of the indicated encrypted video file in the terminal device, and the device further includes:
and the address mapping unit is used for mapping the storage address to a port where the local server is located so as to enable the local server to obtain the playing request.
7. The android system-based encrypted video offline playing device of claim 5, further comprising:
and the head byte encryption module is used for encrypting a plurality of head bytes of the video file to generate the encrypted video file.
8. The android system-based encrypted video offline playing device of claim 7, wherein the header byte encryption module comprises:
and the symmetric encryption unit encrypts a plurality of header bytes of the video file by using a symmetric encryption method.
9. An electronic device, comprising:
a memory and a processor;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the android system based encrypted video offline playback method of any of claims 1-4.
10. A computer storage medium characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to execute the steps of the method for playing encrypted video offline based on the android system as claimed in any one of claims 1 to 4.
CN201910838154.0A 2019-09-05 2019-09-05 Android system-based encrypted video offline playing method and device and electronic equipment Pending CN110677693A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910838154.0A CN110677693A (en) 2019-09-05 2019-09-05 Android system-based encrypted video offline playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910838154.0A CN110677693A (en) 2019-09-05 2019-09-05 Android system-based encrypted video offline playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110677693A true CN110677693A (en) 2020-01-10

Family

ID=69076559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910838154.0A Pending CN110677693A (en) 2019-09-05 2019-09-05 Android system-based encrypted video offline playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110677693A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500487A (en) * 2021-11-15 2022-05-13 广州方阵科技有限公司 End-to-end hypertext transfer protocol conversion system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017066506A1 (en) * 2015-10-14 2017-04-20 Arris Enterprises Llc High definition secure playback with downloadable drm for android platforms
CN109862424A (en) * 2019-03-29 2019-06-07 北京金山安全软件有限公司 Video playing method and device and electronic equipment
CN109874028A (en) * 2017-12-01 2019-06-11 深圳市雷鸟信息科技有限公司 A kind of playback method, system and the storage medium of HLS Streaming Media
CN110061962A (en) * 2019-03-11 2019-07-26 视联动力信息技术股份有限公司 A kind of method and apparatus of video stream data transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017066506A1 (en) * 2015-10-14 2017-04-20 Arris Enterprises Llc High definition secure playback with downloadable drm for android platforms
CN109874028A (en) * 2017-12-01 2019-06-11 深圳市雷鸟信息科技有限公司 A kind of playback method, system and the storage medium of HLS Streaming Media
CN110061962A (en) * 2019-03-11 2019-07-26 视联动力信息技术股份有限公司 A kind of method and apparatus of video stream data transmission
CN109862424A (en) * 2019-03-29 2019-06-07 北京金山安全软件有限公司 Video playing method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500487A (en) * 2021-11-15 2022-05-13 广州方阵科技有限公司 End-to-end hypertext transfer protocol conversion system

Similar Documents

Publication Publication Date Title
US10645430B2 (en) Reducing time to first encrypted frame in a content stream
US9648027B2 (en) Segment authentication for dynamic adaptive streaming
US9900289B2 (en) Low-latency secure segment encryption and authentication interface
WO2016197862A1 (en) Data transmission method and apparatus, and intelligent television system
US9385998B2 (en) Signaling and carriage of protection and usage information for dynamic adaptive streaming
JP2017073801A (en) Content transfer, content encryption in distribution, signaling of right management, and handling
US20200099992A1 (en) Method and terminal for playing a video file
WO2016197875A1 (en) Data processing method and device applicable to service-providing device
CN104378649B (en) It is a kind of that real-time encrypted method and system being carried out to video flowing using the close SM1 algorithms of state
US20120124384A1 (en) HTTP Signing
CN104255010A (en) Support for short cryptoperiods in template mode
CN110401677B (en) Method and device for acquiring digital copyright key, storage medium and electronic equipment
KR20150038232A (en) Methods and systems for dynamic media content output for mobile devices
US20110066843A1 (en) Mobile media play system and method
CN102984557A (en) DRM-based streaming media playing system
CN113810778A (en) Monitoring video processing method and device, storage medium and electronic equipment
CN102196304B (en) Method, system and equipment for generating secrete key in video monitoring
CN110662089A (en) Bullet screen receiving and processing method, storage medium, electronic equipment and system
CN104104676B (en) A kind of audio and video playing method and apparatus
CN112565656B (en) Video call method, device, system, electronic equipment and storage medium
CN113038192B (en) Video processing method and device, electronic equipment and storage medium
CN110677693A (en) Android system-based encrypted video offline playing method and device and electronic equipment
CN105933734B (en) Audio and video file acquisition method and device
CN115174672B (en) Terminal, display device and data transmission method
CN114221969B (en) Data synchronization method, terminal, server and system based on near field communication

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200110