CN107105324B - Method and client for protecting bullet screen information - Google Patents

Method and client for protecting bullet screen information Download PDF

Info

Publication number
CN107105324B
CN107105324B CN201710211330.9A CN201710211330A CN107105324B CN 107105324 B CN107105324 B CN 107105324B CN 201710211330 A CN201710211330 A CN 201710211330A CN 107105324 B CN107105324 B CN 107105324B
Authority
CN
China
Prior art keywords
information
bullet screen
screen information
key
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710211330.9A
Other languages
Chinese (zh)
Other versions
CN107105324A (en
Inventor
周志刚
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710211330.9A priority Critical patent/CN107105324B/en
Publication of CN107105324A publication Critical patent/CN107105324A/en
Application granted granted Critical
Publication of CN107105324B publication Critical patent/CN107105324B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/26613Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel for generating or managing keys in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • H04N21/2351Processing of additional data, e.g. scrambling of additional data or processing content descriptors involving encryption of additional data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • H04N21/4353Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream involving decryption of additional data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4627Rights management associated to the content

Abstract

The invention provides a method and a client for protecting bullet screen information, wherein the method comprises the following steps: the client receives bullet screen information; judging whether the bullet screen information is special bullet screen information or not, and receiving key information if the bullet screen information is the special bullet screen information; decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information; therefore, even if the client corresponding to the common user receives the special barrage information, the special barrage information cannot be decrypted due to the fact that the key information cannot be received, and therefore plaintext information of the special barrage information cannot be obtained; this further increases the number of premium users and thus the revenue of the live platform.

Description

Method and client for protecting bullet screen information
Technical Field
The invention belongs to the technical field of bullet screen information processing, and particularly relates to a method and a client for protecting bullet screen information.
Background
Currently, with the progress of network communication technology and the speed increase of broadband networks, live webcasts are increasingly developed and applied.
Simultaneously along with the development of barrage, barrage information makes the live broadcast have better interdynamic and interesting. In order to increase the income of the platform for users in a grading manner in the live broadcast platform, the user can be upgraded into a high-class user by recharging, so that the high-class user can only enjoy certain special functions, for example, the high-class user can only see certain special bullet screen information, but the bullet screen information sent by the existing bullet screen system is visible to all users, so that a common user can easily acquire the special bullet screen information, and the income of the bullet screen live broadcast platform is reduced.
Based on this, the invention provides a method and a client for protecting bullet screen information, so as to solve the above problems in the prior art.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a client for protecting bullet screen information, which are used for solving the technical problems that ordinary users can easily acquire certain special bullet screen information because bullet screen information sent by an existing server is visible to all users, so that the number of advanced users is reduced, and the income of a bullet screen live broadcast platform is reduced.
The invention provides a method for protecting bullet screen information, which comprises the following steps:
the client receives bullet screen information;
judging whether the bullet screen information is special bullet screen information or not, and receiving key information sent by a server if the bullet screen information is the special bullet screen information;
decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information.
In the above scheme, the judging whether the bullet screen information is special bullet screen information includes:
acquiring an encryption mark bit of the bullet screen information;
and judging whether the encryption mark bit is a first encryption mark bit of the special bullet screen information, and if the encryption mark bit is the first encryption mark bit, determining that the bullet screen information is the special bullet screen information.
In the foregoing solution, the decrypting the bullet screen information by using a decryption algorithm includes:
decrypting the bullet screen information by using a decryption algorithm tea. Wherein, the chatessage is the bullet screen information, and the KEY is the KEY information.
In the foregoing solution, the decrypting the bullet screen information by using the decryption algorithm further includes:
extracting additional information from the ciphertext information of the special bullet screen information according to the key information;
combining the key information and the additional information to form a combined key;
and converting the ciphertext information into corresponding plaintext information by using the combined key.
In the foregoing solution, the extracting additional information from the ciphertext information according to the key information includes:
determining an insertion position of the additional information in the ciphertext information based on the key information;
extracting the additional information at the insertion position of the ciphertext information.
In the foregoing solution, the determining, based on the key information, an insertion position of the additional information in the ciphertext information includes:
determining a reference bit of the key information;
acquiring characters of the key information reference bits;
converting the character into a numerical value according to a preset first conversion rule;
determining the insertion location based on the value.
In the foregoing solution, the extracting additional information from the ciphertext information according to the key information further includes:
determining length information of the key information;
determining length information of the additional information based on length information of the key information;
extracting the additional information from the ciphertext information based on the length information.
In the foregoing solution, the decrypting the bullet screen information by using the decryption algorithm further includes:
receiving image information, and reading at least one group of color values from the image information, wherein the image is an encryption result obtained by encrypting plaintext information;
converting the at least one set of color values into digital information according to a second conversion rule;
converting the digital information into character codes;
and coding and converting the characters into the plaintext information.
In the foregoing solution, the decrypting the bullet screen information by using the decryption algorithm further includes:
receiving audio information, and reading at least one audio code from the audio information, wherein the audio is an encryption result obtained by encrypting plaintext information;
and converting the at least one group of audio codes into plaintext information according to a third conversion rule.
The present invention also provides a client, comprising:
the receiving unit is used for receiving the bullet screen information;
the judging unit is used for judging whether the bullet screen information is special bullet screen information or not, and receiving key information sent by a server if the bullet screen information is the special bullet screen information;
the decryption unit is used for decrypting the bullet screen information by utilizing a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information.
The invention provides a method and a client for protecting bullet screen information, wherein the method comprises the following steps: the client receives bullet screen information; judging whether the bullet screen information is special bullet screen information or not, and receiving key information if the bullet screen information is the special bullet screen information; decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information. Therefore, even if the client corresponding to the common user receives the special barrage information, the special barrage information cannot be decrypted due to the fact that the key information cannot be received, and therefore plaintext information of the special barrage information cannot be obtained; this further increases the number of premium users and thus the revenue of the live platform.
Drawings
Fig. 1 is a schematic flow chart of a method for protecting bullet screen information according to an embodiment of the present invention;
fig. 2 is a schematic overall structure diagram of the client according to the second embodiment of the present invention.
Detailed Description
In order to solve the technical problems that the bullet screen information sent by the existing server is visible to all users, so that common users can easily obtain some special bullet screen information, the number of advanced users is reduced, and the income of a bullet screen live broadcast platform is reduced, the invention provides a client for receiving bullet screen information; judging whether the bullet screen information is special bullet screen information or not, and receiving key information if the bullet screen information is the special bullet screen information; decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information.
The technical solution of the present invention is further described in detail by the accompanying drawings and the specific embodiments.
Example one
In order to reduce the modification cost of the existing bullet screen system, the method is designed based on the existing bullet screen system, and the method is applied to the client side, as shown in fig. 1, and the method includes:
s101, the client receives bullet screen information.
In this step, the client first needs to receive the bullet screen information before displaying the bullet screen information, the bullet screen information includes: common bullet screen information and special bullet screen information; generally, the special barrage information is only wanted to be seen by advanced users and not by ordinary users. For example, the bullet screen information includes: text information, image information, or audio information; the special bullet screen information may include: coupon information, chat information between premium users, etc.
S102, judging whether the bullet screen information is special bullet screen information or not, and receiving key information if the bullet screen information is the special bullet screen information.
In this step, after the client receives the bullet screen information, it is determined whether the bullet screen information is special bullet screen information, if the bullet screen information is ordinary bullet screen information, the bullet screen information can be displayed directly, and if the bullet screen information is special bullet screen information, the key information issued by the server needs to be received. Of course, in this embodiment, only the client of the advanced user can receive the key information, and for the ordinary user, the server does not issue the key information to the client, so even if the client corresponding to the ordinary user receives the special bullet screen information, the client cannot decrypt the special bullet screen information because of no key information. Here, the server distinguishes between advanced users and ordinary users based on user tags, such as: the user indicia of the advanced user may be a vip field, etc.
Judging whether the bullet screen information is special bullet screen information or not, including: acquiring a mark bit of the bullet screen information; and judging whether the encryption mark bit is a first mark bit of the special bullet screen information, and if the encryption mark bit is the first encryption mark bit, determining that the bullet screen information is the special bullet screen information. Here, the first encryption flag bit may include letters, numbers, and the like agreed by the server and the client, and the first encryption flag bit in this embodiment is the number "1". The first encryption mark bit can be positioned behind the first character or the last character of the special bullet screen information, or can be behind other appointed characters.
And if the encrypted mark bit is a second encrypted mark bit, determining that the bullet screen information is the common bullet screen information and directly displaying the bullet screen information. Similarly, the second encryption flag bit may include letters, numbers, and the like agreed by the server and the client, and the second encryption flag bit in this embodiment is a number "0". The second encryption mark bit can be positioned behind the first character or the last character of the common bullet screen information, or can be behind other appointed characters.
S103, decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information.
In this step, after receiving the key information, the bullet screen information may be decrypted by using a decryption algorithm based on the key information, so as to obtain plaintext information of the bullet screen information.
Specifically, since the encryption algorithm in the server may include various algorithms, such as: TEA encryption algorithm, AES encryption algorithm, and RSA encryption algorithm; of course, the encryption algorithm may be some other encryption algorithm. The special bullet screen information may also include various forms of information, such as: picture information, text information, audio information, video information, and the like.
When the bullet screen information is text information and the encryption algorithm is a TEA encryption algorithm, decrypting the bullet screen information by using a decryption algorithm based on the key information comprises the following steps:
decrypting the bullet screen information by using a decryption algorithm tea. The specific program is realized as follows:
Chatmessage=TEA.decrypt(EncryptChatmessage,KEY);
wherein the chatprocess is the decrypted bullet screen information, and the KEY is the received KEY information; the decryption interface is a decryption interface of the TEA algorithm.
When the encryption algorithm is an AES encryption algorithm, decrypting the bullet screen information by using a decryption algorithm based on the key information, comprising:
decrypting the bullet screen information by using a decryption algorithm AES (encrypted text, KEY); the specific program is realized as follows:
Chatmessage=AES.decrypt(EncryptChatmessage,KEY);
wherein the chatprocess is the decrypted bullet screen information, and the KEY is the received KEY information; and the decryption interface is a decryption interface of the AES algorithm.
When the encryption algorithm is an RSA encryption algorithm, the bullet screen information is decrypted by utilizing a decryption algorithm based on the key information, and the method comprises the following steps:
decrypting the bullet screen information by using a decryption algorithm RSA.decryption (encryption chain, KEY); the specific program is realized as follows:
Chatmessage=RSA.decrypt(EncryptChatmessage,KEY);
wherein the chatprocess is the decrypted bullet screen information, and the KEY is the received KEY information; at this time, the decryption interface is a decryption interface of the RSA algorithm.
Here, when the encryption algorithm is another preset encryption algorithm, decrypting the bullet screen information by using a decryption algorithm based on the key information, the method further includes:
after receiving the key information, determining length information of the key, and extracting additional information from the ciphertext information according to the key, specifically comprising: determining the insertion position of the additional information in the ciphertext information based on the key, and determining the length information of the additional information according to the length information of the key; extracting the additional information based on the length information at the insertion position of the ciphertext information. The length of the additional information can be 2-3 times of the key length, and the characters of the additional information can include: a number or a letter.
Determining an insertion position of the additional information in the ciphertext information based on the key, including: determining a reference bit of the key; acquiring characters of the key reference bits; converting the character into a numerical value according to a preset first conversion rule; determining the insertion location based on the value.
Wherein, the preset first conversion rule is that the conversion rule can comprise a plurality of types: for example, characters are correspondingly converted with decimal values, and characters are correspondingly converted with ASCII code values.
When the characters are correspondingly converted from the ASCII code values, after the key is received, the characters of the reference bit of the key are obtained, the decimal ASCII code values corresponding to the characters are determined, and the positions of the additional information characters in the ciphertext are searched by taking the decimal ASCII code values as reference values. After the position is found, the additional information character is extracted from the ciphertext information. Here, the reference bit of the key may be any bit in the key, such as the first bit or the last bit; when the last bit of the key is set as the reference bit of the key, for example, the key is 12345, the character of the reference bit is "5", the ASCII code corresponding to "5" is obtained as "53", and then the additional information is extracted from the position after the 53 th character in the ciphertext information.
And after extracting the additional information from the ciphertext information, judging whether the tail of the ciphertext character has a corresponding file type, and if so, creating a new file of the type to facilitate later decryption and writing. If not, a document file is newly created by default to record the decrypted data.
Then, after the key character string and the character string of the additional information are obtained, the two character strings are spliced to form a combined key, and the ciphertext information is converted into plaintext information by using the combined key, so that the encrypted special barrage information can be converted into the plaintext information and then displayed on a screen of a client.
Here, when the encryption algorithm is another preset encryption algorithm and the bullet screen information is image information, decrypting the bullet screen information by using a decryption algorithm based on the key information, the method further includes:
reading at least one group of color values from an image, wherein the image is an encryption result of encrypting plaintext information; converting the at least one set of color values into digital information according to a second conversion rule; converting the digital information into character codes; and coding and converting the characters into the plaintext information.
Converting the at least one set of color values into digital information according to a second conversion rule, comprising:
determining the maximum hierarchy corresponding to each color, and determining the numerical value A of the digital information according to the formula A ═ B ═ C + G) × C + R; the maximum levels corresponding to each color are the same, R is red, G is green, B is blue, and C is the maximum level corresponding to each color.
When confusing color patches in the image, reading at least one set of color values from the image comprises: receiving confusion numerical values, and determining the number of randomly generated confusion color blocks according to the confusion numerical values; determining a writing position of the confusing color block in the image based on a confusing algorithm; determining a first reference point to write the color value; and traversing the image by taking the first reference point as a starting position, and in the traversing process, skipping the confusion color blocks based on the number of the confusion color blocks and the writing positions of the confusion color blocks in the image, and reading the at least one group of color values.
Here, when the encryption algorithm is another preset encryption algorithm and the bullet screen information is audio information, decrypting the bullet screen information by using a decryption algorithm based on the key information, the method further includes:
receiving audio, and reading at least one audio code from the audio; and converting the at least one group of audio codes into plaintext information according to a third conversion rule.
The reading of at least one audio code from audio comprises: reading audio data and acquiring a frequency queue of the audio; traversing the frequency queue to obtain a first frequency and a second frequency; converting the first frequency to a first audio encoding and the second frequency to a second audio encoding; determining a corresponding audio code according to the first audio code and the second audio code; and combining the audio codes to obtain the at least one group of audio codes.
The reading of the audio data and the obtaining of the frequency queue of the audio comprise: establishing an audio information object, and setting a sampling frequency in the audio information object; collecting the audio data based on the sampling frequency and storing the audio data into an array; and traversing the array, and converting each item of data in the array into corresponding frequency to form a frequency queue.
Said converting said at least one set of audio codes into plaintext information according to a third conversion rule comprises; splitting the audio code into at least one group of audio codes according to a preset extraction rule; determining the audio coding corresponding to each digit; converting the audio codes into at least one group of digital information based on the audio codes corresponding to each digit and each group of audio codes; converting the at least one set of digital information into a character code; and converting the character codes into the plaintext information.
After the decrypted plaintext information is obtained, judging the file type of the plaintext information, and if the file type of the plaintext information is a character string of a character type, writing the data into a document file; if it is other types of special files, such as: pictures, audio and video, the character strings are converted into corresponding data by using Base64 byte coding and are written into a file created before, and a complete decryption process is achieved.
Here, when the special bullet screen information is a picture, audio or video, since the plaintext information of the special bullet screen information has various encoded information, for example: since the plaintext information is converted into Base64 byte codes, the characters of different countries can be converted into a unified coding format, so that the occurrence of code confusion or situations which cannot be identified can be prevented, the Base64 byte codes require that 3 8-bit bytes (3 × 8 ═ 24) are converted into 4 6-bit bytes (4 × 6 ═ 24), and then two 0 s are supplemented in front of the 6 bits, so that a form of 8 bits and one byte is formed. If the remaining characters are less than 3 bytes, then 0 is used for padding, and the output character is used '═ so that 1 or 2' ═ can appear at the end of the text output after encoding.
Example two
Corresponding to the first embodiment, this embodiment further provides a client, as shown in fig. 2, where the client includes: a receiving unit 21, a judging unit 22, and a decrypting unit 23; wherein;
before the client displays the bullet screen information, the receiving unit 21 first needs to receive the bullet screen information, where the bullet screen information includes: common bullet screen information and special bullet screen information; generally, the special barrage information is only wanted to be seen by advanced users and not by ordinary users. For example, the special bullet screen information may include: coupon information, chat information between premium users, etc.
After the receiving unit 21 receives the bullet screen information, the determining unit 22 is configured to determine whether the bullet screen information is special bullet screen information, if the bullet screen information is general bullet screen information, the bullet screen information can be directly displayed, and if the bullet screen information is special bullet screen information, the receiving unit 21 further needs to receive key information issued by a server. Of course, in this embodiment, only the client of the advanced user can receive the key information, and for the ordinary user, the server does not issue the key information to the client, so even if the client corresponding to the ordinary user receives the special bullet screen information, the client cannot decrypt the special bullet screen information because of no key information. Here, the server distinguishes the advanced user from the general user based on the user flag, which may be a vip field or the like.
The judging unit 22 judges whether the bullet screen information is special bullet screen information, including: acquiring a mark bit of the bullet screen information; and judging whether the encryption mark bit is a first mark bit of the special bullet screen information, and if the encryption mark bit is the first encryption mark bit, determining that the bullet screen information is the special bullet screen information. Here, the first encryption flag bit may include letters, numbers, and the like agreed by the server and the client, and the first encryption flag bit in this embodiment is the number "1". The first encryption mark bit can be positioned behind the first character or the last character of the special bullet screen information, or can be behind other appointed characters.
If the encrypted flag bit is the second encrypted flag bit, the determining unit 22 determines that the bullet screen information is the common bullet screen information, and the bullet screen information can be directly displayed. Similarly, the second encryption flag bit may include letters, numbers, and the like agreed by the server and the client, and the second encryption flag bit in this embodiment is a number "0". The second encryption mark bit can be positioned behind the first character or the last character of the common bullet screen information, or can be behind other appointed characters.
After the receiving unit 21 receives the key information, the decrypting unit 23 may decrypt the bullet screen information by using a decryption algorithm based on the key information, and obtain plaintext information of the bullet screen information.
Specifically, since the encryption algorithm in the server may include various algorithms, such as: TEA encryption algorithm, AES encryption algorithm, and RSA encryption algorithm; of course, the encryption algorithm may be some other encryption algorithm. The special bullet screen information may also include various forms of information, such as: picture information, text information, audio information, video information, and the like.
When the encryption algorithm is the TEA encryption algorithm, the decryption unit 23 decrypts the bullet screen information by using a decryption algorithm based on the key information, including:
decrypting the bullet screen information by using a decryption algorithm tea. The specific program is realized as follows:
Chatmessage=TEA.decrypt(EncryptChatmessage,KEY);
wherein the chatessage is the bullet screen information, and the KEY is the received KEY information; the decryption interface is a decryption interface of the TEA algorithm.
Here, when the encryption algorithm is another preset encryption algorithm, the decryption unit 23 decrypts the bullet screen information by using a decryption algorithm based on the key information, and further includes:
after receiving the key information, determining length information of the key, and extracting additional information from the ciphertext information according to the key, specifically comprising: determining the insertion position of the additional information in the ciphertext information based on the key, and determining the length information of the additional information according to the length information of the key; extracting the additional information based on the length information at the insertion position of the ciphertext information. The length of the additional information can be 2-3 times of the key length, and the characters of the additional information can include: a number or a letter.
Determining an insertion position of the additional information in the ciphertext information based on the key, including: determining a reference bit of the key; acquiring characters of the key reference bits; converting the character into a numerical value according to a preset first conversion rule; determining the insertion location based on the value.
Wherein, the preset first conversion rule is that the conversion rule can comprise a plurality of types: for example, characters are correspondingly converted with decimal values, and characters are correspondingly converted with ASCII code values.
When the characters are correspondingly converted from the ASCII code values, after receiving the key, the decryption unit 23 obtains the characters at the reference bit of the key, determines the decimal ASCII code value corresponding to the characters, and uses the value as a reference value to find the position of the additional information character in the ciphertext. After the position is found, the additional information character is extracted from the ciphertext information. Here, the reference bit of the key may be any bit in the key, such as the first bit or the last bit; when the last bit of the key is set as the reference bit of the key, for example, the key is 12345, the character of the reference bit is "5", the ASCII code corresponding to "5" is obtained as "53", and then the additional information is extracted from the position after the 53 th character in the ciphertext information.
And after extracting the additional information from the ciphertext information, judging whether the tail of the ciphertext character has a corresponding file type, and if so, creating a new file of the type to facilitate later decryption and writing. If not, a document file is newly created by default to record the decrypted data.
Then, after obtaining the key character string and the character string of the additional information, the decryption unit 23 concatenates the two character strings to form a combined key, and converts the ciphertext information into plaintext information by using the combined key, so that the encrypted special barrage information can be converted into plaintext information and then displayed on the screen of the client.
Here, when the encryption algorithm is another preset encryption algorithm and the bullet screen information is image information, the decryption unit 23 decrypts the bullet screen information by using a decryption algorithm based on the key information, and further includes:
reading at least one group of color values from an image, wherein the image is an encryption result of encrypting plaintext information; converting the at least one set of color values into digital information according to a second conversion rule; converting the digital information into character codes; and coding and converting the characters into the plaintext information.
Converting the at least one set of color values into digital information according to a second conversion rule, comprising:
determining the maximum hierarchy corresponding to each color, and determining the numerical value A of the digital information according to the formula A ═ B ═ C + G) × C + R; the maximum levels corresponding to each color are the same, R is red, G is green, B is blue, and C is the maximum level corresponding to each color.
When confusing color patches in the image, reading at least one set of color values from the image comprises: receiving confusion numerical values, and determining the number of randomly generated confusion color blocks according to the confusion numerical values; determining a writing position of the confusing color block in the image based on a confusing algorithm; determining a first reference point to write the color value; and traversing the image by taking the first reference point as a starting position, and in the traversing process, skipping the confusion color blocks based on the number of the confusion color blocks and the writing positions of the confusion color blocks in the image, and reading the at least one group of color values.
Here, when the encryption algorithm is another preset encryption algorithm and the bullet screen information is audio information, the decryption unit 23 decrypts the bullet screen information by using the decryption algorithm based on the key information, and further includes:
receiving audio, and reading at least one audio code from the audio; and converting the at least one group of audio codes into plaintext information according to a third conversion rule.
The reading of at least one audio code from audio comprises: reading audio data and acquiring a frequency queue of the audio; traversing the frequency queue to obtain a first frequency and a second frequency; converting the first frequency to a first audio encoding and the second frequency to a second audio encoding; determining a corresponding audio code according to the first audio code and the second audio code; and combining the audio codes to obtain the at least one group of audio codes.
The reading of the audio data and the obtaining of the frequency queue of the audio comprise: establishing an audio information object, and setting a sampling frequency in the audio information object; collecting the audio data based on the sampling frequency and storing the audio data into an array; and traversing the array, and converting each item of data in the array into corresponding frequency to form a frequency queue.
Said converting said at least one set of audio codes into plaintext information according to a third conversion rule comprises; splitting the audio code into at least one group of audio codes according to a preset extraction rule; determining the audio coding corresponding to each digit; converting the audio codes into at least one group of digital information based on the audio codes corresponding to each digit and each group of audio codes; converting the at least one set of digital information into a character code; and converting the character codes into the plaintext information.
After the decrypted plaintext information is obtained, the determining unit 22 is further configured to determine a file type of the plaintext information, and if the plaintext information is a character string of a character type, write the data into a document file; if it is other types of special files, such as: pictures, audio and video, the character strings are converted into corresponding data by using Base64 byte coding and are written into a file created before, and a complete decryption process is achieved.
Here, when the special bullet screen information is a picture, audio or video, since the plaintext information of the special bullet screen information has various encoded information, for example: since the plaintext information is converted into Base64 byte codes, the characters of different countries can be converted into a unified coding format, so that the occurrence of code confusion or situations which cannot be identified can be prevented, the Base64 byte codes require that 3 8-bit bytes (3 × 8 ═ 24) are converted into 4 6-bit bytes (4 × 6 ═ 24), and then two 0 s are supplemented in front of the 6 bits, so that a form of 8 bits and one byte is formed. If the remaining characters are less than 3 bytes, then 0 is used for padding, and the output character is used '═ so that 1 or 2' ═ can appear at the end of the text output after encoding.
The embodiment provided by the invention can bring the following beneficial effects:
the invention provides a method and a client for protecting bullet screen information, wherein the method comprises the following steps: the client receives bullet screen information; judging whether the bullet screen information is special bullet screen information or not, and receiving key information if the bullet screen information is the special bullet screen information; decrypting the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information; therefore, only the client corresponding to the advanced user can receive the key information, and then the special bullet screen information is decrypted based on the key information to watch the special bullet screen information; even if the client corresponding to the ordinary user receives the special barrage information, the special barrage information cannot be decrypted due to the fact that the key information cannot be received, and therefore plaintext information of the special barrage information cannot be obtained; this further increases the number of premium users and thus the revenue of the live platform. In addition, as the special barrage information is encrypted, even a hacker obtains the special barrage information, the special barrage information cannot be easily cracked, and the safety of data transmission is further ensured.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (9)

