Subtitle file encryption and decryption method, system, storage medium and electronic device

By using a white box library to encrypt and decrypt subtitle files between the server and the client, the problem that subtitle streams cannot be effectively protected in the prior art is solved, and the secure transmission and playback of subtitle files is achieved.

CN114091080BActive Publication Date: 2024-12-10BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111431011.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2024-12-10
Estimated Expiration
2041-11-29

Smart Images

  • Figure CN114091080B_ABST
    Figure CN114091080B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a subtitle encryption and decryption method, system, storage medium and electronic device, the method comprising obtaining encryption parameters and a subtitle file to be encrypted; encrypting the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file; performing an encryption operation on the encryption parameters using a white box library to obtain an encrypted parameter; and transmitting the encrypted subtitle file and the encrypted parameter to a client storing the white box library. The present invention can solve the problem that the subtitle stream is stolen due to plain text transmission of subtitles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of subtitle security technology, and in particular to a subtitle file encryption and decryption method, system, storage medium and electronic equipment. Background Art

[0002] As people's awareness of digital copyright increases, the DRM (Digital Rights Management) system came into being. The DRM system can effectively protect the copyright of digital video content being played, prevent digital video content from being illegally copied, reproduced and disseminated, and make it impossible for illegal or unauthorized users to play video programs normally.

[0003] However, when playing videos with subtitles, the video stream can usually be protected by the DRM system, but the independent subtitle stream cannot be protected, and most independent subtitle streams are transmitted in plain text. Therefore, how to prevent the independent subtitle stream from being stolen by illegal or unauthorized users has become a problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a subtitle file encryption and decryption method, system, storage medium and electronic device, which can solve the problem that the subtitle stream is stolen due to the transmission of subtitles in plain text. The specific technical solution is as follows:

[0005] The present invention provides a subtitle file encryption method, which is applied to a server, wherein the server stores a white box library, and the method comprises:

[0006] Get encryption parameters and subtitle files to be encrypted;

[0007] Encrypting the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file;

[0008] Using the white box library to perform an encryption operation on the encryption parameter to obtain an encrypted parameter;

[0009] The encrypted subtitle file and the encrypted parameters are transmitted to a client storing the white box library.

[0010] Optionally, also include:

[0011] Get the subtitle file playback rule file;

[0012] Encapsulating the subtitle file playing rule file and the encryption parameters to obtain a playing permission file;

[0013] The step of using the white box library to perform an encryption operation on the encryption parameter to obtain the encrypted parameter includes:

[0014] Using the white box library to perform an encryption operation on the playback permission file to obtain an encrypted playback permission file;

[0015] The step of transmitting the encrypted subtitle file and the encrypted parameters to a client storing the white box library comprises:

[0016] The encrypted subtitle file and the encrypted playback permission file are transmitted to a client storing the white box library.

[0017] Optionally, the subtitle file includes multiple groups of sentences with playback period marks; the sentences include one or more characters;

[0018] The step of encrypting the subtitle file to be encrypted by using the encryption parameter to obtain the encrypted subtitle file specifically includes:

[0019] According to the character comparison table, an encryption parameter corresponding to the character in the sentence is obtained; the encryption parameter is character representation data, the character representation data is used to represent the character by data different from the character, the character comparison table is used to represent the correspondence between the character and the character representation data, and different characters correspond to different character representation data;

[0020] Replacing characters in the sentence with character representation data corresponding to the characters, and setting the arrangement position of each character representation data according to the arrangement position of the characters in the sentence, to obtain a character representation data set;

[0021] According to the playing time period of the sentence corresponding to the character representation data set, the character representation data set is spliced ​​into an encrypted subtitle file.

[0022] Optionally, the method for generating the character representation data specifically includes:

[0023] Get character image;

[0024] generating image coding data of the character image;

[0025] The image encoding data is used as character representation data corresponding to the characters in the character image.

[0026] Optionally, each character representation data in the character comparison table has a sequence mark set according to a preset sorting order, and different character representation data have different sequence marks;

[0027] The step of replacing the characters in the sentence with character representation data corresponding to the characters, and setting the arrangement position of each character representation data according to the arrangement position of the characters in the sentence to obtain a character representation data set includes:

[0028] Representing characters in the sentence with sequence marks of character representation data corresponding to the characters, and setting the arrangement position of each sequence mark according to the arrangement position of the characters in the sentence, to obtain a sequence mark set corresponding to the sentence;

[0029] The step of splicing the character representation data set into an encrypted subtitle file according to the playback time period of the sentence corresponding to the character representation data set includes:

[0030] According to the playing time period of the sentences corresponding to the sequence mark set, the sequence mark set is spliced ​​into an encrypted subtitle file.

[0031] The present invention also provides a subtitle file encryption system, which is applied to a server, wherein the server stores a white box library, and the system comprises:

[0032] A first acquisition module, used for acquiring encryption parameters and a subtitle file to be encrypted;

[0033] A first encryption module, used to encrypt the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file;

[0034] A second encryption module, used to perform an encryption operation on the encryption parameter using the white box library to obtain an encrypted parameter;

[0035] The first file transmission module is used to transmit the encrypted subtitle file and the encrypted parameters to the client storing the white box library.

[0036] The present invention also provides a subtitle file decryption method, which is applied to a client, wherein the client stores a white box library, and the method comprises:

[0037] Acquire a file to be decrypted; the file to be decrypted includes a subtitle file to be decrypted and an encryption parameter to be decrypted, wherein the subtitle file to be decrypted is encrypted by the encryption parameter;

[0038] Using the white box library to perform a decryption operation on the encryption parameter to be decrypted to obtain a decrypted encryption parameter;

[0039] The decrypted encryption parameters are used to perform a decryption operation on the subtitle file to be decrypted to obtain a decrypted subtitle file.

[0040] Optionally, the file to be decrypted further includes: a subtitle file playback rule file to be decrypted;

[0041] The subtitle file decryption method further includes:

[0042] The subtitle file playback rule file to be decrypted is decrypted using the white box library to obtain a decrypted subtitle file playback rule file; the subtitle file playback rule file is used to make the decrypted subtitle file play according to the subtitle file playback rule.

[0043] Optionally, the subtitle file to be decrypted includes a plurality of character representation data sets spliced ​​in order of playback time periods; the character representation data sets include a plurality of character representation data having an arrangement order, the character representation data are the encryption parameters, and the arrangement order of the character representation data represents the arrangement order of characters in the sentence of the subtitle file; the character representation data is used to represent the character by data different from the character;

[0044] The decrypting operation of the subtitle file to be decrypted by using the decrypted encryption parameters to obtain the decrypted subtitle file specifically includes:

[0045] Acquire a character representation data set corresponding to a playback period in the subtitle file to be decrypted;

[0046] Performing character conversion on the character representation data in the character representation data set according to the character comparison table to obtain characters corresponding to the playback time period; the character comparison table is used to represent the correspondence between characters and character representation data, and different characters correspond to different character representation data;

[0047] The characters are sorted according to the character representation data arrangement order in the character representation data set to obtain a sentence corresponding to the playback time period.

[0048] The present invention also provides a subtitle file decryption system, which is applied to a client, wherein the client stores a white box library, and the system comprises:

[0049] The second acquisition module is used to acquire a file to be decrypted; the file to be decrypted includes a subtitle file to be decrypted and an encryption parameter to be decrypted, wherein the subtitle file to be decrypted is encrypted by the encryption parameter;

[0050] A first decryption module, used to perform a decryption operation on the encryption parameter to be decrypted using the white box library to obtain the decrypted encryption parameter;

[0051] The second decryption module is used to perform a decryption operation on the subtitle file to be decrypted using the decrypted encryption parameters to obtain a decrypted subtitle file.

[0052] The present invention also provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the above-mentioned subtitle file encryption method and / or the above-mentioned subtitle file decryption method is implemented.

[0053] The present invention also provides an electronic device, comprising:

[0054] At least one processor, and at least one memory and bus connected to the processor;

[0055] The processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the above-mentioned subtitle file encryption method and / or the above-mentioned subtitle file decryption method.

[0056] The embodiments of the present invention provide a subtitle encryption and decryption method, system, storage medium and electronic device. By using encryption parameters to encrypt subtitle files to be encrypted and using a white box library to encrypt the encryption parameters, attackers can be prevented from decrypting subtitle files, thereby enhancing the protection of subtitle files and solving the problem of subtitle streams being stolen due to plain text transmission of subtitles.

[0057] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0059] Figure 1 A flow chart of a subtitle file encryption method according to an embodiment of the present invention;

[0060] Figure 2 A flowchart of a subtitle file encryption method according to another embodiment of the present invention;

[0061] Figure 3 A structural diagram of a subtitle file encryption system according to an embodiment of the present invention;

[0062] Figure 4 A structural diagram of a subtitle file encryption system according to another embodiment of the present invention;

[0063] Figure 5 A flowchart of a subtitle file decryption method according to an embodiment of the present invention;

[0064] Figure 6 A flowchart of a subtitle file decryption method according to another embodiment of the present invention;

[0065] Figure 7 A structural diagram of a subtitle file decryption system according to an embodiment of the present invention;

[0066] Figure 8 A structural diagram of a subtitle file decryption system according to another embodiment of the present invention;

[0067] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0069] The present invention provides a subtitle file encryption method, which can be applied to a server. The server can be a server that provides various services, such as a background server that provides support for a terminal device. The background server can respond to an information acquisition request sent by the terminal device, analyze the request, etc., obtain a processing result, and return the processing result. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0070] Various client applications can be installed on the terminal device, such as video playback applications, audio playback applications, etc. The terminal device can be hardware or software. When the terminal device is hardware, it can be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3) players, MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, desktop computers, super mobile personal computers, laptops, etc. When the terminal device is software, it can be installed in the electronic devices listed above. The embodiments of the present application do not impose any restrictions on the specific types of electronic devices.

[0071] It should be noted that the subtitle file encryption method provided in the embodiment of the present application is generally executed by the server. Figure 1 As shown, the subtitle file encryption method includes:

[0072] Step 101: Obtain encryption parameters and a subtitle file to be encrypted.

[0073] In this embodiment, the server can obtain encryption parameters and the subtitle file to be encrypted. The encryption parameters can be data used when encrypting the subtitle file to be encrypted, such as a key, character representation data, etc. Optionally, the character representation data can represent the characters by data different from the characters. The subtitle file can include multiple groups of sentences with playback period marks, and the sentences can include one or more characters.

[0074] When a video is played, subtitles are usually included during the audio playback period. Videos with subtitles help viewers understand the content of the video more clearly. If the language played in the video needs to be translated so that viewers can understand the video content, subtitles in the video are even more necessary. Subtitles transmitted in plain text cannot protect subtitles. In order to protect subtitles, subtitles need to be encrypted.

[0075] A subtitle file is a file that matches playback time periods with playback sentences. During the video playback process, when the video reaches a certain time period (playback period), the subtitle sentence (playback sentence) corresponding to the time period can be displayed. In a preset time period, there may be sentences containing multiple characters or sentences with only one character, or even no sentences. For a complete video, the total playback time of the video needs to be divided into multiple playback periods, and then the subtitle file is generated by matching the sentences that need to be presented in each playback period.

[0076] For example, the name of the subtitle file to be encrypted is sub.xml, and a part of the subtitle file is as follows:

[0077] <sub time=135000000>第一句话

[0078] <sub time=135000012>第二句话

[0079] That is, under the file name sub, the sentence "first sentence" is output when the playback period mark is 135000000, and the sentence "second sentence" is output when the playback period mark is 135000012.

[0080] Step 102: Encrypt the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file.

[0081] As an optional implementation, the subtitle file to be encrypted may be encrypted using a key to obtain an encrypted subtitle file. Optionally, the key may be a symmetric key, and the method for encrypting the subtitle file to be encrypted may be a symmetric encryption algorithm.

[0082] As another optional implementation, the subtitle file to be encrypted is encrypted using encryption parameters, and the encrypted subtitle file can be: according to the character comparison table, encryption parameters corresponding to the characters in the sentence are obtained; the encryption parameters are character representation data, the character representation data is used to represent the characters by data different from the characters, the character comparison table is used to characterize the correspondence between the characters and the character representation data, and different characters correspond to different character representation data; the characters in the sentence are replaced by the character representation data corresponding to the characters, and the arrangement position of each character representation data is set according to the arrangement position of the characters in the sentence, to obtain a character representation data set; according to the playback period of the sentence corresponding to the character representation data set, the character representation data set is spliced ​​into the encrypted subtitle file.

[0083] When encrypting the subtitle file to be encrypted, the sentences in each playback period can be encrypted as an encrypted sub-file. The purpose of this processing method is to decrypt only the sentences in the period to be played in the subsequent decryption process, rather than decrypting all the characters in the encrypted subtitles, to prevent the risk of subtitles being stolen due to premature decryption. At the same time, this method of using the sentences in the playback period as an encrypted sub-unit will greatly reduce the decryption processing time in the subsequent decryption, avoiding the problem of affecting the normal playback of subtitles due to too long decryption time.

