Video processing method, terminal equipment and storage medium

By being isolated storage key files in the storage space of the terminal device, and using the second key dense key file and list file, the problem of leakage and decryption of key files during network transmission and playback during network transmission and playback is solved. High security transmission and playback of video files.

CN119383378AActive Publication Date: 2025-01-28BEIJING FENGHUANG XUE YI SCI & TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411550636.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-01-28
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

In the prior art, during the network transmission and playback of video files, there is a risk of key file leakage and video file decryption, resulting in insufficient security of video files.

Method used

By storing key files in the first storage space of the terminal device, and only allowing the first APP access, combined with the use of the second key dense key file and list file to ensure the security of the key file and the decryption process of the video file Safety.

Benefits of technology

Effectively improve the security of video files, prevent key file leakage and video file decryption risks, and ensure the security of video files during network transmission and playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383378A_ABST
    Figure CN119383378A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video processing method, terminal equipment and a storage medium. The video processing method comprises the following steps: receiving a video file, a list file and a key file based on a first APP of a first terminal device; the video file comprises one or more video segments; the list file comprises a playing list of video segments; the key file comprises a first key; the first key is used for decrypting the video file; storing the key file in a first storage space; the first storage space allows the first APP to access and forbids the second APP to access; the second APP is different from the first APP; writing key information in the list file according to the storage address of the key file in the first storage space; the key information is used for reading the key file; when the video file is decrypted, reading the first key from the first storage space based on the first APP and the key information; and decrypting the video file by using the first key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video technology, and in particular to a video processing method, terminal equipment and storage medium. Background Art

[0002] Generally, the total data volume of a video file is larger than the total data volume of a text file, an audio file, or an image file. With the development of network technology, terminal devices can conveniently download and watch video files online based on the network. In order to facilitate the network transmission of video files, video files can be divided into multiple video segments, which are combined to form a complete video file. In some cases, multiple video segments of a video file will form a playlist, which facilitates the terminal device to play each video segment in order. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a video processing method, a terminal device and a storage medium.

[0004] The technical solution of the present invention is achieved in this way: A first aspect of an embodiment of the present disclosure provides a video processing method, which is executed by a first terminal device and includes: A video file, a list file and a key file are received based on a first APP (Application) of the first terminal device; the video file includes one or more video segments; the list file includes a playlist and the key file; the key file includes a first key; the first key is used to decrypt the video file; The key file is stored in a first storage space; the first storage space allows the first APP to access and prohibits the second APP from accessing; the second APP is different from the first APP; Writing key information into the list file according to the storage address of the key file in the first storage space; the key information is used to read the key file; When decrypting the video file, reading the first key from the first storage space based on the first APP and the key information; The video file is decrypted using the first key.

[0005] Based on the above solution, the method further includes: The key file is stored in a target folder of the first storage space; the target file is allowed to be accessed by the first terminal device and is prohibited to be accessed by a second terminal device; the second terminal device is different from the first terminal device.

[0006] Based on the above solution, the target folder is named with the device identification of the first terminal device, and the device identification is used to verify whether the person accessing the target folder has the right to access the target folder.

[0007] Based on the above solution, the method further includes: The key file and / or the list file storing the key information is encrypted using a second key.

[0008] Based on the above solution, the method further includes: The second key is stored in a second storage space; the second storage space is different from the first storage space.

[0009] Based on the above solution, when decrypting the video file, reading the first key from the first storage space based on the first APP and the key information includes: When decrypting the video file, using the second key to decrypt the list file; After decrypting the list file, reading the key information; The first key in the key file is read from the first storage space according to the key information.

[0010] Based on the above scheme, the method includes: When the video playback is stopped, the list file and / or the key file is encrypted.