1. A method for protecting bullet screen information, the method comprising:
the client receives bullet screen information;
judging whether the bullet screen information is special bullet screen information or not, if so, receiving the key information sent by the server by the client of the advanced user, and not issuing the key information to the client of the common user by the server;
the client of the advanced user decrypts the bullet screen information by using a decryption algorithm based on the key information to obtain plaintext information of the bullet screen information, wherein the bullet screen information comprises: text information, image information, or audio information;
the decrypting the bullet screen information by using the decryption algorithm includes: receiving image information, and reading at least one group of color values from the image information, wherein the image is an encryption result obtained by encrypting plaintext information of the bullet screen information;
converting the at least one set of color values into digital information according to a second conversion rule;
converting the digital information into character codes;
converting the character code into the plaintext information;
converting the at least one set of color values into digital information according to a second conversion rule, comprising:
determining the maximum hierarchy corresponding to each color according to a formula
Figure DEST_PATH_IMAGE002
Determining a value A of the digital information; the maximum levels corresponding to each color are the same, R is red, G is green, B is blue, and C is the maximum level corresponding to each color.
2. The method of claim 1, wherein the determining whether the bullet screen information is special bullet screen information comprises:
acquiring an encryption mark bit of the bullet screen information;
and judging whether the encryption mark bit is a first encryption mark bit of the special bullet screen information, and if the encryption mark bit is the first encryption mark bit, determining that the bullet screen information is the special bullet screen information.
3. The method of claim 1, wherein decrypting the bullet screen information using a decryption algorithm comprises:
decrypting the bullet screen information by using a decryption algorithm tea. The encrypted popup message is the encrypted popup information, and the KEY is the KEY information.
4. The method of claim 1, wherein said decrypting the bullet screen information using a decryption algorithm further comprises:
extracting additional information from the ciphertext information of the special bullet screen information according to the key information;
combining the key information and the additional information to form a combined key;
and converting the ciphertext information into corresponding plaintext information by using the combined key.
5. The method of claim 4, wherein the extracting additional information from the ciphertext information based on the key information comprises:
determining an insertion position of the additional information in the ciphertext information based on the key information;
extracting the additional information at the insertion position of the ciphertext information.
6. The method of claim 5, wherein said determining an insertion location of said additional information in said ciphertext information based on said key information comprises:
determining a reference bit of the key information;
acquiring characters of the key information reference bits;
converting the character into a numerical value according to a preset first conversion rule;
determining the insertion location based on the value.
7. The method of claim 5, wherein the extracting additional information from the ciphertext information based on the key information, further comprises:
determining length information of the key information;
determining length information of the additional information based on length information of the key information;
extracting the additional information from the ciphertext information based on the length information.
8. The method of claim 1, wherein said decrypting the bullet screen information using a decryption algorithm further comprises:
receiving audio information, and reading at least one audio code from the audio information, wherein the audio is an encryption result obtained by encrypting plaintext information;
and converting the at least one group of audio codes into plaintext information according to a third conversion rule.
9. A client, the client comprising:
the receiving unit is used for receiving the bullet screen information;
the judging unit is used for judging whether the bullet screen information is special bullet screen information or not, if the bullet screen information is the special bullet screen information, the client of the advanced user receives the key information sent by the server, and for the client of the common user, the server does not send the key information to the client of the common user;
the decryption unit is used for decrypting the bullet screen information by the client of the advanced user through a decryption algorithm based on the key information to acquire plaintext information of the bullet screen information; wherein the bullet screen information comprises: text information, image information, or audio information;
the decrypting the bullet screen information by using the decryption algorithm includes: receiving image information, and reading at least one group of color values from the image information, wherein the image is an encryption result obtained by encrypting plaintext information of the bullet screen information;
converting the at least one set of color values into digital information according to a second conversion rule;
converting the digital information into character codes;
converting the character code into the plaintext information;
converting the at least one set of color values into digital information according to a second conversion rule, comprising:
determining the maximum hierarchy corresponding to each color according to a formula
Figure DEST_PATH_IMAGE004
Determining a value A of the digital information; the maximum levels corresponding to each color are the same, R is red, G is green, B is blue, and C is the maximum level corresponding to each color.
CN201710211330.9A 2017-03-31 2017-03-31 Method and client for protecting bullet screen information Active CN107105324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710211330.9A CN107105324B (en) 2017-03-31 2017-03-31 Method and client for protecting bullet screen information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710211330.9A CN107105324B (en) 2017-03-31 2017-03-31 Method and client for protecting bullet screen information