[0084] Optionally, the character representation data may be generated in the following two ways, which are only exemplary and not restrictive:

[0085] Method 1: character representation data is generated by using symbolic identifiers such as character strings, graphics, text, numbers or combinations thereof. The characters in the sentence are converted into symbols, and the characters appearing in the subtitles are replaced with different symbolic identifiers, so that the purpose of not being able to know the characters in the subtitles without obtaining the character comparison table is achieved, achieving the effect of encryption.

[0086] Mode 2: The character representation data is the image coding data of the character image. When generating the character representation data, firstly, the character image is acquired, the image coding data of the character image is generated, and the image coding data is used as the character representation data corresponding to the character in the character image.

[0087] When the character representation data is the image coding data of a character image, the character image has a character texture describing the character, and the character texture information can be obtained after the image coding data is restored to the character image. Optionally, the characters in the subtitles are dot matrix fonts. The dot matrix font divides a character into 16*16 or 24*24 dots, and then uses the virtuality and reality of each dot to represent the outline of the character. Dot matrix fonts are also called bitmap fonts, and each glyph is represented by a set of two-dimensional pixel information. In this way, the character representation data is the pixel information array corresponding to the dot matrix font or the binary array converted using the pixel information array. Of course, the character image can also be an image containing only one character. In order to save space, the image coding data of the generated character image is preferably image compression coding. Using image compression coding to store the character image can reduce the storage volume.

[0088] Optionally, there are three ways to generate the character comparison table, which are only exemplary and not specifically limited:

[0089] As an implementation method, a method for generating a character comparison table specifically includes: deduplicating characters in a subtitle file to be encrypted to obtain deduplicated characters; selecting character representation data from a first set to obtain selected character representation data; the selected character representation data is different from the deduplicated characters, and the number of selected character representation data is not less than the number of deduplicated characters; making correspondence between the deduplicated characters and the selected character representation data, so that each deduplicated character corresponds to at least one selected character representation data and the character representation data corresponding to different characters are different, thereby generating a character comparison table.

[0090] Deduplication of characters in the encrypted subtitle file can obtain different characters. Different characters need to be distinguished by different character representation data. The same character representation data can be used to represent the same character. The character representation data and the characters are matched, and the deduplicated characters have at least one character representation data corresponding to them. Optionally, a character has only one character representation data corresponding to it, or a character has two or more character representation data corresponding to it, as long as the character representation data corresponding to the character does not correspond to other characters except the character. When the character representation data is the image encoding data of the character image, since there are many types of fonts for the characters, there are multiple image encoding data of the character images for the same character. Of course, if the character image is a hand-painted image, there are also multiple image encoding data of the corresponding character image. No matter which image encoding data is used, it can uniquely represent the same character.

[0091] This method of generating the character comparison table can be applied to different subtitle files. When the subtitle file changes, the characters also change accordingly, and the character comparison table changes accordingly. Generating a character comparison table for each subtitle file requires the cracker to find the character comparison table every time they crack an encrypted subtitle file. Even if they obtain the character comparison table corresponding to a subtitle file, this table cannot be applied to other subtitle files except this one, increasing the cracking workload of the cracker.

[0092] For the subtitle file sub.xml to be encrypted, first, all the characters used in the video in this subtitle file are de-duplicated, and the de-duplicated characters are as follows. Among them, the de-duplicated characters are represented by the character array charList.

[0093] charList = ["第", "一", "句", "话", "二"]

[0094] Select character representation data from the first set to obtain the selected character representation data. There are multiple character representation data in the first set, and at least 5 of them are selected from this set to correspond to the de-duplicated characters. When the character representation data is a symbol identifier such as a string, a graphic, a character, a number, or a combination thereof, randomly select character representation data from the first set; when the character representation data is the image encoding data of a character image, select the image encoding data of the character image corresponding to the character from the first set. At this time, there is one or more image encoding data corresponding to this character stored in the first set.

[0095] For example, select the character representation data '0x1111111' to correspond to "第", select the character representation data '0x22222' to correspond to "一", select the symbol representation data '0x333333' to correspond to "句", select the character representation data '0x4444444' to correspond to "话", and select the character representation data '0x55555' to correspond to "二". In this way, the character representation data file textureList = [[0x1111111], [0x22222], [0x333333], [0x4444444], [0x55555]] is obtained. The size of the character representation data corresponding to one character is about 0.2 Kbyte. Assuming that a movie has 20,000 non-repeating characters, then the file size of this textureList stored is about 4 MByte. After corresponding the de-duplicated characters with the selected character representation data, the character comparison table is shown in Table 1.

[0096] Table 1 Character Comparison Table

[0097] character No. one sentence talk two Characters represent data 0x1111111 0x22222 0x333333 0x4444444 0x55555

[0098] From the client's perspective, the UTF8 codes (8 bits, Unicode Transformation Format, variable-length character encoding for Unicode) of the Chinese characters "First Sentence" and "Second Sentence" in the subtitles have never appeared in the memory or on the network. The characters seen by the user are the result of symbol conversion, that is, what is seen is character representation data, namely, character strings, graphics, text, numbers and their combinations or image encoding data.

[0099] Generate a character comparison table for each subtitle file. Compared with generating a character comparison table for the entire UTF code table, on the one hand, it saves space for storing the character comparison table. On the other hand, since there are relatively few deduplicated characters in a subtitle file, the time to find the corresponding characters from the table during decompression will be shortened, which is conducive to improving the decompression speed. For example, after deduplicating characters in a video, the total number of deduplicated characters is 1000, while the total number of characters is much larger than 1000. In this way, the time to find a matching character from 1000 characters will be much shorter than the time to find a matching character from all characters.

[0100] As another implementation, a method for generating a character comparison table specifically includes: obtaining a commonly used character set and a second set; the number of character representation data in the second set is not less than the number of symbols in the commonly used symbol set; selecting character representation data from the second set to correspond to characters in the commonly used character set, so that each character in the commonly used character set corresponds to at least one character representation data in the second set and different characters correspond to different character representation data, thereby generating a character comparison table.

[0101] The characters in the commonly used character set are characters with a high frequency of occurrence. For Chinese characters, the number of Chinese characters is nearly 100,000, but the number of commonly used characters is relatively small. Generally speaking, 1,000 commonly used characters can cover 92% of written materials, 2,000 commonly used characters can cover 98% of written materials, and 3,000 commonly used characters can cover 99% of written materials. Therefore, generating a character comparison table corresponding to the characters in the commonly used character set can meet the needs of subtitles in the video. The number of character representation data in the second set is not less than the number of symbols in the commonly used symbol set. One character representation data can only correspond to one commonly used character, and one commonly used character can be represented by one or more character representation data. In the case where one commonly used character corresponds to multiple character representation data, when decrypting the subtitle file, the decryption operation can be completed as long as one character is uniquely determined according to the character representation data.

[0102] Compared with generating a character comparison table for the entire UTF code table, using a common character set to generate a character comparison table can also save space for storing the character comparison table. In addition, the number of common characters is in the range of [1000, 4000]. When decompressing, it does not take a long time to search for corresponding characters from the table, which is conducive to improving the decompression speed.

[0103] As another implementation, a method for generating a character comparison table specifically includes: obtaining a correspondence file; the correspondence file includes a plurality of groups of correspondences between characters and character representation data, the characters in each group of correspondences are different from the character representation data, and the character representation data in different correspondences are different; and selecting from the correspondence file the correspondence between characters and character representation data that match the characters in the subtitle file to be encrypted, to generate a character comparison table.

[0104] Different from the above two character comparison table generation methods, the character comparison table generated under this implementation is generated based on the correspondence between characters and character representation data, that is, the character representation data corresponding to each character is fixed and does not change with different subtitle files, and there is no random selection from the character representation data set for each character. This character comparison table generation method saves time for matching character representation data for characters and can increase the encryption speed of subtitle files.

[0105] After obtaining the encryption parameters corresponding to the characters in the sentence (i.e., the character representation data), the characters in the sentence are replaced with the character representation data corresponding to the characters, and the arrangement position of each character representation data is set according to the arrangement position of the characters in the sentence to obtain a character representation data set; according to the playback period of the sentence corresponding to the character representation data set, the character representation data set is spliced ​​into an encrypted subtitle file.

[0106] As another optional implementation, characters in a sentence are replaced with character representation data corresponding to the characters, and the arrangement position of each character representation data is set according to the arrangement position of the characters in the sentence to obtain a character representation data set; according to the playback period of the sentence corresponding to the character representation data set, the method of splicing the character representation data set into an encrypted subtitle file can also be:

[0107] The characters in the sentence are represented by the sequence marks of the character representation data corresponding to the characters, and the arrangement position of each sequence mark is set according to the arrangement position of the characters in the sentence to obtain a sequence mark set corresponding to the sentence; according to the playback period of the sentence corresponding to the sequence mark set, the sequence mark set is spliced ​​into an encrypted subtitle file.

[0108] Optionally, each character in the character look-up table indicates that the data has an order marker set according to a preset sorting setting. Different characters indicate different order markers for the data. There can be multiple ways to generate the preset sorting, such as one of the following two ways, which is only for illustrative purposes and not subject to specific limitations:

[0109] Way 1: The preset sorting is determined according to the arrangement position of the data represented by the characters in the character look-up table in the statement.

[0110] In this way, because the order of character appearance in each video is different, the character representation data corresponding to the characters is also different. For example, if the character "第" appears first in the subtitle file sub.xml, then the order marker of the character representation data '0x1111111' corresponding to the character "第" is 0. However, the character "第" may not appear first in other videos, so the corresponding order marker is not necessarily 0.

[0111] Way 2: The preset sorting is determined according to the arrangement position of the data represented by the characters in the character look-up table in the character look-up table.

[0112] In this way, the order marker of the character representation data does not change with the different order of character appearance. The order marker of the character representation data is determined according to the arrangement position of the character representation data in the character look-up table. For example, the serial number of the character "第" in the character look-up table is 3. No matter when "第" appears in the subtitle file, the order marker of the corresponding character representation data is 3.

[0113] Represent the characters in the statement with order markers. Since the corresponding character representation data can be directly obtained through the order marker, but the characters in the statement cannot be directly obtained through the order marker, the data cracked by the cracker using the order marker is not the subtitle file in the video, but the character representation data that is different from the characters in the subtitle file. If you want to further obtain the characters in the subtitle, you need to crack the corresponding relationship between the characters and the character representation data in order to extract the character information in the subtitle. This method can further increase the difficulty and cost of cracking the characters in the subtitle file by illegal users or unauthorized users.

[0114] As an implementation, when the preset sorting is determined according to the arrangement positions of the character representation data in the character comparison table in the statement, for the subtitle file sub.xml, the order of the characters appearing is "第", "一", "句", "话", "二" successively. Then, through the correspondence between the characters and the character representation data, it can be obtained that the sequence label of '0x1111111' is 0, the sequence label of [0x22222] is 1, the sequence label of [0x333333] is 2, the sequence label of [0x4444444] is 3, and the sequence label of [0x55555] is 4. Represent the characters in the statement with the sequence labels of the corresponding character representation data, and the obtained sequence label set corresponding to "第一句话" is [0, 1, 2, 3], and the sequence label set corresponding to "第二句话" is [0, 4, 2, 3].

[0115] As another implementation, when the preset sorting is determined according to the arrangement positions of the character representation data in the character comparison table in the character comparison table, as shown in Table 1, since the character "第" is in the first position in the character comparison table, the sequence label of '0x1111111' is 0. Since the arrangement position of the symbol representation in the character comparison table is the same as the arrangement position of the character representation data in the statement, the obtained sequence label set corresponding to "第一句话" is [0, 1, 2, 3], and the sequence label set corresponding to "第二句话" is [0, 4, 2, 3].

[0116] The encrypted subtitle file is multiple sequence label sets with playing time periods. The encrypted subtitle file neither appears the characters in the original subtitle file nor the character representation data corresponding to the characters in the original subtitle file, and the encrypted subtitle file has a good subtitle protection effect.

[0117] The subtitle file sub.xml to be encrypted is encrypted to obtain the encrypted subtitle file new_sub.xml.

[0118] Among them, the encrypted subtitle file new_sub.xml is as follows:

[0119] <sub time=135000000>[0,1,2,3] / / 即charList[0],charList[1],charList[2],charList[3]

[0120] <sub time=135000012>[0,4,2,3] / / 即charList[0],charList[4],charList[2],charList[3]

[0121] 通过上述步骤,能够将待加密的字幕文件sub.xml转变为加密后的字幕文件new_sub.xml。

[0122] 步骤103:利用白盒库对加密参数进行加密操作,得到加密后的参数。

[0123] 在本实施例中,服务端上存储有白盒库。当加密参数为对称密钥时,可以利用白盒库对对称密钥进行加密得到加密后的参数。当加密参数为字符表示数据时,可以将字符表示数据文件textureList进行加密操作,得到加密后的参数。当然,如果客户端没有存储字符对照表,还可以利用白盒库对字符对照表进行加密操作。本发明利用白盒库对加密参数进行加密,相比利用白盒库对字幕文件进行加密来说,加密耗时短,有利于提高加密效率。

[0124] 步骤104:将加密后的字幕文件和加密后的参数传输至存储有白盒库的客户端。

[0125] 在本实施例中,客户端可以存储有与服务端相同的白盒库。这样,在客户端可以利用白盒库对加密后的参数进行解密,得到解密后的加密参数,再利用解密后的加密参数对加密后的字幕文件进行解密,从而对解密后的字幕文件进行播放。

[0126] 图2是根据另一示例性实施例示出的一种字幕文件加密方法的流程图,如图2所示,一种字幕文件加密方法,应用于服务端,服务端存储有白盒库,该方法包括以下步骤。

[0127] 步骤201:获取加密参数和待加密的字幕文件。

[0128] 步骤201与图1所示步骤101类似,不再赘述。

[0129] 步骤202:利用加密参数对待加密的字幕文件进行加密,得到加密后的字幕文件。

[0130] 步骤202与图1所示步骤102类似,不再赘述。

[0131] 步骤203:获取字幕文件播放规则文件;将字幕文件播放规则文件和加密参数进行封装,得到播放许可文件。

[0132] 字幕文件播放规则文件可以用于对播放该字幕文件的设备进行权限管理,还可以用于对播放该字幕文件的场所进行管理,或者可以用于对播放时长进行管理等。服务端将该字幕文件播放规则文件传输至客户端后,客户端可以基于该播放规则对字幕文件进行播放。

[0133] 步骤204:利用白盒库对播放许可文件进行加密操作,得到加密后的播放许可文件。

[0134] 在本实施例中,可以利用白盒库对封装的字幕文件播放规则文件和加密参数进行加密。当然,也可以利用白盒库分别对字幕文件播放规则文件和加密参数进行加密操作,得到加密后的播放许可文件。其中,利用白盒库对加密参数进行加密操作的方法与图1中步骤103类似,不再赘述。

[0135] 步骤205:将加密后的字幕文件和加密后的播放许可文件传输至存储有白盒库的客户端。

[0136] 在本实施例中,客户端可以存储有与服务端相同的白盒库。这样,在客户端可以利用白盒库对加密后的播放许可文件进行解密,得到解密后的加密参数和解密后的播放许可规则,利用解密后的加密参数对加密后的字幕文件进行解密后,对解密后的字幕文件按照播放许可规则进行播放。

[0137] 本发明还提供一种字幕文件加密系统,该系统一般设置于服务端,服务端存储有白盒库。如图3所示,该系统包括:

[0138] 第一获取模块301,用于获取加密参数和待加密的字幕文件。

[0139] 可选的,字幕文件包括多组具有播放时段标记的语句;语句包括一个或多个字符。

[0140] 第一加密模块302,用于利用加密参数对待加密的字幕文件进行加密,得到加密后的字幕文件。

[0141] 第一加密模块302,具体用于:

[0142] 根据字符对照表,得到与语句中的字符对应的加密参数;加密参数为字符表示数据,字符表示数据用于通过与字符不同的数据对字符进行表示,字符对照表用于表征字符与字符表示数据的对应关系,不同字符对应的字符表示数据不同;将语句中的字符用与字符对应的字符表示数据代替,且按照字符在语句中的排列位置设置各字符表示数据的排列位置,得到字符表示数据集合;按照字符表示数据集合对应的语句的播放时段,将字符表示数据集合拼接为加密后的字幕文件。

[0143] 可选的,字符表示数据的生成方法,具体包括:获取字符图像;生成字符图像的图像编码数据;将图像编码数据作为与字符图像中的字符对应的字符表示数据。

[0144] 可选的,字符对照表中的各字符表示数据具有按照预设排序设定的顺序标记,不同的字符表示数据具有的顺序标记不同。

[0145] 第一加密模块302,还可以用于:根据字符对照表,得到与语句中的字符对应的加密参数;加密参数为字符表示数据,字符表示数据用于通过与字符不同的数据对字符进行表示,字符对照表用于表征字符与字符表示数据的对应关系,不同字符对应的字符表示数据不同;将语句中的字符用字符对应的字符表示数据具有的顺序标记进行表示,且按照字符在语句中的排列位置设置各顺序标记的排列位置,得到与语句对应的顺序标记集合;按照顺序标记集合对应的语句的播放时段,将顺序标记集合拼接为加密后的字幕文件。

[0146] 第二加密模块303,用于利用白盒库对加密参数进行加密操作,得到加密后的参数。

[0147] 第一文件传输模块304,用于将加密后的字幕文件和加密后的参数传输至存储有白盒库的客户端。

[0148] 图4是根据另一示例性实施例示出的一种字幕文件加密系统结构图,如图4所示,该系统包括:

[0149] 第一获取模块401,用于获取加密参数和待加密的字幕文件。

[0150] 第一获取模块401与图3所示第一获取模块301类似,不再赘述。

[0151] 第一加密模块402,用于利用加密参数对待加密的字幕文件进行加密,得到加密后的字幕文件。

[0152] 第一加密模块402与图3所示第一加密模块302类似,不再赘述。

[0153] 播放许可文件生成模块403,用于获取字幕文件播放规则文件;将字幕文件播放规则文件和加密参数进行封装,得到播放许可文件。

[0154] 第三加密模块404,用于利用白盒库对播放许可文件进行加密操作,得到加密后的播放许可文件。

[0155] 第二文件传输模块405,用于将加密后的字幕文件和加密后的播放许可文件传输至存储有白盒库的客户端。

[0156] 本发明还提供一种字幕文件解密方法,应用于客户端,客户端存储有白盒库,如图5所示,字幕文件解密方法与字幕文件加密方法对应,该字幕文件解密方法包括:

[0157] 步骤501:获取待解密文件。待解密文件包括待解密的字幕文件和待解密的加密参数,其中,待解密的字幕文件是通过加密参数进行加密的。

[0158] 在本实施例中,加密参数可以是密钥也可以是字符表示数据。在加密参数为字符表示数据时,待解密的字幕文件包括按播放时段顺序拼接的多个字符表示数据集合;字符表示数据集合包括具有排列顺序的多个字符表示数据,字符表示数据的排列顺序表征字幕文件的语句中的字符排列顺序;字符表示数据用于通过与字符不同的数据对字符进行表示。

[0159] 步骤502:利用白盒库对待解密的加密参数进行解密操作,得到解密后的加密参数。

[0160] 在本实施例中,由于客户端存储有与服务端相同的白盒库,因此可以利用白盒库对待解密的加密参数进行解密操作,得到解密后的加密参数。

[0161] 步骤503:利用解密后的加密参数对待解密的字幕文件进行解密操作,得到解密后的字幕文件。

[0162] 作为一可选的实施方式,步骤503,具体包括:在待解密的字幕文件中获取与播放时段对应的字符表示数据集合;按照字符对照表对字符表示数据集合中的字符表示数据进行字符转换,得到与播放时段对应的字符;字符对照表用于表征字符与字符表示数据的对应关系,不同字符对应的字符表示数据不同;将字符按照字符表示数据集合中的字符表示数据排列顺序进行排序,得到与播放时段对应的语句。将与播放时段对应的语句进行拼接即可得到解密后的字幕文件。

[0163] 作为一可选的实施方式,待解密的字幕文件包括按播放时段顺序拼接的多个顺序标记集合;顺序标记集合包括具有排列顺序的多个顺序标记,顺序标记的排列顺序表征字幕文件的语句中的字符排列顺序。

[0164] 待解密的字幕文件中有多个顺序标记集合,每个顺序标记集合对应一个播放时段,在某一个播放时段即将播放时,对当前播放时段或者即将播放时段对应的顺序标记集合进行解密操作,实现一边观看视频一边解密字幕文件的效果。这种边看边解密的方式相较于全部进行字幕文件解密再播放视频内容来说,能够避免因提早解密带来的字幕破解问题。

[0165] 例如,待解密的字幕文件为new_sub.xml,该待解密的字幕文件中包括有两个顺序标记集合,一个是[0,1,2,3],对应的播放时间为sub time=135000000,另一个是[0,4,2,3],对应的播放时间为sub time=135000012。

[0166] 由于顺序标记的排列顺序表征字幕文件的语句中的字符排列顺序,当顺序标记为0,1,2,3时,表示与0对应的字符排在字幕文件语句中的第一位,与1对应的字符排在字幕文件语句中的第二位,与2对应的字符排在字幕文件语句中的第三位,与3对应的字符排在字幕文件语句中的第四位。

[0167] 可选的,在待解密的字幕文件中获取与播放时段对应的顺序标记集合,得到顺序标记集合。

[0168] 在播放视频的过程中获取播放时段对应的顺序标记集合,可选的,在视频播放时也可以获取当前播放时段的后几个时段对应的顺序标记集合,这样对后面的顺序标记集合提前进行解密操作,能够防止因解密时间较长而影响视频中字幕的正常播放的风险。

[0169] 若待解密的字幕文件为new_sub.xml,在当前播放时段为135000000时,确定当前顺序标记集合为[0,1,2,3],对该顺序标记集合[0,1,2,3]进行解密操作;在当前播放时段为135000012时,确定当前顺序标记集合为[0,4,2,3],对顺序标记集合[0,4,2,3]进行解密操作。

[0170] 可选的,将顺序标记集合用具有按照预设排序设定的顺序标记的字符表示数据进行表示,且按照顺序标记在顺序标记集合中的排列位置设置各字符表示数据的排列位置,得到与顺序标记集合对应的字符表示数据集合;字符表示数据用于通过与字符不同的数据对字符进行表示。

[0171] 由于字符表示数据具有按照预设排序设定的顺序标记,因此根据顺序标记即可转换得到与顺序标记对应的字符表示数据。可选的,预设排序有两种生成方式,一种是根据字符对照表中的字符表示数据在语句中的排列位置确定的,另一种是根据字符对照表中的字符表示数据在字符对照表中的排列位置确定的。两种预设排序的生成过程与图1所示步骤102中的预设排序生成方式类似,不再赘述。

[0172] 按照顺序标记在当前顺序标记集合中的排列位置设置各字符表示数据的排列位置,得到与当前顺序标记集合对应的字符表示数据集合。生成的字符表示数据集合中的字符表示数据顺序能够反映出字幕文件的语句中字符出现的顺序。

[0173] 若待解密的字幕文件为new_sub.xml,当前顺序标记集合为[0,1,2,3],与顺序标记0对应的字符表示数据为‘0x1111111’,与顺序标记1对应的字符表示数据为‘0x22222’,与顺序标记2对应的字符表示数据为‘0x333333’,与顺序标记3对应的字符表示数据为‘0x4444444’,按照字符表示数据具有预设的排列顺序可以得到与当前顺序标记集合[0,1,2,3]对应的字符表示数据集合为[0x1111111,0x22222,0x333333,0x4444444]。

[0174] 可选的,按照字符对照表对字符表示数据集合中的字符表示数据进行字符转换,得到与播放时段对应的字符;字符对照表用于表征字符与字符表示数据的对应关系,不同字符对应的字符表示数据不同。

[0175] 字符表示数据集合中的字符表示数据进行字符转换时,利用字符对照表将字符表示数据转换成字幕文件中的字符,从而解密得到字符。若一个字符对应多个字符表示数据,只要字符表示数据能够唯一标识一个字符即能转换得到相应字符。当字符表示数据为字符图像的图像编码数据时,对字符表示数据进行字符转换时需要对图像编码数据解码还原为字符图像后展示出来,这时在客户端展现的字符是依据编码时字符样式还原得到的,例如对于"中”字,编码时依据的字体类型为宋体表示的"中”字,解码得到的字体类型也为宋体表示的"中”字。当字符表示数据为字符串、图形、文字、数字或者其组合等符号标识时,则通过字符对照表直接得到与字符表示数据对应的字符。

[0176] 若待解密的字幕文件为new_sub.xml,字符表示数据集合为[0x1111111,0x22222,0x333333,0x4444444],对字符表示数据‘0x1111111’进行转换时,查找字符对照表,如表1所示,能够得到对应的字符为"第”;对字符表示数据‘0x22222’进行转换时,查找到对应的字符为"一”;对字符表示数据‘0x333333’进行转换时,查找到对应的字符为"句”;对字符表示数据‘0x4444444’进行转换时,查找到对应的字符为"话”,则与当前播放时段对应的字符分别为第、一、句、话。

[0177] 字符对照表的生成方式有三种,与图1中步骤102的字符对照表的生成方式类似,不再赘述。字符表示数据的生成方式有两种,与图1中步骤102的字符表示数据的生成方式类似,不再赘述。

[0178] 可选的,将字符按照字符表示数据集合中的字符表示数据排列顺序进行排序,得到与播放时段对应的语句。

[0179] 将字符进行排序后得到当前播放时段对应的语句,至此,完成了从当前播放时段对应的顺序标记集合到与当前播放时段对应的语句的解密操作。在解密过程中是针对一个播放时段进行解密的,播放到哪个时段或者即将播放哪个时段进行解密操作,能够实现边观看视频边生成视频字幕的效果。

[0180] 图6是根据另一示例性实施例示出的一种字幕文件解密方法的流程图,如图6所示,一种字幕文件解密方法,应用于客户端,客户端存储有白盒库,该方法包括以下步骤。

[0181] 步骤601:获取待解密文件。

[0182] 可选的,待解密文件包括待解密的字幕文件、待解密的加密参数和待解密的字幕文件播放规则文件。其中,待解密的字幕文件是通过加密参数进行加密的。

[0183] 步骤602:利用白盒库对待解密的加密参数进行解密操作,得到解密后的加密参数。

[0184] 步骤602与图5所示步骤502类似,不再赘述。

[0185] 步骤603:利用解密后的加密参数对待解密的字幕文件进行解密操作,得到解密后的字幕文件。

[0186] 步骤603与图5所示步骤503类似,不再赘述。

[0187] 步骤604:利用白盒库对待解密的字幕文件播放规则文件进行解密操作,得到解密后的字幕文件播放规则文件;字幕文件播放规则文件用于使解密后的字幕文件进行播放时依据字幕文件播放规则。

[0188] 本发明还提供一种字幕文件解密系统,应用于客户端,客户端存储有白盒库,如图7所示,该系统包括:

[0189] 第二获取模块701,用于获取待解密文件;待解密文件包括待解密的字幕文件和待解密的加密参数,其中,待解密的字幕文件是通过加密参数进行加密的。

[0190] 第一解密模块702,用于利用白盒库对待解密的加密参数进行解密操作,得到解密后的加密参数。

[0191] 其中,待解密的字幕文件包括按播放时段顺序拼接的多个字符表示数据集合;字符表示数据集合包括具有排列顺序的多个字符表示数据,字符表示数据为加密参数,字符表示数据的排列顺序表征字幕文件的语句中的字符排列顺序;字符表示数据用于通过与字符不同的数据对字符进行表示。

[0192] 第二解密模块703,用于利用解密后的加密参数对待解密的字幕文件进行解密操作,得到解密后的字幕文件。

[0193] 第二解密模块703,具体用于:在待解密的字幕文件中获取与播放时段对应的字符表示数据集合;按照字符对照表对字符表示数据集合中的字符表示数据进行字符转换,得到与播放时段对应的字符;字符对照表用于表征字符与字符表示数据的对应关系,不同字符对应的字符表示数据不同;将字符按照字符表示数据集合中的字符表示数据排列顺序进行排序,得到与播放时段对应的语句。

[0194] 图8是根据另一示例性实施例示出的一种字幕文件解密系统结构图,如图8所示,该系统包括:

[0195] 第三获取模块801,用于获取待解密文件。

[0196] 可选的,待解密文件包括待解密的字幕文件、待解密的加密参数和待解密的字幕文件播放规则文件。其中,待解密的字幕文件是通过加密参数进行加密的。

[0197] 第一解密模块802,用于利用白盒库对待解密的加密参数进行解密操作,得到解密后的加密参数。

[0198] 第一解密模块802与图7所示第一解密模块702类似,不再赘述。

[0199] 第二解密模块803,用于利用解密后的加密参数对待解密的字幕文件进行解密操作,得到解密后的字幕文件。

[0200] 第二解密模块803与图7所示第二解密模块703类似,不再赘述。

[0201] 第三解密模块804,用于利用白盒库对待解密的字幕文件播放规则文件进行解密操作,得到解密后的字幕文件播放规则文件;字幕文件播放规则文件用于使解密后的字幕文件进行播放时依据字幕文件播放规则。

[0202] 本发明实施例提供了一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现上述的字幕文件加密方法和 / 或字幕文件解密方法。

[0203] 本发明实施例提供了一种电子设备,如图9所示,电子设备90包括至少一个处理器901、以及与处理器901连接的至少一个存储器902、总线903;其中,处理器901、存储器902通过总线903完成相互间的通信;处理器901用于调用存储器902中的程序指令,以执行上述的字幕文件加密方法和 / 或字幕文件解密方法。本文中的电子设备可以是服务器、PC、PAD、手机等。

[0204] 本申请还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有上述的字幕文件加密方法和 / 或字幕文件解密方法包括的步骤的程序。

[0205] 本申请是参照根据本申请实施例的方法、系统和计算机程序产品的流程图和 / 或方框图来描述的。应理解可由计算机程序指令实现流程图和 / 或方框图中的每一流程和 / 或方框、以及流程图和 / 或方框图中的流程和 / 或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和 / 或方框图一个方框或多个方框中指定的功能的装置。

[0206] 在一个典型的配置中,设备包括一个或多个处理器(CPU)、存储器和总线。设备还可以包括输入 / 输出接口、网络接口等。

[0207] 存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和 / 或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。存储器是计算机可读介质的示例。

[0208] 计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。

[0209] 本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。

[0210] 需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。还需要说明的是,术语"包括”、"包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句"包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。

[0211] 本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。

[0212] 以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims

1. A subtitle file encryption method, characterized in that: Applied to a server, the server stores a white box library, and the method includes: Get encryption parameters and subtitle files to be encrypted; Encrypting the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file; Using the white box library to perform an encryption operation on the encryption parameter to obtain an encrypted parameter; Transmitting the encrypted subtitle file and the encrypted parameters to a client storing the white box library; The subtitle file includes a plurality of groups of sentences with play period marks; the sentences include one or more characters; The step of encrypting the subtitle file to be encrypted by using the encryption parameter to obtain the encrypted subtitle file specifically includes: According to the character comparison table, encryption parameters corresponding to the characters in the sentence are obtained; the encryption parameters are character representation data, the character representation data is used to represent the characters by data different from the characters, the character comparison table is used to characterize the correspondence between the characters and the character representation data, and different characters correspond to different character representation data; each character representation data in the character comparison table has a sequence mark set according to a preset sorting order, and different character representation data have different sequence marks; Representing characters in the sentence with sequence marks of character representation data corresponding to the characters, and setting the arrangement position of each sequence mark according to the arrangement position of the characters in the sentence, to obtain a sequence mark set corresponding to the sentence; According to the playing time period of the sentences corresponding to the sequence mark set, the sequence mark set is spliced ​​into an encrypted subtitle file.

2. The subtitle file encryption method according to claim 1, characterized in that: Also includes: Get the subtitle file playback rule file; Encapsulating the subtitle file playing rule file and the encryption parameters to obtain a playing permission file; The step of using the white box library to perform an encryption operation on the encryption parameter to obtain the encrypted parameter includes: Using the white box library to perform an encryption operation on the playback permission file to obtain an encrypted playback permission file; The step of transmitting the encrypted subtitle file and the encrypted parameters to a client storing the white box library comprises: The encrypted subtitle file and the encrypted playback permission file are transmitted to a client storing the white box library.

3. The subtitle file encryption method according to claim 1, characterized in that: The method for generating the character representation data specifically includes: Get character image; generating image coding data of the character image; The image encoding data is used as character representation data corresponding to the characters in the character image.

4. A subtitle file encryption system, characterized in that: Applied to a server, the server stores a white box library, and the system includes: A first acquisition module, used for acquiring encryption parameters and a subtitle file to be encrypted; A first encryption module, used to encrypt the subtitle file to be encrypted using the encryption parameters to obtain an encrypted subtitle file; A second encryption module, used to perform an encryption operation on the encryption parameter using the white box library to obtain an encrypted parameter; A first file transmission module, used for transmitting the encrypted subtitle file and the encrypted parameters to a client storing the white box library; The subtitle file includes a plurality of groups of sentences with play period marks; the sentences include one or more characters; The first encryption module encrypts the subtitle file to be encrypted using the encryption parameters to obtain the encrypted subtitle file, specifically including: According to the character comparison table, encryption parameters corresponding to the characters in the sentence are obtained; the encryption parameters are character representation data, the character representation data is used to represent the characters by data different from the characters, the character comparison table is used to characterize the correspondence between the characters and the character representation data, and different characters correspond to different character representation data; each character representation data in the character comparison table has a sequence mark set according to a preset sorting order, and different character representation data have different sequence marks; Representing characters in the sentence with sequence marks of character representation data corresponding to the characters, and setting the arrangement position of each sequence mark according to the arrangement position of the characters in the sentence, to obtain a sequence mark set corresponding to the sentence; According to the playing time period of the sentences corresponding to the sequence mark set, the sequence mark set is spliced ​​into an encrypted subtitle file.

5. A subtitle file decryption method, characterized in that: Applied to a client, the client storing a white box library, the method comprising: Acquire a file to be decrypted; the file to be decrypted includes a subtitle file to be decrypted and an encryption parameter to be decrypted, wherein the subtitle file to be decrypted is encrypted by the encryption parameter; Using the white box library to perform a decryption operation on the encryption parameter to be decrypted to obtain a decrypted encryption parameter; Using the decrypted encryption parameters to perform a decryption operation on the subtitle file to be decrypted, to obtain a decrypted subtitle file; The file to be decrypted is obtained according to the character comparison table, and the encryption parameters corresponding to the characters in the sentence are obtained; the encryption parameters are character representation data, and the character representation data is used to represent the characters by data different from the characters, and the character comparison table is used to characterize the correspondence between the characters and the character representation data, and different characters correspond to different character representation data; each character representation data in the character comparison table has a sequence mark set according to a preset sorting, and different character representation data have different sequence marks; Representing characters in the sentence with sequence marks of character representation data corresponding to the characters, and setting the arrangement position of each sequence mark according to the arrangement position of the characters in the sentence, to obtain a sequence mark set corresponding to the sentence; The subtitle file is obtained by splicing the sequence mark set according to the play time period of the sentence corresponding to the sequence mark set, and includes multiple groups of sentences with play time period marks; the sentence includes one or more characters.

6. The subtitle file decryption method according to claim 5, characterized in that: The file to be decrypted also includes: a subtitle file playback rule file to be decrypted; The subtitle file decryption method further includes: The subtitle file playback rule file to be decrypted is decrypted using the white box library to obtain a decrypted subtitle file playback rule file; the subtitle file playback rule file is used to make the decrypted subtitle file play according to the subtitle file playback rule.

7. The subtitle file decryption method according to any one of claims 5-6, characterized in that: The subtitle file to be decrypted includes a plurality of character representation data sets spliced ​​in order of playback time periods; the character representation data sets include a plurality of character representation data having an arrangement order, the character representation data are the encryption parameters, and the arrangement order of the character representation data represents the arrangement order of characters in the sentence of the subtitle file; the character representation data is used to represent the character by data different from the character; The decrypting operation of the subtitle file to be decrypted by using the decrypted encryption parameters to obtain the decrypted subtitle file specifically includes: Acquire a character representation data set corresponding to a playback period in the subtitle file to be decrypted; Performing character conversion on the character representation data in the character representation data set according to the character comparison table to obtain characters corresponding to the playback time period; the character comparison table is used to represent the correspondence between characters and character representation data, and different characters correspond to different character representation data; The characters are sorted according to the character representation data arrangement order in the character representation data set to obtain a sentence corresponding to the playback time period.

8. A subtitle file decryption system, characterized in that: Applied to a client, the client stores a white box library, and the system includes: The second acquisition module is used to acquire a file to be decrypted; the file to be decrypted includes a subtitle file to be decrypted and an encryption parameter to be decrypted, wherein the subtitle file to be decrypted is encrypted by the encryption parameter; A first decryption module, used to perform a decryption operation on the encryption parameter to be decrypted using the white box library to obtain the decrypted encryption parameter; A second decryption module, used to perform a decryption operation on the subtitle file to be decrypted using the decrypted encryption parameters to obtain a decrypted subtitle file; The file to be decrypted is obtained according to the character comparison table, and the encryption parameters corresponding to the characters in the sentence are obtained; the encryption parameters are character representation data, and the character representation data is used to represent the characters by data different from the characters, and the character comparison table is used to characterize the correspondence between the characters and the character representation data, and different characters correspond to different character representation data; each character representation data in the character comparison table has a sequence mark set according to a preset sorting, and different character representation data have different sequence marks; Representing characters in the sentence with sequence marks of character representation data corresponding to the characters, and setting the arrangement position of each sequence mark according to the arrangement position of the characters in the sentence, to obtain a sequence mark set corresponding to the sentence; The subtitle file is obtained by splicing the sequence mark set according to the play time period of the sentence corresponding to the sequence mark set, and includes multiple groups of sentences with play time period marks; the sentence includes one or more characters.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed by the processor, the subtitle file encryption method according to any one of claims 1 to 3 and / or the subtitle file decryption method according to claims 5 to 7 are implemented.

10. An electronic device, characterized in that: include: At least one processor, and at least one memory and bus connected to the processor; The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the subtitle file encryption method according to any one of claims 1 to 3 and / or the subtitle file decryption method according to claims 5 to 7.