[0011] A second aspect of an embodiment of the present disclosure provides a terminal device, the terminal device comprising: A receiving module, configured to receive a video file, a list file, and a key file based on a first application APP of the first terminal device; the video file includes one or more video segments; the list file includes a playlist and the key file; the key file includes a first key; the first key is used to decrypt the video file; A storage module, used for storing the key file in a first storage space; the first storage space allows the first APP to access and prohibits the second APP from accessing; the second APP is different from the first APP; A writing module, used for writing key information into the list file according to the storage address of the key file in the first storage space; the key information is used for reading the key file; a reading module, configured to read the first key from the first storage space based on the first APP and the key information when decrypting the video file; A decryption module is used to decrypt the video file using the first key.

[0012] A third aspect of the present disclosure provides a terminal device, including: A memory, at least for storing computer executable instructions; A processor, connected to the memory, is used to implement the video processing method described in any technical solution of the first aspect by executing the computer executable instructions.

[0013] A fourth aspect of the embodiments of the present disclosure provides a computer storage medium, wherein the computer storage medium stores computer-readable instructions, and the computer-readable instructions, after being executed, can execute the method described in any technical solution of the first aspect.

[0014] A fifth aspect of the embodiments of the present disclosure provides a computer-readable instruction, which, after being executed, can execute the method described in any technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic diagram of a flow chart of a video processing method provided by some embodiments of the present invention; Figure 2 A schematic diagram of a flow chart of a video processing method provided by some embodiments of the present invention; Figure 3 A schematic diagram of a flow chart of a video processing method provided by some embodiments of the present invention; Figure 4 A schematic diagram of the structure of a terminal device provided in some embodiments of the present invention; Figure 5 A schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In some scenarios, if the video file is a confidential encrypted video file, the terminal device will download the video file from the server and also obtain a key from the server. The key can be used to decrypt the encrypted video file. The video file can be played normally after being decrypted. However, after the password and the video file are provided to the terminal device at the same time, the confidential video may be abused or the encryption of the confidential video file may be removed due to unreasonable use by the user or illegal intrusion of the terminal device, resulting in video leakage and playback risks. In view of this, an embodiment of the present application provides a video processing method that can improve the security of the video. Specifically, Figure 1 As shown, the method may include:

[0017] S1101: receiving a video file, a list file, and a key file based on a first APP (first application program APP) of the first terminal device; the video file includes one or more video segments; the list file includes a play list; the key file includes a first key; the first key is used to decrypt the video file; S1102: storing the key file in a first storage space; the first storage space allows the first APP to access and prohibits the second APP (second application program APP) from accessing; the second APP is different from the first APP; S1103: writing key information into the list file according to the storage address of the key file in the first storage space; the key information is used to read the key file; S1104: when decrypting the video file, reading the first key from the first storage space based on the first APP and the key information; S1105: Decrypt the video file using the first key.

[0018] In some embodiments, the playing time of the video segments of a video file may be equal or unequal. In other embodiments, a video segment may include one or more groups of pictures (Group of P, GOP). A video segment may include all pictures of a scene or multiple scenes.

[0019] In some embodiments, the video file may be various video files that support video segmentation. In some embodiments, the list file may be a plain text file. The list file can be used to obtain and / or determine the play order of multiple video segments in a video file, etc. Exemplarily, the video file may include but is not limited to m3u8 video files. The m3u8 video file may be a streaming media file based on Hypertext Transfer Protocol (HTTP). If the video file is an m3u8 video file, the list file may be an m3u8 file. In some embodiments, the playlist contained in the m3u8 file may be a media playlist (Media Playlist) or a master playlist (Master Playlist). But no matter which playlist it is, the text of the m3u8 file uses utf-8 encoding.

[0020] When the m3u8 file is used as a media playlist, its internal information records a series of media segment resources. By playing the segment resources in sequence, the multimedia resources can be fully displayed.

[0021] In the disclosed embodiment, the video file may be used for live broadcast or on-demand viewing or downloading of the video file.

[0022] For on-demand playback, the client only needs to download the above segment resources in order and play them one by one. For live streaming, the client needs to re-request the m3u8 file at regular intervals to see if there is any new segment data that needs to be downloaded and played.

[0023] When m3u8 is used as the master playlist, it provides multiple stream list resources (Variant Stream) of the same media resource. The m3u8 file may include information about one or more alternate stream resources of the video file. The alternate stream resource specifies a variety of media playlists with different bit rates and formats, and the alternate stream resource can also provide different versions of resource content at the same time, such as audio files in different languages, video files shot from different angles, etc. Customers can select resources with appropriate bit streams according to different network conditions, and it is best to select appropriate resource content according to user preferences.

[0024] Exemplarily, the m3u8 file is encoded in utf-8 and cannot use the Byte Order Mark (BOM) byte order. The m3u8 file can declare one or more uniform resource locators. Usually, a text line in the m3u8 file can be used to write a URI. The m3u8 file can also include one or more tags. Exemplarily, these tags may include but are not limited to:

[0025] Attribute Lists: The values ​​of certain tags are attribute lists. Tags can have one or more attribute-value pairs. For example, tags can be divided into five types: Basic Tags, Media Segment Tags, Media Playlist Tags, Master Playlist Tags, and Playlist Tags. Basic Tags: Applicable to both Media Playlist and Master Playlist. The specific tags are as follows:

[0026] For example, the type tag (EXTM3U): indicates that the file is an m3u8 file. Each M3U file must place this tag in the first line. The version tag (EXT-X-VERSION) indicates the protocol version number of HLS, which is related to the compatibility of streaming media. This tag is global in scope and enables the entire m3u8 file; at most one definition of this tag can appear in each m3u8 file. If the m3u8 file does not contain this tag, the first version of the protocol is used by default. Media Segment Tags: Each video segment (also known as a video slice) is preceded by a series of media segment tags to describe it. Some segment tags are only valid for the subsequent segment resources; some segment tags are valid for all subsequent segments until another tag description is encountered later. Media segment type tags cannot appear in the master playlist. Tag (EXTINF): indicates the duration of the media segment specified by the uniform resource descriptor (in seconds). This tag must be specified before each media segment corresponding to the uniform resource descriptor. Tag (EXT-X-DISCONTINUITY): indicates that there is a discontinuity between the previous segment and the next segment. In some embodiments, the list file may further include a timestamp sequence. Of course, the above is only an example of a list file. In short, based on the list file, the first terminal device can obtain each video segment and play each video segment as needed, thereby achieving orderly playback of the video.

[0027] In this embodiment, the first terminal device will receive a key file in addition to receiving the video file. A first key is stored in the key file. The first key can decrypt the video file. Exemplarily, the first key can be a symmetric encryption key or an asymmetric encryption key.

[0028] In some embodiments, the key file may include one or more first keys. For example, a video file may have a first key, and all video segments of the video file may be decrypted using the first key. For another example, a video file may have multiple first keys, for example, different video segments may have different first keys. Alternatively, multiple video segments (for example, associated video segments) may share a first key. For example, the association of such video segments is reflected in content association or having the same uniform resource address, etc. Of course, in a specific implementation, the content association may be reflected in the need for multiple video segments to be played continuously, or multiple video files describing the same scene or adjacent scenes of the video.

[0029] In an embodiment of the present disclosure, after receiving the key file, the first terminal device will store the key file resources in a specific first storage space. The first storage space is provided with a space characteristic, and only the first APP corresponding to the storage space is allowed to access. In some embodiments, the first storage space can also be a sandbox space for the first APP. The second APP can be any APP installed in the first terminal device or a remote online APP. The first storage space does not allow other APPs other than the first APP to access. In this way, the key file is no longer stored with the video file and / or the list file in the storage space that allows the second APP to access, and the separate storage of the video file and the list file from the key file is realized, which at least improves the security of the key file and reduces the possibility of hackers or illegal devices stealing the key file through other APPs in the first terminal device or online remote APPs, thereby decrypting the video file based on the first key stored in the key file, thereby improving the security of the video file.

[0030] In some embodiments, since the key file is not stored in the same storage space as the list file and the video file, after the first terminal device stores the key file in the first storage space, it will write the key information into the list file according to the storage address of the key file in the first storage space. The key information can be used by the first APP to read the key file. Exemplarily, the key information may include information such as the storage address and storage path of the key file in the first storage space.

[0031] In some embodiments, the first APP may be an APP that can play videos or an APP that receives video files. If the first APP is an APP that can play videos, the first APP needs to decrypt the video file first when it detects the play instruction. If the first APP is an APP that downloads video files, it determines to decrypt the video file when receiving the play request of the video playback APP, and sends the decrypted video segments to the video playback APP one by one for playback. In order to further improve the security of video files, the first APP will only send one or a small number of video segments to the video playback APP at a time, rather than all video segments, to avoid video leakage caused by the video playback APP getting all the decrypted video segments at one time. In some embodiments, the video segment is set with a segment attribute, which can refuse the modification of the video segment attribute of any APP or any APP other than the first APP, the permanent storage of the video segment or the storage available for query. When the video file needs to be decrypted, the first APP is used to read the first key from a position of the first storage space according to the key information, and then the first key is used for decryption.

[0032] In some embodiments, in order to further improve the security of the key file, the key file will be written to the target folder of the first storage space. In some embodiments, the target folder has the characteristic of requiring verification of the identity of the visitor. In other embodiments, the target folder may be a hidden file visible only to the first terminal device. In some embodiments, the target folder is provided with verification information, and identity authentication must be performed if the target folder needs to be accessed. Only the first terminal device is allowed to access and the second terminal device is prohibited from accessing by identity authentication. For example, the identity authentication information may be a device identification of the first terminal device. The device identification may be any information that can uniquely represent the first terminal device. Exemplarily, the device identification may include but is not limited to a physical identification of the first terminal device. In some embodiments, the physical identification may include but is not limited to an International Mobile Equipment Identity (IMEI) and / or a production serial number of the device. In some embodiments, the verification information may also be other physical identifications of the first terminal device, for example, a Media Access Control Address (MAC) address of the first terminal device.

[0033] In other embodiments, the verification information may also be the verification information of the highest security level set by the operating system of the first device. In this way, after the verification is completed based on the verification information and the verification is passed, the target folder allows the application to read the key file, otherwise a read error will occur or the read operation will not be responded to. Therefore, in this way, the key file is written to the target folder, and the protection of the key file is upgraded again.

[0034] In some embodiments, the target folder is named after the device identification of the first terminal device, and the device identification is used to verify whether the person accessing the target folder has the right to access the target folder.

[0035] In the disclosed embodiment, the target folder is a folder named by the device identifier of the first terminal device, and only the first terminal device is allowed to access it, and no other terminal devices are allowed to access it. Exemplarily, the binding between the folder and the terminal device is achieved in this way. In this case, even if an illegal device directly copies the entire first APP in the first terminal device, since the target folder is named after the first terminal device or only allows the first terminal device to access it through folder property settings, the second terminal device written to the copied first APP cannot read the key file from the target folder. Once again, by preventing the leakage of video files caused by hackers or illegal devices copying the entire first APP in the first terminal device, the leakage of confidential video files in this way is eliminated.

[0036] In some embodiments, the method further comprises: The key file and / or the list file storing the key information is encrypted using a second key.

[0037] In some embodiments, the key file is encrypted using a second key.

[0038] In some embodiments, the list file containing the key information is encrypted using the second key. Exemplarily, at least the list file is encrypted using the second key to reduce the leakage of the list file key information and to reduce the storage address, storage path and other related information of the key file obtained based on the key information in the list file.

[0039] In some embodiments, the key file and the list file containing the key information are encrypted separately using the second key.

[0040] In some embodiments, in order to improve the security of the key file, different decryption algorithms are used when the key file and the list file are encrypted using the second key, so that even if an illegal device or hacker obtains the second key and successfully decrypts the list file, the second key cannot be used to decrypt the key file with the same decryption algorithm.

[0041] In some embodiments, when the second key is used to encrypt the list file and the key file, the first algorithm is used to encrypt the list file and the second algorithm is used to encrypt the key file. The first algorithm and the second algorithm are different. Exemplarily, based on the first algorithm, the list file is encrypted, and the content in the list file can be directly converted into ciphertext based on the second key. When the second algorithm is used to encrypt the list file, a third key is generated based on the second key, and the content in the key file is encrypted based on the third key to obtain the encrypted ciphertext. When the second key is used to encrypt the key file, the second key is equivalent to the intermediate key for encrypting the key file. Of course, this is just an example of using the second key to encrypt the list file and the key file, and the specific implementation is not limited to this example.

[0042] In order to further enhance the security of the first key in the key file. After the key file is downloaded to the local first terminal device, the operating system or the first APP of the first terminal device will use the second key again to encrypt the list file stored in the first storage space and containing the key information. In some embodiments, the second key can be generated by the first terminal device itself. For example, the operating system or the first APP of the first terminal device generates the second key based on a specified key deduction algorithm. In some embodiments, the deduction algorithm of the second key can be specified by the server providing the video file. The server can also provide some parameters for generating the second key. Of course, the parameters required for the generation of the second key can also be determined by the first terminal device itself, for example, the first terminal device self-key deduction algorithm. Different encrypted video files may have different second keys. In some embodiments, the second key may be a system-level key, so that even if the first APP is completely copied, the system-level key is not known to the first APP, and hackers or illegal devices will increase the difficulty of obtaining the first key due to the lack of the second key.

[0043] In some embodiments, the method further comprises: The second key is stored in a second storage space; the second storage space is different from the first storage space.

[0044] In some embodiments, the second storage space is not the storage space under the directory where the first APP is located. In this way, even if the first APP is copied, it cannot be copied to the second key.

[0045] In some embodiments, the second storage space may be a storage space that the first APP cannot directly access. For example, when the first APP needs to obtain the second key, it requests the operating system of the first terminal device to read the second key from the second storage space and pass it to the first APP according to the key acquisition password.

[0046] Exemplarily, the second storage space may be a system storage space provided by the first terminal, or a storage space that is only accessible to an operating system of the first terminal device.

[0047] In this way, the second key is stored in the second storage space, and the security of the first key can be further improved by improving the security of the second key.

[0048] like Figure 2 As shown, the video processing method provided by the embodiment of the present disclosure may include a video decryption method, which may specifically include: S2101: When decrypting the video file, use the second key to decrypt the list file; S2102: After decrypting the list file, read the key information; S2103: Reading a first key in the key file from the first storage space according to the key information; S2104: Decrypt the video file using the first key.

[0049] In the disclosed embodiment, the first APP no longer directly reads the first key from the key file in the same folder as the video file to decrypt the video file. Instead, when the video file needs to be decrypted, the second key is first used to decrypt the list file. After the list file is successfully decrypted, the key information can be read from the specified position of the list file. According to the key information, the storage address of the key file in the first storage space is determined, and the key file is obtained based on the storage address. If the second key is used to encrypt the key file, before executing S2104, it is necessary to first use the second key to decrypt the key file, and after the key file is successfully decrypted, read the first key from the key file. If the second key is not used to encrypt the key file, there is no need to use the second key to decrypt the key file.

[0050] In some embodiments, since the key file is stored in the target folder, before reading the key file, it is necessary to verify the key file accessor. If the verification is passed, the key file is allowed to be read, otherwise the key file reading request is rejected. At this time, regardless of whether the key file is encrypted, once the accessor is not the first terminal device itself, for example, a terminal device that has completed stealing the entire first APP of the first terminal device, it may not have permission to access the target folder. Exemplarily, the target folder can be a folder named after the device identification of the first terminal device.

[0051] In some embodiments, the method further comprises: Detecting whether the third terminal device has legally obtained the first APP of the first terminal device; In the case where the third terminal device legally obtains the first APP of the first terminal device, the third terminal device is allowed to access the target folder.

[0052] For example, a user replaces an old device with a new one, and the new device, as a third terminal device, copies the first APP of the first terminal device, which is the old device. In this case, the third terminal device has legally obtained the first APP in the first terminal device, so the third terminal device can be allowed to access the target folder. For example, by modifying the folder attributes of the target folder or changing the name of the target folder, the third terminal device has the right to access the target folder.

[0053] In some embodiments, if the third terminal device legally obtains the first APP of the first terminal device, the third terminal device will use the legal user account and password and other identity authentication information for identity authentication. After the identity authentication is passed, it can be considered that the third terminal device legally obtains the first APP of the first terminal device.

[0054] In some embodiments, the key file may include one or more first keys. If all video segments of the video file share a first key, the key file may contain only one first key, and the first key is used to decrypt each video segment one by one. When a key file contains multiple first keys, one first key can be used to decrypt a video segment. At this time, multiple first keys can be arranged in the key file according to the playback order of the video segments, so that the first terminal device or the first APP can read the first key on demand and decrypt the corresponding video segment. In other embodiments, the key file may store the index and the first key of the video segment correspondingly. In this way, when decrypting the video segment, the key file is retrieved according to the index of the video segment to obtain the first key. In some embodiments, some video segments in the video file may also share a first key. For example, two or three adjacent video segments share a first key. In this case, the index of the video segments sharing the same first key in the key file is stored corresponding to the same first key. Alternatively, when there is no index of the video segment in the key file, the number of segments sharing the same video segment can be written in the key file. In this way, the first terminal device or the first APP can also determine the number of video segments to be decrypted using one first key according to the number of segments when decrypting the video segments in sequence.

[0055] During the process of video decryption or playback, in order to improve the video viewing experience, the decrypted state of the list file and / or the key file can be maintained during the video decryption or playback process. In this way, there is no need to decrypt the list file and / or the key file itself multiple times, thereby reducing the phenomenon of video playback freezes caused by large delays in video segment decryption.

[0056] In some embodiments, the method further comprises: After stopping the video playback or completing the video decryption, encrypt the list file and / or the key file.

[0057] After the video stops playing or the video is decrypted, the list file and / or the key file are encrypted again, so that the security can be ensured after the video stops playing or the decryption is completed.

[0058] In some embodiments, the second key is updated when the list file and / or the key file are encrypted again. That is, after the list file and / or the key file are encrypted for the first time, the second key is dynamically updated any time the list file and / or the key file are encrypted again in the first terminal device. In this way, it is possible to prevent the leakage of information caused by the second key being used too many times or for too long, thereby further improving the security of the video file.

[0059] First, because the m3u8 file usually contains key information, it is easy to cause key information leakage, and the decryption process is in the mobile device. Due to the insecurity of the mobile terminal, there may be a risk that the encryption algorithm may be cracked. Furthermore, because the video needs to be played offline, the video file exists in the device, and the video file in the device is at risk of being copied and reused to play on other devices. The key can be the decryption key of the video file, that is, the aforementioned first key.

[0060] The video processing method provided by the embodiment of the present disclosure may include: Step 1: The server segments and encrypts the video, generates an m3u8 file, generates a key file, and encrypts the key file.

[0061] Step 2: The APP obtains the video key from the server and stores it in the APP's internal storage space (sandbox space, which can only be accessed by the APP and cannot be read from outside under normal circumstances) in a folder named after the device ID (the purpose is to bind the device so that other devices cannot play the video after being stolen).

[0062] Step 3: The APP downloads the segmented encrypted video file from the server and stores it in the internal storage space of the APP; modifies the content of the m3u8 file, the location of the key points to the storage path of the key in step 2, and then encrypts the m3u8 file.

[0063] Step 4: When the APP plays the video, it first decrypts the m3u8 file, then decrypts the key, and finally the player automatically loads the m3u8 file for video playback.

[0064] Step 5: When stopping playback, encrypt the m3u8 file and key to prevent external theft.

[0065] Video files and key files are stored in the internal storage space of the APP. Generally, other APPs cannot access this space and can only access it through the APP itself, which can effectively prevent the theft of video and other resources. The key is stored in a folder named after the device identity (ID) and is bound to the device. When hackers copy the APP and video files to other devices, they cannot be played on other devices. Binding video files to device IDs can effectively prevent video files from being copied to other devices for playback;

[0066] Step 6: Decrypt the m3u8 file and key when playing, and re-encrypt when stopping playing, effectively preventing the key file from being stolen. Decrypting the m3u8 file and key when in use and encrypting them when not in use can effectively hide key data, greatly increasing the difficulty of analysis for hackers.

[0067] like Figure 3 As shown, the embodiment of the present disclosure provides a video processing method based on the m3u8 file, which may include: The server processes the video segments and encrypts the video, generating an m3u8 file and the encrypted key; The APP obtains the key from the server and stores it in a folder named after the device ID; Get all video segments and m3u8 files and store them.

[0068] Modify the key path in the m3u8 file content to point to the path where the key is located in the APP; Encrypt the m3u8 file and key file.

[0069] Determine whether to enter or exit the playback mode, play the video after entering the playback mode, and stop the video playback after exiting the playback mode.

[0070] If you enter the playback mode, the APP automatically plays the video after decrypting the m3u8 file and key file.

[0071] If you exit the playback mode, the m3u8 file and key file will be encrypted.

[0072] like Figure 4 As shown, an embodiment of the present disclosure provides a terminal device, the terminal device comprising: A receiving module 4101 is configured to receive a video file, a list file, and a key file based on a first application APP of the first terminal device; the video file includes one or more video segments; the list file includes a playlist and the key file; the key file includes a first key; and the first key is used to decrypt the video file; The storage module 4102 is used to store the key file in a first storage space; the first storage space allows the first APP to access and prohibits the second APP from accessing; the second APP is different from the first APP; A writing module 4103, configured to write key information into the list file according to the storage address of the key file in the first storage space; the key information is used to read the key file; A reading module 4104, configured to read the first key from the first storage space based on the first APP and the key information when decrypting the video file; The decryption module 4105 is used to decrypt the video file using the first key.

[0073] The terminal device may be the aforementioned first terminal device.

[0074] In some embodiments, the receiving module may correspond to a network interface or a transceiver antenna of the terminal device.

[0075] In some embodiments, the storage module may correspond to a memory of the terminal device.

[0076] In some embodiments, the writing module, reading module and decryption module may correspond to a processor of a terminal device.

[0077] In some embodiments, the storage module is used to store the key file in a target folder of the first storage space; the target file is allowed to be accessed by the first terminal device and is prohibited from being accessed by the second terminal device; the second terminal device is different from the first terminal device.

[0078] In some embodiments, the target folder is named after the device identification of the first terminal device, and the device identification is used to verify whether the person accessing the target folder has the right to access the target folder.

[0079] In some embodiments, the terminal device further includes: An encryption module is used to encrypt the key file and / or the list file storing the key information using a second key.

[0080] The encryption module may also be a processor in the terminal device.

[0081] In some embodiments, the storage module is used to store the second key in a second storage space; the second storage space is different from the first storage space.

[0082] In some embodiments, the decryption module is used to decrypt the list file using the second key when decrypting the video file; after decrypting the list file, read the key information; and read the first key in the key file from the first storage space based on the key information.

[0083] In some embodiments, the encryption module is used to encrypt the list file and / or the key file when the video playback is stopped.

[0084] like Figure 5As shown, an embodiment of the present disclosure provides a terminal device. The terminal device may include: a processor 501 and a memory 502, which can be used to execute the video processing method provided by any of the aforementioned embodiments. The processor 501 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Here, the program executed by the processor 501 can be stored in a memory 502 connected to the processor 501 through a communication bus 503. The memory 502 can be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache.By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory 502 described in the embodiment of the present invention is intended to include but is not limited to these and any other suitable types of memory 502. The memory 502 in the embodiment of the present invention is used to store various types of data to support the operation of the processor 501. Examples of such data include: any computer program operated by the processor 501, such as an operating system and application programs; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks.

[0085] In some embodiments, the memory 502 in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus DRAM (DRRAM). The memory 502 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0086] The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 may be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor are combined to be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware. In some embodiments, the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0087] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0088] Another embodiment of the present invention provides a computer storage medium, the computer readable storage medium stores an executable program, and when the executable program is executed by the processor 501, the steps of the video processing method applied to the endpoint device can be implemented. Figures 1 to 3 One or more of the methods shown.

[0089] In some embodiments, the computer storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0090] It should be noted that the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.

[0091] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention.

Claims

1. A video processing method, characterized in that: The method is executed by the first terminal device and includes: A first APP of the first terminal device receives a video file, a list file and a key file; the video file includes one or more video segments; the list file includes a play list and the key file; the key file includes a first key; the first key is used to decrypt the video file; The key file is stored in a first storage space; the first storage space allows the first APP to access and prohibits the second APP from accessing; the second APP is different from the first APP; Writing key information into the list file according to the storage address of the key file in the first storage space; the key information is used to read the key file; When decrypting the video file, reading the first key from the first storage space based on the first APP and the key information; The video file is decrypted using the first key.

2. The method according to claim 1, characterized in that The step of storing the key file in the first storage space includes: The key file is stored in a target folder of the first storage space; the target file is allowed to be accessed by the first terminal device and is prohibited to be accessed by a second terminal device; the second terminal device is different from the first terminal device.

3. The method according to claim 2, characterized in that The target folder is named with the device identification of the first terminal device, and the device identification is used to verify whether the person who accesses the target folder has the right to access the target folder.

4. The method according to claim 1, characterized in that: The method further comprises: The key file and / or the list file storing the key information is encrypted using a second key.

5. The method according to claim 4, characterized in that The method further comprises: The second key is stored in a second storage space; the second storage space is different from the first storage space.

6. The method according to claim 4 or 5, characterized in that: The step of reading the first key from the first storage space based on the first APP and the key information when decrypting the video file includes: When decrypting the video file, using the second key to decrypt the list file; After decrypting the list file, reading the key information; The first key in the key file is read from the first storage space according to the key information.

7. The method according to any one of claims 1 to 4, characterized in that: The method comprises: When the video playback is stopped, the list file and / or the key file is encrypted.

8. A terminal device, characterized in that: The terminal device comprises: A receiving module, configured to receive a video file, a list file, and a key file based on a first APP of a terminal device; the video file includes one or more video segments; the list file includes a play list and the key file; the key file includes a first key; the first key is used to decrypt the video file; A storage module, used for storing the key file in a first storage space; the first storage space allows the first APP to access and prohibits the second APP from accessing; the second APP is different from the first APP; A writing module, used for writing key information into the list file according to the storage address of the key file in the first storage space; the key information is used for reading the key file; a reading module, configured to read the first key from the first storage space based on the first APP and the key information when decrypting the video file; A decryption module is used to decrypt the video file using the first key.

9. A terminal device, characterized in that: include: A memory, at least for storing computer executable instructions; A processor, connected to the memory, configured to implement the method according to any one of claims 1 to 7 by executing the computer executable instructions.

10. A computer storage medium, characterized in that: The computer storage medium stores computer-readable instructions, and the computer-readable instructions can execute the method according to any one of claims 1 to 7 after being executed.

11. A computer-readable instruction, characterized in that: After being executed, the computer-readable instructions can perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Management method of application data, method for partitioning application storage space, on-line application platform and application

    CN102760084A

  • Data management method and device, embedded equipment and storage medium

    CN111639353A

  • Video file playing processing method and device, electronic equipment and storage medium

    CN113411638A

  • Data transmission method and device

    CN115459949A

  • Video file processing method and device, equipment and readable storage medium

    CN116055767A