Publications (2)

Publication Number Publication Date
CN107105324A CN107105324A (en) 2017-08-29
CN107105324B true CN107105324B (en) 2020-10-16

Family

ID=59676190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710211330.9A Active CN107105324B (en) 2017-03-31 2017-03-31 Method and client for protecting bullet screen information

Country Status (1)

Country Link
CN (1) CN107105324B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108024121B (en) * 2017-11-17 2020-02-07 武汉微摇科技文化有限公司 Voice barrage synchronization method and system
CN108471557B (en) * 2018-03-28 2020-06-16 武汉斗鱼网络科技有限公司 Barrage broadcasting method, device, server and medium
CN110545452B (en) * 2018-05-28 2022-04-12 阿里巴巴集团控股有限公司 Network live broadcast method, device, terminal and server
CN114520923B (en) * 2020-11-20 2023-09-01 武汉斗鱼网络科技有限公司 Barrage information display method, first terminal, second terminal, medium and equipment
CN112995748A (en) * 2021-01-26 2021-06-18 浙江香侬慧语科技有限责任公司 Multi-mode-based automatic bullet screen generation method and system, storage medium and equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059098A1 (en) * 2000-11-16 2002-05-16 Shinichi Sazawa Method for managing an imaginary store, method for using the imaginary store, and recording medium in which an imaginary store managing program is stored
CN101582157B (en) * 2009-03-06 2012-06-06 中山大学 Adaptive spatial steganographic method based on adjacent pixel difference
CN103646068B (en) * 2013-12-04 2017-10-20 Tcl集团股份有限公司 Encryption method, decryption method, the method for sending bulk message and its corresponding intrument
CN105898456A (en) * 2015-12-02 2016-08-24 乐视网信息技术(北京)股份有限公司 Multimedia playback interaction method and device
CN106231115A (en) * 2016-08-29 2016-12-14 深圳市金立通信设备有限公司 A kind of information protecting method and terminal
CN106506487A (en) * 2016-11-03 2017-03-15 武汉斗鱼网络科技有限公司 A kind of information Encrypt and Decrypt method and device

Also Published As

Publication number Publication date
CN107105324A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN107105324B (en) Method and client for protecting bullet screen information
CN107155113B (en) Method and server for protecting bullet screen information
Marwaha et al. Visual cryptographic steganography in images
CN104680077B (en) Method for encrypting picture, method for viewing picture, system and terminal
EP2832102B1 (en) Methods and systems for cryptographic access control of video
JP6346942B2 (en) Blocking password attacks
CN108280356A (en) File encryption-decryption method, device, processing terminal and computer readable storage medium
CN101763397B (en) Device and method for processing expanding information in image file
KR101962275B1 (en) Encryption and decryption method for steganography data based on moving picture
US20220130282A1 (en) Method, apparatus, and computer-readable medium for format preserving encryption of a numerical value
CN113014580A (en) File transmission method and device, electronic equipment and storage medium
CN107481181B (en) Picture hiding method, restoration method and picture hiding system for protecting personal privacy
CN104966525A (en) File encryption method and apparatus, and file decryption method and apparatus
CN109194618A (en) A kind of file encrypting method, document encrypting apparatus and file encryption equipment
CN112399027B (en) Picture encryption and decryption method and device, storage medium and electronic equipment
Patel et al. Steganography over video file by hiding video in another video file, random byte hiding and LSB technique
CN114285575B (en) Image encryption and decryption method and device, storage medium and electronic device
KR20110073227A (en) Method, apparatus, server and recordable medium for encrypting and combining order info and contents info separated from personal info
US9571468B2 (en) Encoding data using a variable number of pixels and bits based on entropy
Nasution et al. Hybrid Cryptosystem Algorithm Vigenere Cipher and Base64 for Text Message Security Utilizing Least Significant Bit (LSB) Steganography as Insert into Image
Wadekar et al. A new approach to video steganography using pixel pattern matching and key segmentation
Ezhilarasi et al. Video Steganography and Security Cryptography
AU2021107010A4 (en) A method for an image steganography with an rsa encryption
CN103220140A (en) Encryption and decryption method, encryption and decryption device and electronic equipment
Kumar et al. Hiding the text messages of variable size using encryption and decryption algorithms in image steganography

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant